Skip to main content

clean_suggestion

Function clean_suggestion 

Source
pub fn clean_suggestion(raw: &str, max_chars: usize) -> String
Expand description

Clean a raw model reply into an inline suggestion. Strips wrapping quotes / code fences, collapses to a single line, trims, enforces max_chars, and maps the 0 sentinel (and empties) to an empty string = “no suggestion”.