Skip to content

Commit f0e5a22

Browse files
committed
fix: message overlay
1 parent 82b52a4 commit f0e5a22

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

package/src/components/MessageOverlay/MessageOverlay.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import { mergeThemes, ThemeProvider, useTheme } from '../../contexts/themeContex
4545
import { useViewport } from '../../hooks/useViewport';
4646
import type { DefaultStreamChatGenerics } from '../../types/types';
4747
import { MessageTextContainer } from '../Message/MessageSimple/MessageTextContainer';
48+
import { StreamingMessageView } from '../Message/MessageSimple/StreamingMessageView';
4849
import { OverlayReactions as DefaultOverlayReactions } from '../MessageOverlay/OverlayReactions';
4950
import type { ReplyProps } from '../Reply/Reply';
5051

@@ -451,9 +452,17 @@ const MessageOverlayWithContext = <
451452
</OwnCapabilitiesProvider>
452453
) : null;
453454
}
455+
case 'ai_text':
456+
return (
457+
<StreamingMessageView
458+
key={`ai_message_text_container_${messageContentOrderIndex}`}
459+
message={message}
460+
/>
461+
);
454462
case 'text':
455463
default:
456-
return otherAttachments?.length && otherAttachments[0].actions ? null : (
464+
return (otherAttachments?.length && otherAttachments[0].actions) ||
465+
message.ai_generated ? null : (
457466
<MessageTextContainer<StreamChatGenerics>
458467
key={`message_text_container_${messageContentOrderIndex}`}
459468
message={message}

0 commit comments

Comments
 (0)