mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 01:21:43 +00:00
perf(tui): paint banner on first frame, don't wait on session.create
Previously `historyItems` was seeded empty and the intro (with Banner + SessionPanel) was only pushed after Python's `session.create` returned — ~1.8s of agent + tools + MCP init with nothing on screen. Base CLI feels instant because it prints the banner as its first action. Seed `historyItems` with an info-less intro on mount. `appLayout` now renders the Banner unconditionally for `kind === 'intro'` and gates only the SessionPanel on `info` being present. Gateway.ready swaps the skin (~200ms) and session.info fills in the panel when the agent is ready. Net: first usable frame drops from ~2s to ~300ms (node + module graph + React mount). No behavior change — intro message is replaced in place by `introMsg(info)` when `newSession()` / `resumeById()` resolve.
This commit is contained in:
parent
cb2a737bc8
commit
c6ed61430a
2 changed files with 6 additions and 3 deletions
|
|
@ -33,11 +33,11 @@ const TranscriptPane = memo(function TranscriptPane({
|
|||
|
||||
{visibleHistory.map(row => (
|
||||
<Box flexDirection="column" key={row.key} ref={transcript.virtualHistory.measureRef(row.key)}>
|
||||
{row.msg.kind === 'intro' && row.msg.info ? (
|
||||
{row.msg.kind === 'intro' ? (
|
||||
<Box flexDirection="column" paddingTop={1}>
|
||||
<Banner t={ui.theme} />
|
||||
|
||||
<SessionPanel info={row.msg.info} sid={ui.sid} t={ui.theme} />
|
||||
{row.msg.info && <SessionPanel info={row.msg.info} sid={ui.sid} t={ui.theme} />}
|
||||
</Box>
|
||||
) : row.msg.kind === 'panel' && row.msg.panelData ? (
|
||||
<Panel sections={row.msg.panelData.sections} t={ui.theme} title={row.msg.panelData.title} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue