Agent pane: opt-in reasoning slider in the composer's reasoning menu (Debug toggle agent.reasoningSlider)
Merged
TE
22d ago+1247+1247+0123456789012345678901234567890123456789-96-96-01234567890123456789
The composer's reasoning menu only offers the Low…Max list. Some people would rather drag or arrow through levels the way the model picker's reasoning panel already lets them. This adds that slider to the reasoning menu as an opt-in look. The list stays the default.
What changes
- A Debug Settings toggle, off by default:
agent.reasoningSlider("Reasoning slider in the composer", Debug Settings > Pages), next toagent.pageHost. It is a plain debug toggle, so it exists only in DEV and NIGHTLY builds; Release always shows the list. There is no Settings row, no cmux.json key, no Labs entry and no MDM or defaults entry.- Plumbing:
AgentPaneTunables.reasoningSlider(CmuxNextAgentPane).AgentPanePageSettingsfollows it the way it follows the composer's cmux.json keys and setsAgentPaneComposerSetting.reasoningSlider, a host-only field that is never parsed from cmux.json. The flag rides the existingcomposerpage event tocomposerSettings.ts, so a flip reaches every open agent page live.
- Plumbing:
- With the toggle on, the menu's Reasoning section is the model picker's
EffortTrack, reused except for two optional props. The title row names the level the thumb sits on, and the slider shows Faster, Smarter and the recommended level as the panel does. Ultracode and Fast Mode / Service Tier stay below as their own sections.- A pick applies while the slider moves and leaves the menu open. Escape closes the menu and returns focus to the chip.
- Opening the menu focuses the slider. Left, Right, Home, End, PageUp and PageDown step it; the menu's row navigation and typeahead never receive those keys. Up and Down step it too, unless rows follow; then Down moves to the first row below, and Up from that row moves back to the slider.
- A model with only one level shows the list: there is nothing to slide between.
- On the agent's own default (
currentis not one of the levels), the thumb rests on the recommended level and nothing is sent until the person moves it, presses Enter, or clicks the resting thumb. Enter or that click picks the resting level once; the click that ends a drag does not resend. With no recommended level, it rests on the first level. - The slider sits in a fieldset labelled by its Reasoning title, so the menu holds only groups, rows and separators.
- With the toggle off, the menu is the same list as before, with the same DOM.
No default behavior changes and no hotkeys change.
Stills
Web gallery agent-pane.effort-picker at 420 px, 2x, after #20787's menu craft. The list is the default and unchanged by this PR.
| List (default) | Slider | Slider over Fast Mode | |
|---|---|---|---|
| Latte | ![]() | ![]() | ![]() |
| Mocha | ![]() | ![]() | ![]() |
Testing
webviews/test/effort-picker-slider.test.tsx(15 tests): the flag defaults off and ignores a non-boolean; off shows the list; on shows the slider on the current level, focused on open; moving it picks and keeps the menu open; the menu never cancels the stepping keys; Escape closes; Down and Up move between the slider and the rows below; a single level shows the list; the resting thumb on the agent's default, and its one-time pick on Enter or a click; the slider is a group labelled Reasoning.webviews/test/effort-slider-keys.test.ts(Chromium, from the follow-up branch): the slider steps and sendssession/set_config_optionfrom real key presses, including when the agent answers late.Packages/macOS/CmuxNext/Tests/CmuxNextSettingsTests/AgentPaneReasoningSliderSettingTests.swift: the flag is off by default and in the page value, cmux.json cannot turn it on, and it has no Settings row.cd webviews && bun run checkpasses.- Localization audit: no new user-facing strings. The Settings title and help strings from the earlier revision are gone; the Debug Settings label is English like every other tunable. The slider reuses the existing
effort.*andpicker.reasoningstrings.
🤖 Generated with Claude Code





