Render MessageReasoning only if text is present (#1082)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
fea44ddb5f
commit
a54dca0906
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ const PurePreviewMessage = ({
|
||||||
const { type } = part;
|
const { type } = part;
|
||||||
const key = `message-${message.id}-part-${index}`;
|
const key = `message-${message.id}-part-${index}`;
|
||||||
|
|
||||||
if (type === 'reasoning') {
|
if (type === 'reasoning' && part.text?.trim().length > 0) {
|
||||||
return (
|
return (
|
||||||
<MessageReasoning
|
<MessageReasoning
|
||||||
key={key}
|
key={key}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue