MCPcopy Create free account
hub / github.com/cortexkit/magic-context / writeHealthyFiles

Function writeHealthyFiles

packages/cli/src/commands/doctor-pi.test.ts:86–102  ·  view source on GitHub ↗
(agentDir: string, cwd: string)

Source from the content-addressed store, hash-verified

84}
85
86function writeHealthyFiles(agentDir: string, cwd: string): void {
87 writeFileSync(
88 join(agentDir, "settings.json"),
89 JSON.stringify({
90 packages: ["npm:@cortexkit/pi-magic-context", "npm:other-pi-extension"],
91 }),
92 );
93 const configHome = process.env.XDG_CONFIG_HOME ?? join(process.env.HOME ?? "", ".config");
94 writeFileSync(
95 join(configHome, "cortexkit", "magic-context.jsonc"),
96 JSON.stringify({ embedding: { provider: "local" } }),
97 );
98 writeFileSync(
99 join(cwd, ".cortexkit", "magic-context.jsonc"),
100 JSON.stringify({ enabled: true }),
101 );
102}
103
104function createMockDb(): Database {
105 const db = new Database(":memory:");

Callers 1

doctor-pi.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected