Skip to content

Cycle reasoning effort with Shift+Tab and show it on the prompt - #484

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6298-cycle-reasoning-effort-with-shifttab-and-show-it-on-the
Aug 19, 2026
Merged

Cycle reasoning effort with Shift+Tab and show it on the prompt#484
TheGreatAxios merged 2 commits into
mainfrom
cl-6298-cycle-reasoning-effort-with-shifttab-and-show-it-on-the

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

Rebinds Shift+Tab to cycle reasoning effort for the live model and keeps the current effort visible on the prompt border. Plain Tab still toggles prompt/transcript focus.

Closes CL-6298.

Changes

  • cycleReasoningEffort walks the model's supported ladder and wraps
  • Shell Shift+Tab / backtab handler invokes a host callback (does not steal focus)
  • Runner rebuilds inference sources and refreshes the prompt model label on each cycle
  • Status flash shows the new effort (or that the model has none)
  • Docs/comments no longer claim Shift+Tab toggles auto mode

Test plan

  • cycleReasoningEffort unit tests
  • keybindings catalog probe for Shift+Tab
  • pre-commit typecheck + build
  • Manual: Shift+Tab cycles effort on a reasoning model; flash + border update
  • Manual: Shift+Tab on a non-reasoning model flashes "no levels" and leaves config alone
  • Manual: plain Tab still toggles focus

Shift+Tab walks the current model's supported effort ladder (wrapping),
rebuilds inference sources so the next turn picks it up, and refreshes the
prompt border label. Plain Tab still toggles focus. Docs no longer claim
Shift+Tab toggles auto mode.
@linear-code

linear-code Bot commented Aug 19, 2026

Copy link
Copy Markdown

CL-6298

@TheGreatAxios TheGreatAxios left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed as reviewer of record against CL-6298.

Verdict: approve (GitHub will not let this identity formally approve its own PR).

Shift+Tab cycles the live model's supported effort ladder, rebuilds inference sources so the next turn picks it up, and the prompt border label plus a status flash show the new value. Plain Tab still toggles focus. Overlays still treat unshifted Tab as complete.

Checked:

  • cycleReasoningEffort wraps the per-model ladder; undefined/unsupported current starts at the first supported level; non-reasoning models return undefined and the runner flashes instead of mutating config.
  • Shell onKey handles both tab+shift and backtab, after overlay handling, and does not steal unshifted Tab.
  • Runner updates config.reasoningEffort, calls buildSessionSources(), agentProxy.setSources, setPromptModelLabel, and flashes the new level.
  • Live keybinding probe in keybindings.test.ts asserts the handler fires and focus is unchanged.
  • README / config comments no longer claim Shift+Tab toggles auto.

Nits (not blocking):

  • docs/TUI.md is the normative TUI spec and still documents Tab without Shift+Tab. Help overlay is updated via keybindings.ts; TUI.md should match.
  • docs/PRODUCT.md does not mention the new binding (README does).
  • First press when session effort is unset jumps to supported[0] (e.g. minimal on gpt-5), not next-after-the-implicit-role-default.
  • /model does not clamp a previously cycled effort onto the new model's ladder. Pre-existing, but Shift+Tab makes edge values (none, xhigh) more reachable.

Commit message is plain English and matches the change.

PRODUCT and TUI specs now name the binding; implementation notes
how the runner rebuilds sources and the prompt-border label.
@TheGreatAxios
TheGreatAxios merged commit 875736f into main Aug 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant