groundBlocks
groundBlocks(
blocks,pendingDiff,changedFiles):VisualBlock[]
Defined in: src/visual-blocks.ts:715
Ground LLM-emitted blocks against the real diff.
- Carrier present (pendingDiff non-empty): join diff blocks to real DiffFiles (drop unmatched), cap each joined file’s hunks, and reconcile file-tree entries against the real diff.
- Carrier empty (e.g. a server bounce lost it before finalize): FAIL CLOSED — drop all
diffblocks (no real hunks to show), keepfile-treeentries whose path is inchangedFiles(paths survive teardown; status does not, so the authoredchangeis kept as-is), and passrich-text/calloutthrough untouched.
Parameters
Section titled “Parameters”blocks
Section titled “blocks”pendingDiff
Section titled “pendingDiff”DiffFile[]
changedFiles
Section titled “changedFiles”string[]