refactor: streamline TUI stream assembly updates

This commit is contained in:
Peter Steinberger
2026-01-20 08:45:07 +00:00
parent c17c7b4e24
commit 32a668e4d9
3 changed files with 48 additions and 20 deletions

View File

@@ -87,4 +87,14 @@ describe("extractContentFromMessage", () => {
expect(text).toBe("hello");
});
it("renders error text when stopReason is error and content is not an array", () => {
const text = extractContentFromMessage({
role: "assistant",
stopReason: "error",
errorMessage: '429 {"error":{"message":"rate limit"}}',
});
expect(text).toContain("HTTP 429");
});
});