truncate

Function truncate 

Source
pub fn truncate(text: &str) -> String
Expand description

2026-09-26: Keep the head and tail of text longer than MAX_TOOL_OUTPUT bytes, with a note giving the elided length in bytes. The result is at most MAX_TOOL_OUTPUT bytes, so truncating it again returns it unchanged.