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

Function assistantMsg

apps/kimi-code/test/tui/export-markdown.test.ts:27–42  ·  view source on GitHub ↗
(
  text: string,
  toolCalls: ToolCall[] = [],
  thinkText?: string,
)

Source from the content-addressed store, hash-verified

25}
26
27function assistantMsg(
28 text: string,
29 toolCalls: ToolCall[] = [],
30 thinkText?: string,
31): ContextMessage {
32 const content: ContentPart[] = [];
33 if (thinkText !== undefined) {
34 content.push({ type: 'think', think: thinkText });
35 }
36 content.push({ type: 'text', text });
37 return {
38 role: 'assistant',
39 content,
40 toolCalls,
41 };
42}
43
44function toolMsg(callId: string, text: string): ContextMessage {
45 return {

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected