fix: title generation + ai sdk upgrade (#1392)

This commit is contained in:
josh 2026-01-15 16:06:42 +00:00 committed by GitHub
parent f19d3d4071
commit 9d5d8a3ea7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1422 additions and 2360 deletions

View file

@ -108,14 +108,18 @@ const PurePreviewMessage = ({
const { type } = part;
const key = `message-${message.id}-part-${index}`;
if (type === "reasoning" && part.text?.trim().length > 0) {
return (
<MessageReasoning
isLoading={isLoading}
key={key}
reasoning={part.text}
/>
);
if (type === "reasoning") {
const hasContent = part.text?.trim().length > 0;
const isStreaming = "state" in part && part.state === "streaming";
if (hasContent || isStreaming) {
return (
<MessageReasoning
isLoading={isLoading || isStreaming}
key={key}
reasoning={part.text || ""}
/>
);
}
}
if (type === "text") {