Browse Source

fix:When creating a new assistant, an avatar was uploaded, but when selecting the assistant to start a new chat, the default avatar still appears in the chat window instead of the one uploaded during creation (#7769)

### 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):
tags/v0.19.x
kunger309 5 months ago
parent
commit
ae70512f5d
No account linked to committer's email address
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      web/src/pages/chat/chat-container/index.tsx

+ 4
- 1
web/src/pages/chat/chat-container/index.tsx View File

import { import {
useFetchNextConversation, useFetchNextConversation,
useGetChatSearchParams, useGetChatSearchParams,
useFetchNextDialog,
} from '@/hooks/chat-hooks'; } from '@/hooks/chat-hooks';
import { useFetchUserInfo } from '@/hooks/user-setting-hooks'; import { useFetchUserInfo } from '@/hooks/user-setting-hooks';
import { buildMessageUuidWithRole } from '@/utils/chat'; import { buildMessageUuidWithRole } from '@/utils/chat';
const ChatContainer = ({ controller }: IProps) => { const ChatContainer = ({ controller }: IProps) => {
const { conversationId } = useGetChatSearchParams(); const { conversationId } = useGetChatSearchParams();
const { data: conversation } = useFetchNextConversation(); const { data: conversation } = useFetchNextConversation();
const { data: currentDialog } = useFetchNextDialog();


const { const {
value, value,
item={message} item={message}
nickname={userInfo.nickname} nickname={userInfo.nickname}
avatar={userInfo.avatar} avatar={userInfo.avatar}
avatarDialog={conversation.avatar}
avatarDialog={currentDialog.icon}
reference={buildMessageItemReference( reference={buildMessageItemReference(
{ {
message: derivedMessages, message: derivedMessages,

Loading…
Cancel
Save