pub fn compress_text(s: &str) -> StringExpand description
Deterministically compress prompt text to reduce tokens without an LLM: trims each line, collapses internal whitespace runs to single spaces, drops blank lines, and removes consecutive duplicate lines.