mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Enable tools to cancel active execution.
- Plumbed abort signals through to tools - Updated the shell tool to properly cancel active requests by killing the entire child process tree of the underlying shell process and then report that the shell itself was canceled. Fixes https://b.corp.google.com/issues/416829935
This commit is contained in:
committed by
N. Taylor Mullen
parent
090198a7d6
commit
6b518dc9e4
@@ -150,7 +150,10 @@ export class WriteFileTool extends BaseTool<WriteFileToolParams, ToolResult> {
|
||||
return confirmationDetails;
|
||||
}
|
||||
|
||||
async execute(params: WriteFileToolParams): Promise<ToolResult> {
|
||||
async execute(
|
||||
params: WriteFileToolParams,
|
||||
_signal: AbortSignal,
|
||||
): Promise<ToolResult> {
|
||||
const validationError = this.validateParams(params);
|
||||
if (validationError) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user