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

Function mergeCtx

packages/agent-core/src/logging/logger.ts:390–398  ·  view source on GitHub ↗
(
  payloadCtx: LogContext | undefined,
  boundCtx: LogContext,
)

Source from the content-addressed store, hash-verified

388}
389
390function mergeCtx(
391 payloadCtx: LogContext | undefined,
392 boundCtx: LogContext,
393): LogContext | undefined {
394 const boundHasKeys = Object.keys(boundCtx).length > 0;
395 if (!boundHasKeys) return payloadCtx;
396 if (payloadCtx === undefined) return { ...boundCtx };
397 return { ...payloadCtx, ...boundCtx };
398}
399
400/**
401 * Root logger. Import and use directly for events that don't belong to any

Callers 1

emitAtMethod · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected