diff options
| author | Adam <[email protected]> | 2025-09-05 15:58:37 -0500 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-09-05 15:58:56 -0500 |
| commit | 8ffedbe157999d7cdc395ddad26c464ec2f87ef0 (patch) | |
| tree | abe51278062c7920ed47eb73e3942af82eceb1ee | |
| parent | 900fe5ca041c5b9e2de9449c441dd9cb10beed0a (diff) | |
| download | opencode-8ffedbe157999d7cdc395ddad26c464ec2f87ef0.tar.gz opencode-8ffedbe157999d7cdc395ddad26c464ec2f87ef0.zip | |
fix: file read response
| -rw-r--r-- | packages/opencode/src/file/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/opencode/src/file/index.ts b/packages/opencode/src/file/index.ts index 457890d54..dda220be4 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 } } } |
