MCPcopy Create free account
hub / github.com/Tencent/teamai-cli / removeSlugMapEntry

Function removeSlugMapEntry

src/skill-command.ts:131–140  ·  view source on GitHub ↗
(targetSkillsDir: string, slug: string)

Source from the content-addressed store, hash-verified

129}
130
131async function removeSlugMapEntry(targetSkillsDir: string, slug: string): Promise<void> {
132 const map = await readSlugMap(targetSkillsDir);
133 if (!(slug in map)) return;
134 delete map[slug];
135 if (Object.keys(map).length === 0) {
136 await remove(slugMapPath(targetSkillsDir));
137 } else {
138 await writeJson(slugMapPath(targetSkillsDir), map);
139 }
140}
141
142/**
143 * Decompress a skill ZIP and install it under `targetSkillsDir/`.

Callers 1

executeSkillCommandFunction · 0.85

Calls 4

readSlugMapFunction · 0.85
slugMapPathFunction · 0.85
writeJsonFunction · 0.85
removeFunction · 0.70

Tested by

no test coverage detected