Add local status line provider configuration (#61211)

## What changed

Add `tui.status_line_provider` to select `"default"` or an MCP provider identified by `server` and `tool`. Replace provider identities as a unit across configuration layers so partial overrides cannot inherit half an identity.

Ignore this setting from project configuration and packaged defaults when computing effective values and origins, while retaining strict validation. Preserve relative path resolution when an ignored provider value is malformed.

Carry the selection into TUI local settings and refresh it on configuration reload. Use the client's configuration home when rebuilding settings for remote sessions.

## Testing

Add coverage for provider precedence, incomplete profile overrides, malformed values and diagnostics, relative path resolution, and local preference preservation when resuming remote sessions.

GitOrigin-RevId: 0777d754d46cf009569ff0c90fd7426f8b7650bf
This commit is contained in:
Joe Savona
2026-11-13 00:28:10 +00:00
committed by copyberry
parent f562a7b3e2
commit 8cdabf23ae
21 changed files with 490 additions and 43 deletions
+2
View File
@@ -1412,6 +1412,7 @@ fn config_toml_deserializes_model_availability_nux() {
right_click_paste: Default::default(),
alternate_screen: AltScreenMode::default(),
status_line: None,
status_line_provider: None,
status_line_use_colors: true,
terminal_title: None,
theme: None,
@@ -4781,6 +4782,7 @@ fn tui_config_missing_notifications_field_defaults_to_enabled() {
right_click_paste: Default::default(),
alternate_screen: AltScreenMode::Auto,
status_line: None,
status_line_provider: None,
status_line_use_colors: true,
terminal_title: None,
theme: None,
+5
View File
@@ -54,6 +54,7 @@ use codex_config::types::OAuthCredentialsStoreMode;
use codex_config::types::QuickDial;
use codex_config::types::ResumeCwdMode;
use codex_config::types::SessionPickerViewMode;
use codex_config::types::StatusLineSelection;
use codex_config::types::ToolSuggestConfig;
use codex_config::types::ToolSuggestDisabledTool;
use codex_config::types::ToolSuggestDiscoverable;
@@ -878,6 +879,9 @@ pub struct Config {
/// When unset, the TUI defaults to: `model-with-reasoning` and `current-dir`.
pub tui_status_line: Option<Vec<String>>,
/// Local choice of built-in status items or an MCP provider.
pub tui_status_line_provider: Option<Box<StatusLineSelection>>,
/// Whether to color status line items with colors from the active syntax theme.
pub tui_status_line_use_colors: bool,
@@ -4857,6 +4861,7 @@ impl Config {
.map(|t| t.alternate_screen)
.unwrap_or_default(),
tui_status_line: cfg.tui.as_ref().and_then(|t| t.status_line.clone()),
tui_status_line_provider: cfg.tui.as_ref().and_then(|t| t.status_line_provider.clone()),
tui_status_line_use_colors: cfg
.tui
.as_ref()