summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-04-25 14:05:58 -0700
committerGitHub <[email protected]>2025-04-25 14:05:58 -0700
commit7087c0508ea9260abaa31b0cd8f206d3b11cf21b (patch)
tree748adf1d30936ec421306bf4ad3664728011269d /packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
parent1a64268bb058049d94a9265c839265607606ec88 (diff)
more consistent confirmations, TODO to improve write confirmations, drop "description" from execution confirmation, add confirmation to new (still dummy) shell tool (#176)
Diffstat (limited to 'packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx')
-rw-r--r--packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx17
1 files changed, 5 insertions, 12 deletions
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 = (
- <Text color={Colors.AccentCyan}>{executionProps.command}</Text>
- );
-
- // Combine command and description into bodyContent for layout consistency
bodyContent = (
<Box flexDirection="column">
<Box paddingX={1} marginLeft={1}>
- {commandDisplay}
+ <Text color={Colors.AccentCyan}>{executionProps.command}</Text>
</Box>
</Box>
);
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 },