Skip to content

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

refactor(flows): reuse composio identity lookup helper

Steven Enamakelc668ee06e405
diff --git a/crates/openhuman-core/src/flows/ops/connections.rs b/crates/openhuman-core/src/flows/ops/connections.rs
index 3f612ddb89..a413494d5c 100644
--- a/crates/openhuman-core/src/flows/ops/connections.rs
+++ b/crates/openhuman-core/src/flows/ops/connections.rs
@@ -164,18 +164,10 @@ pub(super) fn build_flow_connections(
let normalize_connection_identifier =
|raw: &str| keys.get(raw).cloned().unwrap_or_else(|| raw.to_string());
- let identity_lookup: std::collections::HashMap<(String, String), &_> = identities
- .iter()
- .map(|id| {
- (
- (
- normalize_connection_identifier(&id.source),
- normalize_connection_identifier(&id.identifier),
- ),
- id,
- )
- })
- .collect();
+ let identity_lookup = crate::integrations::composio::ops::connections::identity_lookup(
+ identities,
+ keys,
+ );
let mut out = Vec::with_capacity(composio.len() + http.len());
for conn in composio {