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

Function writeUserConfig

packages/pi-plugin/src/config/index.test.ts:49–57  ·  view source on GitHub ↗
(
	home: string,
	text: string,
	extension: "jsonc" | "json" = "jsonc",
)

Source from the content-addressed store, hash-verified

47}
48
49function writeUserConfig(
50 home: string,
51 text: string,
52 extension: "jsonc" | "json" = "jsonc",
53): string {
54 const path = join(home, ".config", "cortexkit", `magic-context.${extension}`);
55 writeConfig(path, text);
56 return path;
57}
58
59afterEach(() => {
60 if (originalHome === undefined) {

Callers 1

index.test.tsFile · 0.85

Calls 1

writeConfigFunction · 0.70

Tested by

no test coverage detected