Reduce diff

This commit is contained in:
Charles Cunningham
2026-01-15 18:29:24 -08:00
parent a0e778795c
commit 70424769d1
2 changed files with 10 additions and 2 deletions

View File

@@ -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,

View File

@@ -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,