( text: string, toolCalls: ToolCall[] = [], thinkText?: string, )
| 25 | } |
| 26 | |
| 27 | function 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 | |
| 44 | function toolMsg(callId: string, text: string): ContextMessage { |
| 45 | return { |
no test coverage detected