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-f4ot--transcription...

49 lines
1.2 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
# claudbg-f4ot
title: Transcription header shows tools as debug HashMap, not readable list
status: todo
type: bug
created_at: 2026-03-30T04:43:50Z
updated_at: 2026-03-30T04:43:50Z
parent: claudbg-8vpb
---
## Problem
The transcription header line `Tools:` prints a raw Rust debug-format `HashMap`, e.g.:
```
Tools: {"Bash": 3, "Read": 5, "Write": 2}
```
## Expected behavior
A human-readable comma-separated summary, e.g.:
```
Tools: Bash×3, Read×5, Write×2
```
(or similar format — `Name(n)`, `Name: n`, etc. — sorted by count descending)
## Root cause
`src/commands/sessions.rs:427`:
```rust
println!("Tools: {:?}", stats.tool_calls);
```
`stats.tool_calls` is `HashMap<String, u64>`. The `:?` debug format is not user-friendly.
Same issue exists in `src/commands/agents.rs` transcribe header (prints same stats).
## Fix
Format `stats.tool_calls` by iterating entries, sorting by count descending, and joining as `"Name×N"`. The `×` (multiplication sign) or `(N)` notation both work.
## Relevant files
- `src/commands/sessions.rs` — transcribe function, `Tools:` println
- `src/commands/agents.rs` — transcribe function (same issue)
- `src/models/stats.rs``tool_calls: HashMap<String, u64>`