diff options
Diffstat (limited to 'packages/cli/src/ui')
| -rw-r--r-- | packages/cli/src/ui/App.tsx | 8 | ||||
| -rw-r--r-- | packages/cli/src/ui/components/ShellModeIndicator.tsx | 18 |
2 files changed, 25 insertions, 1 deletions
diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index 3a747ae8..68933f10 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -16,6 +16,7 @@ import { useAutoAcceptIndicator } from './hooks/useAutoAcceptIndicator.js'; import { Header } from './components/Header.js'; import { LoadingIndicator } from './components/LoadingIndicator.js'; import { AutoAcceptIndicator } from './components/AutoAcceptIndicator.js'; +import { ShellModeIndicator } from './components/ShellModeIndicator.js'; import { EditorState, InputPrompt } from './components/InputPrompt.js'; import { Footer } from './components/Footer.js'; import { ThemeDialog } from './components/ThemeDialog.js'; @@ -352,7 +353,12 @@ export const App = ({ </Text> </> </Box> - {showAutoAcceptIndicator && <AutoAcceptIndicator />} + <Box> + {showAutoAcceptIndicator && !shellModeActive && ( + <AutoAcceptIndicator /> + )} + {shellModeActive && <ShellModeIndicator />} + </Box> </Box> {isInputActive && ( <> diff --git a/packages/cli/src/ui/components/ShellModeIndicator.tsx b/packages/cli/src/ui/components/ShellModeIndicator.tsx new file mode 100644 index 00000000..e4147035 --- /dev/null +++ b/packages/cli/src/ui/components/ShellModeIndicator.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 ShellModeIndicator: React.FC = () => ( + <Box> + <Text color={Colors.AccentYellow}> + shell mode enabled + <Text color={Colors.SubtleComment}> (! to toggle)</Text> + </Text> + </Box> +); |
