(overrides: Partial<TranslateContext> = {})
| 13 | import type { StreamChunk } from '@tanstack/ai' |
| 14 | |
| 15 | function makeCtx(overrides: Partial<TranslateContext> = {}): TranslateContext { |
| 16 | let id = 0 |
| 17 | return { |
| 18 | model: 'anthropic/claude-sonnet-4-5', |
| 19 | runId: 'run-1', |
| 20 | threadId: 'thread-1', |
| 21 | genId: () => `gen-${++id}`, |
| 22 | ...overrides, |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | async function* fromArray( |
| 27 | events: Array<OpencodeStreamEvent>, |
no outgoing calls
no test coverage detected