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

Method project

packages/agent-core/src/agent/context/index.ts:378–389  ·  view source on GitHub ↗
(messages: readonly ContextMessage[], options?: ProjectOptions)

Source from the content-addressed store, hash-verified

376 }
377
378 project(messages: readonly ContextMessage[], options?: ProjectOptions): Message[] {
379 const anomalies: ProjectionAnomaly[] = [];
380 const result = project(this.agent.microCompaction.compact(messages), {
381 ...options,
382 onAnomaly: (anomaly) => {
383 anomalies.push(anomaly);
384 options?.onAnomaly?.(anomaly);
385 },
386 });
387 this.reportProjectionRepairs(anomalies);
388 return result;
389 }
390
391 // Surface the projector's wire-repairs so a silently-mangled history leaves a
392 // trace instead of being papered over. Deduped by signature: a repair that

Callers 2

messagesMethod · 0.95
strictMessagesMethod · 0.95

Calls 4

projectFunction · 0.90
compactMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected