@lobehub/chat 0.114.5 → 0.114.7
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 +42 -0
- package/README.md +9 -9
- package/README.zh-CN.md +9 -9
- package/docs/Deployment/Docker-Deployment.md +1 -0
- package/docs/Deployment/Docker-Deployment.zh-CN.md +1 -0
- package/package.json +1 -1
- package/src/app/chat/(desktop)/features/ChatInput/index.tsx +3 -3
- package/src/app/chat/(desktop)/index.tsx +1 -1
- package/src/app/chat/(mobile)/features/ChatInput/index.tsx +4 -4
- package/src/app/chat/(mobile)/mobile/index.tsx +1 -1
- package/src/app/chat/features/ChatHeader/ShareButton/Preview.tsx +1 -1
- package/src/features/SideBar/TopActions.tsx +27 -25
- package/src/layout/GlobalLayout/StoreHydration.tsx +6 -0
- package/src/services/plugin.ts +4 -2
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/Clear.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/FileUpload.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/History.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/ModelSwitch.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/Temperature.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/Token/TokenTag.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/Token/index.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/Tools/ToolItem.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/Tools/index.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/config.ts +0 -0
- /package/src/{app/chat/features → features}/ChatInput/ActionBar/index.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/STT/index.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/Topic/index.tsx +0 -0
- /package/src/{app/chat/features → features}/ChatInput/useChatInput.ts +0 -0
- /package/src/{app/chat/features → features}/ChatInput/useSend.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/Assistant.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/Error.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/Fallback.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/Function.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/User.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/customAction.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Actions/index.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/ApiKeyForm.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/ErrorActionContainer.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/InvalidAccess.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/OpenAPIKey.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/OpenAiBizError.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/Plugin/PluginError.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/Plugin/PluginSettings.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Error/style.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/Assistant.test.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/Assistant.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/ExtraContainer.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/TTS/FilePlayer.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/TTS/InitPlayer.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/TTS/Player.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/TTS/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/Translate.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/User.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/index.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Extras/type.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Loading.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Messages/Assistant.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Messages/Default.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Messages/Function.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Messages/User.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Messages/index.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/OTPInput.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/PluginResultJSON.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/Settings.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/style.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/DefaultType/IFrameRender/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/DefaultType/SystemJsRender/utils.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/StandaloneType/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.test.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/iframeOnReady.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.test.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/listenToPlugin.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/pluginSettings.test.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/pluginSettings.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/pluginState.test.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/pluginState.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/postMessage.test.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Render/utils/postMessage.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/SkeletonList.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ChatList/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ScrollAnchor/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/ScrollAnchor/useAtBottom.ts +0 -0
- /package/src/{app/chat/features → features}/Conversation/index.tsx +0 -0
- /package/src/{app/chat/features → features}/Conversation/useInitConversation.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.114.7](https://github.com/lobehub/lobe-chat/compare/v0.114.6...v0.114.7)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-12-22**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Move the conversation and chatInput to features folder.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Code refactoring
|
|
19
|
+
|
|
20
|
+
- **misc**: Move the conversation and chatInput to features folder, closes [#750](https://github.com/lobehub/lobe-chat/issues/750) ([0334592](https://github.com/lobehub/lobe-chat/commit/0334592))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.114.6](https://github.com/lobehub/lobe-chat/compare/v0.114.5...v0.114.6)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-12-22**</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.114.5](https://github.com/lobehub/lobe-chat/compare/v0.114.4...v0.114.5)
|
|
6
48
|
|
|
7
49
|
<sup>Released on **2023-12-19**</sup>
|
package/README.md
CHANGED
|
@@ -172,9 +172,9 @@ e-commerce platform data access, and various third-party services.
|
|
|
172
172
|
| [weather GPT](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Steven Tey** on **2023-12-16**</sup> | Get current weather information for a specific location.<br/>`weather` |
|
|
173
173
|
| [Ask Your PDF](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **AskYourPDF** on **2023-12-16**</sup> | Unlock the power of your PDFs!, dive into your documents, find answers, and bring information to your fingertips.<br/>`pdf` `document` `web` |
|
|
174
174
|
| [Clock Time](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | Display a clock to show current time<br/>`clock` `time` |
|
|
175
|
-
| [
|
|
175
|
+
| [Mindmap](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Moonlit7** on **2023-12-19**</sup> | A mindmap generation assistant<br/>`mindmap` |
|
|
176
176
|
|
|
177
|
-
> 📊 Total plugins: [<kbd>**
|
|
177
|
+
> 📊 Total plugins: [<kbd>**9**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
178
178
|
|
|
179
179
|
<!-- PLUGIN LIST -->
|
|
180
180
|
|
|
@@ -206,14 +206,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
206
206
|
|
|
207
207
|
<!-- AGENT LIST -->
|
|
208
208
|
|
|
209
|
-
| Recent Submits
|
|
210
|
-
|
|
|
211
|
-
| [
|
|
212
|
-
| [
|
|
213
|
-
| [
|
|
214
|
-
| [
|
|
209
|
+
| Recent Submits | Description |
|
|
210
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
|
|
211
|
+
| [Facebook Ads Expert](https://chat-preview.lobehub.com/market?agent=facebook-ads-expert)<br/><sup>By **[alissonryan](https://github.com/alissonryan)** on **2023-12-20**</sup> | Create a Facebook Ads with a expert<br/>`copywriting` `facebook-ads` `lead-generation` |
|
|
212
|
+
| [Dream Painter](https://chat-preview.lobehub.com/market?agent=dream-painter)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2023-12-19**</sup> | A dream artist who can bring your dreams into reality.<br/>`txt-2-img` `painter` |
|
|
213
|
+
| [NewsHub](https://chat-preview.lobehub.com/market?agent=news-hub)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2023-12-19**</sup> | A news search assistant proficient at finding and presenting relevant news<br/>`news` `search` `helper` |
|
|
214
|
+
| [NewsNest](https://chat-preview.lobehub.com/market?agent=news-nest)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2023-12-19**</sup> | A news search assistant, can help you find and display relevant news based on your needs.<br/>`news` `search` |
|
|
215
215
|
|
|
216
|
-
> 📊 Total agents: [<kbd>**
|
|
216
|
+
> 📊 Total agents: [<kbd>**79**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
217
217
|
|
|
218
218
|
<!-- AGENT LIST -->
|
|
219
219
|
|
package/README.zh-CN.md
CHANGED
|
@@ -153,9 +153,9 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
153
153
|
| [天气 GPT](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Steven Tey** on **2023-12-16**</sup> | 获取特定位置的当前天气信息。<br/>`天气` |
|
|
154
154
|
| [AskYouPDF](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **AskYourPDF** on **2023-12-16**</sup> | 释放您的 PDF 的力量!深入您的文档,找到答案,并将信息带到您的指尖。<br/>`pdf` `文档` `web` |
|
|
155
155
|
| [时钟时间](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **LobeHub** on **2023-11-01**</sup> | 显示一个时钟来展示当前时间<br/>`时钟` `时间` |
|
|
156
|
-
| [
|
|
156
|
+
| [思维导图](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **Moonlit7** on **2023-12-19**</sup> | 思维导图生成助手<br/>`思维导图` `脑图` |
|
|
157
157
|
|
|
158
|
-
> 📊 Total plugins: [<kbd>**
|
|
158
|
+
> 📊 Total plugins: [<kbd>**9**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
|
|
159
159
|
|
|
160
160
|
<!-- PLUGIN LIST -->
|
|
161
161
|
|
|
@@ -183,14 +183,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
183
183
|
|
|
184
184
|
<!-- AGENT LIST -->
|
|
185
185
|
|
|
186
|
-
| 最近新增
|
|
187
|
-
|
|
|
188
|
-
| [
|
|
189
|
-
| [
|
|
190
|
-
| [
|
|
191
|
-
| [
|
|
186
|
+
| 最近新增 | 助手说明 |
|
|
187
|
+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
188
|
+
| [Facebook 广告专家](https://chat-preview.lobehub.com/market?agent=facebook-ads-expert)<br/><sup>By **[alissonryan](https://github.com/alissonryan)** on **2023-12-20**</sup> | 与专家一起创建 Facebook 广告<br/>`文案撰写` `facebook广告` `潜在客户生成` |
|
|
189
|
+
| [梦境画家](https://chat-preview.lobehub.com/market?agent=dream-painter)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2023-12-19**</sup> | 一位能将你的梦想变成现实的梦境艺术家。<br/>`txt-2-img` `painter` |
|
|
190
|
+
| [NewsHub](https://chat-preview.lobehub.com/market?agent=news-hub)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2023-12-19**</sup> | 一个新闻搜索助手,擅长查找和呈现相关新闻<br/>`新闻` `搜索` `助手` |
|
|
191
|
+
| [NewsNest](https://chat-preview.lobehub.com/market?agent=news-nest)<br/><sup>By **[ccdanpian](https://github.com/ccdanpian)** on **2023-12-19**</sup> | 一个新闻搜索助手,可以根据您的需求帮助您查找和显示相关新闻。<br/>`新闻` `搜索` |
|
|
192
192
|
|
|
193
|
-
> 📊 Total agents: [<kbd>**
|
|
193
|
+
> 📊 Total agents: [<kbd>**79**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
194
194
|
|
|
195
195
|
<!-- AGENT LIST -->
|
|
196
196
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.114.
|
|
3
|
+
"version": "0.114.7",
|
|
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",
|
|
@@ -3,14 +3,14 @@ import { Maximize2, Minimize2 } from 'lucide-react';
|
|
|
3
3
|
import { memo, useCallback, useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
|
-
import ActionBar from '@/app/chat/features/ChatInput/ActionBar';
|
|
7
|
-
import SaveTopic from '@/app/chat/features/ChatInput/Topic';
|
|
8
|
-
import { useChatInput } from '@/app/chat/features/ChatInput/useChatInput';
|
|
9
6
|
import {
|
|
10
7
|
CHAT_TEXTAREA_HEIGHT,
|
|
11
8
|
CHAT_TEXTAREA_MAX_HEIGHT,
|
|
12
9
|
HEADER_HEIGHT,
|
|
13
10
|
} from '@/const/layoutTokens';
|
|
11
|
+
import ActionBar from '@/features/ChatInput/ActionBar';
|
|
12
|
+
import SaveTopic from '@/features/ChatInput/Topic';
|
|
13
|
+
import { useChatInput } from '@/features/ChatInput/useChatInput';
|
|
14
14
|
|
|
15
15
|
import DragUpload from './DragUpload';
|
|
16
16
|
import { LocalFiles } from './LocalFiles';
|
|
@@ -5,8 +5,8 @@ import { FC, memo } from 'react';
|
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
7
|
import ResponsiveIndex from '@/components/ResponsiveIndex';
|
|
8
|
+
import Conversation from '@/features/Conversation';
|
|
8
9
|
|
|
9
|
-
import Conversation from '../features/Conversation';
|
|
10
10
|
import PageTitle from '../features/PageTitle';
|
|
11
11
|
import ChatHeader from './features/ChatHeader';
|
|
12
12
|
import ChatInput from './features/ChatInput';
|
|
@@ -3,10 +3,10 @@ import { useTheme } from 'antd-style';
|
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
|
|
6
|
-
import ActionBar from '@/
|
|
7
|
-
import STT from '@/
|
|
8
|
-
import SaveTopic from '@/
|
|
9
|
-
import { useChatInput } from '@/
|
|
6
|
+
import ActionBar from '@/features/ChatInput/ActionBar';
|
|
7
|
+
import STT from '@/features/ChatInput/STT';
|
|
8
|
+
import SaveTopic from '@/features/ChatInput/Topic';
|
|
9
|
+
import { useChatInput } from '@/features/ChatInput/useChatInput';
|
|
10
10
|
|
|
11
11
|
import Files from './Files';
|
|
12
12
|
|
|
@@ -4,9 +4,9 @@ import dynamic from 'next/dynamic';
|
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
|
6
6
|
|
|
7
|
+
import Conversation from '@/features/Conversation';
|
|
7
8
|
import { useSessionStore } from '@/store/session';
|
|
8
9
|
|
|
9
|
-
import Conversation from '../../features/Conversation';
|
|
10
10
|
import ChatInput from '../features/ChatInput';
|
|
11
11
|
import Layout from './layout.mobile';
|
|
12
12
|
|
|
@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
8
8
|
import { Flexbox } from 'react-layout-kit';
|
|
9
9
|
|
|
10
10
|
import pkg from '@/../package.json';
|
|
11
|
-
import ChatList from '@/
|
|
11
|
+
import ChatList from '@/features/Conversation/ChatList';
|
|
12
12
|
import { useSessionStore } from '@/store/session';
|
|
13
13
|
import { agentSelectors, sessionSelectors } from '@/store/session/selectors';
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ActionIcon } from '@lobehub/ui';
|
|
2
2
|
import { Bot, MessageSquare } from 'lucide-react';
|
|
3
|
-
import
|
|
3
|
+
import Link from 'next/link';
|
|
4
4
|
import { memo } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
@@ -14,37 +14,39 @@ export interface TopActionProps {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const TopActions = memo<TopActionProps>(({ tab, setTab }) => {
|
|
17
|
-
const pathname = usePathname();
|
|
18
|
-
const router = useRouter();
|
|
19
17
|
const { t } = useTranslation('common');
|
|
20
18
|
const switchBackToChat = useSessionStore((s) => s.switchBackToChat);
|
|
19
|
+
|
|
21
20
|
return (
|
|
22
21
|
<>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// 如果已经在 chat 路径下了,那么就不用再跳转了
|
|
28
|
-
if (pathname?.startsWith('/chat')) return;
|
|
22
|
+
<Link
|
|
23
|
+
href={'/chat'}
|
|
24
|
+
onClick={(e) => {
|
|
25
|
+
e.preventDefault();
|
|
29
26
|
switchBackToChat();
|
|
30
27
|
setTab(SidebarTabKey.Chat);
|
|
31
28
|
}}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
29
|
+
>
|
|
30
|
+
<ActionIcon
|
|
31
|
+
active={tab === SidebarTabKey.Chat}
|
|
32
|
+
icon={MessageSquare}
|
|
33
|
+
placement={'right'}
|
|
34
|
+
size="large"
|
|
35
|
+
title={t('tab.chat')}
|
|
36
|
+
/>
|
|
37
|
+
</Link>
|
|
38
|
+
<Link href={'/market'}>
|
|
39
|
+
<ActionIcon
|
|
40
|
+
active={tab === SidebarTabKey.Market}
|
|
41
|
+
icon={Bot}
|
|
42
|
+
onClick={() => {
|
|
43
|
+
setTab(SidebarTabKey.Market);
|
|
44
|
+
}}
|
|
45
|
+
placement={'right'}
|
|
46
|
+
size="large"
|
|
47
|
+
title={t('tab.market')}
|
|
48
|
+
/>
|
|
49
|
+
</Link>
|
|
48
50
|
</>
|
|
49
51
|
);
|
|
50
52
|
});
|
|
@@ -29,6 +29,12 @@ const StoreHydration = memo(() => {
|
|
|
29
29
|
},
|
|
30
30
|
[router],
|
|
31
31
|
);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
router.prefetch('/chat');
|
|
34
|
+
router.prefetch('/market');
|
|
35
|
+
router.prefetch('/settings/common');
|
|
36
|
+
router.prefetch('/settings/agent');
|
|
37
|
+
}, [router]);
|
|
32
38
|
|
|
33
39
|
return null;
|
|
34
40
|
});
|
package/src/services/plugin.ts
CHANGED
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
LobeChatPluginsMarketIndex,
|
|
4
4
|
pluginManifestSchema,
|
|
5
5
|
} from '@lobehub/chat-plugin-sdk';
|
|
6
|
-
import { OpenAPIConvertor } from '@lobehub/chat-plugin-sdk/openapi';
|
|
7
|
-
import YAML from 'yaml';
|
|
8
6
|
|
|
9
7
|
import { getPluginIndexJSON } from '@/const/url';
|
|
10
8
|
import { PluginModel } from '@/database/models/plugin';
|
|
@@ -40,6 +38,8 @@ class PluginService {
|
|
|
40
38
|
if (contentType === 'application/json') {
|
|
41
39
|
data = await res.json();
|
|
42
40
|
} else {
|
|
41
|
+
const { default: YAML } = await import('yaml');
|
|
42
|
+
|
|
43
43
|
const yaml = await res.text();
|
|
44
44
|
data = YAML.parse(yaml);
|
|
45
45
|
}
|
|
@@ -94,6 +94,8 @@ class PluginService {
|
|
|
94
94
|
const openapiJson = await this._fetchJSON(parser.data.openapi, useProxy);
|
|
95
95
|
|
|
96
96
|
try {
|
|
97
|
+
const { OpenAPIConvertor } = await import('@lobehub/chat-plugin-sdk/openapi');
|
|
98
|
+
|
|
97
99
|
const convertor = new OpenAPIConvertor(openapiJson);
|
|
98
100
|
const openAPIs = await convertor.convertOpenAPIToPluginSchema();
|
|
99
101
|
data.api = [...data.api, ...openAPIs];
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/{app/chat/features → features}/Conversation/ChatList/Error/ErrorActionContainer.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/{app/chat/features → features}/Conversation/ChatList/Error/Plugin/PluginError.tsx
RENAMED
|
File without changes
|
/package/src/{app/chat/features → features}/Conversation/ChatList/Error/Plugin/PluginSettings.tsx
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/Settings.tsx
RENAMED
|
File without changes
|
/package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/index.tsx
RENAMED
|
File without changes
|
/package/src/{app/chat/features → features}/Conversation/ChatList/Plugins/Inspector/style.ts
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|