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

Function redactString

packages/agent-core/src/logging/formatter.ts:111–117  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

109}
110
111function redactString(value: string): string {
112 let out = value;
113 for (const pattern of RAW_SECRET_PATTERNS) {
114 out = out.replace(pattern, `$1${REDACTED}`);
115 }
116 return out;
117}
118
119function quote(value: string): string {
120 return `"${value.replaceAll('\\', '\\\\').replaceAll('"', '\\"').replaceAll('\n', '\\n')}"`;

Callers 2

serializeValueFunction · 0.85
formatEntryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected