migrate Snapshot schemas to Effect Schema (#23747)

This commit is contained in:
Kit Langton
2026-04-21 17:37:27 -04:00
committed by GitHub
parent b1c3095edd
commit 0bcf734a67
5 changed files with 30 additions and 28 deletions

View File

@@ -153,15 +153,17 @@ export const EditTool = Tool.define(
}).pipe(Effect.orDie),
)
let additions = 0
let deletions = 0
for (const change of diffLines(contentOld, contentNew)) {
if (change.added) additions += change.count || 0
if (change.removed) deletions += change.count || 0
}
const filediff: Snapshot.FileDiff = {
file: filePath,
patch: diff,
additions: 0,
deletions: 0,
}
for (const change of diffLines(contentOld, contentNew)) {
if (change.added) filediff.additions += change.count || 0
if (change.removed) filediff.deletions += change.count || 0
additions,
deletions,
}
yield* ctx.metadata({