fix(cursor): reported full file size for ranged reads

This commit is contained in:
can1357
2026-07-30 01:45:41 +02:00
parent be5292bffd
commit 34d7f2fb38
5 changed files with 15 additions and 1 deletions
@@ -1899,6 +1899,7 @@ describe("Cursor exec answers: what the result claims about the work", () => {
details: {
truncation: { truncated: true, totalLines: 97 },
meta: { truncation: { totalLines: 101 } },
fileSize: 4096,
},
});
},
@@ -1910,6 +1911,7 @@ describe("Cursor exec answers: what the result claims about the work", () => {
if (answer.value.result.case !== "success") throw new Error(`got ${answer.value.result.case}`);
expect(answer.value.result.value.totalLines).toBe(101);
expect(answer.value.result.value.rangeApplied).toBe(true);
expect(answer.value.result.value.fileSize).toBe(4096n);
});
it("counts the payload when the read returned the file whole", async () => {