@wrongstack/tui 0.9.19 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -72,9 +72,30 @@ process.exit(exitCode);
72
72
  | `@` | File picker |
73
73
  | `/` (at start) | Slash command picker |
74
74
  | `Ctrl+G` | Toggle agents monitor overlay |
75
+ | `Ctrl+S` | Edit autonomy settings (default mode + auto-proceed delay); also `/settings` |
75
76
  | `Esc` | Close any picker / dialog / agents monitor |
76
77
  | `Ctrl+L` | Clear screen (TUI keeps state — equivalent to scrolling) |
77
78
 
79
+ ### Mouse mode (`--mouse`)
80
+
81
+ With `--mouse` the TUI takes over terminal mouse tracking (forces alt-screen; native wheel-scroll and text selection are suspended until `/mouse off`). Then:
82
+
83
+ - **Wheel** scrolls chat history, or moves the selection in an open picker.
84
+ - **Click or drag the right-edge scrollbar** to jump/scrub the chat viewport to any position.
85
+ - **Click inside the input** to move the caret (single- and multi-line).
86
+ - **Click** a picker item to select + confirm it (single click).
87
+ - **Click** the permission dialog's `[y]/[n]/[a]/[d]` buttons.
88
+ - **Click** a `/rewind` checkpoint to select it; click again to rewind.
89
+ - **Click** the status-bar model chip to open the model picker, or the `∞ MODE` chip to open the autonomy picker.
90
+ - **Click** a `/settings` row to focus it; click again to cycle its value.
91
+ - **Click** the lower region to dismiss an open monitor (`Ctrl+F/G/T/P`) or the `?` help overlay (parity with `Esc`).
92
+
93
+ Keyboard shortcuts (always available in managed/alt-screen mode, not just `--mouse`):
94
+ - **PgUp/PgDn** — page scroll through chat history.
95
+ - **Home/End** — jump to top/bottom of chat history (when input is empty); move cursor to start/end of line (when typing).
96
+ - **Ctrl+Home/End** — jump to top/bottom of chat history (always, even when typing).
97
+ - **↑/↓** — navigate input history when buffer is empty.
98
+
78
99
  ## Options worth knowing
79
100
 
80
101
  - **`altScreen: true`** (default) — render into the terminal's alternate screen buffer (vim/less/htop style). The TUI owns the whole viewport, native scrollback is untouched, and the live region cannot leak into terminal history. Raw mode plus alt-screen also means every keystroke — including Ctrl+S, Ctrl+Q, Ctrl+Z, Ctrl+\\ — reaches Ink instead of being consumed by the terminal driver (`runTui` additionally registers no-op handlers for `SIGTSTP`/`SIGQUIT`/`SIGTTIN`/`SIGTTOU` as belt-and-suspenders). Set `false` (or pass `--no-alt-screen`) to render into normal scrollback if you specifically want completed chat to survive after exit; the trade-off is the documented live-region leak on resize / overlay-close / picker-submit, and that some shortcuts may fall through to the terminal.
package/dist/index.d.ts CHANGED
@@ -112,6 +112,14 @@ interface RunTuiOptions {
112
112
  * while the TUI is up and only what's currently on screen is visible.
113
113
  */
114
114
  altScreen?: boolean;
115
+ /**
116
+ * Enable full mouse support: clickable list items in menus/pickers and
117
+ * in-app mouse-wheel scrolling of the chat history. Opt-in (default false)
118
+ * because enabling terminal mouse tracking disables the terminal's own
119
+ * wheel-scroll and text-selection/copy. When true this FORCES alt-screen
120
+ * on (the app must own the screen to render its scroll viewport).
121
+ */
122
+ mouse?: boolean;
115
123
  /**
116
124
  * Called right after we exit the alt-screen on a clean shutdown. The
117
125
  * CLI uses this to print a one-line "session saved to …" hint into