Skip to content

Commit b86b196

Browse files
committed
test: align bracket tool-call spacing with main
1 parent d56c504 commit b86b196

2 files changed

Lines changed: 1 addition & 9 deletions

File tree

src/plugin-sdk/tool-payload.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,4 @@ describe("stripPlainTextToolCallBlocks", () => {
115115
),
116116
).toBe("before\nafter");
117117
});
118-
119-
it("preserves paragraph spacing around bracketed local-model tool blocks", () => {
120-
expect(
121-
stripPlainTextToolCallBlocks(
122-
["before", "[read]", '{"path":"/tmp/file.txt"}', "[END_TOOL_REQUEST]", "after"].join("\n"),
123-
),
124-
).toBe("before\n\nafter");
125-
});
126118
});

src/plugin-sdk/tool-payload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ export function stripPlainTextToolCallBlocks(text: string): string {
313313
}
314314
result += text.slice(cursor, index);
315315
cursor = block.end;
316-
const afterBlockLineBreak = block.raw.startsWith("[") ? null : consumeLineBreak(text, cursor);
316+
const afterBlockLineBreak = consumeLineBreak(text, cursor);
317317
if (afterBlockLineBreak !== null) {
318318
cursor = afterBlockLineBreak;
319319
}

0 commit comments

Comments
 (0)