Skip to content

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

refactor(web_chat): drop redundant event conversions and explicit let bindings

Steven Enamakelebd36f9bf16c
diff --git a/crates/openhuman-core/src/web_chat/presentation.rs b/crates/openhuman-core/src/web_chat/presentation.rs
index a945fe6b24..fd6cc025d8 100644
--- a/crates/openhuman-core/src/web_chat/presentation.rs
+++ b/crates/openhuman-core/src/web_chat/presentation.rs
@@ -275,13 +275,13 @@ fn publish_chat_done(
};
publish_web_channel_event_in(
ctx,
- WebChannelEvent::from(chat_done_event(
+ chat_done_event(
context,
full_response,
citations,
usage_payload,
timing_payload,
- )),
+ ),
);
}
diff --git a/crates/openhuman-core/src/web_chat/progress.rs b/crates/openhuman-core/src/web_chat/progress.rs
index a7e843cd53..9ea53313e8 100644
--- a/crates/openhuman-core/src/web_chat/progress.rs
+++ b/crates/openhuman-core/src/web_chat/progress.rs
@@ -501,7 +501,7 @@ pub(crate) fn spawn_progress_bridge(
config: Config,
dispatch_ctx: DispatchCtx,
) {
- let _ = spawn_progress_bridge_with_heartbeat_interval(
+ drop(spawn_progress_bridge_with_heartbeat_interval(
rx,
client_id,
thread_id,
@@ -511,7 +511,7 @@ pub(crate) fn spawn_progress_bridge(
config,
dispatch_ctx,
std::time::Duration::from_secs(INFERENCE_HEARTBEAT_SECS),
- );
+ ));
}
#[allow(clippy::too_many_arguments)]