From ba7752f85d28e18c0019ded886feee28d271d297 Mon Sep 17 00:00:00 2001 From: Willie Date: Sat, 28 Feb 2026 20:14:29 +0800 Subject: [PATCH] feat(ui): enhance install skill picker with descriptions and into-dir field Include skill description from SKILL.md frontmatter in the discover API response, add the optional description field to the DiscoveredSkill TypeScript interface, and render it inline in the SkillPickerModal. Filter search also matches against descriptions. The --into directory input already existed in InstallForm, so no change was needed there. --- internal/server/handler_install.go | 2 +- ui/src/api/client.ts | 1 + ui/src/components/SkillPickerModal.tsx | 12 ++++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/internal/server/handler_install.go b/internal/server/handler_install.go index f9ed2fe50..093d28708 100644 --- a/internal/server/handler_install.go +++ b/internal/server/handler_install.go @@ -58,7 +58,7 @@ func (s *Server) handleDiscover(w http.ResponseWriter, r *http.Request) { skills := make([]map[string]string, len(discovery.Skills)) for i, sk := range discovery.Skills { - skills[i] = map[string]string{"name": sk.Name, "path": sk.Path} + skills[i] = map[string]string{"name": sk.Name, "path": sk.Path, "description": sk.Description} } writeJSON(w, map[string]any{ diff --git a/ui/src/api/client.ts b/ui/src/api/client.ts index 49898c9d1..1c13e7445 100644 --- a/ui/src/api/client.ts +++ b/ui/src/api/client.ts @@ -331,6 +331,7 @@ export interface SkillFileContent { export interface DiscoveredSkill { name: string; path: string; + description?: string; } export interface DiscoverResult { diff --git a/ui/src/components/SkillPickerModal.tsx b/ui/src/components/SkillPickerModal.tsx index 85b3cf826..de386d858 100644 --- a/ui/src/components/SkillPickerModal.tsx +++ b/ui/src/components/SkillPickerModal.tsx @@ -33,7 +33,10 @@ export default function SkillPickerModal({ if (!filter) return skills; const q = filter.toLowerCase(); return skills.filter( - (s) => s.name.toLowerCase().includes(q) || s.path.toLowerCase().includes(q), + (s) => + s.name.toLowerCase().includes(q) || + s.path.toLowerCase().includes(q) || + (s.description?.toLowerCase().includes(q) ?? false), ); }, [skills, filter]); @@ -162,7 +165,7 @@ export default function SkillPickerModal({ checked={selected.has(skill.path)} onChange={() => toggle(skill.path)} /> -
+
)} + {skill.description && ( + + {skill.description} + + )}
))}