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

Function textOf

packages/agent-core/test/agent/context.test.ts:79–80  ·  view source on GitHub ↗
(message: ContextMessage)

Source from the content-addressed store, hash-verified

77 ]);
78
79 const textOf = (message: ContextMessage): string =>
80 message.content.map((part) => (part.type === 'text' ? part.text : '')).join('');
81
82 expect(ctx.agent.context.history.map(({ role, origin }) => ({ role, origin }))).toEqual([
83 { role: 'user', origin: { kind: 'injection', variant: 'image_compression' } },

Callers 1

context.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected