MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / pretty_tool

Function pretty_tool

atomic-cli/src/commands/agent/attest.rs:752–774  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

750/// "Claude Code"). Unknown names and prefix-less variants (e.g. "API") pass
751/// through unchanged.
752fn 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
776fn format_tokens(tokens: u64) -> String {
777 if tokens >= 1_000_000 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected