@lobehub/chat 0.10.0 → 0.10.1
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.10.1](https://github.com/lobehub/lobe-chat/compare/v0.10.0...v0.10.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-07-22**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: 修正对话中用户头像的问题.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: 修正对话中用户头像的问题 ([560c8bb](https://github.com/lobehub/lobe-chat/commit/560c8bb))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 0.10.0](https://github.com/lobehub/lobe-chat/compare/v0.9.0...v0.10.0)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-07-22**</sup>
|
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { agentSelectors } from '@/store/session';
|
|
2
|
+
import { useSettings } from '@/store/settings';
|
|
2
3
|
import { ChatMessage } from '@/types/chatMessage';
|
|
3
4
|
|
|
4
5
|
import type { SessionStore } from '../../../store';
|
|
6
|
+
import { DEFAULT_AVATAR } from '../../agentConfig';
|
|
5
7
|
import { sessionSelectors } from '../../session';
|
|
6
8
|
|
|
7
9
|
// 展示在聊天框中的消息
|
|
@@ -24,6 +26,10 @@ export const currentChats = (s: SessionStore): ChatMessage[] => {
|
|
|
24
26
|
avatar: agentSelectors.currentAgentAvatar(s),
|
|
25
27
|
title: session.meta.title,
|
|
26
28
|
}
|
|
29
|
+
: m.role === 'user'
|
|
30
|
+
? {
|
|
31
|
+
avatar: useSettings.getState().settings.avatar || DEFAULT_AVATAR,
|
|
32
|
+
}
|
|
27
33
|
: m.meta,
|
|
28
34
|
};
|
|
29
35
|
});
|