From 4e3ba687a6bd37ba387edfc3db88467e47c7775f Mon Sep 17 00:00:00 2001
From: Brandon Keiji <brandonkeiji@google.com>
Date: Thu, 22 May 2025 06:00:36 +0000
Subject: fix: forward entire tool call confirmation object through
 useToolScheduler (#481)

---
 .../cli/src/ui/components/messages/ToolConfirmationMessage.tsx   | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

(limited to 'packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx')

diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
index 19b1841a..0606856f 100644
--- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
+++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
@@ -10,7 +10,6 @@ import { DiffRenderer } from './DiffRenderer.js';
 import { Colors } from '../../colors.js';
 import {
   ToolCallConfirmationDetails,
-  ToolEditConfirmationDetails,
   ToolConfirmationOutcome,
   ToolExecuteConfirmationDetails,
 } from '@gemini-code/server';
@@ -23,12 +22,6 @@ export interface ToolConfirmationMessageProps {
   confirmationDetails: ToolCallConfirmationDetails;
 }
 
-function isEditDetails(
-  props: ToolCallConfirmationDetails,
-): props is ToolEditConfirmationDetails {
-  return (props as ToolEditConfirmationDetails).fileName !== undefined;
-}
-
 export const ToolConfirmationMessage: React.FC<
   ToolConfirmationMessageProps
 > = ({ confirmationDetails }) => {
@@ -49,7 +42,7 @@ export const ToolConfirmationMessage: React.FC<
     RadioSelectItem<ToolConfirmationOutcome>
   >();
 
-  if (isEditDetails(confirmationDetails)) {
+  if (confirmationDetails.type === 'edit') {
     // Body content is now the DiffRenderer, passing filename to it
     // The bordered box is removed from here and handled within DiffRenderer
     bodyContent = (
-- 
cgit v1.2.3

