Skip to content

Commit 5a2779c

Browse files
committed
fix after merge
1 parent 563e619 commit 5a2779c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/opencode/src/tool/edit.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ export const EditTool = Tool.define("edit", {
156156
await Bus.publish(File.Event.Edited, {
157157
file: filePath,
158158
})
159-
diff = trimDiff(createTwoFilesPatch(filePath, filePath, contentOld, contentNew))
159+
contentNew = await file.text()
160+
diff = trimDiff(
161+
createTwoFilesPatch(filePath, filePath, normalizeLineEndings(contentOld), normalizeLineEndings(contentNew)),
162+
)
160163
})()
161164

162165
FileTime.read(ctx.sessionID, filePath)

0 commit comments

Comments
 (0)