Expand description
Rendering utilities for tool output. Tool output rendering utilities Provides helpers for formatting tool results for display.
Functions§
- get_
text_ output - Extract text output from tool result content, stripping ANSI codes.
- invalid_
arg_ text - Format an “invalid argument” indicator for tool output.
- normalize_
display_ text - Normalize display text by removing carriage returns.
- replace_
tabs - Replace tabs with spaces for display.
- replace_
tabs_ owned - Replace tabs with spaces, returning an owned String.
- sanitize_
binary_ output - Sanitize binary output by replacing non-printable bytes. Keeps newlines, tabs, and printable ASCII. Replaces everything else.
- shorten_
path - Shorten a file path by replacing the home directory prefix with
~. - truncate_
output_ preview - Format a string as a truncated preview for tool output display.