refactor(snapshot): store unified patches in file diffs (#21244)

Co-authored-by: Adam <2363879+adamdotdevin@users.noreply.github.com>
This commit is contained in:
Dax
2026-04-07 19:48:23 -04:00
committed by GitHub
parent 463318486f
commit b7fab49b64
30 changed files with 343 additions and 183 deletions

View File

@@ -164,9 +164,7 @@ export const ApplyPatchTool = Tool.define("apply_patch", {
filePath: change.filePath,
relativePath: path.relative(Instance.worktree, change.movePath ?? change.filePath).replaceAll("\\", "/"),
type: change.type,
diff: change.diff,
before: change.oldContent,
after: change.newContent,
patch: change.diff,
additions: change.additions,
deletions: change.deletions,
movePath: change.movePath,

View File

@@ -123,8 +123,7 @@ export const EditTool = Tool.define("edit", {
const filediff: Snapshot.FileDiff = {
file: filePath,
before: contentOld,
after: contentNew,
patch: diff,
additions: 0,
deletions: 0,
}