Skip to main content

context_snippet

Function context_snippet 

Source
pub fn context_snippet(
    model: &DiffModel,
    file: &str,
    line: u32,
    on_old_side: bool,
) -> Option<Vec<(char, String)>>
Expand description

The anchored line plus its immediate neighbors within the same hunk, each tagged with its diff origin char (’ ’, ‘-’, ‘+’). None when the file or line has left the model (the comment is outdated). Shared by the markdown export and the MCP comment payloads.