wrap preformatted ansi in <Ansi> component

This commit is contained in:
Ari Lotter 2026-04-12 16:53:53 -04:00
parent 690d62a6d1
commit 3bf0f39337
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,4 @@
import { Box, Text } from '@hermes/ink'
import { Ansi, Box, Text } from '@hermes/ink'
import { memo } from 'react'
import { LONG_MSG, ROLE } from '../constants.js'
@ -40,7 +40,7 @@ export const MessageLine = memo(function MessageLine({
}
if (msg.role !== 'user' && hasAnsi(msg.text)) {
return <Text wrap="wrap">{msg.text}</Text>
return <Ansi>{msg.text}</Ansi>
}
if (msg.role === 'assistant') {