Expand description
Token-efficient diffs (§6.1): emit minimal unified hunks, never full-file rewrites. Small context radii keep the token cost proportional to what actually changed.
Functions§
- changed_
lines - The number of changed (inserted or deleted) lines between
oldandnew— a cheap proxy for edit size, useful for budgeting and for choosing whole-file vs diff transport. - unified_
diff - A compact unified diff between
oldandnew, withcontextunchanged lines around each hunk. Returns an empty string when the inputs are identical.