@lobehub/chat 0.107.10 → 0.107.12
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/.github/FUNDING.yml +13 -0
- package/CHANGELOG.md +50 -0
- package/package.json +1 -1
- package/src/app/chat/(desktop)/features/ChatInput/DragUpload.tsx +1 -1
- package/src/app/chat/(desktop)/features/ChatInput/Footer/LocalFiles.tsx +1 -1
- package/src/app/chat/(mobile)/features/ChatInput/Files.tsx +1 -1
- package/src/app/chat/(mobile)/mobile/index.tsx +17 -8
- package/src/app/chat/components/FileList/FileItem.tsx +1 -1
- package/src/app/chat/components/FileList/Lightbox.tsx +1 -1
- package/src/app/chat/features/ChatInput/ActionBar/Clear.tsx +1 -1
- package/src/app/chat/features/ChatInput/ActionBar/FileUpload.tsx +1 -1
- package/src/app/chat/features/ChatInput/useSend.ts +2 -2
- package/src/app/settings/common/Common.tsx +1 -1
- package/src/services/chat.ts +1 -1
- package/src/store/chat/actions/topic.ts +1 -0
- /package/src/store/{files → file}/index.ts +0 -0
- /package/src/store/{files → file}/initialState.ts +0 -0
- /package/src/store/{files → file}/selectors.test.ts +0 -0
- /package/src/store/{files → file}/selectors.ts +0 -0
- /package/src/store/{files → file}/slices/images/action.test.ts +0 -0
- /package/src/store/{files → file}/slices/images/action.ts +0 -0
- /package/src/store/{files → file}/slices/images/index.ts +0 -0
- /package/src/store/{files → file}/slices/images/initialState.ts +0 -0
- /package/src/store/{files → file}/store.ts +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: lobehub
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: lobehub/lobe-chat
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.107.12](https://github.com/lobehub/lobe-chat/compare/v0.107.11...v0.107.12)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-12-02**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix topic not refresh when switching sessions quickly.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix topic not refresh when switching sessions quickly, closes [#555](https://github.com/lobehub/lobe-chat/issues/555) ([1806c05](https://github.com/lobehub/lobe-chat/commit/1806c05))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.107.11](https://github.com/lobehub/lobe-chat/compare/v0.107.10...v0.107.11)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-12-01**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fix switch model don't work on mobile.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **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))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.107.10](https://github.com/lobehub/lobe-chat/compare/v0.107.9...v0.107.10)
|
|
6
56
|
|
|
7
57
|
<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.12",
|
|
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",
|
|
@@ -6,7 +6,7 @@ import { memo, useEffect, useRef, useState } from 'react';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
|
9
|
-
import { useFileStore } from '@/store/
|
|
9
|
+
import { useFileStore } from '@/store/file';
|
|
10
10
|
|
|
11
11
|
const useStyles = createStyles(({ css, token, stylish }) => {
|
|
12
12
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
|
|
3
3
|
import FileList from '@/app/chat/components/FileList';
|
|
4
|
-
import { useFileStore } from '@/store/
|
|
4
|
+
import { useFileStore } from '@/store/file';
|
|
5
5
|
|
|
6
6
|
export const LocalFiles = memo(() => {
|
|
7
7
|
const inputFilesList = useFileStore((s) => s.inputFilesList);
|
|
@@ -2,7 +2,7 @@ import { memo } from 'react';
|
|
|
2
2
|
import { Flexbox } from 'react-layout-kit';
|
|
3
3
|
|
|
4
4
|
import FileList from '@/app/chat/components/FileList';
|
|
5
|
-
import { useFileStore } from '@/store/
|
|
5
|
+
import { useFileStore } from '@/store/file';
|
|
6
6
|
|
|
7
7
|
const Files = memo(() => {
|
|
8
8
|
const inputFilesList = useFileStore((s) => s.inputFilesList);
|
|
@@ -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;
|
|
@@ -6,7 +6,7 @@ import Image from 'next/image';
|
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { Center, Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
|
9
|
-
import { useFileStore } from '@/store/
|
|
9
|
+
import { useFileStore } from '@/store/file';
|
|
10
10
|
|
|
11
11
|
import { IMAGE_SIZE, useStyles } from './FileItem.style';
|
|
12
12
|
|
|
@@ -2,7 +2,7 @@ import { createStyles } from 'antd-style';
|
|
|
2
2
|
import { memo } from 'react';
|
|
3
3
|
import Lightbox from 'react-spring-lightbox';
|
|
4
4
|
|
|
5
|
-
import { filesSelectors, useFileStore } from '@/store/
|
|
5
|
+
import { filesSelectors, useFileStore } from '@/store/file';
|
|
6
6
|
|
|
7
7
|
const useStyles = createStyles(({ css, token }) => ({
|
|
8
8
|
wrapper: css`
|
|
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
8
|
import HotKeys from '@/components/HotKeys';
|
|
9
9
|
import { CLEAN_MESSAGE_KEY, PREFIX_KEY } from '@/const/hotkeys';
|
|
10
10
|
import { useChatStore } from '@/store/chat';
|
|
11
|
-
import { useFileStore } from '@/store/
|
|
11
|
+
import { useFileStore } from '@/store/file';
|
|
12
12
|
|
|
13
13
|
const Clear = memo(() => {
|
|
14
14
|
const { t } = useTranslation('setting');
|
|
@@ -6,7 +6,7 @@ import { memo, useState } from 'react';
|
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Center } from 'react-layout-kit';
|
|
8
8
|
|
|
9
|
-
import { useFileStore } from '@/store/
|
|
9
|
+
import { useFileStore } from '@/store/file';
|
|
10
10
|
import { useSessionStore } from '@/store/session';
|
|
11
11
|
import { agentSelectors } from '@/store/session/selectors';
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useChatStore } from '@/store/chat';
|
|
4
|
+
import { filesSelectors, useFileStore } from '@/store/file';
|
|
5
5
|
|
|
6
6
|
export const useSendMessage = () => {
|
|
7
7
|
const [sendMessage, updateInputMessage] = useChatStore((s) => [
|
|
@@ -11,7 +11,7 @@ import { DEFAULT_SETTINGS } from '@/const/settings';
|
|
|
11
11
|
import AvatarWithUpload from '@/features/AvatarWithUpload';
|
|
12
12
|
import { localeOptions } from '@/locales/options';
|
|
13
13
|
import { useChatStore } from '@/store/chat';
|
|
14
|
-
import { useFileStore } from '@/store/
|
|
14
|
+
import { useFileStore } from '@/store/file';
|
|
15
15
|
import { settingsSelectors, useGlobalStore } from '@/store/global';
|
|
16
16
|
import { usePluginStore } from '@/store/plugin';
|
|
17
17
|
import { useSessionStore } from '@/store/session';
|
package/src/services/chat.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { merge } from 'lodash-es';
|
|
|
3
3
|
|
|
4
4
|
import { VISION_MODEL_WHITE_LIST } from '@/const/llm';
|
|
5
5
|
import { DEFAULT_AGENT_CONFIG } from '@/const/settings';
|
|
6
|
-
import { filesSelectors, useFileStore } from '@/store/
|
|
6
|
+
import { filesSelectors, useFileStore } from '@/store/file';
|
|
7
7
|
import { usePluginStore } from '@/store/plugin';
|
|
8
8
|
import { pluginSelectors } from '@/store/plugin/selectors';
|
|
9
9
|
import { ChatMessage } from '@/types/chatMessage';
|
|
@@ -125,6 +125,7 @@ export const chatTopic: StateCreator<
|
|
|
125
125
|
onSuccess: (topics) => {
|
|
126
126
|
set({ topics, topicsInit: true }, false, n('useFetchTopics(success)', { sessionId }));
|
|
127
127
|
},
|
|
128
|
+
dedupingInterval: 0,
|
|
128
129
|
}),
|
|
129
130
|
useSearchTopics: (keywords) =>
|
|
130
131
|
useSWR<ChatTopic[]>(keywords, topicService.searchTopics, {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|