hermes-agent/ui-opentui/src
alt-glitch 5fd2b5bb7b opentui(v6): suppress redundant JSON/diff-echo output under rendered diffs
A patch tool's result is a JSON record whose payload IS the diff. In a verbose
session the gateway redacts + TAIL-caps result_text (_cap_tui_verbose_text),
so the echo arrived under the native diff in two broken shapes: truncated
mid-JSON (unparseable, so the old JSON.parse check failed open), or — for tall
edits — capped PAST the JSON head, which the store's normalizeOutput then
un-escapes into plain lines that duplicate the diff. North star: no raw JSON
in the transcript, ever.

Three layers:
- gateway: when diff_unified ships, result_text drops the in-JSON diff echo
  (_result_sans_diff_echo) — small, parseable, carries only the non-diff
  signal (success/files_modified/warnings/lsp_diagnostics).
- fileTool diffOutputPlan: anything starting with '{' under a rendered diff is
  suppressed regardless of parseability; parseable JSON with real non-diff
  signal (error/warning/lsp_diagnostics) renders JUST those as labeled notes;
  a non-JSON fragment whose lines echo the rendered diff is suppressed too
  (guards older emitters). Plain-text results (lint tails) still render.
2026-06-10 18:49:03 +05:30
..
boundary opentui(v6): clamp negative draw coords at the node:ffi seam (diff crash fix) 2026-06-10 18:48:51 +05:30
entry feat(tui): run on Node 26 (one runtime), finalize copy UX, rename to ui-opentui 2026-06-09 16:16:48 +00:00
logic opentui(v6): file tool renderer — relative path + full native diff 2026-06-10 16:48:15 +05:30
test opentui(v6): suppress redundant JSON/diff-echo output under rendered diffs 2026-06-10 18:49:03 +05:30
view opentui(v6): suppress redundant JSON/diff-echo output under rendered diffs 2026-06-10 18:49:03 +05:30