Skip to content

Commit 2528c0e

Browse files
authored
The plugin doesn't contain the full file path, so we have to manipulate itFixes #1149 (#1162)
1 parent 9856b62 commit 2528c0e

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

website/src/scripts/modal.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,18 @@ function renderLocalPluginModal(
11801180
// Add click handlers to plugin items
11811181
modalContent.querySelectorAll(".collection-item").forEach((el) => {
11821182
el.addEventListener("click", () => {
1183-
const path = (el as HTMLElement).dataset.path;
1183+
let path = (el as HTMLElement).dataset.path;
11841184
const itemType = (el as HTMLElement).dataset.type;
1185+
1186+
switch (itemType) {
1187+
case "agent":
1188+
path = path.replace(".md", ".agent.md");
1189+
break;
1190+
case "skill":
1191+
path = `${path}/SKILL.md`;
1192+
break;
1193+
}
1194+
11851195
if (path && itemType) {
11861196
openFileModal(path, itemType);
11871197
}

0 commit comments

Comments
 (0)