Function
toolEvent
(
callID: string,
tool: string,
state: Record<string, unknown>,
)
Source from the content-addressed store, hash-verified
| 184 | }) |
| 185 | |
| 186 | function toolEvent( |
| 187 | callID: string, |
| 188 | tool: string, |
| 189 | state: Record<string, unknown>, |
| 190 | ): OpencodeStreamEvent { |
| 191 | return { |
| 192 | kind: 'event', |
| 193 | event: { |
| 194 | type: 'message.part.updated', |
| 195 | properties: { |
| 196 | part: { |
| 197 | id: `part-${callID}`, |
| 198 | sessionID: 'sess-1', |
| 199 | type: 'tool', |
| 200 | callID, |
| 201 | tool, |
| 202 | state: state as never, |
| 203 | }, |
| 204 | }, |
| 205 | }, |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | it('pairs a tool call across running and completed states', async () => { |
| 210 | const chunks = await collect([ |
Tested by
no test coverage detected