mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-12-03 15:42:16 +00:00
When the terminal's own 'disable mouse reporting' toggle (or an external app / tmux) clears the DEC mouse modes, a mouse-only user is deadlocked: every existing recovery trigger (resize, >5s stdin gap + keypress, raw-mode bounce) needs stdin — and mouse reporting being off is exactly why no stdin arrives. Users had to resize the window to scroll again. Fix: a mouse-mode watchdog in App that DECRQM-probes mode 1000 every 2s while tracking is expected on. If the terminal reports the mode RESET, reassertTerminalModes() re-arms tracking — the same recovery a resize performs, without the resize. Probes are skipped whenever a mouse/wheel event arrived within the interval (tracking provably alive → zero query chatter during normal use), never fired while paused for an editor handoff or when /mouse off was chosen, and the watchdog permanently disables itself on terminals that don't answer DECRQM (DA1-sentinel resolution via the existing timeout-free TerminalQuerier). Terminals whose toggle merely gates event delivery report SET, so an active user toggle is never fought; terminals whose toggle clears the modes report RESET after re-enable and recover within ~2s. |
||
|---|---|---|
| .. | ||
| src | ||
| ambient.d.ts | ||
| index.d.ts | ||
| index.js | ||
| package.json | ||
| text-input.d.ts | ||
| text-input.js | ||
| tsconfig.json | ||