* Output for an aborted tool call. When the abort carries a user-cancellation * reason (the user pressed stop), say so explicitly so the model treats it as a * deliberate interruption instead of a system fault to theorise about or retry. * Any other abort keeps the neutral wording.
(toolName: string, signal: AbortSignal)
| 55 | * Any other abort keeps the neutral wording. |
| 56 | */ |
| 57 | function abortedToolOutput(toolName: string, signal: AbortSignal): string { |
| 58 | if (isUserCancellation(signal.reason)) { |
| 59 | return `The user manually interrupted "${toolName}" (and anything else running at the same time). This was a deliberate user action, not a system error, timeout, or capacity limit. Do not retry automatically or guess at the cause — wait for the user's next instruction.`; |
| 60 | } |
| 61 | return `Tool "${toolName}" was aborted`; |
| 62 | } |
| 63 | |
| 64 | export interface ToolCallStepContext { |
| 65 | readonly tools?: readonly ExecutableTool[] | undefined; |
no test coverage detected