mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
💄 style: 修正对话中用户头像的问题
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { agentSelectors } from '@/store/session';
|
||||
import { useSettings } from '@/store/settings';
|
||||
import { ChatMessage } from '@/types/chatMessage';
|
||||
|
||||
import type { SessionStore } from '../../../store';
|
||||
import { DEFAULT_AVATAR } from '../../agentConfig';
|
||||
import { sessionSelectors } from '../../session';
|
||||
|
||||
// 展示在聊天框中的消息
|
||||
@@ -24,6 +26,10 @@ export const currentChats = (s: SessionStore): ChatMessage[] => {
|
||||
avatar: agentSelectors.currentAgentAvatar(s),
|
||||
title: session.meta.title,
|
||||
}
|
||||
: m.role === 'user'
|
||||
? {
|
||||
avatar: useSettings.getState().settings.avatar || DEFAULT_AVATAR,
|
||||
}
|
||||
: m.meta,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user