From 67309ba34b816bebfe5e8c645c66880de70537a8 Mon Sep 17 00:00:00 2001 From: yiliang114 <1204183885@qq.com> Date: Fri, 10 Apr 2026 01:13:04 +0800 Subject: [PATCH] fix: persist ProceedAlways permission outcome in compact mode Compact mode confirmation dialog uses ProceedAlways for "Allow always" option, but persistPermissionOutcome() only handled ProceedAlwaysProject and ProceedAlwaysUser, causing the permission to never be saved. Now ProceedAlways is treated as project scope (same as ProceedAlwaysProject). --- packages/core/src/core/permission-helpers.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/core/src/core/permission-helpers.ts b/packages/core/src/core/permission-helpers.ts index 82d960bd6ca..cafe985e593 100644 --- a/packages/core/src/core/permission-helpers.ts +++ b/packages/core/src/core/permission-helpers.ts @@ -174,6 +174,7 @@ export async function persistPermissionOutcome( payload?: ToolConfirmationPayload, ): Promise { if ( + outcome !== ToolConfirmationOutcome.ProceedAlways && outcome !== ToolConfirmationOutcome.ProceedAlwaysProject && outcome !== ToolConfirmationOutcome.ProceedAlwaysUser ) { @@ -181,9 +182,9 @@ export async function persistPermissionOutcome( } const scope = - outcome === ToolConfirmationOutcome.ProceedAlwaysProject - ? 'project' - : 'user'; + outcome === ToolConfirmationOutcome.ProceedAlwaysUser + ? 'user' + : 'project'; // Read permissionRules from the stored confirmation details first, // falling back to payload for backward compatibility.