diff options
| author | Taylor Mullen <[email protected]> | 2025-04-18 19:09:41 -0400 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-04-18 19:14:36 -0400 |
| commit | 40e11e053c1cf304255c21f91e950c520285c6c5 (patch) | |
| tree | a2897d6236641d30b7a1014466967edf6e298ba1 /packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx | |
| parent | 2a850ed0511033ffa88b450643d79bb47ae18693 (diff) | |
Fix remaining tslint errors (YAY).
- Also updated ci.yml to ensure that linting failures will break the build.
Fully fixes https://b.corp.google.com/issues/411384603
Diffstat (limited to 'packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx index 59c2cc42..15c99850 100644 --- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx @@ -6,9 +6,9 @@ import { ToolEditConfirmationDetails, ToolConfirmationOutcome, ToolExecuteConfirmationDetails, -} from '../../types.js'; // Adjust path as needed +} from '../../types.js'; import { PartListUnion } from '@google/genai'; -import DiffRenderer from './DiffRenderer.js'; +import { DiffRenderer } from './DiffRenderer.js'; import { UI_WIDTH } from '../../constants.js'; export interface ToolConfirmationMessageProps { @@ -27,9 +27,9 @@ interface InternalOption { value: ToolConfirmationOutcome; } -const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({ - confirmationDetails, -}) => { +export const ToolConfirmationMessage: React.FC< + ToolConfirmationMessageProps +> = ({ confirmationDetails }) => { const { onConfirm } = confirmationDetails; useInput((_, key) => { @@ -42,14 +42,11 @@ const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({ onConfirm(item.value); }; - let title: string; let bodyContent: React.ReactNode | null = null; // Removed contextDisplay here let question: string; const options: InternalOption[] = []; if (isEditDetails(confirmationDetails)) { - title = 'Edit'; // Title for the outer box - // Body content is now the DiffRenderer, passing filename to it // The bordered box is removed from here and handled within DiffRenderer bodyContent = <DiffRenderer diffContent={confirmationDetails.fileDiff} />; @@ -69,7 +66,6 @@ const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({ } else { const executionProps = confirmationDetails as ToolExecuteConfirmationDetails; - title = 'Execute Command'; // Title for the outer box // For execution, we still need context display and description const commandDisplay = <Text color="cyan">{executionProps.command}</Text>; @@ -118,5 +114,3 @@ const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({ </Box> ); }; - -export default ToolConfirmationMessage; |
