fix: file read response

This commit is contained in:
Adam 2025-09-05 15:58:37 -05:00
parent 900fe5ca04
commit 8ffedbe157
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75

View file

@ -156,10 +156,10 @@ export namespace File {
const diff = await $`git diff ${file}`.cwd(Instance.directory).quiet().nothrow().text()
if (diff.trim()) {
const original = await $`git show HEAD:${file}`.cwd(Instance.directory).quiet().nothrow().text()
const diff = structuredPatch(file, file, original, content, "old", "new", {
const patch = structuredPatch(file, file, original, content, "old", "new", {
context: Infinity,
})
const patch = formatPatch(diff)
const diff = formatPatch(patch)
return { content, patch, diff }
}
}