Fix: Fix share-chat bugs (#9150)

### What problem does this PR solve?

Fix: Fix share-chat bugs #3221

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-08-01 12:38:29 +08:00
committed by GitHub
parent 5ccdb95008
commit ac53ef6216
10 changed files with 143 additions and 57 deletions

View File

@ -44,6 +44,7 @@ interface IProps
nickname?: string;
avatar?: string;
avatarDialog?: string | null;
agentName?: string;
clickDocumentButton?: (documentId: string, chunk: IReferenceChunk) => void;
index: number;
showLikeButton?: boolean;
@ -60,6 +61,7 @@ function MessageItem({
loading = false,
avatar,
avatarDialog,
agentName,
sendLoading = false,
clickDocumentButton,
removeMessageById,
@ -120,8 +122,8 @@ function MessageItem({
{visibleAvatar &&
(item.role === MessageType.User ? (
<RAGFlowAvatar avatar={avatar ?? '/logo.svg'} />
) : avatarDialog ? (
<RAGFlowAvatar avatar={avatarDialog} />
) : avatarDialog || agentName ? (
<RAGFlowAvatar avatar={avatarDialog} name={agentName} isPerson />
) : (
<AssistantIcon />
))}