Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Aaron Powell
2026-02-10 14:31:07 +11:00
committed by GitHub
parent 4ddc77bb36
commit 6210128ab1
4 changed files with 26 additions and 5 deletions

View File

@@ -159,6 +159,10 @@ function getDisplayName(filePath, kind) {
} else if (kind === "instruction") {
return basename.replace(".instructions.md", "");
} else if (kind === "hook") {
// For folder-based hooks like hooks/<hook>/README.md, use the folder name.
if (basename.toLowerCase() === "readme.md") {
return path.basename(path.dirname(filePath));
}
return basename.replace(".hook.md", "");
} else if (kind === "skill") {
return path.basename(filePath);