@lobehub/chat 0.39.3 → 0.39.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.39.4](https://github.com/lobehub/lobe-chat/compare/v0.39.3...v0.39.4)
6
+
7
+ <sup>Released on **2023-08-05**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: 修正 assistant 消息没有 background 的问题.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: 修正 assistant 消息没有 background 的问题, closes [#42](https://github.com/lobehub/lobe-chat/issues/42) ([812e976](https://github.com/lobehub/lobe-chat/commit/812e976))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 0.39.3](https://github.com/lobehub/lobe-chat/compare/v0.39.2...v0.39.3)
6
31
 
7
32
  <sup>Released on **2023-08-04**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.39.3",
3
+ "version": "0.39.4",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -19,6 +19,7 @@ export const getChatsById =
19
19
  session,
20
20
  {
21
21
  assistant: agentSelectors.currentAgentAvatar(s),
22
+ assistantBackground: agentSelectors.currentAgentBackgroundColor(s),
22
23
  user: useSettings.getState().settings.avatar || DEFAULT_USER_AVATAR,
23
24
  },
24
25
  s.activeTopicId,
@@ -4,7 +4,7 @@ import { LobeAgentSession } from '@/types/session';
4
4
 
5
5
  export const organizeChats = (
6
6
  session: LobeAgentSession,
7
- avatar: { assistant: string; user: string },
7
+ avatar: { assistant: string; assistantBackground?: string; user: string },
8
8
  topicId?: string,
9
9
  ) => {
10
10
  const getMeta = (message: ChatMessage) => {
@@ -22,6 +22,7 @@ export const organizeChats = (
22
22
  case 'assistant': {
23
23
  return {
24
24
  avatar: avatar.assistant,
25
+ backgroundColor: avatar.assistantBackground,
25
26
  title: session.meta.title,
26
27
  };
27
28
  }