hermes-agent/tests/tui_gateway
Teknium 3f7d1c801d feat(undo): /undo [N] backs up N user turns with prefill + soft-delete
Extends the existing /undo command from a single in-memory exchange
removal into a full rewind: back up N user turns (default 1), soft-delete
the truncated rows in SessionDB (active=0, kept for audit, hidden from
re-prompts and search), notify memory providers, and prefill the composer
with the backed-up message text for editing — CLI and TUI.

Reuses the SessionDB rewind primitives, the on_session_switch(rewound=True)
memory hook, and the TUI command.dispatch prefill payload from SaguaroDev's
#21910 work, wired to /undo [N] instead of a separate /rewind picker.

- cli.py: undo_last(n, prefill) — in-memory truncate + SQLite soft-delete
  + agent surgery (system-prompt invalidate, flush-index reset) + memory
  notify + editable buffer prefill; /undo dispatch parses optional count;
  checkpoint-rollback caller passes prefill=False
- tui_gateway/server.py: command.dispatch undo branch (was rewind) parses
  count, picks Nth-from-last user turn, clamps to oldest
- commands.py: /undo gains [N] args_hint
- tests: rename + expand TUI suite (multi-turn, clamp, invalid-count)
- release.py: AUTHOR_MAP entry for SaguaroDev

Co-authored-by: SaguaroDev <74339271+SaguaroDev@users.noreply.github.com>
2026-06-01 01:22:38 -07:00
..
__init__.py feat: add tests and update mds 2026-04-08 19:31:25 -05:00
test_entry_sys_path.py chore: prune unused imports and duplicate import redefinitions 2026-05-28 22:26:25 -07:00
test_goal_command.py test(tui_gateway): stop reloading server module in fixture teardown (#34217) 2026-05-28 18:16:54 -07:00
test_make_agent_provider.py fix(tui): close slash parity gaps with CLI (#20339) 2026-05-05 15:42:39 -05:00
test_protocol.py Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
test_render.py feat: add tests and update mds 2026-04-08 19:31:25 -05:00
test_review_summary_callback.py Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
test_undo_command.py feat(undo): /undo [N] backs up N user turns with prefill + soft-delete 2026-06-01 01:22:38 -07:00
test_wait_for_mcp_discovery.py perf(tui): stop slow/dead MCP servers from freezing TUI startup 2026-05-30 02:53:37 -07:00