feat: small refactors

This commit is contained in:
Brooklyn Nicholson 2026-04-06 18:38:13 -05:00
parent e2b3b1c5e4
commit afd670a36f
12 changed files with 2780 additions and 68 deletions

View file

@ -27,6 +27,8 @@ export function Thinking({
return () => clearInterval(id)
}, [])
const tail = (reasoning || thinking || '').slice(-120).replace(/\n/g, ' ')
return (
<Box flexDirection="column">
{tools.length ? (
@ -35,17 +37,15 @@ export function Thinking({
{SPINNER[frame]} {TOOL_VERBS[tool.name] ?? '⚡ ' + tool.name}
</Text>
))
) : tail ? (
<Text color={t.color.dim} dimColor wrap="truncate-end">
{SPINNER[frame]} 💭 {tail}
</Text>
) : (
<Text color={t.color.dim}>
{SPINNER[frame]} {face} {verb}
</Text>
)}
{(reasoning || thinking) && (
<Text color={t.color.dim} dimColor wrap="truncate-end">
{' 💭 '}
{(reasoning || thinking || '').slice(-120).replace(/\n/g, ' ')}
</Text>
)}
</Box>
)
}