From 70424769d11631361c238e79149923f55f4cf6ed Mon Sep 17 00:00:00 2001 From: Charles Cunningham Date: Thu, 15 Jan 2026 18:29:24 -0800 Subject: [PATCH] Reduce diff --- codex-rs/tui/src/history_cell.rs | 6 +++++- codex-rs/tui2/src/history_cell.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/codex-rs/tui/src/history_cell.rs b/codex-rs/tui/src/history_cell.rs index 75e5e149af..42464cd770 100644 --- a/codex-rs/tui/src/history_cell.rs +++ b/codex-rs/tui/src/history_cell.rs @@ -1432,7 +1432,6 @@ pub(crate) fn new_mcp_tools_output( if tools.is_empty() { lines.push(" • No MCP tools available.".italic().into()); lines.push("".into()); - return PlainHistoryCell { lines }; } let mut servers: Vec<_> = config.mcp_servers.iter().collect(); @@ -1456,6 +1455,9 @@ pub(crate) fn new_mcp_tools_output( header.push(" ".into()); header.push("(disabled)".red()); lines.push(header.into()); + if let Some(reason) = cfg.disabled_reason.as_ref().map(ToString::to_string) { + lines.push(vec![" • Reason: ".into(), reason.dim()].into()); + } lines.push(Line::from("")); continue; } @@ -1916,6 +1918,7 @@ mod tests { cwd: None, }, enabled: true, + disabled_reason: None, startup_timeout_sec: None, tool_timeout_sec: None, enabled_tools: None, @@ -1936,6 +1939,7 @@ mod tests { env_http_headers: Some(env_headers), }, enabled: true, + disabled_reason: None, startup_timeout_sec: None, tool_timeout_sec: None, enabled_tools: None, diff --git a/codex-rs/tui2/src/history_cell.rs b/codex-rs/tui2/src/history_cell.rs index cffe4ad3a1..2f7394aa63 100644 --- a/codex-rs/tui2/src/history_cell.rs +++ b/codex-rs/tui2/src/history_cell.rs @@ -1496,7 +1496,6 @@ pub(crate) fn new_mcp_tools_output( if tools.is_empty() { lines.push(" • No MCP tools available.".italic().into()); lines.push("".into()); - return PlainHistoryCell { lines }; } let mut servers: Vec<_> = config.mcp_servers.iter().collect(); @@ -1520,6 +1519,9 @@ pub(crate) fn new_mcp_tools_output( header.push(" ".into()); header.push("(disabled)".red()); lines.push(header.into()); + if let Some(reason) = cfg.disabled_reason.as_ref().map(ToString::to_string) { + lines.push(vec![" • Reason: ".into(), reason.dim()].into()); + } lines.push(Line::from("")); continue; } @@ -2051,6 +2053,7 @@ mod tests { cwd: None, }, enabled: true, + disabled_reason: None, startup_timeout_sec: None, tool_timeout_sec: None, enabled_tools: None, @@ -2071,6 +2074,7 @@ mod tests { env_http_headers: Some(env_headers), }, enabled: true, + disabled_reason: None, startup_timeout_sec: None, tool_timeout_sec: None, enabled_tools: None,