@lobehub/chat 0.36.0 → 0.36.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 +25 -0
- package/package.json +2 -2
- package/src/store/session/index.ts +4 -2
- package/src/store/settings/index.ts +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.36.1](https://github.com/lobehub/lobe-chat/compare/v0.36.0...v0.36.1)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-08-03**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Refactor zustand usage with v4.4.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Code refactoring
|
|
19
|
+
|
|
20
|
+
- **misc**: Refactor zustand usage with v4.4, closes [#52](https://github.com/lobehub/lobe-chat/issues/52) ([4c65aa7](https://github.com/lobehub/lobe-chat/commit/4c65aa7))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
## [Version 0.36.0](https://github.com/lobehub/lobe-chat/compare/v0.35.1...v0.36.0)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2023-08-03**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"description": "Lobe Chat is an open-source chatbot client using LangChain, Typescript and Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"swr": "^2",
|
|
94
94
|
"ts-md5": "^1",
|
|
95
95
|
"uuid": "^9",
|
|
96
|
-
"zustand": "^4",
|
|
96
|
+
"zustand": "^4.4",
|
|
97
97
|
"zustand-utils": "^1"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import equal from 'fast-deep-equal';
|
|
2
2
|
import { PersistOptions, devtools, persist } from 'zustand/middleware';
|
|
3
|
+
import { createWithEqualityFn } from 'zustand/traditional';
|
|
3
4
|
|
|
4
5
|
import { isDev } from '@/utils/env';
|
|
5
6
|
|
|
@@ -22,13 +23,14 @@ const persistOptions: PersistOptions<SessionStore, SessionPersist> = {
|
|
|
22
23
|
// version: Migration.targetVersion,
|
|
23
24
|
};
|
|
24
25
|
|
|
25
|
-
export const useSessionStore =
|
|
26
|
+
export const useSessionStore = createWithEqualityFn<SessionStore>()(
|
|
26
27
|
persist(
|
|
27
28
|
devtools(createStore, {
|
|
28
29
|
name: LOBE_CHAT + (isDev ? '_DEV' : ''),
|
|
29
30
|
}),
|
|
30
31
|
persistOptions,
|
|
31
32
|
),
|
|
33
|
+
equal,
|
|
32
34
|
);
|
|
33
35
|
|
|
34
36
|
export * from './selectors';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import equal from 'fast-deep-equal';
|
|
2
2
|
import { type PersistOptions, devtools, persist } from 'zustand/middleware';
|
|
3
|
+
import { createWithEqualityFn } from 'zustand/traditional';
|
|
3
4
|
|
|
4
5
|
import { isDev } from '@/utils/env';
|
|
5
6
|
|
|
@@ -12,13 +13,14 @@ const persistOptions: PersistOptions<SettingsStore> = {
|
|
|
12
13
|
skipHydration: true,
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
export const useSettings =
|
|
16
|
+
export const useSettings = createWithEqualityFn<SettingsStore>()(
|
|
16
17
|
persist(
|
|
17
18
|
devtools(createStore, {
|
|
18
19
|
name: LOBE_SETTINGS + (isDev ? '_DEV' : ''),
|
|
19
20
|
}),
|
|
20
21
|
persistOptions,
|
|
21
22
|
),
|
|
23
|
+
equal,
|
|
22
24
|
);
|
|
23
25
|
|
|
24
26
|
export * from './selectors';
|