@lobehub/chat 0.9.0 → 0.10.0

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.0](https://github.com/lobehub/lobe-chat/compare/v0.9.0...v0.10.0)
6
+
7
+ <sup>Released on **2023-07-22**</sup>
8
+
9
+ #### ✨ Features
10
+
11
+ - **misc**: 支持复制与编辑会话消息.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's improved
19
+
20
+ - **misc**: 支持复制与编辑会话消息 ([bebcf9f](https://github.com/lobehub/lobe-chat/commit/bebcf9f))
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.9.0](https://github.com/lobehub/lobe-chat/compare/v0.8.2...v0.9.0)
6
31
 
7
32
  <sup>Released on **2023-07-22**</sup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
5
5
  "keywords": [
6
6
  "chatbot",
@@ -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
  />