Skip to content

Commit 71ddc7c

Browse files
author
Bertan Ari
committed
test(vscode-lm): cover empty-emit side of the carried marker guard
1 parent 2195006 commit 71ddc7c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/api/providers/__tests__/vscode-lm.spec.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ describe("VsCodeLmHandler", () => {
393393
expect(chunks.some((chunk) => chunk.type === "tool_call")).toBe(false)
394394
})
395395

396+
it("emits no text chunk when a chunk is entirely a carried marker fragment", async () => {
397+
const chunks = await collect(["<fun", "ky text"])
398+
399+
expect(chunks.filter((chunk) => chunk.type === "text")).toEqual([{ type: "text", text: "<funky text" }])
400+
})
401+
396402
it("buffers across chunks that arrive after the marker", async () => {
397403
const chunks = await collect([
398404
'prose <function_calls><invoke name="calculator">',

0 commit comments

Comments
 (0)