From 37dabd873af7a04951c0d831b42012308a160655 Mon Sep 17 00:00:00 2001 From: Philippe GRANGER Date: Wed, 4 Feb 2026 16:16:36 +0100 Subject: [PATCH] fix(confirmation): use type guard for ToolConfirmationPayload union type Replace direct property access with 'in' operator to properly narrow the union type, fixing TypeScript compilation error. --- packages/core/src/scheduler/confirmation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/scheduler/confirmation.ts b/packages/core/src/scheduler/confirmation.ts index 5f2e1d1bc1..3d1ef3b46c 100644 --- a/packages/core/src/scheduler/confirmation.ts +++ b/packages/core/src/scheduler/confirmation.ts @@ -171,7 +171,7 @@ export async function resolveConfirmation( // This prevents the infinite loop issue reported in #7669 outcome = ToolConfirmationOutcome.Cancel; } - } else if (response.payload?.newContent) { + } else if (response.payload && 'newContent' in response.payload) { await handleInlineModification(deps, toolCall, response.payload, signal); outcome = ToolConfirmationOutcome.ProceedOnce; }