hermes-agent/ui-opentui/src
alt-glitch c7e5215b50 opentui(v6): HERMES_TUI_TOOL_OUTPUTS flag — drop tool-body retention (W3)
The biggest real memory lever: OpenTUI retained full resultText + the raw
result dict + the args dict per tool call, while Ink discards tool bodies
(keeps only a short context line). That retention asymmetry is the bulk of the
Ink-vs-OpenTUI memory gap.

New `HERMES_TUI_TOOL_OUTPUTS` flag (toolOutputsEnabled() in env.ts, default
ON — the rich tool cards are OpenTUI's differentiator). When OFF, the
tool.complete reducer (store.ts) neither BUILDS nor STORES the body: skip the
whole result_text/result stringify+envelope-strip work and suppress
part.resultText / part.result / part.args / part.argsText / part.lineCount /
part.omittedNote. KEPT either way: name, state, duration, error, summary,
argsPreview (the redaction-safe one-liner from tool.start context = Ink's
context line), and the file-edit diff (diffUnified/diffStats — a diff is a
high-value surface, not generic "output"). Render is automatic: with no
resultText/result, defaultRenderer.expandable() is false → header-only row =
Ink parity, no extra view gating needed.

This powers the bench's fair Ink-vs-OpenTUI comparison (D8 — launch OpenTUI
with outputs off so both engines are body-less = pure engine overhead) and the
low-mem mode.

Tests: store retains rich outputs by default; OFF drops the bodies but keeps
name/duration/error/argsPreview/diff. npm run check OK (770 tests).
2026-06-14 13:56:08 +05:30
..
boundary opentui(v6): bump @opentui 0.4.0 -> 0.4.1 + openConsoleOnError:false (W5) 2026-06-14 13:53:11 +05:30
entry opentui(v6): clarify markdown + cold slash-highlight + @-mention race fix 2026-06-14 12:56:21 +05:30
logic opentui(v6): HERMES_TUI_TOOL_OUTPUTS flag — drop tool-body retention (W3) 2026-06-14 13:56:08 +05:30
test opentui(v6): HERMES_TUI_TOOL_OUTPUTS flag — drop tool-body retention (W3) 2026-06-14 13:56:08 +05:30
view opentui(v6): credits/usage notice chrome banner (Ink parity) 2026-06-14 12:56:21 +05:30