Skip to content

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

refactor(threads): replace ambient dispatch ctx with host_default

Steven Enamakel45a38fe0306c
diff --git a/crates/openhuman-core/src/threads/store/bus.rs b/crates/openhuman-core/src/threads/store/bus.rs
index 9316f865c8..40b95f9c94 100644
--- a/crates/openhuman-core/src/threads/store/bus.rs
+++ b/crates/openhuman-core/src/threads/store/bus.rs
@@ -242,7 +242,7 @@ impl EventHandler<DomainEvent> for ConversationPersistenceSubscriber {
return;
}
if let Err(error) = persist_channel_turn(
- &DispatchCtx::ambient(),
+ &DispatchCtx::host_default(),
&my_workspace,
ChannelTurnDescriptor {
channel,
@@ -301,7 +301,7 @@ impl EventHandler<DomainEvent> for ConversationPersistenceSubscriber {
return;
}
if let Err(error) = persist_channel_turn(
- &DispatchCtx::ambient(),
+ &DispatchCtx::host_default(),
&my_workspace,
ChannelTurnDescriptor {
channel,
@@ -403,7 +403,7 @@ async fn persist_channel_turn(
let created_at = Utc::now().to_rfc3339();
ensure_thread(
- &DispatchCtx::ambient(),
+ &DispatchCtx::host_default(),
workspace_dir.to_path_buf(),
CreateConversationThread {
id: thread_id.clone(),
@@ -418,7 +418,7 @@ async fn persist_channel_turn(
let persisted_message_id = format!("{}:{}", descriptor.role, descriptor.message_id);
if get_messages(
- &DispatchCtx::ambient(),
+ &DispatchCtx::host_default(),
workspace_dir.to_path_buf(),
&thread_id,
)?
@@ -434,7 +434,7 @@ async fn persist_channel_turn(
}
append_message(
- &DispatchCtx::ambient(),
+ &DispatchCtx::host_default(),
workspace_dir.to_path_buf(),
&thread_id,
ConversationMessage {