fix(coding-agent): Coalesce adjacent assistant thinking blocks into one section
This commit is contained in:
@@ -74,6 +74,24 @@ describe("AssistantMessageComponent", () => {
|
||||
expect(rendered).toContain("response may be incomplete");
|
||||
});
|
||||
|
||||
test("coalesces adjacent thinking blocks into one hidden thinking label", () => {
|
||||
initTheme("dark");
|
||||
|
||||
const component = new AssistantMessageComponent(
|
||||
createAssistantMessage([
|
||||
{ type: "thinking", thinking: "first thought" },
|
||||
{ type: "thinking", thinking: "" },
|
||||
{ type: "thinking", thinking: "second thought" },
|
||||
{ type: "text", text: "answer" },
|
||||
]),
|
||||
true,
|
||||
);
|
||||
const rendered = stripAnsi(component.render(80).join("\n"));
|
||||
|
||||
expect(rendered.match(/Thinking\.\.\./g)).toHaveLength(1);
|
||||
expect(rendered).toContain("answer");
|
||||
});
|
||||
|
||||
test("uses configured output padding for text and thinking", () => {
|
||||
initTheme("dark");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user