( toolCall: Pick<ToolCallState, 'id' | 'status' | 'error'> )
| 45 | } |
| 46 | |
| 47 | export function requireToolCallError( |
| 48 | toolCall: Pick<ToolCallState, 'id' | 'status' | 'error'> |
| 49 | ): string { |
| 50 | if (typeof toolCall.error === 'string' && toolCall.error.length > 0) { |
| 51 | return toolCall.error |
| 52 | } |
| 53 | |
| 54 | throw new Error( |
| 55 | `Terminal tool call ${toolCall.id} is missing a canonical error for status ${toolCall.status}` |
| 56 | ) |
| 57 | } |
| 58 | |
| 59 | export function getToolCallTerminalData( |
| 60 | toolCall: Pick<ToolCallState, 'id' | 'status' | 'result' | 'error'> |
no outgoing calls
no test coverage detected