hermes-agent-features/ui-tui/src/components
0xbyt4 3504bd401b fix(tui): route Ctrl+B to voice toggle, not composer input
When the user runs /voice and then presses Ctrl+B in the TUI, three
handlers collaborate to consume the chord and none of them dispatch
voice.record:

- isAction() is platform-aware — on macOS it requires Cmd (meta/super),
  so Ctrl+B fails the match in useInputHandlers and never triggers
  voiceStart/voiceStop.
- TextInput's Ctrl+B pass-through list doesn't include 'b', so the
  keystroke falls through to the wordMod backward-word branch on Linux
  and to the printable-char insertion branch on macOS — the latter is
  exactly what timmie reported ("enters a b into the tui").
- /voice emits "voice: on" with no hint, so the user has no way to
  know Ctrl+B is the recording toggle.

Introduces isVoiceToggleKey(key, ch) in lib/platform.ts that matches
raw Ctrl+B on every platform (mirrors tips.py and config.yaml's
voice.record_key default) and additionally accepts Cmd+B on macOS so
existing muscle memory keeps working. Wires it into useInputHandlers,
adds Ctrl+B to TextInput's pass-through list so the global handler
actually receives the chord, and appends "press Ctrl+B to record" to
the /voice on message.

Empirically verified with hermes --tui: Ctrl+B no longer leaks 'b'
into the composer and now dispatches the voice.record RPC (the
downstream ImportError for hermes_cli.voice is a separate upstream
bug — follow-up patch).
2026-04-23 16:18:15 -07:00
..
agentsOverlay.tsx refactor(tui): consolidate agents overlay — share duration/root helpers via lib 2026-04-22 12:10:21 -05:00
appChrome.tsx refactor(ui-tui): clean touched resize and sticky prompt paths 2026-04-23 14:37:00 -05:00
appLayout.tsx fix(ui-tui): keep bottom statusbar in composer layout 2026-04-23 12:44:56 -05:00
appOverlays.tsx Merge pull request #13591 from NousResearch/bb/tui-pager-scroll 2026-04-21 15:54:45 -05:00
branding.tsx fix(tui): route update-behind banner through theme + auto-detect light terminals (#11300) 2026-04-20 11:12:13 -05:00
markdown.tsx refactor(tui): clean markdown.tsx per KISS/DRY 2026-04-21 18:11:12 -05:00
maskedPrompt.tsx fix(tui): fix Linux Ctrl+C regression, remove double clipboard write 2026-04-20 07:14:33 -07:00
messageLine.tsx chore: uptick 2026-04-18 15:17:42 -05:00
modelPicker.tsx fix(tui): truncate long picker rows so the height stays stable 2026-04-21 14:43:18 -05:00
prompts.tsx fix(tui): pager supports scrolling (up/down/page/top/bottom) 2026-04-21 14:48:26 -05:00
queuedMessages.tsx refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
sessionPicker.tsx fix(tui): truncate long picker rows so the height stays stable 2026-04-21 14:43:18 -05:00
skillsHub.tsx fix(tui): truncate long picker rows so the height stays stable 2026-04-21 14:43:18 -05:00
textInput.tsx fix(tui): route Ctrl+B to voice toggle, not composer input 2026-04-23 16:18:15 -07:00
themed.tsx refactor(tui): /clean pass across ui-tui — 49 files, −217 LOC 2026-04-16 22:32:53 -05:00
thinking.tsx feat(tui): subagent spawn observability overlay 2026-04-22 10:38:17 -05:00