Skip to content

Add agent type labels, tool duration, and token usage display#3

Merged
phiat merged 3 commits intomainfrom
feature/enhanced-metadata
Mar 18, 2026
Merged

Add agent type labels, tool duration, and token usage display#3
phiat merged 3 commits intomainfrom
feature/enhanced-metadata

Conversation

@phiat
Copy link
Copy Markdown
Owner

@phiat phiat commented Mar 18, 2026

Summary

  • Agent type labels: Parse .meta.json to show agent types (e.g., "Explore", "code-reviewer") instead of generic "Agent-abc1234" in both tree and stream views
  • Tool execution duration: Show toolUseResult.durationMs on output headers (e.g., "(1.2s)", "(45ms)")
  • Token usage tracking: Accumulate and display cumulative input/output token counts in the header bar (e.g., "12.3k in / 4.5k out")

Test plan

  • go test ./... — all tests pass
  • go build . — compiles cleanly
  • Manual test: verify agent types display correctly in tree and stream
  • Manual test: verify tool duration appears on output headers
  • Manual test: verify token counts accumulate in header

🤖 Generated with Claude Code

phiat and others added 3 commits March 18, 2026 10:15
- Parse .meta.json to show agent types (Explore, code-reviewer) instead of generic Agent-ID in tree
- Show tool execution duration from toolUseResult.durationMs on output headers
- Track and display cumulative token usage (input/output) in header bar

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Agent type from .meta.json now applied to stream item headers (not just tree nodes)
- Add lookupAgentType helper for debounce path
- Clarify that token counter includes history (shows total session cost)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@phiat phiat marked this pull request as ready for review March 18, 2026 14:42
@phiat phiat merged commit a1e0e1a into main Mar 18, 2026
1 check passed
@phiat phiat deleted the feature/enhanced-metadata branch March 18, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant