Module tool_display

Module tool_display 

Source
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 arguments JSON.
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_len characters, appending if truncated.