mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-26 01:01:40 +00:00
tui: inherit Python-side rendering via gateway bridge
This commit is contained in:
parent
0f556a17f5
commit
f116c59071
5 changed files with 128 additions and 14 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Box, Text } from 'ink'
|
||||
|
||||
import { LONG_MSG, ROLE } from '../constants.js'
|
||||
import { userDisplay } from '../lib/text.js'
|
||||
import { hasAnsi, userDisplay } from '../lib/text.js'
|
||||
import type { Theme } from '../theme.js'
|
||||
import type { Msg } from '../types.js'
|
||||
|
||||
|
|
@ -12,6 +12,10 @@ export function MessageLine({ compact, msg, t }: { compact?: boolean; msg: Msg;
|
|||
|
||||
const content = (() => {
|
||||
if (msg.role === 'assistant') {
|
||||
if (hasAnsi(msg.text)) {
|
||||
return <Text>{msg.text}</Text>
|
||||
}
|
||||
|
||||
return <Md compact={compact} t={t} text={msg.text} />
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue