MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getSourceSubtitle

Function getSourceSubtitle

src/components/skills/SkillsMenu.tsx:33–46  ·  view source on GitHub ↗
(source: SkillSource, skills: SkillCommand[])

Source from the content-addressed store, hash-verified

31 return `${capitalize(getSettingSourceName(source))} skills`;
32}
33function 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}
47export function SkillsMenu(t0) {
48 const $ = _c(35);
49 const {

Callers 1

SkillsMenuFunction · 0.85

Calls 2

getDisplayPathFunction · 0.85
getSkillsPathFunction · 0.85

Tested by

no test coverage detected