mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-07 08:02:23 +00:00
* feat(tui): make display.mouse_tracking pick which DEC modes to enable
Previously the boolean flag was all-or-nothing across modes 1000+1002+1003+1006.
Inside tmux, mode 1003 (any-motion) makes every mouse cross of the prompt row
fire a clipboard probe that surfaces as "No image in clipboard" — sometimes
dozens in a row. Disabling tracking entirely killed scroll-wheel scrolling too,
since tmux's own scrollback is preempted by the alt-screen TUI.
`display.mouse_tracking` (and `/mouse <preset>`) now accepts `off | wheel |
buttons | all` in addition to the legacy booleans. `wheel` is 1000+1006:
scroll wheel + click only, no drag, no hover — the tmux-friendly subset.
`buttons` adds 1002 for drag-to-select. `all` (= legacy `true`) keeps the
hover-driven UI (scrollbar paginate-on-hover, link mouseenter, etc.).
* fix(tui): repaint + sync mouse mode when display.mouse_tracking changes
Two interacting bugs left the TUI blank when `display.mouse_tracking`
switched at runtime (config edit, /mouse <preset>):
1. AlternateScreen's effect re-runs on every `mouseTracking` change,
tearing down and re-entering the alt screen. After re-entry, ink's
frame buffers are reset by `resetFramesForAltScreen()` but nothing
schedules the follow-up render — the alt screen sits blank until
some other state change happens to trigger one. Add a
`scheduleRender()` in `setAltScreenActive`'s active=true branch so
the freshly-entered alt screen gets a full repaint immediately.
2. `setAltScreenActive` early-returns when `active` hasn't changed,
which silently drops a `mouseTracking` change if the cleanup→setup
pair somehow leaves `altScreenActive` already true. Call
`setAltScreenMouseTracking` explicitly from the AlternateScreen
effect so the in-memory mode and terminal DECSET sequence stay in
sync regardless of how `setAltScreenActive` resolved (the call is a
no-op when the mode is unchanged).
* fix(tui): address copilot review #4341269705
- tui_gateway/server.py: drop the never-referenced _MOUSE_TRACKING_MODES
frozenset (comment #3284802434). _MOUSE_TRACKING_ALIASES already
centralizes the canonical preset set via its values; the separate
constant added no behavior.
- tests/test_tui_gateway_server.py: update the existing
test_config_mouse_uses_documented_key_with_legacy_fallback to assert
the new preset strings ('all'/'off' instead of 'on'/'off',
display.mouse_tracking persisted as 'all' instead of True) and add
test_config_mouse_accepts_preset_strings_and_aliases covering /mouse
set with wheel/click/unknown (comment #3284802453). The on/off legacy
config.set return shape was an implementation detail of the boolean
flag, not a stable API — the slash command, gateway help text, and
docs all advertise the preset values now.
- ui-tui/packages/hermes-ink/src/ink/ink.tsx: schedule a render at the
end of reenterAltScreen() (comment #3284802461). Mirrors the same fix
in setAltScreenActive() from
|
||
|---|---|---|
| .. | ||
| components | ||
| events | ||
| hooks | ||
| layout | ||
| termio | ||
| Ansi.tsx | ||
| bidi.ts | ||
| cache-eviction.ts | ||
| clearTerminal.ts | ||
| colorize.test.ts | ||
| colorize.ts | ||
| constants.ts | ||
| cursor.ts | ||
| devtools.ts | ||
| dom.ts | ||
| focus.ts | ||
| frame.ts | ||
| get-max-width.ts | ||
| global.d.ts | ||
| hit-test.ts | ||
| hyperlinkHover.ts | ||
| ink-cursor-advance.test.ts | ||
| ink-resize.test.ts | ||
| ink.tsx | ||
| instances.ts | ||
| line-width-cache.ts | ||
| log-update.test.ts | ||
| log-update.ts | ||
| lru.ts | ||
| measure-element.ts | ||
| measure-text.ts | ||
| node-cache.ts | ||
| optimizer.ts | ||
| output.ts | ||
| parse-keypress.test.ts | ||
| parse-keypress.ts | ||
| reconciler.ts | ||
| render-border.ts | ||
| render-node-to-output.ts | ||
| render-to-screen.ts | ||
| renderer.ts | ||
| root.ts | ||
| screen.ts | ||
| searchHighlight.ts | ||
| selection.test.ts | ||
| selection.ts | ||
| squash-text-nodes.ts | ||
| stringWidth.ts | ||
| styles.ts | ||
| supports-hyperlinks.ts | ||
| tabstops.ts | ||
| terminal-focus-state.ts | ||
| terminal-querier.ts | ||
| terminal.test.ts | ||
| terminal.ts | ||
| termio.ts | ||
| useTerminalNotification.ts | ||
| warn.ts | ||
| widest-line.ts | ||
| wrap-text.test.ts | ||
| wrap-text.ts | ||
| wrapAnsi.ts | ||