From f934f018818f3f66e0a141fe9bbccdd03254f191 Mon Sep 17 00:00:00 2001 From: Allen Hutchison Date: Fri, 24 Oct 2025 16:22:02 -0700 Subject: [PATCH] fix(tools): ReadFile no longer shows confirmation when message bus is off (#12003) --- packages/core/src/tools/tools.ts | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/packages/core/src/tools/tools.ts b/packages/core/src/tools/tools.ts index 4ea20de673..a69856cd72 100644 --- a/packages/core/src/tools/tools.ts +++ b/packages/core/src/tools/tools.ts @@ -114,27 +114,13 @@ export abstract class BaseToolInvocation< /** * Subclasses should override this method to provide custom confirmation UI * when the policy engine's decision is 'ASK_USER'. - * The base implementation provides a generic confirmation prompt. + * The base implementation returns false (no confirmation needed). + * Only tools that need confirmation (e.g., write, execute tools) should override this. */ protected async getConfirmationDetails( _abortSignal: AbortSignal, ): Promise { - const confirmationDetails: ToolCallConfirmationDetails = { - type: 'info', - title: `Confirm: ${this._toolDisplayName || this._toolName}`, - prompt: this.getDescription(), - onConfirm: async (outcome: ToolConfirmationOutcome) => { - if (outcome === ToolConfirmationOutcome.ProceedAlways) { - if (this.messageBus && this._toolName) { - this.messageBus.publish({ - type: MessageBusType.UPDATE_POLICY, - toolName: this._toolName, - }); - } - } - }, - }; - return confirmationDetails; + return false; } protected getMessageBusDecision(