pub fn truncate_diff(diff: &str, max_chars: usize) -> String
Truncate diff content with context preservation.
Keeps the beginning and end of the diff to show what changed, hiding the middle if too long.