mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-14 08:01:02 -07:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user