Skip to content

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

refactor(runtime): replace spawn_draft_updater with build_channel_context_block

Steven Enamakela5155e43b752
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/helpers.rs b/crates/openhuman-core/src/channels/runtime/dispatch/helpers.rs
index c01e27e254..4704a5d869 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/helpers.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/helpers.rs
@@ -53,14 +53,8 @@ pub(super) fn spawn_typing_task(
})
}
-/// Forward agent progress to a provider draft while keeping the updater
-/// attached to the current dispatch worker's cancellation lifecycle.
-pub(super) fn spawn_draft_updater(
- mut progress: tokio::sync::mpsc::Receiver<AgentProgress>,
- channel: Arc<dyn Channel>,
- reply_target: String,
- draft_id: String,
-) -> tokio_util::task::AbortOnDropHandle<()> {
+/// Build the `[Channel context]` block for a channel turn.
+pub(super) fn build_channel_context_block(msg: &traits::ChannelMessage) -> String {
tokio_util::task::AbortOnDropHandle::new(tokio::spawn(async move {
let mut accumulated = String::new();
let mut last_thinking_update = None;