Expand description
Shared tool display formatting — single source of truth for all surfaces.
These pure functions convert raw tool names and arguments into
human-readable display strings. The agentic loop populates
AgentEvent payloads with pre-formatted fields computed here,
so CLI, WebUI (Axum SSE), and GUI (Tauri) all render identical labels
without duplicating formatting logic.
Functions§
- format_
tool_ args_ summary - Extract a one-line argument summary from a tool call’s
argumentsJSON. - format_
tool_ display_ name - Convert a raw tool name into a human-readable “Title Case” label.
- strip_
tool_ prefix - Strip the routing prefix from a qualified tool name.
- title_
case_ 🔒word - Title-case a single word (first char uppercase, rest lowercase).
- truncate 🔒
- Truncate a string to
max_lencharacters, appending…if truncated.