fix: title generation + ai sdk upgrade (#1392)
This commit is contained in:
parent
f19d3d4071
commit
9d5d8a3ea7
38 changed files with 1422 additions and 2360 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue