Skip to content

Commit

Permalink
fix: message overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
isekovanic committed Dec 3, 2024
1 parent 82b52a4 commit f0e5a22
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion package/src/components/MessageOverlay/MessageOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { mergeThemes, ThemeProvider, useTheme } from '../../contexts/themeContex
import { useViewport } from '../../hooks/useViewport';
import type { DefaultStreamChatGenerics } from '../../types/types';
import { MessageTextContainer } from '../Message/MessageSimple/MessageTextContainer';
import { StreamingMessageView } from '../Message/MessageSimple/StreamingMessageView';
import { OverlayReactions as DefaultOverlayReactions } from '../MessageOverlay/OverlayReactions';
import type { ReplyProps } from '../Reply/Reply';

Expand Down Expand Up @@ -451,9 +452,17 @@ const MessageOverlayWithContext = <
</OwnCapabilitiesProvider>
) : null;
}
case 'ai_text':
return (
<StreamingMessageView
key={`ai_message_text_container_${messageContentOrderIndex}`}
message={message}
/>
);
case 'text':
default:
return otherAttachments?.length && otherAttachments[0].actions ? null : (
return (otherAttachments?.length && otherAttachments[0].actions) ||
message.ai_generated ? null : (
<MessageTextContainer<StreamChatGenerics>
key={`message_text_container_${messageContentOrderIndex}`}
message={message}
Expand Down

0 comments on commit f0e5a22

Please sign in to comment.