Documentation
¶
Overview ¶
Package textdiff computes line diffs for display: what an edit or write changed in a file, grouped into hunks with a little surrounding context. It has no dependencies and no notion of styling — the chat layer builds diffs from tool calls and the render layer paints them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diff ¶
Diff is a displayable diff: its rows (hunks separated by Gap rows) and the total count of added and removed lines.
func Compute ¶
Compute diffs old against new line by line and groups the result into hunks with ctx lines of context on each side. A negative ctx keeps every unchanged line (no Gap rows).
Click to show internal directories.
Click to hide internal directories.