diff --git a/src/apps/chat/components/message/ChatMessage.tsx b/src/apps/chat/components/message/ChatMessage.tsx index 2657bc40a..8e387773f 100644 --- a/src/apps/chat/components/message/ChatMessage.tsx +++ b/src/apps/chat/components/message/ChatMessage.tsx @@ -64,6 +64,7 @@ const avatarIconSx = { width: 36, height: 36 }; export function makeAvatar(messageAvatar: string | null, messageRole: DMessage['role'] | string, messageOriginLLM: string | undefined, messagePurposeId: SystemPurposeId | undefined, messageSender: string, messageTyping: boolean, size: 'sm' | undefined = undefined): React.JSX.Element { if (typeof messageAvatar === 'string' && messageAvatar) return ; + const mascotSx = size === 'sm' ? avatarIconSx : { width: 64, height: 64 }; switch (messageRole) { case 'system': @@ -76,17 +77,18 @@ export function makeAvatar(messageAvatar: string | null, messageRole: DMessage[' // typing gif (people seem to love this, so keeping it after april fools') const isTextToImage = messageOriginLLM === 'DALLĀ·E' || messageOriginLLM === 'Prodia'; const isReact = messageOriginLLM?.startsWith('react-'); - if (messageTyping) { + + // animation: message typing + if (messageTyping) return ; - } - // text-to-image: icon + // icon: text-to-image if (isTextToImage) return - {symbol} - ; + if (symbol) + return + {symbol} + ; // default assistant avatar return ; // https://mui.com/static/images/avatar/2.jpg