opencode/packages
mike.wang fcb658a54e fix: restore terminal state on exit to prevent mouse escape sequence garbage
After the TUI exits, the terminal was left with mouse tracking enabled
(\x1b[?1003l / \x1b[?1006l SGR mode), causing subsequent terminal input
to print raw escape sequences like ^[<35;61;11M instead of being
interpreted normally.

Root cause: renderer.destroy() relies on native destroyRenderer() to
send the mouse-disable sequences, but process.exit() in index.ts fires
before those writes are flushed to stdout.

Fixes:
- exit.tsx: explicitly write mouse-disable + cursor-restore sequences to
  stdout before renderer.destroy(), and register a process 'exit' handler
  as a last-resort guarantee that fires synchronously on process exit.
- prompt/index.tsx + session/index.tsx: add double-confirm for Ctrl+C
  exit (press twice within 3 s) matching the behaviour of claude code and
  similar TUI tools; inline hint replaces the toast for the first press.
- win32.ts: tighten the ENABLE_PROCESSED_INPUT enforcement poll from
  100 ms to 16 ms so the guard reacts faster after console-mode resets.

Closes #13276
2026-04-08 10:44:18 +08:00
..
app release: v1.4.0 2026-04-08 00:32:31 +00:00
console release: v1.4.0 2026-04-08 00:32:31 +00:00
containers chore: bump Bun to 1.3.11 (#18144) 2026-03-23 10:19:21 +10:00
desktop release: v1.4.0 2026-04-08 00:32:31 +00:00
desktop-electron release: v1.4.0 2026-04-08 00:32:31 +00:00
docs fix(web): favicon rename again 2026-01-21 14:36:21 -06:00
enterprise release: v1.4.0 2026-04-08 00:32:31 +00:00
extensions/zed release: v1.4.0 2026-04-08 00:32:31 +00:00
function release: v1.4.0 2026-04-08 00:32:31 +00:00
identity
opencode fix: restore terminal state on exit to prevent mouse escape sequence garbage 2026-04-08 10:44:18 +08:00
plugin release: v1.4.0 2026-04-08 00:32:31 +00:00
script refactor: replace bun semver with npm semver package 2026-03-09 15:29:55 -04:00
sdk release: v1.4.0 2026-04-08 00:32:31 +00:00
slack release: v1.4.0 2026-04-08 00:32:31 +00:00
storybook chore(app): markdown playground in storyboard 2026-03-25 09:14:35 -05:00
ui release: v1.4.0 2026-04-08 00:32:31 +00:00
util release: v1.4.0 2026-04-08 00:32:31 +00:00
web release: v1.4.0 2026-04-08 00:32:31 +00:00