Formatting utilities for tool call display in the CLI.
This module handles rendering tool calls and tool messages for the TUI.
Imported at module level by textual_adapter (itself deferred from the startup
path). Heavy SDK dependencies (e.g., backends) are deferred to function bodies.
Get the glyph set for the current charset mode.
Remove known dangerous/invisible Unicode characters from text.
Truncate a string value if it exceeds max_length.
Format tool calls for display with tool-specific smart formatting.
Shows the most relevant information for each tool type rather than all arguments.
Convert ToolMessage content into a printable string.