Tui: use collaboration mode instead of model and effort (#9507)

- Only use collaboration modes in the tui state to track model and
effort.
- No behavior change without the collaboration modes flag.
- Change model and effort on /model, /collab (behind a flag), and
shift+tab (behind flag)
This commit is contained in:
Ahmed Ibrahim
2026-01-20 10:26:12 -08:00
committed by GitHub
parent 7b27aa7707
commit 5ae6e70801
15 changed files with 841 additions and 558 deletions

View File

@@ -23,6 +23,7 @@ use crate::history_cell::HistoryCell;
use codex_core::features::Feature;
use codex_core::protocol::AskForApproval;
use codex_core::protocol::SandboxPolicy;
use codex_protocol::config_types::CollaborationMode;
use codex_protocol::openai_models::ReasoningEffort;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -102,6 +103,9 @@ pub(crate) enum AppEvent {
/// Update the current model slug in the running app and widget.
UpdateModel(String),
/// Update the current collaboration mode in the running app and widget.
UpdateCollaborationMode(CollaborationMode),
/// Persist the selected model and reasoning effort to the appropriate config.
PersistModelSelection {
model: String,