Skip to main content

wants_diff_content

Function wants_diff_content 

Source
pub fn wants_diff_content(params: &Value) -> bool
Expand description

Check if the caller requested the full before/after file contents in the diff. This is for UI rendering only (e.g. the OpenCode/Pi plugins building a diff view in tool metadata) and is deliberately NOT the default: full content makes the response scale with file size, not edit size, which floods agent context on large files. Agent-facing/raw consumers should pass include_diff (counts only) instead.