mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-13 11:45:56 +00:00
This commit is contained in:
@@ -1180,8 +1180,18 @@ function renderLocalPluginModal(
|
|||||||
// Add click handlers to plugin items
|
// Add click handlers to plugin items
|
||||||
modalContent.querySelectorAll(".collection-item").forEach((el) => {
|
modalContent.querySelectorAll(".collection-item").forEach((el) => {
|
||||||
el.addEventListener("click", () => {
|
el.addEventListener("click", () => {
|
||||||
const path = (el as HTMLElement).dataset.path;
|
let path = (el as HTMLElement).dataset.path;
|
||||||
const itemType = (el as HTMLElement).dataset.type;
|
const itemType = (el as HTMLElement).dataset.type;
|
||||||
|
|
||||||
|
switch (itemType) {
|
||||||
|
case "agent":
|
||||||
|
path = path.replace(".md", ".agent.md");
|
||||||
|
break;
|
||||||
|
case "skill":
|
||||||
|
path = `${path}/SKILL.md`;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (path && itemType) {
|
if (path && itemType) {
|
||||||
openFileModal(path, itemType);
|
openFileModal(path, itemType);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user