@lobehub/chat 0.107.16 → 0.109.0
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 +50 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/docs/Environment-Variable.md +2 -2
- package/docs/Environment-Variable.zh-CN.md +2 -2
- package/locales/en_US/plugin.json +19 -0
- package/locales/en_US/setting.json +26 -0
- package/locales/ja_JP/plugin.json +19 -0
- package/locales/ja_JP/setting.json +26 -0
- package/locales/ko_KR/plugin.json +19 -0
- package/locales/ko_KR/setting.json +26 -0
- package/locales/ru_RU/plugin.json +19 -0
- package/locales/ru_RU/setting.json +26 -0
- package/locales/zh_CN/plugin.json +19 -0
- package/locales/zh_CN/setting.json +26 -5
- package/locales/zh_TW/plugin.json +19 -0
- package/locales/zh_TW/setting.json +26 -0
- package/package.json +3 -3
- package/src/app/chat/features/ChatHeader/PluginTag/PluginStatus.tsx +6 -6
- package/src/app/chat/features/ChatHeader/PluginTag/index.tsx +4 -4
- package/src/app/chat/features/ChatInput/ActionBar/Tools/ToolItem.tsx +37 -0
- package/src/app/chat/features/ChatInput/ActionBar/Tools/index.tsx +116 -0
- package/src/app/chat/features/ChatInput/ActionBar/config.ts +3 -1
- package/src/app/chat/features/Conversation/ChatList/Error/Plugin/PluginSettings.tsx +4 -4
- package/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/Settings.tsx +3 -3
- package/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/index.tsx +4 -4
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx +2 -2
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/Iframe.tsx +4 -4
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/StandaloneType/index.tsx +2 -2
- package/src/app/chat/features/Conversation/useInitConversation.ts +2 -2
- package/src/app/settings/(desktop)/index.tsx +3 -2
- package/src/app/settings/common/Common.tsx +8 -3
- package/src/app/settings/common/index.tsx +3 -3
- package/src/app/settings/common/page.tsx +7 -1
- package/src/app/settings/page.tsx +4 -1
- package/src/config/server.ts +5 -1
- package/src/features/AgentSetting/AgentPlugin/AddPluginButton.tsx +56 -0
- package/src/features/AgentSetting/AgentPlugin/LoadingList.tsx +48 -0
- package/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx +5 -5
- package/src/features/AgentSetting/AgentPlugin/PluginAction/index.tsx +36 -0
- package/src/features/AgentSetting/AgentPlugin/index.tsx +157 -9
- package/src/features/AgentSetting/store/action.ts +0 -1
- package/src/features/PluginDevModal/MetaForm.tsx +3 -3
- package/src/features/PluginDevModal/PluginPreview.tsx +1 -1
- package/src/features/PluginDevModal/index.tsx +4 -1
- package/src/features/PluginSettings/index.tsx +3 -3
- package/src/features/PluginSettingsModal/index.tsx +22 -17
- package/src/features/PluginStore/Loading.tsx +13 -0
- package/src/features/PluginStore/PluginItem.tsx +81 -0
- package/src/features/PluginStore/PluginSettings.tsx +40 -0
- package/src/features/{AgentSetting/AgentPlugin/MarketSettingModal.tsx → PluginStore/StoreSetting.tsx} +2 -2
- package/src/features/PluginStore/index.tsx +95 -0
- package/src/layout/GlobalLayout/StoreHydration.tsx +3 -3
- package/src/locales/default/plugin.ts +19 -0
- package/src/locales/default/setting.ts +26 -5
- package/src/services/__tests__/chat.test.ts +221 -0
- package/src/services/__tests__/message.test.ts +333 -0
- package/src/services/__tests__/plugin.test.ts +88 -0
- package/src/services/__tests__/session.test.ts +227 -0
- package/src/services/__tests__/topic.test.ts +220 -0
- package/src/services/chat.ts +4 -6
- package/src/services/plugin.ts +12 -1
- package/src/store/chat/actions/message.test.ts +0 -1
- package/src/store/session/slices/agent/action.ts +24 -8
- package/src/store/{plugin → tool}/helpers.ts +2 -13
- package/src/store/tool/index.ts +2 -0
- package/src/store/tool/initialState.ts +11 -0
- package/src/store/tool/selectors.ts +3 -0
- package/src/store/tool/slices/customPlugin/action.test.ts +164 -0
- package/src/store/{plugin → tool}/slices/customPlugin/action.ts +2 -2
- package/src/store/tool/slices/customPlugin/selectors.test.ts +59 -0
- package/src/store/tool/slices/customPlugin/selectors.ts +9 -0
- package/src/store/tool/slices/plugin/action.test.ts +141 -0
- package/src/store/tool/slices/plugin/action.ts +95 -0
- package/src/store/{plugin → tool}/slices/plugin/initialState.ts +0 -7
- package/src/store/{plugin → tool/slices/plugin}/selectors.test.ts +4 -41
- package/src/store/{plugin → tool/slices/plugin}/selectors.ts +17 -19
- package/src/store/tool/slices/store/action.test.ts +396 -0
- package/src/store/tool/slices/store/action.ts +103 -0
- package/src/store/tool/slices/store/index.ts +3 -0
- package/src/store/tool/slices/store/initialState.ts +17 -0
- package/src/store/tool/slices/store/selectors.test.ts +48 -0
- package/src/store/tool/slices/store/selectors.ts +21 -0
- package/src/store/{plugin → tool}/store.ts +8 -6
- package/vitest.config.ts +1 -0
- package/src/features/AgentSetting/AgentPlugin/MarketList.tsx +0 -232
- package/src/features/AgentSetting/AgentPlugin/PluginSettings.tsx +0 -80
- package/src/store/chat/reducers/files.test.ts +0 -38
- package/src/store/chat/reducers/files.ts +0 -37
- package/src/store/plugin/hooks/useSessionHydrated.ts +0 -21
- package/src/store/plugin/index.ts +0 -2
- package/src/store/plugin/initialState.ts +0 -9
- package/src/store/plugin/slices/plugin/action.ts +0 -173
- /package/src/store/{plugin → tool}/slices/customPlugin/index.ts +0 -0
- /package/src/store/{plugin → tool}/slices/customPlugin/initialState.ts +0 -0
- /package/src/store/{plugin → tool}/slices/customPlugin/reducers/customPluginList.ts +0 -0
- /package/src/store/{plugin → tool}/slices/plugin/index.ts +0 -0
- /package/src/store/{plugin → tool}/slices/plugin/reducers/manifest.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 0.109.0](https://github.com/lobehub/lobe-chat/compare/v0.108.0...v0.109.0)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2023-12-06**</sup>
|
|
8
|
+
|
|
9
|
+
#### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **misc**: Introducing plugin store and refactor with tool concept.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's improved
|
|
19
|
+
|
|
20
|
+
- **misc**: Introducing plugin store and refactor with tool concept, closes [#573](https://github.com/lobehub/lobe-chat/issues/573) ([92f43d1](https://github.com/lobehub/lobe-chat/commit/92f43d1))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 0.108.0](https://github.com/lobehub/lobe-chat/compare/v0.107.16...v0.108.0)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2023-12-03**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **misc**: Hide the password form item in the settings when there is no `ACCESS_CODE` env.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **misc**: Hide the password form item in the settings when there is no `ACCESS_CODE` env, closes [#568](https://github.com/lobehub/lobe-chat/issues/568) ([3b5f8b2](https://github.com/lobehub/lobe-chat/commit/3b5f8b2))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 0.107.16](https://github.com/lobehub/lobe-chat/compare/v0.107.15...v0.107.16)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2023-12-03**</sup>
|
package/README.md
CHANGED
|
@@ -393,7 +393,7 @@ This project provides some additional configuration items set with environment v
|
|
|
393
393
|
| `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
|
|
394
394
|
| `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn/v1`<br/>The default value is<br/>`https://api.openai.com/v1` |
|
|
395
395
|
| `OPENAI_FUNCTION_REGIONS` | No | When you deploy Lobe-Chat using Vercel and need to specify the region for the Edge Function that handles requests to the OpenAI API, you can use this configuration. The value should be a comma-separated array of strings. | `iad1,sfo1` |
|
|
396
|
-
| `ACCESS_CODE` | No | Add a password to access this service;
|
|
396
|
+
| `ACCESS_CODE` | No | Add a password to access this service; you can set a long password to avoid leaking | `awCTe)re_r74` or `rtrt_ewee3@09!` |
|
|
397
397
|
|
|
398
398
|
> \[!NOTE]
|
|
399
399
|
>
|
package/README.zh-CN.md
CHANGED
|
@@ -365,7 +365,7 @@ $ docker run -d -p 3210:3210 \
|
|
|
365
365
|
| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
|
|
366
366
|
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
|
|
367
367
|
| `OPENAI_FUNCTION_REGIONS` | 可选 | 当你使用 Vercel 部署 Lobe-Chat,而且有需求指定响应调用 OpenAI 接口的请求的 Edge Function 的 Region 时,可以使用该配置进行配置,该值的类型为逗号分隔的字符串数组 | `iad1,sfo1` |
|
|
368
|
-
| `ACCESS_CODE` | 可选 |
|
|
368
|
+
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破 | `awCTe)re_r74` or `rtrt_ewee3@09!` |
|
|
369
369
|
|
|
370
370
|
> \[!NOTE]
|
|
371
371
|
>
|
|
@@ -27,9 +27,9 @@ LobeChat provides additional configuration options during deployment, which can
|
|
|
27
27
|
### `ACCESS_CODE`
|
|
28
28
|
|
|
29
29
|
- Type: Optional
|
|
30
|
-
- Description: Add a password to access the LobeChat service,
|
|
30
|
+
- Description: Add a password to access the LobeChat service, ; you can set a long password to avoid leaking.
|
|
31
31
|
- Default: `-`
|
|
32
|
-
- Example: `
|
|
32
|
+
- Example: `awCTe)re_r74` or `rtrt_ewee3@09!`
|
|
33
33
|
|
|
34
34
|
### `NEXT_PUBLIC_CUSTOM_MODELS`
|
|
35
35
|
|
|
@@ -27,9 +27,9 @@ LobeChat 在部署时提供了一些额外的配置项,使用环境变量进
|
|
|
27
27
|
### `ACCESS_CODE`
|
|
28
28
|
|
|
29
29
|
- 类型:可选
|
|
30
|
-
- 描述:添加访问 LobeChat
|
|
30
|
+
- 描述:添加访问 LobeChat 服务的密码,你可以设置一个长密码以防被爆破
|
|
31
31
|
- 默认值:-
|
|
32
|
-
- 示例:`
|
|
32
|
+
- 示例:`awCTe)re_r74` or `rtrt_ewee3@09!`
|
|
33
33
|
|
|
34
34
|
### `NEXT_PUBLIC_CUSTOM_MODELS`
|
|
35
35
|
|
|
@@ -83,6 +83,12 @@
|
|
|
83
83
|
"update": "Update",
|
|
84
84
|
"updateSuccess": "Plugin settings updated successfully"
|
|
85
85
|
},
|
|
86
|
+
"error": {
|
|
87
|
+
"fetchError": "Request failed",
|
|
88
|
+
"installError": "Plugin {{name}} installation failed",
|
|
89
|
+
"manifestInvalid": "Invalid manifest file format",
|
|
90
|
+
"noManifest": "Manifest file does not exist"
|
|
91
|
+
},
|
|
86
92
|
"list": {
|
|
87
93
|
"item": {
|
|
88
94
|
"local.config": "Configuration",
|
|
@@ -125,5 +131,18 @@
|
|
|
125
131
|
},
|
|
126
132
|
"modalDesc": "After configuring the address of the plugin marketplace, you can use a custom plugin marketplace",
|
|
127
133
|
"title": "Configure Plugin Marketplace"
|
|
134
|
+
},
|
|
135
|
+
"store": {
|
|
136
|
+
"empty": "No installed plugins yet",
|
|
137
|
+
"install": "Install",
|
|
138
|
+
"installAllPlugins": "Install All",
|
|
139
|
+
"networkError": "Failed to fetch plugin store. Please check your network connection and try again",
|
|
140
|
+
"releasedAt": "Released at {{createdAt}}",
|
|
141
|
+
"tabs": {
|
|
142
|
+
"all": "All",
|
|
143
|
+
"installed": "Installed"
|
|
144
|
+
},
|
|
145
|
+
"title": "Plugin Store",
|
|
146
|
+
"uninstall": "Uninstall"
|
|
128
147
|
}
|
|
129
148
|
}
|
|
@@ -84,6 +84,20 @@
|
|
|
84
84
|
},
|
|
85
85
|
"waitingForMore": "<1>Access to other models is planned</1>, so stay tuned ✨"
|
|
86
86
|
},
|
|
87
|
+
"plugin": {
|
|
88
|
+
"addTooltip": "Add Custom Plugin",
|
|
89
|
+
"clearDeprecated": "Remove Deprecated Plugins",
|
|
90
|
+
"empty": "No installed plugins yet, feel free to visit the <1>Plugin Store</1> to explore",
|
|
91
|
+
"installStatus": {
|
|
92
|
+
"deprecated": "Uninstalled"
|
|
93
|
+
},
|
|
94
|
+
"settings": {
|
|
95
|
+
"hint": "Please fill in the following configuration based on the description",
|
|
96
|
+
"title": "{{id}} Plugin Configuration",
|
|
97
|
+
"tooltip": "Plugin Configuration"
|
|
98
|
+
},
|
|
99
|
+
"store": "Plugin Store"
|
|
100
|
+
},
|
|
87
101
|
"settingAgent": {
|
|
88
102
|
"avatar": {
|
|
89
103
|
"title": "Avatar"
|
|
@@ -293,5 +307,17 @@
|
|
|
293
307
|
"common": "Common Settings",
|
|
294
308
|
"llm": "Custom LLM API",
|
|
295
309
|
"tts": "Speech Services"
|
|
310
|
+
},
|
|
311
|
+
"tools": {
|
|
312
|
+
"builtins": {
|
|
313
|
+
"groupName": "Built-in"
|
|
314
|
+
},
|
|
315
|
+
"plugins": {
|
|
316
|
+
"enabled": "Enabled {{num}}",
|
|
317
|
+
"groupName": "Plugins",
|
|
318
|
+
"noEnabled": "No enabled plugins yet",
|
|
319
|
+
"store": "Plugin Store"
|
|
320
|
+
},
|
|
321
|
+
"title": "Extensions"
|
|
296
322
|
}
|
|
297
323
|
}
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
"update": "更新",
|
|
83
83
|
"updateSuccess": "プラグインの設定が正常に更新されました"
|
|
84
84
|
},
|
|
85
|
+
"error": {
|
|
86
|
+
"fetchError": "リクエストに失敗しました",
|
|
87
|
+
"installError": "プラグイン {{name}} のインストールに失敗しました",
|
|
88
|
+
"manifestInvalid": "マニフェストの形式が正しくありません",
|
|
89
|
+
"noManifest": "マニフェストが存在しません"
|
|
90
|
+
},
|
|
85
91
|
"list": {
|
|
86
92
|
"item": {
|
|
87
93
|
"deprecated.title": "削除済み",
|
|
@@ -105,5 +111,18 @@
|
|
|
105
111
|
},
|
|
106
112
|
"modalDesc": "プラグインマーケットのアドレスを設定すると、カスタムのプラグインマーケットを使用できます",
|
|
107
113
|
"title": "プラグインマーケットの設定"
|
|
114
|
+
},
|
|
115
|
+
"store": {
|
|
116
|
+
"empty": "インストールされたプラグインはありません",
|
|
117
|
+
"install": "インストール",
|
|
118
|
+
"installAllPlugins": "すべてのプラグインをインストール",
|
|
119
|
+
"networkError": "プラグインストアの取得に失敗しました。ネットワーク接続を確認してから再試行してください",
|
|
120
|
+
"releasedAt": "{{createdAt}} にリリース",
|
|
121
|
+
"tabs": {
|
|
122
|
+
"all": "すべて",
|
|
123
|
+
"installed": "インストール済み"
|
|
124
|
+
},
|
|
125
|
+
"title": "プラグインストア",
|
|
126
|
+
"uninstall": "アンインストール"
|
|
108
127
|
}
|
|
109
128
|
}
|
|
@@ -84,6 +84,20 @@
|
|
|
84
84
|
},
|
|
85
85
|
"waitingForMore": "他のモデルは現在 <1>計画中</1> です。お楽しみに ✨"
|
|
86
86
|
},
|
|
87
|
+
"plugin": {
|
|
88
|
+
"addTooltip": "カスタムプラグインを追加",
|
|
89
|
+
"clearDeprecated": "無効なプラグインをクリア",
|
|
90
|
+
"empty": "インストールされたプラグインはありません。 <1>プラグインストア</1> で探索してください",
|
|
91
|
+
"installStatus": {
|
|
92
|
+
"deprecated": "アンインストール済み"
|
|
93
|
+
},
|
|
94
|
+
"settings": {
|
|
95
|
+
"hint": "説明に従って以下の設定を入力してください",
|
|
96
|
+
"title": "{{id}} プラグイン設定",
|
|
97
|
+
"tooltip": "プラグイン設定"
|
|
98
|
+
},
|
|
99
|
+
"store": "プラグインストア"
|
|
100
|
+
},
|
|
87
101
|
"settingAgent": {
|
|
88
102
|
"avatar": {
|
|
89
103
|
"title": "アバター"
|
|
@@ -280,5 +294,17 @@
|
|
|
280
294
|
"common": "一般設定",
|
|
281
295
|
"llm": "言語モデル",
|
|
282
296
|
"tts": "音声サービス"
|
|
297
|
+
},
|
|
298
|
+
"tools": {
|
|
299
|
+
"builtins": {
|
|
300
|
+
"groupName": "組み込み"
|
|
301
|
+
},
|
|
302
|
+
"plugins": {
|
|
303
|
+
"enabled": "{{num}} 個が有効",
|
|
304
|
+
"groupName": "プラグイン",
|
|
305
|
+
"noEnabled": "有効なプラグインはありません",
|
|
306
|
+
"store": "プラグインストア"
|
|
307
|
+
},
|
|
308
|
+
"title": "拡張ツール"
|
|
283
309
|
}
|
|
284
310
|
}
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
"update": "업데이트",
|
|
83
83
|
"updateSuccess": "플러그인 설정이 성공적으로 업데이트되었습니다."
|
|
84
84
|
},
|
|
85
|
+
"error": {
|
|
86
|
+
"fetchError": "요청 실패",
|
|
87
|
+
"installError": "플러그인 {{name}} 설치 실패",
|
|
88
|
+
"manifestInvalid": "설명 파일 형식이 잘못되었습니다",
|
|
89
|
+
"noManifest": "설명 파일이 없습니다"
|
|
90
|
+
},
|
|
85
91
|
"list": {
|
|
86
92
|
"item": {
|
|
87
93
|
"deprecated.title": "삭제됨",
|
|
@@ -105,5 +111,18 @@
|
|
|
105
111
|
},
|
|
106
112
|
"modalDesc": "플러그인 마켓의 주소를 구성하면 사용자 정의 플러그인 마켓을 사용할 수 있습니다.",
|
|
107
113
|
"title": "플러그인 마켓 설정"
|
|
114
|
+
},
|
|
115
|
+
"store": {
|
|
116
|
+
"empty": "설치된 플러그인이 없습니다",
|
|
117
|
+
"install": "설치",
|
|
118
|
+
"installAllPlugins": "모두 설치",
|
|
119
|
+
"networkError": "플러그인 스토어를 가져오는 데 실패했습니다. 네트워크 연결을 확인한 후 다시 시도하십시오",
|
|
120
|
+
"releasedAt": "{{createdAt}}에 출시",
|
|
121
|
+
"tabs": {
|
|
122
|
+
"all": "모두",
|
|
123
|
+
"installed": "설치됨"
|
|
124
|
+
},
|
|
125
|
+
"title": "플러그인 스토어",
|
|
126
|
+
"uninstall": "제거"
|
|
108
127
|
}
|
|
109
128
|
}
|
|
@@ -84,6 +84,20 @@
|
|
|
84
84
|
},
|
|
85
85
|
"waitingForMore": "더 많은 모델이 <1>계획 중</1>에 있으니 기대해주세요 ✨"
|
|
86
86
|
},
|
|
87
|
+
"plugin": {
|
|
88
|
+
"addTooltip": "사용자 정의 플러그인 추가",
|
|
89
|
+
"clearDeprecated": "사용되지 않는 플러그인 지우기",
|
|
90
|
+
"empty": "설치된 플러그인이 없습니다. <1>플러그인 상점</1>에서 살펴보세요",
|
|
91
|
+
"installStatus": {
|
|
92
|
+
"deprecated": "설치 취소됨"
|
|
93
|
+
},
|
|
94
|
+
"settings": {
|
|
95
|
+
"hint": "설명에 따라 아래 구성을 입력하십시오",
|
|
96
|
+
"title": "{{id}} 플러그인 구성",
|
|
97
|
+
"tooltip": "플러그인 구성"
|
|
98
|
+
},
|
|
99
|
+
"store": "플러그인 상점"
|
|
100
|
+
},
|
|
87
101
|
"settingAgent": {
|
|
88
102
|
"avatar": {
|
|
89
103
|
"title": "아바타"
|
|
@@ -280,5 +294,17 @@
|
|
|
280
294
|
"common": "일반 설정",
|
|
281
295
|
"llm": "언어 모델",
|
|
282
296
|
"tts": "음성 서비스"
|
|
297
|
+
},
|
|
298
|
+
"tools": {
|
|
299
|
+
"builtins": {
|
|
300
|
+
"groupName": "내장"
|
|
301
|
+
},
|
|
302
|
+
"plugins": {
|
|
303
|
+
"enabled": "{{num}}개 활성화됨",
|
|
304
|
+
"groupName": "플러그인",
|
|
305
|
+
"noEnabled": "활성화된 플러그인이 없습니다",
|
|
306
|
+
"store": "플러그인 상점"
|
|
307
|
+
},
|
|
308
|
+
"title": "확장 도구"
|
|
283
309
|
}
|
|
284
310
|
}
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
"update": "Обновить",
|
|
83
83
|
"updateSuccess": "Настройки плагина успешно обновлены"
|
|
84
84
|
},
|
|
85
|
+
"error": {
|
|
86
|
+
"fetchError": "Ошибка запроса",
|
|
87
|
+
"installError": "Ошибка установки плагина {{name}}",
|
|
88
|
+
"manifestInvalid": "Неверный формат файла описания",
|
|
89
|
+
"noManifest": "Отсутствует файл описания"
|
|
90
|
+
},
|
|
85
91
|
"list": {
|
|
86
92
|
"item": {
|
|
87
93
|
"deprecated.title": "Удалено",
|
|
@@ -105,5 +111,18 @@
|
|
|
105
111
|
},
|
|
106
112
|
"modalDesc": "После настройки адреса рынка плагинов можно использовать пользовательский рынок плагинов",
|
|
107
113
|
"title": "Настройки рынка плагинов"
|
|
114
|
+
},
|
|
115
|
+
"store": {
|
|
116
|
+
"empty": "Нет установленных плагинов",
|
|
117
|
+
"install": "Установить",
|
|
118
|
+
"installAllPlugins": "Установить все",
|
|
119
|
+
"networkError": "Не удалось получить доступ к магазину плагинов. Пожалуйста, проверьте подключение к сети и повторите попытку",
|
|
120
|
+
"releasedAt": "Опубликовано {{createdAt}}",
|
|
121
|
+
"tabs": {
|
|
122
|
+
"all": "Все",
|
|
123
|
+
"installed": "Установленные"
|
|
124
|
+
},
|
|
125
|
+
"title": "Магазин плагинов",
|
|
126
|
+
"uninstall": "Удалить"
|
|
108
127
|
}
|
|
109
128
|
}
|
|
@@ -84,6 +84,20 @@
|
|
|
84
84
|
},
|
|
85
85
|
"waitingForMore": "<1>Планируется доступ к другим моделям</1>, так что следите за обновлениями ✨"
|
|
86
86
|
},
|
|
87
|
+
"plugin": {
|
|
88
|
+
"addTooltip": "Добавить пользовательский плагин",
|
|
89
|
+
"clearDeprecated": "Удалить устаревшие плагины",
|
|
90
|
+
"empty": "Нет установленных плагинов, добро пожаловать в <1>Магазин плагинов</1>",
|
|
91
|
+
"installStatus": {
|
|
92
|
+
"deprecated": "Удалено"
|
|
93
|
+
},
|
|
94
|
+
"settings": {
|
|
95
|
+
"hint": "Пожалуйста, заполните следующие настройки на основе описания",
|
|
96
|
+
"title": "{{id}} Настройки плагина",
|
|
97
|
+
"tooltip": "Настройки плагина"
|
|
98
|
+
},
|
|
99
|
+
"store": "Магазин плагинов"
|
|
100
|
+
},
|
|
87
101
|
"settingAgent": {
|
|
88
102
|
"avatar": {
|
|
89
103
|
"title": "Аватар"
|
|
@@ -293,5 +307,17 @@
|
|
|
293
307
|
"common": "Общие настройки",
|
|
294
308
|
"llm": "Пользовательский API GPT",
|
|
295
309
|
"tts": "Сервис речи"
|
|
310
|
+
},
|
|
311
|
+
"tools": {
|
|
312
|
+
"builtins": {
|
|
313
|
+
"groupName": "Встроенные"
|
|
314
|
+
},
|
|
315
|
+
"plugins": {
|
|
316
|
+
"enabled": "Включено {{num}}",
|
|
317
|
+
"groupName": "Плагины",
|
|
318
|
+
"noEnabled": "Нет включенных плагинов",
|
|
319
|
+
"store": "Магазин плагинов"
|
|
320
|
+
},
|
|
321
|
+
"title": "Расширенные инструменты"
|
|
296
322
|
}
|
|
297
323
|
}
|
|
@@ -82,6 +82,12 @@
|
|
|
82
82
|
"update": "更新",
|
|
83
83
|
"updateSuccess": "插件设置更新成功"
|
|
84
84
|
},
|
|
85
|
+
"error": {
|
|
86
|
+
"fetchError": "请求失败",
|
|
87
|
+
"installError": "插件 {{name}} 安装失败",
|
|
88
|
+
"manifestInvalid": "描述文件格式不正确",
|
|
89
|
+
"noManifest": "描述文件不存在"
|
|
90
|
+
},
|
|
85
91
|
"list": {
|
|
86
92
|
"item": {
|
|
87
93
|
"deprecated.title": "已删除",
|
|
@@ -105,5 +111,18 @@
|
|
|
105
111
|
},
|
|
106
112
|
"modalDesc": "配置插件市场的地址后,可以使用自定义的插件市场",
|
|
107
113
|
"title": "设置插件市场"
|
|
114
|
+
},
|
|
115
|
+
"store": {
|
|
116
|
+
"empty": "暂无已安装插件",
|
|
117
|
+
"install": "安装",
|
|
118
|
+
"installAllPlugins": "安装全部",
|
|
119
|
+
"networkError": "获取插件商店失败,请检测网络连接后重试",
|
|
120
|
+
"releasedAt": "发布于 {{createdAt}}",
|
|
121
|
+
"tabs": {
|
|
122
|
+
"all": "全部",
|
|
123
|
+
"installed": "已安装"
|
|
124
|
+
},
|
|
125
|
+
"title": "插件商店",
|
|
126
|
+
"uninstall": "卸载"
|
|
108
127
|
}
|
|
109
128
|
}
|
|
@@ -84,6 +84,20 @@
|
|
|
84
84
|
},
|
|
85
85
|
"waitingForMore": "更多模型正在 <1>计划接入</1> 中,敬请期待 ✨"
|
|
86
86
|
},
|
|
87
|
+
"plugin": {
|
|
88
|
+
"addTooltip": "添加自定义插件",
|
|
89
|
+
"clearDeprecated": "移除无效插件",
|
|
90
|
+
"empty": "暂无已安装插件,欢迎前往 <1>插件商店</1> 探索",
|
|
91
|
+
"installStatus": {
|
|
92
|
+
"deprecated": "已卸载"
|
|
93
|
+
},
|
|
94
|
+
"settings": {
|
|
95
|
+
"hint": "请根据描述填写以下配置",
|
|
96
|
+
"title": "{{id}} 插件配置",
|
|
97
|
+
"tooltip": "插件配置"
|
|
98
|
+
},
|
|
99
|
+
"store": "插件商店"
|
|
100
|
+
},
|
|
87
101
|
"settingAgent": {
|
|
88
102
|
"avatar": {
|
|
89
103
|
"title": "头像"
|
|
@@ -187,11 +201,6 @@
|
|
|
187
201
|
}
|
|
188
202
|
},
|
|
189
203
|
"settingPlugin": {
|
|
190
|
-
"add": "添加",
|
|
191
|
-
"addTooltip": "添加自定义插件",
|
|
192
|
-
"clearDeprecated": "移除无效插件",
|
|
193
|
-
"config": "{{id}} 插件配置",
|
|
194
|
-
"settings": "配置插件市场",
|
|
195
204
|
"title": "插件列表"
|
|
196
205
|
},
|
|
197
206
|
"settingSystem": {
|
|
@@ -276,5 +285,17 @@
|
|
|
276
285
|
"common": "通用设置",
|
|
277
286
|
"llm": "语言模型",
|
|
278
287
|
"tts": "语音服务"
|
|
288
|
+
},
|
|
289
|
+
"tools": {
|
|
290
|
+
"builtins": {
|
|
291
|
+
"groupName": "内置"
|
|
292
|
+
},
|
|
293
|
+
"plugins": {
|
|
294
|
+
"enabled": "已启用 {{num}}",
|
|
295
|
+
"groupName": "插件",
|
|
296
|
+
"noEnabled": "暂无启用插件",
|
|
297
|
+
"store": "插件商店"
|
|
298
|
+
},
|
|
299
|
+
"title": "扩展工具"
|
|
279
300
|
}
|
|
280
301
|
}
|
|
@@ -83,6 +83,12 @@
|
|
|
83
83
|
"update": "更新",
|
|
84
84
|
"updateSuccess": "外掛設定已成功更新"
|
|
85
85
|
},
|
|
86
|
+
"error": {
|
|
87
|
+
"fetchError": "請求失敗",
|
|
88
|
+
"installError": "插件 {{name}} 安裝失敗",
|
|
89
|
+
"manifestInvalid": "描述檔格式無效",
|
|
90
|
+
"noManifest": "描述檔不存在"
|
|
91
|
+
},
|
|
86
92
|
"list": {
|
|
87
93
|
"item": {
|
|
88
94
|
"local.config": "設定",
|
|
@@ -125,5 +131,18 @@
|
|
|
125
131
|
},
|
|
126
132
|
"modalDesc": "設定外掛市集的網址後,您可以使用自訂的外掛市集",
|
|
127
133
|
"title": "設定外掛市集"
|
|
134
|
+
},
|
|
135
|
+
"store": {
|
|
136
|
+
"empty": "暫無已安裝插件",
|
|
137
|
+
"install": "安裝",
|
|
138
|
+
"installAllPlugins": "安裝全部",
|
|
139
|
+
"networkError": "獲取插件商店失敗,請檢查網路連線後重試",
|
|
140
|
+
"releasedAt": "發佈於 {{createdAt}}",
|
|
141
|
+
"tabs": {
|
|
142
|
+
"all": "全部",
|
|
143
|
+
"installed": "已安裝"
|
|
144
|
+
},
|
|
145
|
+
"title": "插件商店",
|
|
146
|
+
"uninstall": "解除安裝"
|
|
128
147
|
}
|
|
129
148
|
}
|
|
@@ -84,6 +84,20 @@
|
|
|
84
84
|
},
|
|
85
85
|
"waitingForMore": "<1>計劃支援其他模型</1>,敬請期待 ✨"
|
|
86
86
|
},
|
|
87
|
+
"plugin": {
|
|
88
|
+
"addTooltip": "新增自訂外掛程式",
|
|
89
|
+
"clearDeprecated": "清除已棄用的外掛程式",
|
|
90
|
+
"empty": "目前沒有安裝任何外掛程式,歡迎前往 <1>外掛程式商店</1> 進行探索",
|
|
91
|
+
"installStatus": {
|
|
92
|
+
"deprecated": "已移除"
|
|
93
|
+
},
|
|
94
|
+
"settings": {
|
|
95
|
+
"hint": "請根據描述填寫以下設定",
|
|
96
|
+
"title": "{{id}} 外掛程式設定",
|
|
97
|
+
"tooltip": "外掛程式設定"
|
|
98
|
+
},
|
|
99
|
+
"store": "外掛程式商店"
|
|
100
|
+
},
|
|
87
101
|
"settingAgent": {
|
|
88
102
|
"avatar": {
|
|
89
103
|
"title": "頭像"
|
|
@@ -293,5 +307,17 @@
|
|
|
293
307
|
"common": "通用設定",
|
|
294
308
|
"llm": "語言模型",
|
|
295
309
|
"tts": "語音服務"
|
|
310
|
+
},
|
|
311
|
+
"tools": {
|
|
312
|
+
"builtins": {
|
|
313
|
+
"groupName": "內建"
|
|
314
|
+
},
|
|
315
|
+
"plugins": {
|
|
316
|
+
"enabled": "已啟用 {{num}}",
|
|
317
|
+
"groupName": "外掛程式",
|
|
318
|
+
"noEnabled": "目前沒有已啟用的外掛程式",
|
|
319
|
+
"store": "外掛程式商店"
|
|
320
|
+
},
|
|
321
|
+
"title": "擴充工具"
|
|
296
322
|
}
|
|
297
323
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.0",
|
|
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",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"@types/ua-parser-js": "^0.7",
|
|
145
145
|
"@types/uuid": "^9",
|
|
146
146
|
"@umijs/lint": "^4",
|
|
147
|
-
"@vitest/coverage-v8": "
|
|
147
|
+
"@vitest/coverage-v8": "^1",
|
|
148
148
|
"commitlint": "^18",
|
|
149
149
|
"consola": "^3",
|
|
150
150
|
"dpdm": "^3",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"stylelint": "^15",
|
|
163
163
|
"ts-node": "^10",
|
|
164
164
|
"typescript": "^5",
|
|
165
|
-
"vitest": "
|
|
165
|
+
"vitest": "^1"
|
|
166
166
|
},
|
|
167
167
|
"publishConfig": {
|
|
168
168
|
"access": "public",
|
|
@@ -6,9 +6,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
7
|
|
|
8
8
|
import ManifestPreviewer from '@/components/ManifestPreviewer';
|
|
9
|
-
import { usePluginStore } from '@/store/plugin';
|
|
10
|
-
import { pluginSelectors } from '@/store/plugin/selectors';
|
|
11
9
|
import { useSessionStore } from '@/store/session';
|
|
10
|
+
import { useToolStore } from '@/store/tool';
|
|
11
|
+
import { customPluginSelectors, pluginSelectors } from '@/store/tool/selectors';
|
|
12
12
|
|
|
13
13
|
interface PluginStatusProps {
|
|
14
14
|
deprecated?: boolean;
|
|
@@ -17,13 +17,13 @@ interface PluginStatusProps {
|
|
|
17
17
|
}
|
|
18
18
|
const PluginStatus = memo<PluginStatusProps>(({ title, id, deprecated }) => {
|
|
19
19
|
const { t } = useTranslation('common');
|
|
20
|
-
const [status, isCustom, fetchPluginManifest] =
|
|
20
|
+
const [status, isCustom, fetchPluginManifest] = useToolStore((s) => [
|
|
21
21
|
pluginSelectors.getPluginManifestLoadingStatus(id)(s),
|
|
22
|
-
|
|
22
|
+
customPluginSelectors.isCustomPlugin(id)(s),
|
|
23
23
|
s.installPlugin,
|
|
24
24
|
]);
|
|
25
25
|
|
|
26
|
-
const manifest =
|
|
26
|
+
const manifest = useToolStore(pluginSelectors.getPluginManifestById(id));
|
|
27
27
|
|
|
28
28
|
const removePlugin = useSessionStore((s) => s.removePlugin);
|
|
29
29
|
|
|
@@ -78,7 +78,7 @@ const PluginStatus = memo<PluginStatusProps>(({ title, id, deprecated }) => {
|
|
|
78
78
|
removePlugin(id);
|
|
79
79
|
}}
|
|
80
80
|
size={'small'}
|
|
81
|
-
title={t('
|
|
81
|
+
title={t('plugin.clearDeprecated', { ns: 'setting' })}
|
|
82
82
|
/>
|
|
83
83
|
) : (
|
|
84
84
|
<Flexbox align={'center'} horizontal>
|
|
@@ -5,8 +5,8 @@ import isEqual from 'fast-deep-equal';
|
|
|
5
5
|
import { LucideToyBrick } from 'lucide-react';
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
|
|
8
|
-
import { pluginHelpers,
|
|
9
|
-
import { pluginSelectors } from '@/store/
|
|
8
|
+
import { pluginHelpers, useToolStore } from '@/store/tool';
|
|
9
|
+
import { pluginSelectors } from '@/store/tool/selectors';
|
|
10
10
|
|
|
11
11
|
import PluginStatus from './PluginStatus';
|
|
12
12
|
|
|
@@ -15,8 +15,8 @@ export interface PluginTagProps {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const PluginTag = memo<PluginTagProps>(({ plugins }) => {
|
|
18
|
-
const list =
|
|
19
|
-
const displayPlugin =
|
|
18
|
+
const list = useToolStore(pluginSelectors.displayPluginList);
|
|
19
|
+
const displayPlugin = useToolStore(pluginSelectors.getPluginMetaById(plugins[0]), isEqual);
|
|
20
20
|
|
|
21
21
|
if (plugins.length === 0) return null;
|
|
22
22
|
|