Skip to content

Commit 864f91a

Browse files
committed
remove clear mcp configs method
1 parent d0670b2 commit 864f91a

File tree

1 file changed

+2
-12
lines changed
  • crates/chat-cli/src/cli/agent

1 file changed

+2
-12
lines changed

crates/chat-cli/src/cli/agent/mod.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -319,16 +319,6 @@ impl Agent {
319319
}
320320
Ok(agent)
321321
}
322-
323-
// Add a method to clear MCP configurations
324-
pub fn clear_mcp_configs(&mut self) {
325-
self.mcp_servers = McpServerConfig::default();
326-
self.use_legacy_mcp_json = false;
327-
self.tools.retain(|tool| !is_mcp_ref(tool));
328-
self.allowed_tools.retain(|tool| !is_mcp_ref(tool));
329-
self.tool_aliases.retain(|orig, _alias| !is_mcp_ref(&orig.to_string()));
330-
self.tools_settings.retain(|target, _| !is_mcp_ref(&target.to_string()));
331-
}
332322
}
333323

334324
/// Result of evaluating tool permissions, indicating whether a tool should be allowed,
@@ -411,14 +401,14 @@ impl Agents {
411401
mcp_enabled: bool,
412402
) -> (Self, AgentsLoadMetadata) {
413403
if !mcp_enabled {
414-
let _ = execute!(
404+
execute!(
415405
output,
416406
style::SetForegroundColor(Color::Yellow),
417407
style::Print("\n"),
418408
style::Print("⚠️ WARNING: "),
419409
style::SetForegroundColor(Color::Reset),
420410
style::Print("MCP functionality has been disabled by your administrator.\n\n"),
421-
);
411+
)?;
422412
}
423413

424414
// Tracking metadata about the performed load operation.

0 commit comments

Comments
 (0)