()
| 30 | chunks: (string | { toolName: string; input: Record<string, unknown> })[], |
| 31 | ): AsyncGenerator<StreamChunk, PromptResult<string | null>> { |
| 32 | async function* generator(): AsyncGenerator< |
| 33 | StreamChunk, |
| 34 | PromptResult<string | null> |
| 35 | > { |
| 36 | for (const chunk of chunks) { |
| 37 | if (typeof chunk === 'string') { |
| 38 | yield { type: 'text' as const, text: chunk } |
| 39 | } else { |
| 40 | yield createToolCallChunk(chunk.toolName, chunk.input) |
| 41 | } |
| 42 | } |
| 43 | return promptSuccess('mock-message-id') |
| 44 | } |
| 45 | return generator() |
| 46 | } |
| 47 |
no test coverage detected