Skip to content

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

chore(tui): tidy imports and formatting in thread actions, benchmark and demo

Steven Enamakel236f6c7c3be6
diff --git a/crates/openhuman-tui/src/app/thread_actions.rs b/crates/openhuman-tui/src/app/thread_actions.rs
index 1ce683c79c..655ec0eff3 100644
--- a/crates/openhuman-tui/src/app/thread_actions.rs
+++ b/crates/openhuman-tui/src/app/thread_actions.rs
@@ -1,5 +1,6 @@
//! Conversation send, cancel and session loading.
use super::*;
+use openhuman_rpc::embed::chat_surface::WebChannelEvent;
/// Queue a chat turn on the current thread. Fire-and-forget: the reply streams
/// back over the web-channel bus and is folded in by the reducer.
diff --git a/crates/openhuman-tui/src/benchmark.rs b/crates/openhuman-tui/src/benchmark.rs
index 741a33bb3b..cc1890ea80 100644
--- a/crates/openhuman-tui/src/benchmark.rs
+++ b/crates/openhuman-tui/src/benchmark.rs
@@ -1,9 +1,8 @@
//! Deterministic, offline measurements of the real viewport and TestBackend renderer.
use super::{render, state::TranscriptState, ui_state::UiState, viewport::ViewportCache};
-use openhuman_rpc::embed::chat_surface::WebChannelEvent;
-use tinychannels_bus::web::WebEventContext;
-use ratatui::{backend::TestBackend, Terminal};
-use serde_json::{json, Value};
+use openhuman_rpc::embed::chat_surface::{WebChannelEvent, WebEventContext};
+use ratatui::{Terminal, backend::TestBackend};
+use serde_json::{Value, json};
use std::{hint::black_box, time::Instant};
const SAMPLES: usize = 200;
@@ -51,13 +50,13 @@ pub(crate) fn run() -> anyhow::Result<()> {
});
let streaming = measure(|_| {
state.apply_event(&WebChannelEvent::TextDelta {
- context: WebEventContext {
- client_id: "benchmark".into(),
- ..Default::default()
- },
- delta: Some(" streamed token".into()),
- delta_kind: None,
- round: None,
+ context: WebEventContext {
+ client_id: "benchmark".into(),
+ ..Default::default()
+ },
+ delta: Some(" streamed token".into()),
+ delta_kind: None,
+ round: None,
});
black_box(cache.rows(&state, width - 4, height - 9, 0));
});
diff --git a/crates/openhuman-tui/src/demo.rs b/crates/openhuman-tui/src/demo.rs
index 7f49a7653c..140abae4b0 100644
--- a/crates/openhuman-tui/src/demo.rs
+++ b/crates/openhuman-tui/src/demo.rs
@@ -4,8 +4,7 @@ use super::cockpit::{Overlay, OverlayKind};
use super::state::TranscriptState;
use super::ui_state::{AppTab, UiState};
use crossterm::event::{self, Event, KeyCode, KeyModifiers};
-use openhuman_rpc::embed::chat_surface::WebChannelEvent;
-use tinychannels_bus::web::WebEventContext;
+use openhuman_rpc::embed::chat_surface::{WebChannelEvent, WebEventContext};
pub fn sample() -> TranscriptState {
let mut state = TranscriptState::new("preview");
@@ -72,7 +71,7 @@ pub fn sample() -> TranscriptState {
skill_id: Some("child-1".into()),
success: Some(true),
round: None,
- subagent: Some(tinychannels_bus::web::WebSubagentProgressDetail {
+ subagent: Some(openhuman_rpc::embed::chat_surface::SubagentProgressDetail {
task_id: Some("child-1".into()),
display_name: Some("Explore".into()),
elapsed_ms: Some(840),