@lobehub/chat 0.107.9 → 0.107.11
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,48 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.107.11](https://github.com/lobehub/lobe-chat/compare/v0.107.10...v0.107.11)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-12-01**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix switch model don't work on mobile.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix switch model don't work on mobile, closes [#541](https://github.com/lobehub/lobe-chat/issues/541) ([609f505](https://github.com/lobehub/lobe-chat/commit/609f505))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.107.10](https://github.com/lobehub/lobe-chat/compare/v0.107.9...v0.107.10)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-11-30**</sup>
|
|
33
|
+
|
|
34
|
+
<br/>
|
|
35
|
+
|
|
36
|
+
<details>
|
|
37
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
38
|
+
|
|
39
|
+
</details>
|
|
40
|
+
|
|
41
|
+
<div align="right">
|
|
42
|
+
|
|
43
|
+
[](#readme-top)
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
|
|
5
47
|
### [Version 0.107.9](https://github.com/lobehub/lobe-chat/compare/v0.107.8...v0.107.9)
|
|
6
48
|
|
|
7
49
|
<sup>Released on **2023-11-30**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.107.
|
|
3
|
+
"version": "0.107.11",
|
|
4
4
|
"description": "An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatbot",
|
|
@@ -4,18 +4,27 @@ import dynamic from 'next/dynamic';
|
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
|
+
import { useSessionStore } from '@/store/session';
|
|
8
|
+
|
|
7
9
|
import Conversation from '../../features/Conversation';
|
|
8
10
|
import ChatInput from '../features/ChatInput';
|
|
9
11
|
import Layout from './layout.mobile';
|
|
10
12
|
|
|
11
13
|
const TopicList = dynamic(() => import('../features/TopicList'));
|
|
12
14
|
|
|
13
|
-
const Chat = memo(() =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const Chat = memo(() => {
|
|
16
|
+
// due to mobile side don't have sessionList, so we need to fetch sessions here
|
|
17
|
+
// refs: https://github.com/lobehub/lobe-chat/pull/541
|
|
18
|
+
const useFetchSessions = useSessionStore((s) => s.useFetchSessions);
|
|
19
|
+
useFetchSessions();
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Layout>
|
|
23
|
+
<Flexbox height={'calc(100% - 44px)'} horizontal>
|
|
24
|
+
<Conversation chatInput={<ChatInput />} mobile />
|
|
25
|
+
<TopicList />
|
|
26
|
+
</Flexbox>
|
|
27
|
+
</Layout>
|
|
28
|
+
);
|
|
29
|
+
});
|
|
21
30
|
export default Chat;
|
|
@@ -21,10 +21,8 @@ const SessionItem = memo<SessionItemProps>(({ id }) => {
|
|
|
21
21
|
const [open, setOpen] = useState(false);
|
|
22
22
|
|
|
23
23
|
const [defaultModel] = useGlobalStore((s) => [settingsSelectors.defaultAgentConfig(s).model]);
|
|
24
|
-
const [active
|
|
25
|
-
|
|
26
|
-
!!s.chatLoadingId && id === s.activeId,
|
|
27
|
-
]);
|
|
24
|
+
const [active] = useSessionStore((s) => [s.activeId === id]);
|
|
25
|
+
const [loading] = useChatStore((s) => [!!s.chatLoadingId && id === s.activeId]);
|
|
28
26
|
|
|
29
27
|
const [pin, title, description, systemRole, avatar, avatarBackground, updateAt, model] =
|
|
30
28
|
useSessionStore((s) => {
|