Skip to content

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

style: reorder imports and collapse test formatting

Steven Enamakel39b5da72f847
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index c4dd09223c..57dabaf812 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -10,9 +10,9 @@ use std::future::Future;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::task::{Context, Poll, Wake, Waker};
-use tinychannels_bus::context::ChatMessage;
use tinybus::EventHandler;
use tinychannels::routes::resolve_provider_alias;
+use tinychannels_bus::context::ChatMessage;
use tinychannels_bus::ChannelMessage;
use tinytools::{Tool, ToolResult};
@@ -343,10 +343,10 @@ async fn handle_runtime_command_unknown_provider_sends_helpful_error() {
async fn handle_runtime_command_set_model_clears_sender_history_and_persists_route_override() {
let ctx = runtime_context(PathBuf::from("/tmp"));
let key = "telegram_alice_room";
- ctx.conversation_histories.lock().unwrap().insert(
- key.to_string(),
- vec![ChatMessage::user("old history")],
- );
+ ctx.conversation_histories
+ .lock()
+ .unwrap()
+ .insert(key.to_string(), vec![ChatMessage::user("old history")]);
let channel_impl = Arc::new(RecordingChannel::default());
let channel: Arc<dyn Channel> = channel_impl.clone();
let msg = ChannelMessage {
@@ -551,10 +551,10 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {
.get(sender_key)
.is_none());
- ctx.conversation_histories.lock().unwrap().insert(
- sender_key.to_string(),
- vec![ChatMessage::user("after new")],
- );
+ ctx.conversation_histories
+ .lock()
+ .unwrap()
+ .insert(sender_key.to_string(), vec![ChatMessage::user("after new")]);
set_route_selection(
&ctx,
sender_key,
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
index 467838aa00..adb7e33ccc 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs
@@ -17,8 +17,8 @@ use crate::util::truncate_with_ellipsis;
use std::sync::Arc;
use std::time::{Duration, Instant};
use tinyagents_session::transcript::TranscriptMessage;
-use tinychannels_bus::context::ChatMessage;
use tinychannels_bus as traits;
+use tinychannels_bus::context::ChatMessage;
use tokio_util::sync::CancellationToken;
use tokio_util::task::AbortOnDropHandle;
diff --git a/crates/openhuman-core/src/cron/channel_bridge_tests.rs b/crates/openhuman-core/src/cron/channel_bridge_tests.rs
index 273a78796b..541bdc3ce2 100644
--- a/crates/openhuman-core/src/cron/channel_bridge_tests.rs
+++ b/crates/openhuman-core/src/cron/channel_bridge_tests.rs
@@ -34,10 +34,7 @@ async fn bridge_reads_appends_trims_and_sends() {
let histories: ChannelHistories = Arc::new(Mutex::new(HashMap::new()));
histories.lock().unwrap().insert(
"k".into(),
- vec![
- ChatMessage::user("remind me"),
- ChatMessage::assistant("ok"),
- ],
+ vec![ChatMessage::user("remind me"), ChatMessage::assistant("ok")],
);
let sends = Arc::new(AtomicUsize::new(0));
let last_target = Arc::new(Mutex::new(String::new()));