Prettify a tool label from `AITool::description()` (e.g. "CLI: claude-code") into a product-facing name. Drops the access-method prefix, then maps the known agent registry keys to display names (e.g. "claude-code" → "Claude Code"). Unknown names and prefix-less variants (e.g. "API") pass through unchanged.
(description: &str)
| 750 | /// "Claude Code"). Unknown names and prefix-less variants (e.g. "API") pass |
| 751 | /// through unchanged. |
| 752 | fn pretty_tool(description: &str) -> String { |
| 753 | let name = match description.split_once(": ") { |
| 754 | Some((_prefix, name)) => name, |
| 755 | None => description, |
| 756 | }; |
| 757 | match name { |
| 758 | "claude-code" => "Claude Code", |
| 759 | "codex" => "Codex", |
| 760 | "gemini-cli" => "Gemini CLI", |
| 761 | "agy" => "Antigravity CLI", |
| 762 | "cursor" => "Cursor", |
| 763 | "devin" => "Devin Desktop", |
| 764 | "cline" => "Cline", |
| 765 | "opencode" => "OpenCode", |
| 766 | "copilot" => "Copilot", |
| 767 | "sherpa" => "Sherpa", |
| 768 | "pi" => "Pi", |
| 769 | "kilo" => "Kilo Code", |
| 770 | "grok" => "Grok Build", |
| 771 | other => other, |
| 772 | } |
| 773 | .to_string() |
| 774 | } |
| 775 | |
| 776 | fn format_tokens(tokens: u64) -> String { |
| 777 | if tokens >= 1_000_000 { |
nothing calls this directly
no outgoing calls
no test coverage detected