Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(mcp): simplify connected_overview control flow

Steven Enamakel490fbbcb51a9
diff --git a/crates/openhuman-core/src/mcp/registry/mod.rs b/crates/openhuman-core/src/mcp/registry/mod.rs
index 1edec796e7..6e201f5d3b 100644
--- a/crates/openhuman-core/src/mcp/registry/mod.rs
+++ b/crates/openhuman-core/src/mcp/registry/mod.rs
@@ -104,9 +104,10 @@ pub mod connections {
/// Sorted by qualified name, so a prompt built from this does not reshuffle
/// between turns and cost its cached prefix.
pub async fn connected_overview() -> Vec<ConnectedServerOverview> {
- host::ambient_config().map_or_else(Vec::new, |config| {
- async move { connected_overview_for_config(&config).await }.await
- })
+ let Some(config) = host::ambient_config() else {
+ return Vec::new();
+ };
+ connected_overview_for_config(&config).await
}
/// Every connected server's identity and advertised tools in `config`'s