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

+6 -2
View File
@@ -269,7 +269,7 @@ impl App {
}
let (session, turns, live_attached) = match app_server
.resume_thread(self.config.clone(), thread_id)
.resume_thread(self.config.clone(), thread_id, self.resume_model_settings())
.await
{
Ok(started) => (started.session, started.turns, true),
@@ -789,7 +789,11 @@ impl App {
self.chat_widget.rollout_path().as_deref(),
);
match app_server
.resume_thread(resume_config.clone(), target_session.thread_id)
.resume_thread(
resume_config.clone(),
target_session.thread_id,
self.resume_model_settings(),
)
.await
{
Ok(resumed) => {