Improve in-flight cancel latency via run abort signal propagation
This commit is contained in:
@@ -700,6 +700,7 @@ Cancel the current agent operation.
|
||||
|
||||
Used by the web dashboard/chat stop button and channel-level `/stop` / `/cancel` command fast-paths.
|
||||
Cancellation is best-effort and stops at the next agent/tool-loop safe point.
|
||||
Flynn now propagates a run-level abort signal into model/tool execution, so providers/tools that honor `AbortSignal` typically stop promptly instead of waiting for request/tool timeouts.
|
||||
|
||||
### Node Methods
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ export interface ToolExecutionContext {
|
||||
}
|
||||
```
|
||||
|
||||
`signal` is wired to run-level cancellation (`agent.cancel`, `/stop`, `/cancel`) and tool timeout. Tools should honor it for fast cooperative aborts.
|
||||
|
||||
### ToolResult
|
||||
|
||||
```typescript
|
||||
|
||||
Reference in New Issue
Block a user