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

Function stripInternalCtx

packages/agent-core/src/logging/logger.ts:329–334  ·  view source on GitHub ↗
(ctx: LogContext | undefined)

Source from the content-addressed store, hash-verified

327type InternalLogContext = LogContext & { [SESSION_LOG_ID]?: unknown };
328
329function stripInternalCtx(ctx: LogContext | undefined): LogContext | undefined {
330 if (ctx === undefined) return undefined;
331 if (!(SESSION_LOG_ID in ctx)) return ctx;
332 const { [SESSION_LOG_ID]: _internal, ...visible } = ctx as InternalLogContext;
333 return visible;
334}
335
336function makeGlobalSink(config: LoggingConfig): RotatingFileSink | undefined {
337 if (config.level === 'off') return undefined;

Callers 1

emitAtMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected