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

Function assertNonConfigWrite

apps/kimi-code/src/utils/persistence.ts:20–26  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

18}
19
20function assertNonConfigWrite(filePath: string): void {
21 if (basename(filePath) === 'config.toml') {
22 throw new Error(
23 'CLI persistence helpers must not write config.toml; use core/SDK config APIs.',
24 );
25 }
26}
27
28function tempPathFor(filePath: string): string {
29 const dir = dirname(filePath);

Callers 2

writeJsonFileFunction · 0.85
appendJsonlLineFunction · 0.85

Calls 1

basenameFunction · 0.85

Tested by

no test coverage detected