Skip to main content

format_diff_for_llm

Function format_diff_for_llm 

Source
pub fn format_diff_for_llm(raw_diff: &str, limit: usize) -> String
Expand description

Format a raw unified diff into a compact, LLM-friendly form. Truncation is UTF-8 boundary safe (the original tool sliced at a byte offset and could panic on multi-byte characters).