pub fn pack_diff_context(
files: &[DiffContextFile<'_>],
options: DiffContextOptions,
) -> PackedDiffContextExpand description
Pack file-level diff records into a deterministic context block.
The algorithm is intentionally small:
- Sort records by mode-specific priority, using relevance and patch size.
- Include full file patches while they fit the optional character budget.
- When a high-priority file does not fit, include a compact patch made of file/hunk headers, changed lines, and adjacent context lines.
- Return summaries for deleted, omitted, empty, and truncated records.