fix(core): balance truncated patch summaries

This commit is contained in:
Kit Langton 2026-07-20 15:27:40 -04:00
commit a9bc065996
3 changed files with 11 additions and 4 deletions

View file

@ -241,7 +241,7 @@ describe("PatchTool", () => {
const hunk = parsePatch(structured.files[0]?.patch ?? "")[0]?.hunks[0]
expect(hunk?.lines.some((line) => line.startsWith("-"))).toBe(true)
expect(hunk?.lines.some((line) => line.startsWith("+"))).toBe(true)
expect(hunk).toMatchObject({ oldLines: 2, newLines: 2 })
expect(hunk).toMatchObject({ oldLines: 1, newLines: 1 })
expect(structured).toMatchObject({
applied: [{ type: "update", resource: "large.txt" }],
files: [{ file: "large.txt", patch: expect.stringContaining("... truncated ...") }],