diff options
Diffstat (limited to 'packages/cli/src/ui/components/messages/UserShellMessage.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/messages/UserShellMessage.tsx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/messages/UserShellMessage.tsx b/packages/cli/src/ui/components/messages/UserShellMessage.tsx new file mode 100644 index 00000000..946ca7e7 --- /dev/null +++ b/packages/cli/src/ui/components/messages/UserShellMessage.tsx @@ -0,0 +1,25 @@ +/** + * @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'; + +interface UserShellMessageProps { + text: string; +} + +export const UserShellMessage: React.FC<UserShellMessageProps> = ({ text }) => { + // Remove leading '!' if present, as App.tsx adds it for the processor. + const commandToDisplay = text.startsWith('!') ? text.substring(1) : text; + + return ( + <Box> + <Text color={Colors.AccentCyan}>$ </Text> + <Text>{commandToDisplay}</Text> + </Box> + ); +}; |
