fix(tui): surface streaming reasoning titles

This commit is contained in:
Aiden Cline
2026-05-23 18:07:41 -05:00
parent 009065f430
commit ce84bc60b2
2 changed files with 18 additions and 4 deletions
@@ -9,6 +9,20 @@ describe("reasoningSummary", () => {
})
})
test("extracts a completed title before its streamed body arrives", () => {
expect(reasoningSummary("**Continuing Quality Review**")).toEqual({
title: "Continuing Quality Review",
body: "",
})
})
test("does not consume ordinary leading bold content", () => {
expect(reasoningSummary("**Important:** keep this in the body.")).toEqual({
title: null,
body: "**Important:** keep this in the body.",
})
})
test("leaves content without a leading title in its body", () => {
expect(reasoningSummary("Details only.")).toEqual({ title: null, body: "Details only." })
})