Skip to content

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

refactor(channels): use ctx binding and clone history key

Steven Enamakel44bd6e478ad6
diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rs
index e85850cd2d..22e442075d 100644
--- a/crates/openhuman-core/src/channels/routes.rs
+++ b/crates/openhuman-core/src/channels/routes.rs
@@ -211,8 +211,7 @@ pub(crate) async fn handle_runtime_command_if_needed(
model: current.model,
},
history_len,
- providers: self
- .context
+ providers: ctx
.config
.as_deref()
.map(provider_descriptors)
diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rs
index 8c0092b9ca..1d58f207dc 100644
--- a/crates/openhuman-core/src/channels/runtime/test_support.rs
+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs
@@ -507,7 +507,7 @@ pub async fn run_dispatch_harness(options: DispatchHarnessOptions) -> DispatchHa
history_key_ignores_thread: expected_event_channel == "telegram",
thread_id: history_key.clone(),
client_id: expected_event_channel.clone(),
- session_key: history_key,
+ session_key: history_key.clone(),
};
process_channel_runtime_message(
Arc::clone(&ctx),