Skip to content

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

chore(web_chat): add debug logging to progress bridge

Steven Enamakelf6152eecccfb
diff --git a/crates/openhuman-core/src/web_chat/progress.rs b/crates/openhuman-core/src/web_chat/progress.rs
index 1f424354cf..77dfada0b7 100644
--- a/crates/openhuman-core/src/web_chat/progress.rs
+++ b/crates/openhuman-core/src/web_chat/progress.rs
@@ -502,6 +502,7 @@ pub(crate) fn spawn_progress_bridge(
dispatch_ctx: DispatchCtx,
) {
dispatch_ctx.clone().spawn(async move {
+ eprintln!("progress bridge: task started");
let ids = TurnIds {
client_id,
thread_id,
@@ -509,6 +510,7 @@ pub(crate) fn spawn_progress_bridge(
};
let mut projection =
ProgressProjection::new(&dispatch_ctx, ids, metadata, config, turn_state_store).await;
+ eprintln!("progress bridge: projection ready");
let mut beat =
tokio::time::interval(std::time::Duration::from_secs(INFERENCE_HEARTBEAT_SECS));
beat.set_missed_tick_behavior(tokio::time::MissedTickBehavior::Skip);
@@ -530,7 +532,11 @@ pub(crate) fn spawn_progress_bridge(
// can take longer than one heartbeat interval, and selecting
// the timer while awaiting them would cancel the progress
// event that already won the receive branch.
- Next::Progress(Some(event)) => projection.on_event(event).await,
+ Next::Progress(Some(event)) => {
+ eprintln!("progress bridge: event received");
+ projection.on_event(event).await;
+ eprintln!("progress bridge: event projected");
+ }
Next::Progress(None) => break,
Next::Heartbeat => projection.heartbeat().await,
}