tui: live bash output, token counter, structured lens view for side panel

This commit is contained in:
hermes committed 2026-10-09 15:10:59 +00:00
1 parent 79bd3b8ea7
commit c57d238f7b
7 files changed
+284 -67

No files matched your search

+24
View File
@@ -73,6 +73,30 @@ pub struct State {
pub sub_usage: Mutex<hx_ai::Usage>,
/// Subagents of this session (see [`subagent`]).
pub subs: subagent::Subs,
/// Last output lines of running `bash` calls, keyed by command (UI live view).
/// ponytail: keyed by command text, so two identical commands running at once share a tail;
/// key by call id once ToolCtx carries it.
pub live: Mutex<HashMap<String, String>>,
/// Structured last lens report for side panels.
pub lens: Mutex<LensView>,
}
/// Lens results of the last turn, structured (the injected text is for the model).
#[derive(Debug, Clone, Default, PartialEq)]
pub struct LensView {
pub diags: Vec<Diag>,
/// (test name, passed); None = no test run yet
pub tests: Option<Vec<(String, bool)>>,
}
#[derive(Debug, Clone, PartialEq)]
pub struct Diag {
/// workspace-relative
pub file: String,
pub line: u32,
pub col: u32,
pub error: bool,
pub message: String,
}
impl State {