Skip to content

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

feat(web_chat): add optional turn timing to response delivery

Steven Enamakela6dc4e238501
diff --git a/crates/openhuman-core/src/web_chat/presentation.rs b/crates/openhuman-core/src/web_chat/presentation.rs
index bebba9da73..6f558f5b18 100644
--- a/crates/openhuman-core/src/web_chat/presentation.rs
+++ b/crates/openhuman-core/src/web_chat/presentation.rs
@@ -65,8 +65,11 @@ pub(crate) async fn deliver_response(
citations: &[crate::memory::agent::memory_loader::MemoryCitation],
usage: Option<&LastTurnUsage>,
workspace_dir: Option<&std::path::Path>,
+ timing: Option<super::turn_timing::TurnTimingSnapshot>,
) {
let usage_payload = usage_payload(usage);
+ let timing_payload =
+ timing.map(|snapshot| snapshot.into_payload(usage.map(|u| u.output_tokens)));
// Spawn reaction decision in parallel — it runs on the local model and
// shouldn't block segmentation or delivery.