Skip to main content

Module render_utils

Module render_utils 

Source
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.