Add per-agent run stats (messages, tool calls by type)
compute_run_stats() walks the conversation AST after each agent completes, counting messages and tool calls by tool name. Stats are returned from save_agent_log(), stored on UnconsciousAgent, and displayed in the agent list UI. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
b4dfd3c092
commit
aade8a9cce
2 changed files with 59 additions and 16 deletions
|
|
@ -250,6 +250,10 @@ impl SubconsciousScreen {
|
|||
format!("run {}", snap.runs + 1)
|
||||
} else if !snap.enabled {
|
||||
"off".to_string()
|
||||
} else if let Some(ref stats) = snap.last_stats {
|
||||
format!("×{} {} {}msg {}tc",
|
||||
snap.runs, ago,
|
||||
stats.messages, stats.tool_calls)
|
||||
} else {
|
||||
format!("×{} {}", snap.runs, ago)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue