(context: StreamingContext)
| 1013 | } |
| 1014 | |
| 1015 | function cancelPendingTools(context: StreamingContext): void { |
| 1016 | for (const [, toolCall] of context.toolCalls) { |
| 1017 | if (toolCall.status === 'pending' || toolCall.status === 'executing') { |
| 1018 | setTerminalToolCallState(toolCall, { |
| 1019 | status: MothershipStreamV1ToolOutcome.cancelled, |
| 1020 | error: 'Stopped by user', |
| 1021 | }) |
| 1022 | } |
| 1023 | } |
| 1024 | } |
| 1025 | |
| 1026 | function isRetryableStreamError(error: unknown): boolean { |
| 1027 | if (error instanceof DOMException && error.name === 'AbortError') { |
no test coverage detected