Render MessageReasoning only if text is present (#1082)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Hayden Bleasel 2025-07-05 01:58:33 -07:00 committed by GitHub
parent fea44ddb5f
commit a54dca0906
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,7 +103,7 @@ const PurePreviewMessage = ({
const { type } = part;
const key = `message-${message.id}-part-${index}`;
if (type === 'reasoning') {
if (type === 'reasoning' && part.text?.trim().length > 0) {
return (
<MessageReasoning
key={key}