Add Agents tab for per-agent token tracking#9
Open
BubbleBuffer wants to merge 1 commit into
Open
Conversation
Adds a new Agents tab showing token usage broken down by agent (e.g. superpawers-implementer, build, explore). Includes per-agent charts, detail panels with cost/tokens/sessions/rate, and per-model sub-breakdowns within each agent. Fuzzy search and keyboard navigation supported.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new Agents page that breaks down token usage by agent (the
agentfield from OpenCode usage events). Previously the tool only had Overview, Models, and Providers pages.What's new
Files changed
src/analytics/agent_stats.rsAgentUsageRow,AgentModelBreakdown,build_agent_chart(). Groups events by agent, builds per-model sub-breakdownssrc/ui/agents.rsrender_agents()TUI page with chart, list, detail panel, model sub-breakdown, searchsrc/analytics/model_stats.rsUsageAccumulator,build_chart_for_models,medianpublicsrc/ui/models.rsSearchItem,render_search_overlay,layout_rowspublicsrc/analytics/mod.rsagent_statsmodule,agents+agent_chartfieldssrc/ui/mod.rsagentsmodulesrc/ui/app.rsVerification
cargo build: 0 warningscargo test: 39/39 passedcargo fmt: clean