summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/messages/GeminiMessage.tsx
diff options
context:
space:
mode:
authorTaylor Mullen <[email protected]>2025-04-22 07:48:12 -0400
committerN. Taylor Mullen <[email protected]>2025-04-22 08:05:30 -0400
commit80b04dc505bf1c784a54c5d80d971310b05144cc (patch)
treec2ec8e750f74f15318af2d489ced94b809c76496 /packages/cli/src/ui/components/messages/GeminiMessage.tsx
parent1ed9743ad4e2dfb0469a8fd79b71a52ec391d50e (diff)
Update UI of tool messages
- Bring tool messages in line with original envisioned UI of: https://screenshot.googleplex.com/9yZCX636LzpMrgc - In particular this represents more descriptive names. FWIW we already had this tech we just weren't passing around information correctly (`displayName` vs. `name`) - Add gray to our list of color pallete's and removed Background (unused) - Re-enabled representing canceled messages - Migrated back towards a cleaner tool message design of status symbols & border colors vs. overly verbose text. - Removed border from confirmation diffs. Fixes https://b.corp.google.com/issues/412598909
Diffstat (limited to 'packages/cli/src/ui/components/messages/GeminiMessage.tsx')
-rw-r--r--packages/cli/src/ui/components/messages/GeminiMessage.tsx23
1 files changed, 4 insertions, 19 deletions
diff --git a/packages/cli/src/ui/components/messages/GeminiMessage.tsx b/packages/cli/src/ui/components/messages/GeminiMessage.tsx
index 584c7729..11449b18 100644
--- a/packages/cli/src/ui/components/messages/GeminiMessage.tsx
+++ b/packages/cli/src/ui/components/messages/GeminiMessage.tsx
@@ -16,28 +16,13 @@ interface GeminiMessageProps {
export const GeminiMessage: React.FC<GeminiMessageProps> = ({ text }) => {
const prefix = '✦ ';
const prefixWidth = prefix.length;
-
- // Handle potentially null or undefined text gracefully
- const safeText = text || '';
-
- // Use the static render method from the MarkdownRenderer class
- // Pass safeText which is guaranteed to be a string
- const renderedBlocks = MarkdownRenderer.render(safeText);
-
- // If the original text was actually empty/null, render the minimal state
- if (!safeText && renderedBlocks.length === 0) {
- return (
- <Box flexDirection="row">
- <Box width={prefixWidth}>
- <Text color={Colors.AccentPurple}>{prefix}</Text>
- </Box>
- <Box flexGrow={1}></Box>
- </Box>
- );
- }
+ const renderedBlocks = MarkdownRenderer.render(text);
return (
<Box flexDirection="row">
+ <Box width={prefixWidth}>
+ <Text color={Colors.AccentPurple}>{prefix}</Text>
+ </Box>
<Box flexGrow={1} flexDirection="column">
{renderedBlocks}
</Box>