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

Function collect

packages/agent-core/src/profile/context.ts:66–74  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

64 const seen = new Set<string>();
65
66 const collect = async (path: string): Promise<boolean> => {
67 const file = await readAgentFile(kaos, path);
68 if (file === undefined) return false;
69 const key = kaos.normpath(file.path);
70 if (seen.has(key)) return false;
71 seen.add(key);
72 discovered.push(file);
73 return true;
74 };
75
76 // User-level files come first so any project-level AGENTS.md overrides them.
77 // The brand dir follows KIMI_CODE_HOME (default ~/.kimi-code); the generic

Callers 1

loadAgentsMdForRootsFunction · 0.70

Calls 5

readAgentFileFunction · 0.85
normpathMethod · 0.65
hasMethod · 0.65
addMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected