(signal?: AbortSignal, stream?: StreamedMessage)
| 264 | } |
| 265 | |
| 266 | async function throwIfAborted(signal?: AbortSignal, stream?: StreamedMessage): Promise<void> { |
| 267 | if (!signal?.aborted) { |
| 268 | return; |
| 269 | } |
| 270 | |
| 271 | if (stream !== undefined) { |
| 272 | await cancelStream(stream); |
| 273 | } |
| 274 | |
| 275 | throwAbortError(); |
| 276 | } |
| 277 | |
| 278 | /** True when `pending` is a ToolCall whose _streamIndex equals `index`. */ |
| 279 | function isPendingToolCallAtIndex( |
no test coverage detected