MCPcopy Create free account
hub / github.com/Noumena-Network/code / buildNamespace

Function buildNamespace

src/skills/loadSkillsDir.ts:529–540  ·  view source on GitHub ↗
(targetDir: string, baseDir: string)

Source from the content-addressed store, hash-verified

527}
528
529function buildNamespace(targetDir: string, baseDir: string): string {
530 const normalizedBaseDir = baseDir.endsWith(pathSep)
531 ? baseDir.slice(0, -1)
532 : baseDir
533
534 if (targetDir === normalizedBaseDir) {
535 return ''
536 }
537
538 const relativePath = targetDir.slice(normalizedBaseDir.length + 1)
539 return relativePath ? relativePath.split(pathSep).join(':') : ''
540}
541
542function getSkillCommandName(filePath: string, baseDir: string): string {
543 const skillDirectory = dirname(filePath)

Callers 2

getSkillCommandNameFunction · 0.70
getRegularCommandNameFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected