( events: Array<OpencodeStreamEvent>, ctx: TranslateContext = makeCtx(), )
| 30 | } |
| 31 | |
| 32 | async function collect( |
| 33 | events: Array<OpencodeStreamEvent>, |
| 34 | ctx: TranslateContext = makeCtx(), |
| 35 | ): Promise<Array<StreamChunk>> { |
| 36 | const chunks: Array<StreamChunk> = [] |
| 37 | for await (const chunk of translateOpencodeStream(fromArray(events), ctx)) { |
| 38 | chunks.push(chunk) |
| 39 | } |
| 40 | return chunks |
| 41 | } |
| 42 | |
| 43 | const session: OpencodeStreamEvent = { kind: 'session', sessionId: 'sess-1' } |
| 44 |
no test coverage detected