MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / pushFirstExisting

Function pushFirstExisting

packages/agent-core/src/skill/scanner.ts:278–289  ·  view source on GitHub ↗
(
  out: SkillRoot[],
  dirs: readonly string[],
  base: string,
  source: SkillSource,
  isDir: (p: string) => Promise<boolean>,
  realpath: (p: string) => Promise<string>,
)

Source from the content-addressed store, hash-verified

276}
277
278async function pushFirstExisting(
279 out: SkillRoot[],
280 dirs: readonly string[],
281 base: string,
282 source: SkillSource,
283 isDir: (p: string) => Promise<boolean>,
284 realpath: (p: string) => Promise<string>,
285): Promise<void> {
286 for (const dir of dirs) {
287 if (await pushExistingRoot(out, path.join(base, dir), source, isDir, realpath)) return;
288 }
289}
290
291async function pushBrandGroup(
292 out: SkillRoot[],

Callers 2

resolveSkillRootsFunction · 0.85
pushBrandGroupFunction · 0.85

Calls 1

pushExistingRootFunction · 0.85

Tested by

no test coverage detected