You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
claudbg/.beans/claudbg-d3aj--session-stati...

912 B

title status type priority created_at updated_at parent
Session statistics computation completed task normal 2026-03-27T19:39:15Z 2026-03-28T17:31:49Z claudbg-mztt

Given a parsed list of SessionEntries, compute: total input/output/cache tokens (sum across all assistant message usage fields), tool call counts keyed by tool name, session duration (sum of durationMs from system messages with subtype=turn_duration), model (from first assistant message). Return a SessionStats struct.

Summary of Changes\n\nCreated src/models/stats.rs with SessionStats struct (token counts, tool_calls HashMap, duration_ms, model, message counts) and compute_stats(entries: &[RawEntry]) -> SessionStats. Accumulates usage from assistant messages, counts tool_use blocks by name, sums duration_ms from system entries, captures model from first assistant message. All 4 required unit tests pass.