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

Function textOf

packages/agent-core/test/agent/compaction/micro.test.ts:956–965  ·  view source on GitHub ↗
(message: Message | undefined)

Source from the content-addressed store, hash-verified

954}
955
956function textOf(message: Message | undefined): string {
957 return (
958 message?.content
959 .map((part) => {
960 if (part.type === 'text') return part.text;
961 return '';
962 })
963 .join('') ?? ''
964 );
965}
966
967function hasMarker(messages: readonly Message[]): boolean {
968 return toolTexts(messages).includes(DEFAULT_MARKER);

Callers 2

micro.test.tsFile · 0.70
toolTextsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected