hermes-agent/ui-tui/src
Teknium 2517917de3
fix(cli): restore fallback paste collapse + handle long single-line pastes (#32447)
Follow-up to #32087 after community report from @ethernet that 8000-char
single-line pastes get dumped raw into the input box.

A) Fallback regression revert
   paste_collapse_threshold_fallback default: 0 -> 5
   #32087 disabled the fallback handler by default. The fallback path
   has been always-on with line_count >= 5 since #3065 (March 2026);
   the previous shape was the salvaged contributor's design and didn't
   match pre-existing behavior for terminals without bracketed paste
   support (Windows terminals, some SSH setups). Restoring the original
   on-by-default.

B) Long single-line paste guard
   New config key: paste_collapse_char_threshold (default 2000)
   Bracketed-paste handler and fallback handler now BOTH collapse when
   line count >= line threshold OR total char length >= char threshold.
   Catches the case ethernet hit: ~8000 chars of minified JSON / log
   output on a single line dumped raw into the buffer.
   TUI mirrors the same config via uiStore.pasteCollapseChars.
   Set 0 to disable.

Defaults verified:
  paste_collapse_threshold: 5
  paste_collapse_threshold_fallback: 5
  paste_collapse_char_threshold: 2000

Tests:
  tests/hermes_cli/test_config.py: 87/87 pass
  ui-tui useConfigSync.test.ts: 34/34 pass
  ui-tui useComposerState.test.ts: 9/9 pass
  tsc: 0 new errors in touched files
2026-05-25 23:49:01 -07:00
..
__tests__ fix(tui): delineate assistant responses from details (#31087) 2026-05-25 10:23:03 -05:00
app fix(cli): restore fallback paste collapse + handle long single-line pastes (#32447) 2026-05-25 23:49:01 -07:00
components fix(tui): delineate assistant responses from details (#31087) 2026-05-25 10:23:03 -05:00
config feat: configurable paste collapse thresholds (TUI + CLI) 2026-05-25 06:23:18 -07:00
content fix(tui): copilot review on #16707 — naming, label consistency, esc priority 2026-04-27 15:37:54 -05:00
domain fix(tui): stabilize sticky prompt tracking 2026-04-28 22:10:40 -05:00
hooks fix(tui): recompute virtual tail after width resize 2026-05-23 14:49:26 -05:00
lib fix(tui): delineate assistant responses from details (#31087) 2026-05-25 10:23:03 -05:00
protocol refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
types fix(tui): keep Ink displayCursor in sync with fast-echo writes so cursor stops drifting (#26717) 2026-05-16 00:28:12 -05:00
app.tsx fix(tui): apply ui-tui fix pass and restore type-check 2026-04-25 14:08:54 -05:00
banner.ts feat(tui): responsive banner tiers 2026-05-23 17:37:51 -05:00
entry.tsx fix(tui): log parent gateway lifecycle exits (#31051) 2026-05-23 13:28:40 -05:00
gatewayClient.ts fix(tui): log parent gateway lifecycle exits (#31051) 2026-05-23 13:28:40 -05:00
gatewayTypes.ts fix(cli): restore fallback paste collapse + handle long single-line pastes (#32447) 2026-05-25 23:49:01 -07:00
theme.ts fix(tui): honor skin highlight colors (#20895) 2026-05-06 14:01:56 -07:00
types.ts fix(tui): surface verbose tool details (#30225) 2026-05-22 00:16:52 -05:00