The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
style(web_chat): reflow imports and expressions to satisfy rustfmt
Steven Enamakel795bea375e9c
diff --git a/crates/openhuman-core/src/web_chat/surface.rs b/crates/openhuman-core/src/web_chat/surface.rsindex 47a3df23b7..f3958156da 100644--- a/crates/openhuman-core/src/web_chat/surface.rs+++ b/crates/openhuman-core/src/web_chat/surface.rs@@ -7,8 +7,10 @@ use std::sync::Arc;use sha2::Digest as _;use tinychannels_bus::module_progressive::ChannelOutputEvent;+use tinychannels_bus::module_web_output::{+ BeginWebTurn, EndWebTurn, ProjectWebOutput, WebTurnHandle,+};use tinychannels_bus::web as bus_web;-use tinychannels_bus::module_web_output::{BeginWebTurn, EndWebTurn, ProjectWebOutput, WebTurnHandle};use super::event_bus_channel::publish_web_channel_event_in;use super::WebChannelEvent;@@ -55,14 +57,13 @@ impl Surface {let module = crate::modules::client(config);let tenant = super::ops::tenant_of(ctx);- let scope_bytes = serde_json::to_vec(&(- tenant,- &ids.client_id,- &ids.thread_id,- &ids.request_id,- ))- .expect("web turn scope tuple is serializable");- let scope_key = format!("web-chat:{}", hex::encode(sha2::Sha256::digest(scope_bytes)));+ let scope_bytes =+ serde_json::to_vec(&(tenant, &ids.client_id, &ids.thread_id, &ids.request_id))+ .expect("web turn scope tuple is serializable");+ let scope_key = format!(+ "web-chat:{}",+ hex::encode(sha2::Sha256::digest(scope_bytes))+ );Self {state: Arc::new(tokio::sync::Mutex::new(SurfaceState {diff --git a/crates/openhuman-core/src/web_chat/turn_host_tests.rs b/crates/openhuman-core/src/web_chat/turn_host_tests.rsindex 1ab7ad6797..82d055cfe1 100644--- a/crates/openhuman-core/src/web_chat/turn_host_tests.rs+++ b/crates/openhuman-core/src/web_chat/turn_host_tests.rs@@ -135,14 +135,16 @@ async fn the_heartbeat_beats_only_for_a_live_turn() {thread_id: "host-hb-thread".into(),request_id: "host-hb-request".into(),};- let projection = Arc::new(AsyncMutex::new(ProgressProjection::new(- &DispatchCtx::ambient(),- ids,- Default::default(),- crate::config::Config::default(),- std::sync::Arc::new(tinyagents_session::port::InMemoryTurnStates::default()),- )- .await));+ let projection = Arc::new(AsyncMutex::new(+ ProgressProjection::new(+ &DispatchCtx::ambient(),+ ids,+ Default::default(),+ crate::config::Config::default(),+ std::sync::Arc::new(tinyagents_session::port::InMemoryTurnStates::default()),+ )+ .await,+ ));let beat = AbortOnDrop(spawn_heartbeat(&DispatchCtx::ambient(), projection.clone()));// Before `TurnStarted` the turn is not live: no beat, however long it waits.