mirror of
https://github.com/github/awesome-copilot.git
synced 2026-04-11 02:35:55 +00:00
This commit is contained in:
@@ -1180,8 +1180,18 @@ function renderLocalPluginModal(
|
||||
// Add click handlers to plugin items
|
||||
modalContent.querySelectorAll(".collection-item").forEach((el) => {
|
||||
el.addEventListener("click", () => {
|
||||
const path = (el as HTMLElement).dataset.path;
|
||||
let path = (el as HTMLElement).dataset.path;
|
||||
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) {
|
||||
openFileModal(path, itemType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user