(source: SkillSource, skills: SkillCommand[])
| 31 | return `${capitalize(getSettingSourceName(source))} skills`; |
| 32 | } |
| 33 | function getSourceSubtitle(source: SkillSource, skills: SkillCommand[]): string | undefined { |
| 34 | // MCP skills show server names; file-based skills show filesystem paths. |
| 35 | // Skill names are `<server>:<skill>`, not `mcp__<server>__…`. |
| 36 | if (source === 'mcp') { |
| 37 | const servers = [...new Set(skills.map(s => { |
| 38 | const idx = s.name.indexOf(':'); |
| 39 | return idx > 0 ? s.name.slice(0, idx) : null; |
| 40 | }).filter((n): n is string => n != null))]; |
| 41 | return servers.length > 0 ? servers.join(', ') : undefined; |
| 42 | } |
| 43 | const skillsPath = getDisplayPath(getSkillsPath(source, 'skills')); |
| 44 | const hasCommandsSkills = skills.some(s => s.loadedFrom === 'commands_DEPRECATED'); |
| 45 | return hasCommandsSkills ? `${skillsPath}, ${getDisplayPath(getSkillsPath(source, 'commands'))}` : skillsPath; |
| 46 | } |
| 47 | export function SkillsMenu(t0) { |
| 48 | const $ = _c(35); |
| 49 | const { |
no test coverage detected