@lobehub/chat 0.9.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,56 @@
|
|
|
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
|
+
|
|
30
|
+
## [Version 0.10.0](https://github.com/lobehub/lobe-chat/compare/v0.9.0...v0.10.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-07-22**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **misc**: 支持复制与编辑会话消息.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **misc**: 支持复制与编辑会话消息 ([bebcf9f](https://github.com/lobehub/lobe-chat/commit/bebcf9f))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 0.9.0](https://github.com/lobehub/lobe-chat/compare/v0.8.2...v0.9.0)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-07-22**</sup>
|
package/package.json
CHANGED
|
@@ -9,8 +9,8 @@ import MessageExtra from './MessageExtra';
|
|
|
9
9
|
|
|
10
10
|
const List = () => {
|
|
11
11
|
const data = useSessionStore(chatSelectors.currentChats, isEqual);
|
|
12
|
-
const [deleteMessage, resendMessage] = useSessionStore(
|
|
13
|
-
(s) => [s.deleteMessage, s.resendMessage],
|
|
12
|
+
const [deleteMessage, resendMessage, dispatchMessage] = useSessionStore(
|
|
13
|
+
(s) => [s.deleteMessage, s.resendMessage, s.dispatchMessage],
|
|
14
14
|
shallow,
|
|
15
15
|
);
|
|
16
16
|
|
|
@@ -30,6 +30,9 @@ const List = () => {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}}
|
|
33
|
+
onMessageChange={(id, content) => {
|
|
34
|
+
dispatchMessage({ id, key: 'content', type: 'updateMessage', value: content });
|
|
35
|
+
}}
|
|
33
36
|
renderMessageExtra={MessageExtra}
|
|
34
37
|
style={{ marginTop: 24 }}
|
|
35
38
|
/>
|
|
@@ -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
|
});
|