From ae70512f5dd5168b40495a35a1b77e66f844d0ef Mon Sep 17 00:00:00 2001 From: kunger309 <77869538+kunger309@users.noreply.github.com> Date: Thu, 22 May 2025 11:50:02 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9AWhen=20creating=20a=20new=20assista?= =?UTF-8?q?nt,=20an=20avatar=20was=20uploaded,=20but=20when=20selecting=20?= =?UTF-8?q?the=20assistant=20to=20start=20a=20new=20chat,=20the=20default?= =?UTF-8?q?=20avatar=20still=20appears=20in=20the=20chat=20window=20instea?= =?UTF-8?q?d=20of=20the=20one=20uploaded=20during=20creation=20(#7769)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What problem does this PR solve? _Briefly describe what this PR aims to solve. Include background context that will help reviewers understand the purpose of the PR._ ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe): --- web/src/pages/chat/chat-container/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/pages/chat/chat-container/index.tsx b/web/src/pages/chat/chat-container/index.tsx index 29b94a976..bb080c75d 100644 --- a/web/src/pages/chat/chat-container/index.tsx +++ b/web/src/pages/chat/chat-container/index.tsx @@ -16,6 +16,7 @@ import { useClickDrawer } from '@/components/pdf-drawer/hooks'; import { useFetchNextConversation, useGetChatSearchParams, + useFetchNextDialog, } from '@/hooks/chat-hooks'; import { useFetchUserInfo } from '@/hooks/user-setting-hooks'; import { buildMessageUuidWithRole } from '@/utils/chat'; @@ -29,6 +30,8 @@ interface IProps { const ChatContainer = ({ controller }: IProps) => { const { conversationId } = useGetChatSearchParams(); const { data: conversation } = useFetchNextConversation(); + const { data: currentDialog } = useFetchNextDialog(); + const { value, @@ -70,7 +73,7 @@ const ChatContainer = ({ controller }: IProps) => { item={message} nickname={userInfo.nickname} avatar={userInfo.avatar} - avatarDialog={conversation.avatar} + avatarDialog={currentDialog.icon} reference={buildMessageItemReference( { message: derivedMessages,