mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 10:01:24 +00:00
refactor: streamline TUI stream assembly updates
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user