Skip to main content

Module apply

Module apply 

Source
Expand description

Apply parsed update chunks to file content.

This ports applyUpdateChunks and its diagnostics from packages/opencode-plugin/src/patch-parser.ts.

Structs§

ClosestPartialMatch

Functions§

apply_update_chunks
Apply parsed update chunks to original file content, returning the patched text or an error string.
find_closest_partial_match
Find the closest partial match and report where the candidate first diverges for failure diagnostics.
seek_sequence
Return only the matched line index for diagnostics that do not need the full tiered match details.