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:
balibabu
2026-06-12 17:54:36 +08:00
committed by GitHub
parent 22a058f56c
commit 89aac82663
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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}