fix(tui): align Ctrl+L and /model default scope with classic CLI#16657
Conversation
Make Ctrl+L non-destructive by redrawing the current screen state instead of starting a new session, and stop auto-appending --global for typed /model commands so session scope remains the default unless explicitly requested.
Run ui-tui lint autofix + prettier and commit the resulting formatting-only changes for the keybinding/model parity branch.
There was a problem hiding this comment.
Pull request overview
This PR adjusts TUI UX and slash-command semantics to match classic CLI expectations by remapping Ctrl/Cmd+L to a non-destructive repaint and by keeping typed /model changes session-scoped by default.
Changes:
- Remap Ctrl/Cmd+L from “new session” to a redraw/repaint behavior in input handling and hotkey docs.
- Change
/modelargument handling so typed switches no longer implicitly append--global(session scope remains default). - Update/extend tests to reflect the new hotkey and
/modelsemantics.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ui-tui/src/content/hotkeys.ts | Updates the documented meaning of Ctrl/Cmd+L to “redraw / repaint”. |
| ui-tui/src/app/useInputHandlers.ts | Implements the new Ctrl/Cmd+L behavior (no session reset). |
| ui-tui/src/app/slash/commands/session.ts | Removes implicit --global appending for typed /model values while still stripping the internal --tui-session flag. |
| ui-tui/src/tests/createSlashHandler.test.ts | Updates /model expectations to remain session-scoped by default. |
| ui-tui/src/tests/constants.test.ts | Adds a test asserting the hotkey documentation change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Use explicit repaint patch semantics for Ctrl/Cmd+L and narrow the hotkey assertion to the actual +L entry so unrelated descriptions do not cause false failures.
|
Addressed Copilot review feedback in da6f844:\n- switched Ctrl/Cmd+L repaint handler to explicit \n- narrowed hotkey assertion to the specific +L entry to avoid brittle global phrase matching |
|
Correction on the first bullet above: switched Ctrl/Cmd+L repaint handler to explicit |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Expose a small forceRedraw API from @hermes/ink and use it for Ctrl/Cmd+L so the hotkey performs a real terminal clear + full repaint instead of a no-op state patch.
|
Addressed the latest Copilot redraw note in b3e7a41:\n- exported from \n- wired Ctrl/Cmd+L to call after clearing selection\n- keeps hotkey behavior as actual clear + full repaint parity with classic Ctrl+L |
|
Correction on the previous comment: Addressed the latest Copilot redraw note in b3e7a41:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ding-model-parity fix(tui): align Ctrl+L and /model default scope with classic CLI
…ding-model-parity fix(tui): align Ctrl+L and /model default scope with classic CLI
…ding-model-parity fix(tui): align Ctrl+L and /model default scope with classic CLI
…ding-model-parity fix(tui): align Ctrl+L and /model default scope with classic CLI
…ding-model-parity fix(tui): align Ctrl+L and /model default scope with classic CLI
Summary
Ctrl+Lin TUI input handling to non-destructive redraw/repaint behavior instead of starting a new session/modelbehavior with classic CLI by keeping session scope as the default (no implicit--global)Test plan
npm run type-check(inui-tui/)npm run build --prefix packages/hermes-ink && npm test -- --run src/__tests__/createSlashHandler.test.ts src/__tests__/constants.test.ts(inui-tui/)