From f0b9199a772d23f8c9375c8cd627da345bc205ae Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Sat, 17 May 2025 23:04:26 -0700 Subject: [PATCH] refactor: Remove console.error from WriteFileTool - Removes an unnecessary `console.error` call from the `shouldConfirmExecute` method in the `WriteFileTool` class. - This logging was redundant as validation errors are already handled and returned by the method. - Additionally, `console.error` is not suitable for this scenario, as incorrect arguments can be provided by the LLM, and these are anticipated and managed without needing an error log. Fixes https://b.corp.google.com/issues/418491206 --- packages/server/src/tools/write-file.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/server/src/tools/write-file.ts b/packages/server/src/tools/write-file.ts index c628ce75..c9f95ea9 100644 --- a/packages/server/src/tools/write-file.ts +++ b/packages/server/src/tools/write-file.ts @@ -132,9 +132,6 @@ export class WriteFileTool extends BaseTool { const validationError = this.validateToolParams(params); if (validationError) { - console.error( - `[WriteFile Wrapper] Attempted confirmation with invalid parameters: ${validationError}`, - ); return false; }