From 8ffedbe157999d7cdc395ddad26c464ec2f87ef0 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Fri, 5 Sep 2025 15:58:37 -0500 Subject: [PATCH] fix: file read response --- packages/opencode/src/file/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opencode/src/file/index.ts b/packages/opencode/src/file/index.ts index 457890d5..dda220be 100644 --- a/packages/opencode/src/file/index.ts +++ b/packages/opencode/src/file/index.ts @@ -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 } } }