Skip to content

Commit

Permalink
💄 style: 修正 assistant 消息没有 background 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 5, 2023
1 parent 5c8eb9c commit 812e976
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/store/session/slices/chat/selectors/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const getChatsById =
session,
{
assistant: agentSelectors.currentAgentAvatar(s),
assistantBackground: agentSelectors.currentAgentBackgroundColor(s),
user: useSettings.getState().settings.avatar || DEFAULT_USER_AVATAR,
},
s.activeTopicId,
Expand Down
3 changes: 2 additions & 1 deletion src/store/session/slices/chat/selectors/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { LobeAgentSession } from '@/types/session';

export const organizeChats = (
session: LobeAgentSession,
avatar: { assistant: string; user: string },
avatar: { assistant: string; assistantBackground?: string; user: string },
topicId?: string,
) => {
const getMeta = (message: ChatMessage) => {
Expand All @@ -22,6 +22,7 @@ export const organizeChats = (
case 'assistant': {
return {
avatar: avatar.assistant,
backgroundColor: avatar.assistantBackground,
title: session.meta.title,
};
}
Expand Down

0 comments on commit 812e976

Please sign in to comment.