summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/HistoryItemDisplay.tsx
diff options
context:
space:
mode:
authorTaylor Mullen <[email protected]>2025-05-18 01:18:32 -0700
committerN. Taylor Mullen <[email protected]>2025-05-18 01:25:50 -0700
commite4d978da7ce5422cd4d2a92d369985df6387ad79 (patch)
treea1be044381a5c34b97cb1be8b790c4dd0ae01c3e /packages/cli/src/ui/components/HistoryItemDisplay.tsx
parent0d4e0fe6477712f4781438b84096690d2e3c208e (diff)
feat(cli): Introduce toggleable shell mode with enhanced UI
- Implements a toggleable shell mode, removing the need to prefix every command with `!`. - Users can now enter and exit shell mode by typing `!` as the first character in an empty input prompt. - The input prompt visually indicates active shell mode with a distinct color and `! ` prefix. - Shell command history items (`user_shell`) are now visually differentiated from regular user messages. - This provides a cleaner and more streamlined user experience for frequent shell interactions. Fixes https://b.corp.google.com/issues/418509745
Diffstat (limited to 'packages/cli/src/ui/components/HistoryItemDisplay.tsx')
-rw-r--r--packages/cli/src/ui/components/HistoryItemDisplay.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/HistoryItemDisplay.tsx b/packages/cli/src/ui/components/HistoryItemDisplay.tsx
index 0a5ba7d1..0b61fc04 100644
--- a/packages/cli/src/ui/components/HistoryItemDisplay.tsx
+++ b/packages/cli/src/ui/components/HistoryItemDisplay.tsx
@@ -7,6 +7,7 @@
import React from 'react';
import type { HistoryItem } from '../types.js';
import { UserMessage } from './messages/UserMessage.js';
+import { UserShellMessage } from './messages/UserShellMessage.js';
import { GeminiMessage } from './messages/GeminiMessage.js';
import { InfoMessage } from './messages/InfoMessage.js';
import { ErrorMessage } from './messages/ErrorMessage.js';
@@ -28,6 +29,7 @@ export const HistoryItemDisplay: React.FC<HistoryItemDisplayProps> = ({
<Box flexDirection="column" key={item.id}>
{/* Render standard message types */}
{item.type === 'user' && <UserMessage text={item.text} />}
+ {item.type === 'user_shell' && <UserShellMessage text={item.text} />}
{item.type === 'gemini' && (
<GeminiMessage
text={item.text}