hermes-agent/ui-tui/src/__tests__
Brooklyn Nicholson 97c2da2112 fix(tui): render MEDIA: as a clickable file chip, drop audio directive
The agent emits `MEDIA:<path>` to signal file delivery to the gateway,
and `[[audio_as_voice]]` as a voice-delivery hint. The gateway strips
both before sending to Telegram/Discord/Slack, but the TUI was rendering
them raw through markdown — which is also how the intraword underscore
bug originally surfaced (`browser_screenshot_ecc…`).

At the `Md` layer, detect both sentinels on their own line:
- `MEDIA:<path>` → `▸ <path>` with the path rendered literal and wrapped
  in a `Link` for OSC 8 hyperlink support (absolute paths get a
  `file://` URL, so modern terminals make them click-to-open).
- `[[audio_as_voice]]` → dropped silently; it has no meaning in TUI.

Covers tests for quoted/backticked MEDIA variants, Windows drive paths,
whitespace, and the inline-in-prose case (left untouched — still
protected by the intraword-underscore guard).
2026-04-20 17:11:54 -05:00
..
asCommandDispatch.test.ts fix(tui): slash.exec _pending_input commands, tool ANSI, terminal title 2026-04-18 09:30:48 -07:00
clipboard.test.ts fix(tui): make mac copy use pbcopy 2026-04-20 07:14:33 -07:00
constants.test.ts refactor(tui): store-driven turn state + slash registry + module split 2026-04-16 12:34:45 -05:00
createGatewayEventHandler.test.ts feat(tui): honor display.* flags in turn renderer, status bar, and event handler 2026-04-18 09:42:57 -05:00
createSlashHandler.test.ts Merge branch 'main' of github.com:NousResearch/hermes-agent into bb/tui-audit-followup 2026-04-18 14:52:54 -05:00
markdown.test.ts fix(tui): render MEDIA: as a clickable file chip, drop audio directive 2026-04-20 17:11:54 -05:00
messages.test.ts chore: fmt 2026-04-08 22:02:38 -05:00
paths.test.ts feat(tui): append git branch to cwd label in status bar 2026-04-18 17:17:05 -05:00
providers.test.ts chore(tui): /clean pass — inline one-off locals, tighten ConfirmPrompt 2026-04-19 07:55:38 -05:00
reasoning.test.ts fix(tui): strip <think>…</think> tags from assistant content and route to reasoning panel 2026-04-18 14:46:38 -05:00
rpc.test.ts fix(ui-tui): surface RPC errors and guard invalid gateway responses 2026-04-13 14:17:52 -05:00
syntax.test.ts feat(tui): per-language syntax highlighting in markdown code fences 2026-04-18 09:48:38 -05:00
text.test.ts feat: add inline token count etc and fix venv 2026-04-15 10:20:56 -05:00
theme.test.ts fix(tui): route update-behind banner through theme + auto-detect light terminals (#11300) 2026-04-20 11:12:13 -05:00
useConfigSync.test.ts feat(tui): read display.streaming / show_reasoning / show_cost / inline_diffs from config 2026-04-18 09:42:57 -05:00