Files
hermes-agent/ui-opentui/src/view/statusLine.tsx
T
alt-glitch a38152cd91 feat(tui): run on Node 26 (one runtime), finalize copy UX, rename to ui-opentui
Ports the engine off the second JS runtime onto Node 26.3 (node:ffi) so the
repo ships a single JavaScript runtime: child_process for the gateway, vitest
for tests, an esbuild + Solid build step. Mouse selection copies the rendered
text you highlight, and the clipboard path is crash-proofed (a broken copy
pipe no longer quits the UI). Renames the engine dir ui-tui-opentui-v2/ ->
ui-opentui/ and updates the launcher/installer/Docker references.
2026-06-09 16:16:48 +00:00

32 lines
1.1 KiB
TypeScript

/**
* StatusLine — the transient line just below the transcript (spec §3 chrome).
* Shows EITHER:
* - a `hint` (e.g. "Ctrl+C again to quit" — item 11), in the warn colour and
* taking priority; or
* - the kaomoji busy face/verb from `thinking.delta`/`status.update` WHILE a
* turn runs (Ink's FaceTicker), dim, cleared on `message.complete`.
* This keeps those transient indicators OUT of the transcript. Renders nothing
* when both are idle.
*/
import { Show } from 'solid-js'
import type { SessionStore } from '../logic/store.ts'
import { useTheme } from './theme.tsx'
export function StatusLine(props: { store: SessionStore }) {
const theme = useTheme()
const line = () => props.store.state.hint ?? props.store.state.status
const isHint = () => props.store.state.hint !== undefined
return (
<Show when={line()}>
{text => (
<box style={{ flexShrink: 0 }}>
<text selectable={false}>
<span style={{ fg: isHint() ? theme().color.warn : theme().color.muted }}>{text()}</span>
</text>
</box>
)}
</Show>
)
}