* fix(tui): debounce v2 layout reflow on resize
Same-size resize events are deduped, layout reflow is debounced to 80ms,
and message remount is deferred to the next frame so #messages.content_region
reports the post-resize width instead of the pre-resize one.
* feat(tui): rebind v2 keys (Ctrl+C dual, Ctrl+↑↓ sessions, Ctrl+O fold) + help overlay
- Ctrl+C is the single stop/quit key: stops a running task; otherwise
clears non-empty input; otherwise arms quit (press again within 2s to
exit). Removes Ctrl+S, Ctrl+Q, and InputArea's prior Ctrl+C
copy-or-clear binding. Any non-Ctrl+C key disarms the pending quit.
- Ctrl+O toggles turn fold (was Ctrl+F, which collides with terminal
app search shortcuts on macOS). Topbar gains a small "▾ fold"
indicator when fold mode is on.
- Ctrl+Up / Ctrl+Down switches sessions (was Ctrl+Left / Ctrl+Right)
to match the vertical session-list mental model.
- Esc is the single one-press cancel for ChoiceList — drops the prior
two-step "Left to leave, Left to cancel" flow. Esc also continues to
close the command palette and now closes the help overlay.
- Adds a Ctrl+? help overlay listing every keybinding. Bound on both
ctrl+? and ctrl+question_mark to survive terminal reporting quirks.
- Newline keeps Ctrl+J / Ctrl+Enter / Shift+Enter as cross-terminal
fallbacks (Ctrl+J is the portable one for macOS Terminal.app); drops
Alt+Enter.
- Bottom bar simplifies to four essentials + Ctrl+? and / hints, and
shows a transient "再按 Ctrl+C 退出" while quit is armed.
* fix(tui): switch help shortcut from Ctrl+? to Ctrl+/
Ctrl+? (= Ctrl+Shift+/) is unreliable across terminals — many emulators
either swallow it or report it as something Textual can't parse. Ctrl+/
is the conventional VS Code / command-line help shortcut and ships with
the legacy Ctrl+_ fallback (ASCII 0x1F is what older terminals send for
Ctrl+/). All three forms are bound (ctrl+slash, ctrl+/, ctrl+underscore)
so the binding survives terminal-reporting differences.
Bottom hint bar collapses to a single left-aligned line carrying the
command-palette and help hints alongside the action keys, since the
prior right column repeated information the left column already had room
for. The help overlay header reads "快捷键帮助" instead of "快捷键".
* fix(tui): ctrl+c dual-press with non-empty input, centered help modal
- Ctrl+C with non-empty input now clears AND arms quit; a second Ctrl+C
within 2s exits. Previously typing in the input let one Ctrl+C exit
silently after the clear, which was easy to trigger by accident.
- Help is now a ModalScreen pushed over the main screen so opening it
no longer shifts the input box. Centered with a lighter background
(#21262d on #30363d border) to read as a lifted panel.
- Esc-cancelling a ChoiceList removes the prompt cleanly with no
"已取消" output — the canceled prompt simply disappears from the
chat, matching expectations for in-flight tool prompts.
* fix(tui): keep Ctrl+C copy semantics and update choice hints
When there is selected text, Ctrl+C now copies the selection and returns
without triggering stop, input clear, or quit-arming. This preserves the
TUI selection/copy path after Ctrl+C became the global stop/quit key.
Choice prompts now advertise the current Esc-cancel behavior instead of
the removed Left-arrow flow, and stale comments/docs mentioning the old
left-arrow return path were cleaned up.