From 6b518dc9e4c601c0108768932dc1450c036075fd Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Fri, 9 May 2025 23:29:02 -0700 Subject: 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 --- packages/server/src/tools/edit.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'packages/server/src/tools/edit.ts') diff --git a/packages/server/src/tools/edit.ts b/packages/server/src/tools/edit.ts index c40b9e44..fd57d97d 100644 --- a/packages/server/src/tools/edit.ts +++ b/packages/server/src/tools/edit.ts @@ -333,7 +333,10 @@ Expectation for parameters: * @param params Parameters for the edit operation * @returns Result of the edit operation */ - async execute(params: EditToolParams): Promise { + async execute( + params: EditToolParams, + _signal: AbortSignal, + ): Promise { const validationError = this.validateParams(params); if (validationError) { return { -- cgit v1.2.3