From 2528c0e755720162e69daa72cce83eb67ce27ee7 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 25 Mar 2026 09:40:11 +1100 Subject: [PATCH] The plugin doesn't contain the full file path, so we have to manipulate itFixes #1149 (#1162) --- website/src/scripts/modal.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/website/src/scripts/modal.ts b/website/src/scripts/modal.ts index 9000216e..e29df3da 100644 --- a/website/src/scripts/modal.ts +++ b/website/src/scripts/modal.ts @@ -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); }