Make advanced reasoning selection explicit in the TUI (#32746)

## Why

`Max` and `Ultra` consume usage limits faster than standard reasoning levels, so they should not be selected accidentally while navigating the normal effort scale.

## What changed

- Move `Max` and `Ultra` behind a `More reasoning…` entry with a dedicated warning and descriptions.
- Keep the reasoning shortcuts from silently increasing into advanced efforts.
- Apply `Ultra` to the active conversation without changing defaults for new threads, while preserving it across mode switches and thread resumes.
- Record applied thread settings in thread metadata, including explicit clearing of reasoning effort, so resumed threads restore their latest model settings unless the user supplied an override.

## Testing

- Add TUI coverage for the advanced picker, shortcuts, Plan mode, configuration defaults, and resumed conversations.
- Add app-server and thread-store coverage for persisting, clearing, and restoring model and reasoning settings.

GitOrigin-RevId: 6708c7c2e8d38f491bf63000ea34f83476afdfe6
This commit is contained in:
Felipe Coury authored and copyberry committed 2026-07-13 09:40:51 +00:00
1 parent 2a4942c081
commit 769a5de257
27 files changed
+1447 -92

No files matched your search

+11
View File
@@ -741,6 +741,17 @@ pub(crate) enum AppEvent {
model: ModelPreset,
},
/// Open the explicit Max/Ultra reasoning selection popup for a model.
OpenAdvancedReasoningPopup {
model: ModelPreset,
},
/// Apply an advanced reasoning effort to the active conversation without changing defaults.
ApplyAdvancedReasoning {
model: String,
effort: ReasoningEffort,
},
/// Open the Plan-mode reasoning scope prompt for the selected model/effort.
OpenPlanReasoningScopePrompt {
model: String,