diff options
| author | Taylor Mullen <[email protected]> | 2025-05-17 21:25:28 -0700 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-05-17 22:27:22 -0700 |
| commit | aca27709dfec3a56f775459e5b0b9d25bc593e28 (patch) | |
| tree | 9fe986a0b1abeaf24a7e34c23a486158256ff3c2 /packages/cli/src/ui/components/AutoAcceptIndicator.tsx | |
| parent | 13a6a9a690900a50287d344592bf02bdfb2586f1 (diff) | |
feat: Add auto-accept indicator and toggle
- This commit introduces a visual indicator in the CLI to show when auto-accept for tool confirmations is enabled. Users can now also toggle this setting on/off using Shift + Tab.
- This addresses user feedback for better visibility and control over the auto-accept feature, improving the overall user experience.
- This behavior is similar to Claude Code, providing a familiar experience for users transitioning from that environment.
- Added tests for the new auto indicator hook.
Fixes https://b.corp.google.com/issues/413740468
Diffstat (limited to 'packages/cli/src/ui/components/AutoAcceptIndicator.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/AutoAcceptIndicator.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/AutoAcceptIndicator.tsx b/packages/cli/src/ui/components/AutoAcceptIndicator.tsx new file mode 100644 index 00000000..dc23d5e2 --- /dev/null +++ b/packages/cli/src/ui/components/AutoAcceptIndicator.tsx @@ -0,0 +1,18 @@ +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import React from 'react'; +import { Box, Text } from 'ink'; +import { Colors } from '../colors.js'; + +export const AutoAcceptIndicator: React.FC = () => ( + <Box> + <Text color={Colors.AccentGreen}> + accepting edits + <Text color={Colors.SubtleComment}> (shift + tab to disable)</Text> + </Text> + </Box> +); |
