From 14e56289391ea95b493c2a20c87f8d88047aa051 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sun, 15 Nov 2026 17:16:08 +0100 Subject: 0.6.0: transcript viewer, turn summary, yolo floor, model/version records - --show renders a session without locking it - status line summarises writes, commands and denials per turn - sessions record harness version; model switches are appended and listed - --yolo refuses $HOME and / unless AGENT686_ALLOW_HOME=1 --- src/ui.rs | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/ui.rs') diff --git a/src/ui.rs b/src/ui.rs index 3148df9..2fdda1a 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -150,7 +150,14 @@ pub fn tool_result(summary: &str, aborted: bool) { let _ = std::io::stdout().flush(); } -pub fn status(steps: usize, elapsed: Duration, outcome: &Outcome) { +#[derive(Debug, Default, Clone, Copy)] +pub struct Summary { + pub writes: usize, + pub commands: usize, + pub denied: usize, +} + +pub fn status(steps: usize, elapsed: Duration, outcome: &Outcome, summary: &Summary) { let mut parts = vec![ if steps == 1 { "1 step".to_string() @@ -159,6 +166,23 @@ pub fn status(steps: usize, elapsed: Duration, outcome: &Outcome) { }, format!("{:.1}s", elapsed.as_secs_f64()), ]; + if summary.writes > 0 { + parts.push(format!( + "{} write{}", + summary.writes, + if summary.writes == 1 { "" } else { "s" } + )); + } + if summary.commands > 0 { + parts.push(format!( + "{} command{}", + summary.commands, + if summary.commands == 1 { "" } else { "s" } + )); + } + if summary.denied > 0 { + parts.push(format!("{} denied", summary.denied)); + } let (input, output) = outcome.tokens(); if let (Some(i), Some(o)) = (input, output) { parts.push(format!("{i} in ยท {o} out")); -- cgit v1.2.3