summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/messages/GeminiMessage.tsx
diff options
context:
space:
mode:
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>