mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
wrap preformatted ansi in <Ansi> component
This commit is contained in:
parent
690d62a6d1
commit
3bf0f39337
2 changed files with 3 additions and 2 deletions
|
|
@ -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') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue