@lobehub/chat 1.88.3 → 1.88.4
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 +33 -0
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadList/index.tsx +22 -0
- package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/index.tsx +15 -9
- package/src/hooks/useFetchTopics.ts +1 -3
- package/src/store/chat/slices/thread/action.ts +0 -2
- /package/docs/usage/providers/{gemini.mdx → google.mdx} +0 -0
- /package/docs/usage/providers/{gemini.zh-CN.mdx → google.zh-CN.mdx} +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,39 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.88.4](https://github.com/lobehub/lobe-chat/compare/v1.88.3...v1.88.4)
|
6
|
+
|
7
|
+
<sup>Released on **2025-05-25**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **docs**: Rename and update Google Gemini documentation.
|
12
|
+
|
13
|
+
#### 💄 Styles
|
14
|
+
|
15
|
+
- **misc**: Improve thread flicker when first-time loading.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### What's fixed
|
23
|
+
|
24
|
+
- **docs**: Rename and update Google Gemini documentation, closes [#7957](https://github.com/lobehub/lobe-chat/issues/7957) ([432c28d](https://github.com/lobehub/lobe-chat/commit/432c28d))
|
25
|
+
|
26
|
+
#### Styles
|
27
|
+
|
28
|
+
- **misc**: Improve thread flicker when first-time loading, closes [#7963](https://github.com/lobehub/lobe-chat/issues/7963) ([4cacacd](https://github.com/lobehub/lobe-chat/commit/4cacacd))
|
29
|
+
|
30
|
+
</details>
|
31
|
+
|
32
|
+
<div align="right">
|
33
|
+
|
34
|
+
[](#readme-top)
|
35
|
+
|
36
|
+
</div>
|
37
|
+
|
5
38
|
### [Version 1.88.3](https://github.com/lobehub/lobe-chat/compare/v1.88.2...v1.88.3)
|
6
39
|
|
7
40
|
<sup>Released on **2025-05-25**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.88.
|
3
|
+
"version": "1.88.4",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { memo } from 'react';
|
2
|
+
|
3
|
+
import { useFetchThreads } from '@/hooks/useFetchThreads';
|
4
|
+
import { useChatStore } from '@/store/chat';
|
5
|
+
import { threadSelectors } from '@/store/chat/selectors';
|
6
|
+
|
7
|
+
import ThreadItem from '../ThreadItem';
|
8
|
+
|
9
|
+
const ThreadList = memo(() => {
|
10
|
+
const [id] = useChatStore((s) => [s.activeTopicId]);
|
11
|
+
const threads = useChatStore(threadSelectors.getThreadsByTopic(id));
|
12
|
+
|
13
|
+
useFetchThreads(id);
|
14
|
+
|
15
|
+
return threads?.map((item, index) => (
|
16
|
+
<ThreadItem id={item.id} index={index} key={item.id} title={item.title} />
|
17
|
+
));
|
18
|
+
});
|
19
|
+
|
20
|
+
ThreadList.displayName = 'ThreadList';
|
21
|
+
|
22
|
+
export default ThreadList;
|
@@ -1,12 +1,12 @@
|
|
1
|
+
import { Skeleton } from 'antd';
|
1
2
|
import { createStyles } from 'antd-style';
|
2
|
-
import { memo, useState } from 'react';
|
3
|
+
import { Suspense, memo, useState } from 'react';
|
3
4
|
import { Flexbox } from 'react-layout-kit';
|
4
5
|
|
5
6
|
import { useChatStore } from '@/store/chat';
|
6
|
-
import { threadSelectors } from '@/store/chat/selectors';
|
7
7
|
import { useGlobalStore } from '@/store/global';
|
8
8
|
|
9
|
-
import
|
9
|
+
import ThreadList from '../ThreadList';
|
10
10
|
import DefaultContent from './DefaultContent';
|
11
11
|
import TopicContent from './TopicContent';
|
12
12
|
|
@@ -54,8 +54,6 @@ const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) =
|
|
54
54
|
const [toggleTopic] = useChatStore((s) => [s.switchTopic]);
|
55
55
|
const [isHover, setHovering] = useState(false);
|
56
56
|
|
57
|
-
const threads = useChatStore(threadSelectors.getThreadsByTopic(id));
|
58
|
-
|
59
57
|
return (
|
60
58
|
<Flexbox style={{ position: 'relative' }}>
|
61
59
|
<Flexbox
|
@@ -80,10 +78,18 @@ const TopicItem = memo<ConfigCellProps>(({ title, active, id, fav, threadId }) =
|
|
80
78
|
<TopicContent fav={fav} id={id} showMore={isHover} title={title} />
|
81
79
|
)}
|
82
80
|
</Flexbox>
|
83
|
-
{active &&
|
84
|
-
|
85
|
-
|
86
|
-
|
81
|
+
{active && (
|
82
|
+
<Suspense
|
83
|
+
fallback={
|
84
|
+
<Flexbox gap={8} paddingBlock={8} paddingInline={24} width={'100%'}>
|
85
|
+
<Skeleton.Button active size={'small'} style={{ height: 18, width: '100%' }} />
|
86
|
+
<Skeleton.Button active size={'small'} style={{ height: 18, width: '100%' }} />
|
87
|
+
</Flexbox>
|
88
|
+
}
|
89
|
+
>
|
90
|
+
<ThreadList />
|
91
|
+
</Suspense>
|
92
|
+
)}
|
87
93
|
</Flexbox>
|
88
94
|
);
|
89
95
|
});
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { useFetchThreads } from '@/hooks/useFetchThreads';
|
2
1
|
import { useChatStore } from '@/store/chat';
|
3
2
|
import { useGlobalStore } from '@/store/global';
|
4
3
|
import { systemStatusSelectors } from '@/store/global/selectors';
|
@@ -9,9 +8,8 @@ import { useSessionStore } from '@/store/session';
|
|
9
8
|
*/
|
10
9
|
export const useFetchTopics = () => {
|
11
10
|
const [sessionId] = useSessionStore((s) => [s.activeId]);
|
12
|
-
const
|
11
|
+
const useFetchTopics = useChatStore((s) => s.useFetchTopics);
|
13
12
|
const isDBInited = useGlobalStore(systemStatusSelectors.isDBInited);
|
14
13
|
|
15
14
|
useFetchTopics(isDBInited, sessionId);
|
16
|
-
useFetchThreads(activeTopicId);
|
17
15
|
};
|
@@ -215,8 +215,6 @@ export const chatThreadMessage: StateCreator<
|
|
215
215
|
enable && !!topicId && !isDeprecatedEdition ? [SWR_USE_FETCH_THREADS, topicId] : null,
|
216
216
|
async ([, topicId]: [string, string]) => threadService.getThreads(topicId),
|
217
217
|
{
|
218
|
-
suspense: true,
|
219
|
-
fallbackData: [],
|
220
218
|
onSuccess: (threads) => {
|
221
219
|
const nextMap = { ...get().threadMaps, [topicId!]: threads };
|
222
220
|
|
File without changes
|
File without changes
|