Skip to content

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

refactor(web_chat): import event_context from web_chat root

Steven Enamakeldfffdd5ddcf0
diff --git a/crates/openhuman-core/src/voice/realtime_harness/chat_delivery.rs b/crates/openhuman-core/src/voice/realtime_harness/chat_delivery.rs
index af4c8402d2..c55e7aedb2 100644
--- a/crates/openhuman-core/src/voice/realtime_harness/chat_delivery.rs
+++ b/crates/openhuman-core/src/voice/realtime_harness/chat_delivery.rs
@@ -52,7 +52,7 @@ pub(super) fn deliver_voice_result_to_chat(
spoken.chars().count()
);
crate::web_chat::publish_web_channel_event(crate::web_chat::WebChannelEvent::ProactiveMessage {
- context: crate::web_chat::channel_event::event_context(
+ context: crate::web_chat::event_context(
VOICE_CHAT_CLIENT_ID,
VOICE_CHAT_THREAD_ID,
"",
@@ -71,7 +71,7 @@ pub(super) fn deliver_voice_result_to_chat(
// avoid a loop; harmless if the call already ended (nobody is subscribed).
if allow_speak_back {
crate::web_chat::publish_web_channel_event(crate::web_chat::WebChannelEvent::VoiceSpeak {
- context: crate::web_chat::channel_event::event_context(
+ context: crate::web_chat::event_context(
VOICE_CHAT_CLIENT_ID,
"",
"",
@@ -98,7 +98,7 @@ pub(super) fn deliver_voice_failure_to_chat(correlation_id: &str) {
"[voice-harness] delivering deferred failure notice to chat correlation={correlation_id}"
);
crate::web_chat::publish_web_channel_event(crate::web_chat::WebChannelEvent::ProactiveMessage {
- context: crate::web_chat::channel_event::event_context(
+ context: crate::web_chat::event_context(
VOICE_CHAT_CLIENT_ID,
VOICE_CHAT_THREAD_ID,
"",
diff --git a/crates/openhuman-core/src/web_chat/egress_surface.rs b/crates/openhuman-core/src/web_chat/egress_surface.rs
index fc9b40d169..51b7e568d4 100644
--- a/crates/openhuman-core/src/web_chat/egress_surface.rs
+++ b/crates/openhuman-core/src/web_chat/egress_surface.rs
@@ -11,7 +11,7 @@ use tinybus::{EventHandler, SubscriptionHandle};
use crate::core::events::DomainEvent;
use crate::web_chat::WebChannelEvent;
-use crate::web_chat::channel_event::event_context;
+use crate::web_chat::event_context;
use super::event_bus::publish_web_channel_event;
diff --git a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs
index 1cd7481f06..4c72d92a67 100644
--- a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs
+++ b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs
@@ -8,7 +8,7 @@ use serde_json::{Value, json};
use crate::core::Outcome;
use crate::core::runtime::DispatchCtx;
use crate::web_chat::WebChannelEvent;
-use crate::web_chat::channel_event::event_context;
+use crate::web_chat::event_context;
use super::super::event_bus::publish_web_channel_event_in;
use super::super::runner::{CancelNote, runtime, scope_of};
diff --git a/crates/openhuman-core/src/web_chat/proactive.rs b/crates/openhuman-core/src/web_chat/proactive.rs
index 688021ddcf..11adab2f03 100644
--- a/crates/openhuman-core/src/web_chat/proactive.rs
+++ b/crates/openhuman-core/src/web_chat/proactive.rs
@@ -6,7 +6,7 @@
use crate::core::events::DomainEvent;
use crate::core::runtime::DispatchCtx;
-use crate::web_chat::channel_event::event_context;
+use crate::web_chat::event_context;
use crate::web_chat::{WebChannelEvent, publish_web_channel_event_in};
use async_trait::async_trait;
use std::sync::Arc;
diff --git a/crates/openhuman-core/src/web_chat/suggestions.rs b/crates/openhuman-core/src/web_chat/suggestions.rs
index 314ff25ad2..9961d6e80c 100644
--- a/crates/openhuman-core/src/web_chat/suggestions.rs
+++ b/crates/openhuman-core/src/web_chat/suggestions.rs
@@ -35,7 +35,7 @@ use tinyinference_llm::message::Message;
use tinyinference_llm::model::ModelRequest;
use crate::inference::provider;
-use crate::web_chat::channel_event::event_context;
+use crate::web_chat::event_context;
use crate::web_chat::{ChatSuggestion, WebChannelEvent};
use super::publish_web_channel_event_in;