Skip to main content

truncate_preview

Function truncate_preview 

Source
pub fn truncate_preview(preview: &str, max_length: usize) -> String
Expand description

Smart truncate preview to reduce token usage Truncates at word boundary if possible, adds ellipsis if truncated