From 7087c0508ea9260abaa31b0cd8f206d3b11cf21b Mon Sep 17 00:00:00 2001 From: Olcan Date: Fri, 25 Apr 2025 14:05:58 -0700 Subject: more consistent confirmations, TODO to improve write confirmations, drop "description" from execution confirmation, add confirmation to new (still dummy) shell tool (#176) --- .../ui/components/messages/ToolConfirmationMessage.tsx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 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 9f65f1b9..19ccb466 100644 --- a/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx @@ -60,11 +60,11 @@ export const ToolConfirmationMessage: React.FC< question = `Apply this change?`; options.push( { - label: 'Yes', + label: 'Yes, allow once', value: ToolConfirmationOutcome.ProceedOnce, }, { - label: 'Yes (always allow)', + label: 'Yes, allow always', // TODO: this is extreme w/o being qualified by file or directory value: ToolConfirmationOutcome.ProceedAlways, }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel }, @@ -73,29 +73,22 @@ export const ToolConfirmationMessage: React.FC< const executionProps = confirmationDetails as ToolExecuteConfirmationDetails; - // For execution, we still need context display and description - const commandDisplay = ( - {executionProps.command} - ); - - // Combine command and description into bodyContent for layout consistency bodyContent = ( - {commandDisplay} + {executionProps.command} ); question = `Allow execution?`; - const alwaysLabel = `Yes (always allow '${executionProps.rootCommand}' commands)`; options.push( { - label: 'Yes', + label: 'Yes, allow once', value: ToolConfirmationOutcome.ProceedOnce, }, { - label: alwaysLabel, + label: `Yes, allow always for ${executionProps.rootCommand} ...`, value: ToolConfirmationOutcome.ProceedAlways, }, { label: 'No (esc)', value: ToolConfirmationOutcome.Cancel }, -- cgit v1.2.3