mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 23:41:12 +08:00
Fix: chat/agent -- Default avatar is not displaying correctly. (#15948)
### What problem does this PR solve? Fix: chat/agent -- Default avatar is not displaying correctly. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -51,6 +51,7 @@ const MessageItem = ({
|
||||
showLikeButton = true,
|
||||
showLoudspeaker = true,
|
||||
visibleAvatar = true,
|
||||
nickname,
|
||||
}: IProps) => {
|
||||
const { theme } = useTheme();
|
||||
const isAssistant = item.role === MessageType.Assistant;
|
||||
@@ -98,6 +99,7 @@ const MessageItem = ({
|
||||
className="size-10"
|
||||
avatar={avatar ?? '/logo.svg'}
|
||||
isPerson
|
||||
name={nickname}
|
||||
/>
|
||||
) : avatarDialog ? (
|
||||
<RAGFlowAvatar
|
||||
|
||||
@@ -79,6 +79,7 @@ function MessageItem({
|
||||
children,
|
||||
showLog,
|
||||
isShare,
|
||||
nickname,
|
||||
}: IProps) {
|
||||
const { theme } = useTheme();
|
||||
const isAssistant = item.role === MessageType.Assistant;
|
||||
@@ -186,7 +187,11 @@ function MessageItem({
|
||||
>
|
||||
{visibleAvatar &&
|
||||
(item.role === MessageType.User ? (
|
||||
<RAGFlowAvatar avatar={avatar ?? '/logo.svg'} />
|
||||
<RAGFlowAvatar
|
||||
avatar={avatar ?? '/logo.svg'}
|
||||
name={nickname}
|
||||
isPerson
|
||||
/>
|
||||
) : avatarDialog || agentName ? (
|
||||
<RAGFlowAvatar
|
||||
avatar={avatarDialog as string}
|
||||
|
||||
Reference in New Issue
Block a user