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

Function createReadToolKaos

packages/agent-core/test/session/init.test.ts:690–711  ·  view source on GitHub ↗
(cwd: string, content: string)

Source from the content-addressed store, hash-verified

688}
689
690function createReadToolKaos(cwd: string, content: string): Kaos {
691 return createFakeKaos({
692 getcwd: () => cwd,
693 stat: async () =>
694 ({
695 stMode: 0o100644,
696 stIno: 1,
697 stDev: 1,
698 stNlink: 1,
699 stUid: 0,
700 stGid: 0,
701 stSize: content.length,
702 stAtime: 0,
703 stMtime: 0,
704 stCtime: 0,
705 }) satisfies StatResult,
706 readBytes: async () => Buffer.from(content),
707 readLines: async function* () {
708 yield content;
709 },
710 });
711}
712
713function registerLookupNoteTool(agent: Agent): void {
714 agent.tools.registerUserTool({

Callers 1

init.test.tsFile · 0.85

Calls 1

createFakeKaosFunction · 0.90

Tested by

no test coverage detected