pub fn truncate_text(text: &str, max_bytes: usize) -> (&str, bool)
Truncates text to a maximum byte length, appending a truncation notice.
Returns (truncated_text, was_truncated).
(truncated_text, was_truncated)