From 738c2692fb9bdeda7c801e7b4e773f81ebc1ded0 Mon Sep 17 00:00:00 2001 From: Taylor Mullen Date: Mon, 21 Apr 2025 14:32:18 -0400 Subject: Fix confirmations. - This fixes what it means to get confirmations in GC. Prior to this they had just been accidentally unwired as part of all of the refactorings to turns + to server/core. - The key piece of this is that we wrap the onConfirm in the gemini stream hook in order to resubmit function responses. This isn't 100% ideal but gets the job done for now. - Fixed history not updating properly with confirmations. Fixes https://b.corp.google.com/issues/412323656 --- .../cli/src/ui/components/messages/ToolMessage.tsx | 34 ---------------------- 1 file changed, 34 deletions(-) (limited to 'packages/cli/src/ui/components/messages/ToolMessage.tsx') diff --git a/packages/cli/src/ui/components/messages/ToolMessage.tsx b/packages/cli/src/ui/components/messages/ToolMessage.tsx index f33ed6cb..f21e1d28 100644 --- a/packages/cli/src/ui/components/messages/ToolMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolMessage.tsx @@ -11,11 +11,6 @@ import { IndividualToolCallDisplay, ToolCallStatus } from '../../types.js'; import { DiffRenderer } from './DiffRenderer.js'; import { FileDiff, ToolResultDisplay } from '../../../tools/tools.js'; import { Colors } from '../../colors.js'; -import { - ToolCallConfirmationDetails, - ToolEditConfirmationDetails, - ToolExecuteConfirmationDetails, -} from '@gemini-code/server'; export const ToolMessage: React.FC = ({ callId, @@ -23,12 +18,7 @@ export const ToolMessage: React.FC = ({ description, resultDisplay, status, - confirmationDetails, }) => { - // Explicitly type the props to help the type checker - const typedConfirmationDetails = confirmationDetails as - | ToolCallConfirmationDetails - | undefined; const typedResultDisplay = resultDisplay as ToolResultDisplay | undefined; let color = Colors.SubtleComment; @@ -78,30 +68,6 @@ export const ToolMessage: React.FC = ({ : ` - ${description}`} - {status === ToolCallStatus.Confirming && typedConfirmationDetails && ( - - {/* Display diff for edit/write */} - {'fileDiff' in typedConfirmationDetails && ( - - )} - {/* Display command for execute */} - {'command' in typedConfirmationDetails && ( - - Command:{' '} - { - (typedConfirmationDetails as ToolExecuteConfirmationDetails) - .command - } - - )} - {/* */} - - )} {status === ToolCallStatus.Success && typedResultDisplay && ( {typeof typedResultDisplay === 'string' ? ( -- cgit v1.2.3