@lobehub/chat 1.109.0 → 1.110.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/.cursor/rules/i18n.mdc +1 -2
- package/CHANGELOG.md +59 -0
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/apps/desktop/electron-builder.js +22 -0
- package/apps/desktop/src/main/controllers/McpInstallCtr.ts +153 -0
- package/apps/desktop/src/main/controllers/index.ts +19 -0
- package/apps/desktop/src/main/core/App.ts +46 -0
- package/apps/desktop/src/main/core/infrastructure/IoCContainer.ts +4 -0
- package/apps/desktop/src/main/core/infrastructure/ProtocolManager.ts +256 -0
- package/apps/desktop/src/main/types/protocol.ts +60 -0
- package/apps/desktop/src/main/utils/__tests__/protocol.test.ts +203 -0
- package/apps/desktop/src/main/utils/protocol.ts +210 -0
- package/changelog/v1.json +21 -0
- package/locales/ar/models.json +6 -0
- package/locales/ar/plugin.json +196 -136
- package/locales/ar/providers.json +3 -0
- package/locales/bg-BG/models.json +6 -0
- package/locales/bg-BG/plugin.json +204 -144
- package/locales/bg-BG/providers.json +3 -0
- package/locales/de-DE/models.json +6 -0
- package/locales/de-DE/plugin.json +176 -116
- package/locales/de-DE/providers.json +3 -0
- package/locales/en-US/models.json +6 -0
- package/locales/en-US/plugin.json +192 -132
- package/locales/en-US/providers.json +3 -0
- package/locales/es-ES/models.json +6 -0
- package/locales/es-ES/plugin.json +203 -143
- package/locales/es-ES/providers.json +3 -0
- package/locales/fa-IR/models.json +6 -0
- package/locales/fa-IR/plugin.json +155 -95
- package/locales/fa-IR/providers.json +3 -0
- package/locales/fr-FR/models.json +6 -0
- package/locales/fr-FR/plugin.json +161 -101
- package/locales/fr-FR/providers.json +3 -0
- package/locales/it-IT/models.json +6 -0
- package/locales/it-IT/plugin.json +193 -133
- package/locales/it-IT/providers.json +3 -0
- package/locales/ja-JP/models.json +6 -0
- package/locales/ja-JP/plugin.json +195 -135
- package/locales/ja-JP/providers.json +3 -0
- package/locales/ko-KR/models.json +6 -0
- package/locales/ko-KR/plugin.json +163 -103
- package/locales/ko-KR/providers.json +3 -0
- package/locales/nl-NL/models.json +6 -0
- package/locales/nl-NL/plugin.json +211 -151
- package/locales/nl-NL/providers.json +3 -0
- package/locales/pl-PL/models.json +6 -0
- package/locales/pl-PL/plugin.json +171 -111
- package/locales/pl-PL/providers.json +3 -0
- package/locales/pt-BR/models.json +6 -0
- package/locales/pt-BR/plugin.json +180 -120
- package/locales/pt-BR/providers.json +3 -0
- package/locales/ru-RU/models.json +6 -0
- package/locales/ru-RU/plugin.json +191 -131
- package/locales/ru-RU/providers.json +3 -0
- package/locales/tr-TR/models.json +6 -0
- package/locales/tr-TR/plugin.json +187 -127
- package/locales/tr-TR/providers.json +3 -0
- package/locales/vi-VN/models.json +6 -0
- package/locales/vi-VN/plugin.json +152 -92
- package/locales/vi-VN/providers.json +3 -0
- package/locales/zh-CN/models.json +6 -0
- package/locales/zh-CN/plugin.json +60 -0
- package/locales/zh-CN/providers.json +3 -0
- package/locales/zh-TW/models.json +6 -0
- package/locales/zh-TW/plugin.json +157 -97
- package/locales/zh-TW/providers.json +3 -0
- package/package.json +2 -1
- package/packages/electron-client-ipc/src/events/index.ts +5 -2
- package/packages/electron-client-ipc/src/events/protocol.ts +29 -0
- package/packages/electron-client-ipc/src/types/index.ts +1 -0
- package/packages/electron-client-ipc/src/types/mcpInstall.ts +19 -0
- package/packages/types/src/plugins/mcp.ts +38 -1
- package/packages/types/src/plugins/protocol.ts +166 -0
- package/src/app/[variants]/(main)/chat/_layout/Desktop/index.tsx +4 -1
- package/src/app/[variants]/(main)/discover/(detail)/mcp/[slug]/features/Sidebar/ActionButton/index.tsx +1 -2
- package/src/components/KeyValueEditor/index.tsx +4 -2
- package/src/config/aiModels/aihubmix.ts +465 -30
- package/src/config/aiModels/anthropic.ts +27 -1
- package/src/config/aiModels/groq.ts +40 -4
- package/src/config/aiModels/qwen.ts +24 -2
- package/src/features/MCP/MCPInstallProgress/index.tsx +1 -1
- package/src/features/PluginDevModal/MCPManifestForm/index.tsx +30 -36
- package/src/features/PluginStore/McpList/List/Item.tsx +1 -1
- package/src/features/ProtocolUrlHandler/InstallPlugin/ConfigDisplay.tsx +211 -0
- package/src/features/ProtocolUrlHandler/InstallPlugin/CustomPluginInstallModal.tsx +228 -0
- package/src/features/ProtocolUrlHandler/InstallPlugin/OfficialPluginInstallModal/Detail.tsx +44 -0
- package/src/features/ProtocolUrlHandler/InstallPlugin/OfficialPluginInstallModal/index.tsx +105 -0
- package/src/features/ProtocolUrlHandler/InstallPlugin/index.tsx +55 -0
- package/src/features/ProtocolUrlHandler/InstallPlugin/types.ts +45 -0
- package/src/features/ProtocolUrlHandler/index.tsx +30 -0
- package/src/libs/model-runtime/anthropic/index.ts +15 -2
- package/src/libs/model-runtime/utils/modelParse.ts +2 -2
- package/src/libs/model-runtime/utils/streams/ollama.test.ts +97 -51
- package/src/libs/model-runtime/utils/streams/ollama.ts +4 -0
- package/src/locales/default/plugin.ts +60 -0
- package/src/store/tool/slices/mcpStore/action.ts +127 -1
- package/src/store/tool/slices/mcpStore/initialState.ts +8 -13
- package/src/store/tool/slices/mcpStore/selectors.ts +13 -0
@@ -1,25 +1,25 @@
|
|
1
1
|
{
|
2
2
|
"confirm": "確定",
|
3
3
|
"debug": {
|
4
|
-
"arguments": "
|
5
|
-
"function_call": "
|
6
|
-
"off": "
|
7
|
-
"on": "
|
4
|
+
"arguments": "調用參數",
|
5
|
+
"function_call": "函數調用",
|
6
|
+
"off": "關閉調試",
|
7
|
+
"on": "查看插件調用信息",
|
8
8
|
"payload": "插件載荷",
|
9
|
-
"pluginState": "
|
10
|
-
"response": "
|
9
|
+
"pluginState": "插件 State",
|
10
|
+
"response": "返回結果",
|
11
11
|
"title": "插件詳情",
|
12
|
-
"tool_call": "
|
12
|
+
"tool_call": "工具調用請求"
|
13
13
|
},
|
14
14
|
"detailModal": {
|
15
15
|
"customPlugin": {
|
16
16
|
"description": "請前往編輯頁面查看詳情",
|
17
17
|
"editBtn": "立即編輯",
|
18
|
-
"title": "
|
18
|
+
"title": "這是一個自定義插件"
|
19
19
|
},
|
20
20
|
"emptyState": {
|
21
|
-
"description": "
|
22
|
-
"title": "
|
21
|
+
"description": "請先安裝此插件,以查看插件能力和配置選項",
|
22
|
+
"title": "安裝後查看插件詳情"
|
23
23
|
},
|
24
24
|
"info": {
|
25
25
|
"description": "API 描述",
|
@@ -27,23 +27,23 @@
|
|
27
27
|
},
|
28
28
|
"tabs": {
|
29
29
|
"info": "插件能力",
|
30
|
-
"manifest": "
|
31
|
-
"settings": "
|
30
|
+
"manifest": "安裝文件",
|
31
|
+
"settings": "設置"
|
32
32
|
},
|
33
33
|
"title": "插件詳情"
|
34
34
|
},
|
35
35
|
"dev": {
|
36
|
-
"confirmDeleteDevPlugin": "
|
36
|
+
"confirmDeleteDevPlugin": "即將刪除該本地插件,刪除後將無法找回,是否刪除該插件?",
|
37
37
|
"customParams": {
|
38
38
|
"useProxy": {
|
39
|
-
"label": "
|
39
|
+
"label": "通過代理安裝(如遇到跨域訪問錯誤,可嘗試開啟該選項後重新安裝)"
|
40
40
|
}
|
41
41
|
},
|
42
|
-
"deleteSuccess": "
|
42
|
+
"deleteSuccess": "插件刪除成功",
|
43
43
|
"manifest": {
|
44
44
|
"identifier": {
|
45
|
-
"desc": "
|
46
|
-
"label": "
|
45
|
+
"desc": "插件的唯一標識",
|
46
|
+
"label": "標識符"
|
47
47
|
},
|
48
48
|
"mode": {
|
49
49
|
"mcp": "MCP 插件",
|
@@ -51,30 +51,30 @@
|
|
51
51
|
"url": "線上連結"
|
52
52
|
},
|
53
53
|
"name": {
|
54
|
-
"desc": "
|
55
|
-
"label": "
|
54
|
+
"desc": "插件標題",
|
55
|
+
"label": "標題",
|
56
56
|
"placeholder": "搜尋引擎"
|
57
57
|
}
|
58
58
|
},
|
59
59
|
"mcp": {
|
60
60
|
"advanced": {
|
61
|
-
"title": "
|
61
|
+
"title": "高級設置"
|
62
62
|
},
|
63
63
|
"args": {
|
64
64
|
"desc": "傳遞給執行命令的參數列表,一般在這裡輸入 MCP 伺服器名稱,或啟動腳本路徑",
|
65
65
|
"label": "命令參數",
|
66
|
-
"placeholder": "
|
66
|
+
"placeholder": "例如:mcp-hello-world",
|
67
67
|
"required": "請輸入啟動參數"
|
68
68
|
},
|
69
69
|
"auth": {
|
70
|
-
"bear": "API
|
70
|
+
"bear": "API Key",
|
71
71
|
"desc": "選擇 MCP 伺服器的認證方式",
|
72
72
|
"label": "認證類型",
|
73
73
|
"none": "無需認證",
|
74
74
|
"placeholder": "請選擇認證類型",
|
75
75
|
"token": {
|
76
|
-
"desc": "輸入你的 API
|
77
|
-
"label": "API
|
76
|
+
"desc": "輸入你的 API Key 或 Bearer Token",
|
77
|
+
"label": "API Key",
|
78
78
|
"placeholder": "sk-xxxxx",
|
79
79
|
"required": "請輸入認證令牌"
|
80
80
|
}
|
@@ -83,9 +83,9 @@
|
|
83
83
|
"label": "插件圖示"
|
84
84
|
},
|
85
85
|
"command": {
|
86
|
-
"desc": "用於啟動 MCP STDIO
|
86
|
+
"desc": "用於啟動 MCP STDIO Server 的可執行檔或腳本",
|
87
87
|
"label": "命令",
|
88
|
-
"placeholder": "例如:
|
88
|
+
"placeholder": "例如:npx / uv / docker 等",
|
89
89
|
"required": "請輸入啟動命令"
|
90
90
|
},
|
91
91
|
"desc": {
|
@@ -109,30 +109,30 @@
|
|
109
109
|
"headers": {
|
110
110
|
"add": "新增一行",
|
111
111
|
"desc": "輸入請求標頭",
|
112
|
-
"label": "HTTP
|
112
|
+
"label": "HTTP Headers"
|
113
113
|
},
|
114
114
|
"identifier": {
|
115
115
|
"desc": "為你的 MCP 插件指定一個名稱,需要使用英文字符",
|
116
|
-
"invalid": "
|
116
|
+
"invalid": "標識符只能包含字母、數字、連字號和底線",
|
117
117
|
"label": "MCP 插件名稱",
|
118
118
|
"placeholder": "例如:my-mcp-plugin",
|
119
119
|
"required": "請輸入 MCP 服務標識符"
|
120
120
|
},
|
121
121
|
"previewManifest": "預覽插件描述文件",
|
122
|
-
"quickImport": "
|
122
|
+
"quickImport": "快速導入 JSON 配置",
|
123
123
|
"quickImportError": {
|
124
124
|
"empty": "輸入內容不能為空",
|
125
125
|
"invalidJson": "無效的 JSON 格式",
|
126
126
|
"invalidStructure": "JSON 格式無效"
|
127
127
|
},
|
128
|
-
"stdioNotSupported": "
|
128
|
+
"stdioNotSupported": "當前環境不支援 stdio 類型的 MCP 插件",
|
129
129
|
"testConnection": "測試連接",
|
130
130
|
"testConnectionTip": "測試連接成功後 MCP 插件才可以被正常使用",
|
131
131
|
"type": {
|
132
|
-
"desc": "選擇 MCP
|
133
|
-
"httpFeature1": "
|
132
|
+
"desc": "選擇 MCP 插件的通訊方式,網頁版只支援 Streamable HTTP",
|
133
|
+
"httpFeature1": "相容網頁版與桌面端",
|
134
134
|
"httpFeature2": "連接遠端 MCP 伺服器, 無需額外安裝配置",
|
135
|
-
"httpShortDesc": "
|
135
|
+
"httpShortDesc": "基於串流式 HTTP 的通訊協議",
|
136
136
|
"label": "MCP 插件類型",
|
137
137
|
"stdioFeature1": "更低的通訊延遲, 適合本地執行",
|
138
138
|
"stdioFeature2": "需在本地安裝運行 MCP 伺服器",
|
@@ -141,94 +141,94 @@
|
|
141
141
|
"title": "MCP 插件類型"
|
142
142
|
},
|
143
143
|
"url": {
|
144
|
-
"desc": "輸入你的 MCP
|
144
|
+
"desc": "輸入你的 MCP Server Streamable HTTP 地址,不支援 SSE 模式",
|
145
145
|
"invalid": "請輸入有效的 URL 地址",
|
146
|
-
"label": "HTTP Endpoint URL",
|
146
|
+
"label": "Streamable HTTP Endpoint URL",
|
147
147
|
"required": "請輸入 MCP 服務 URL"
|
148
148
|
}
|
149
149
|
},
|
150
150
|
"meta": {
|
151
151
|
"author": {
|
152
|
-
"desc": "
|
152
|
+
"desc": "插件的作者",
|
153
153
|
"label": "作者"
|
154
154
|
},
|
155
155
|
"avatar": {
|
156
|
-
"desc": "
|
156
|
+
"desc": "插件的圖示,可以使用 Emoji,也可以使用 URL",
|
157
157
|
"label": "圖示"
|
158
158
|
},
|
159
159
|
"description": {
|
160
|
-
"desc": "
|
160
|
+
"desc": "插件描述",
|
161
161
|
"label": "描述",
|
162
|
-
"placeholder": "
|
162
|
+
"placeholder": "查詢搜尋引擎獲取資訊"
|
163
163
|
},
|
164
|
-
"formFieldRequired": "
|
164
|
+
"formFieldRequired": "該欄位為必填項",
|
165
165
|
"homepage": {
|
166
|
-
"desc": "
|
166
|
+
"desc": "插件的首頁",
|
167
167
|
"label": "首頁"
|
168
168
|
},
|
169
169
|
"identifier": {
|
170
|
-
"desc": "
|
171
|
-
"errorDuplicate": "
|
172
|
-
"label": "
|
173
|
-
"pattenErrorMessage": "
|
170
|
+
"desc": "插件的唯一標識,將從 manifest 中自動識別",
|
171
|
+
"errorDuplicate": "標識符和已有插件重複,請修改標識符",
|
172
|
+
"label": "標識符",
|
173
|
+
"pattenErrorMessage": "只能輸入英文字符、數字 、- 和_ 這兩個符號"
|
174
174
|
},
|
175
175
|
"lobe": "{{appName}} 插件",
|
176
176
|
"manifest": {
|
177
|
-
"desc": "{{appName}}
|
178
|
-
"label": "
|
177
|
+
"desc": "{{appName}}將會通過該連結安裝插件",
|
178
|
+
"label": "插件描述文件 (Manifest) URL",
|
179
179
|
"preview": "預覽 Manifest",
|
180
|
-
"refresh": "
|
180
|
+
"refresh": "刷新"
|
181
181
|
},
|
182
182
|
"openai": "OpenAI 插件",
|
183
183
|
"title": {
|
184
|
-
"desc": "
|
185
|
-
"label": "
|
184
|
+
"desc": "插件標題",
|
185
|
+
"label": "標題",
|
186
186
|
"placeholder": "搜尋引擎"
|
187
187
|
}
|
188
188
|
},
|
189
|
-
"metaConfig": "
|
190
|
-
"modalDesc": "
|
189
|
+
"metaConfig": "插件元信息配置",
|
190
|
+
"modalDesc": "添加自定義插件後,可用於插件開發驗證,也可直接在會話中使用。插件開發請參考<1>開發文檔↗</>",
|
191
191
|
"openai": {
|
192
|
-
"importUrl": "從 URL
|
192
|
+
"importUrl": "從 URL 連結導入",
|
193
193
|
"schema": "Schema"
|
194
194
|
},
|
195
195
|
"preview": {
|
196
196
|
"api": {
|
197
197
|
"noParams": "該工具沒有參數",
|
198
|
-
"noResults": "
|
199
|
-
"params": "
|
200
|
-
"searchPlaceholder": "
|
198
|
+
"noResults": "未找到符合搜尋條件的 API",
|
199
|
+
"params": "參數:",
|
200
|
+
"searchPlaceholder": "搜尋工具..."
|
201
201
|
},
|
202
|
-
"card": "
|
203
|
-
"desc": "
|
202
|
+
"card": "預覽插件展示效果",
|
203
|
+
"desc": "預覽插件描述",
|
204
204
|
"empty": {
|
205
|
-
"desc": "
|
205
|
+
"desc": "完成配置後,將能夠在此處預覽插件支援的工具能力",
|
206
206
|
"title": "配置插件後開始預覽"
|
207
207
|
},
|
208
|
-
"title": "
|
208
|
+
"title": "插件名稱預覽"
|
209
209
|
},
|
210
210
|
"save": "安裝插件",
|
211
|
-
"saveSuccess": "
|
211
|
+
"saveSuccess": "插件設定保存成功",
|
212
212
|
"tabs": {
|
213
213
|
"manifest": "功能描述清單 (Manifest)",
|
214
|
-
"meta": "
|
214
|
+
"meta": "插件元信息"
|
215
215
|
},
|
216
216
|
"title": {
|
217
|
-
"create": "
|
218
|
-
"edit": "
|
217
|
+
"create": "添加自定義插件",
|
218
|
+
"edit": "編輯自定義插件"
|
219
219
|
},
|
220
220
|
"type": {
|
221
|
-
"lobe": "
|
221
|
+
"lobe": "{{appName}} 插件",
|
222
222
|
"openai": "OpenAI 插件"
|
223
223
|
},
|
224
224
|
"update": "更新",
|
225
|
-
"updateSuccess": "
|
225
|
+
"updateSuccess": "插件設定更新成功"
|
226
226
|
},
|
227
227
|
"error": {
|
228
228
|
"fetchError": "請求該 manifest 連結失敗,請確保連結的有效性,並檢查連結是否允許跨域訪問",
|
229
229
|
"installError": "插件 {{name}} 安裝失敗",
|
230
230
|
"manifestInvalid": "manifest 不符合規範,校驗結果: \n\n {{error}}",
|
231
|
-
"noManifest": "
|
231
|
+
"noManifest": "描述文件不存在",
|
232
232
|
"openAPIInvalid": "OpenAPI 解析失敗,錯誤: \n\n {{error}}",
|
233
233
|
"reinstallError": "插件 {{name}} 刷新失敗",
|
234
234
|
"testConnectionFailed": "獲取 Manifest 失敗: {{error}}",
|
@@ -241,13 +241,13 @@
|
|
241
241
|
"list": {
|
242
242
|
"item": {
|
243
243
|
"deprecated.title": "已刪除",
|
244
|
-
"local.config": "
|
245
|
-
"local.title": "
|
244
|
+
"local.config": "配置",
|
245
|
+
"local.title": "自定義"
|
246
246
|
}
|
247
247
|
},
|
248
248
|
"loading": {
|
249
|
-
"content": "
|
250
|
-
"plugin": "
|
249
|
+
"content": "調用插件中...",
|
250
|
+
"plugin": "插件運行中..."
|
251
251
|
},
|
252
252
|
"localSystem": {
|
253
253
|
"apiName": {
|
@@ -265,7 +265,7 @@
|
|
265
265
|
"COMPLETED": "安裝完成",
|
266
266
|
"CONFIGURATION_REQUIRED": "請完成相關配置後繼續安裝",
|
267
267
|
"ERROR": "安裝錯誤",
|
268
|
-
"FETCHING_MANIFEST": "
|
268
|
+
"FETCHING_MANIFEST": "獲取插件描述文件...",
|
269
269
|
"GETTING_SERVER_MANIFEST": "初始化 MCP 伺服器...",
|
270
270
|
"INSTALLING_PLUGIN": "正在安裝插件...",
|
271
271
|
"configurationDescription": "該 MCP 插件需要配置參數才能正常使用,請填寫必要的配置信息",
|
@@ -292,7 +292,7 @@
|
|
292
292
|
"errorTypes": {
|
293
293
|
"AUTHORIZATION_ERROR": "授權驗證錯誤",
|
294
294
|
"CONNECTION_FAILED": "連接失敗",
|
295
|
-
"INITIALIZATION_TIMEOUT": "
|
295
|
+
"INITIALIZATION_TIMEOUT": "初始化超時",
|
296
296
|
"PROCESS_SPAWN_ERROR": "進程啟動失敗",
|
297
297
|
"UNKNOWN_ERROR": "未知錯誤",
|
298
298
|
"VALIDATION_ERROR": "參數驗證失敗"
|
@@ -305,7 +305,67 @@
|
|
305
305
|
"recheckDependencies": "重新檢查",
|
306
306
|
"skipDependencies": "跳過檢查"
|
307
307
|
},
|
308
|
-
"pluginList": "
|
308
|
+
"pluginList": "插件列表",
|
309
|
+
"protocolInstall": {
|
310
|
+
"actions": {
|
311
|
+
"install": "安裝",
|
312
|
+
"installAnyway": "仍要安裝",
|
313
|
+
"installed": "已安裝"
|
314
|
+
},
|
315
|
+
"config": {
|
316
|
+
"args": "參數",
|
317
|
+
"command": "命令",
|
318
|
+
"env": "環境變數",
|
319
|
+
"headers": "請求標頭",
|
320
|
+
"title": "配置信息",
|
321
|
+
"type": {
|
322
|
+
"http": "類型: HTTP",
|
323
|
+
"label": "類型",
|
324
|
+
"stdio": "類型: Stdio"
|
325
|
+
},
|
326
|
+
"url": "服務地址"
|
327
|
+
},
|
328
|
+
"custom": {
|
329
|
+
"badge": "自定義插件",
|
330
|
+
"security": {
|
331
|
+
"description": "此插件未經過官方驗證,安裝可能存在安全風險!請確保您信任插件來源。",
|
332
|
+
"title": "⚠️ 安全風險提示"
|
333
|
+
},
|
334
|
+
"title": "安裝自定義插件"
|
335
|
+
},
|
336
|
+
"marketplace": {
|
337
|
+
"title": "安裝第三方插件",
|
338
|
+
"trustedBy": "由 {{name}} 提供",
|
339
|
+
"unverified": {
|
340
|
+
"title": "未經驗證的第三方插件",
|
341
|
+
"warning": "此插件來自未驗證的第三方市場,安裝前請確認您信任該來源。"
|
342
|
+
},
|
343
|
+
"verified": "已驗證"
|
344
|
+
},
|
345
|
+
"messages": {
|
346
|
+
"connectionTestFailed": "連接測試失敗",
|
347
|
+
"installError": "插件安裝失敗,請重試",
|
348
|
+
"installSuccess": "插件 {{name}} 安裝成功!",
|
349
|
+
"manifestError": "獲取插件詳情失敗,請檢查網路連接後重試",
|
350
|
+
"manifestNotFound": "未能獲取插件描述文件"
|
351
|
+
},
|
352
|
+
"meta": {
|
353
|
+
"author": "作者",
|
354
|
+
"homepage": "主頁",
|
355
|
+
"identifier": "標識符",
|
356
|
+
"source": "來源",
|
357
|
+
"version": "版本"
|
358
|
+
},
|
359
|
+
"official": {
|
360
|
+
"badge": "LobeHub 官方插件",
|
361
|
+
"description": "此插件由 LobeHub 官方開發和維護,經過嚴格的安全審核,可放心使用。",
|
362
|
+
"loadingMessage": "正在獲取插件詳情...",
|
363
|
+
"loadingTitle": "載入中",
|
364
|
+
"title": "安裝官方插件"
|
365
|
+
},
|
366
|
+
"title": "安裝 MCP 插件",
|
367
|
+
"warning": "⚠️ 請確認您信任此插件的來源,惡意插件可能會危害您的系統安全。"
|
368
|
+
},
|
309
369
|
"search": {
|
310
370
|
"apiName": {
|
311
371
|
"crawlMultiPages": "讀取多個頁面內容",
|
@@ -322,7 +382,7 @@
|
|
322
382
|
"detail": {
|
323
383
|
"preview": "預覽",
|
324
384
|
"raw": "原始文本",
|
325
|
-
"tooLong": "文本內容過長,對話上下文僅保留前 {{characters}}
|
385
|
+
"tooLong": "文本內容過長,對話上下文僅保留前 {{characters}} 字符,超過部分不計入會話上下文"
|
326
386
|
},
|
327
387
|
"meta": {
|
328
388
|
"crawler": "抓取模式",
|
@@ -331,13 +391,13 @@
|
|
331
391
|
},
|
332
392
|
"searchxng": {
|
333
393
|
"baseURL": "請輸入",
|
334
|
-
"description": "請輸入 SearchXNG
|
394
|
+
"description": "請輸入 SearchXNG 的網址,即可開始聯網搜尋",
|
335
395
|
"keyPlaceholder": "請輸入密鑰",
|
336
|
-
"title": "配置 SearchXNG
|
337
|
-
"unconfiguredDesc": "
|
338
|
-
"unconfiguredTitle": "暫未配置 SearchXNG
|
396
|
+
"title": "配置 SearchXNG 搜尋引擎",
|
397
|
+
"unconfiguredDesc": "請聯絡管理員完成 SearchXNG 搜尋引擎配置,即可開始聯網搜尋",
|
398
|
+
"unconfiguredTitle": "暫未配置 SearchXNG 搜尋引擎"
|
339
399
|
},
|
340
|
-
"title": "
|
400
|
+
"title": "聯網搜尋"
|
341
401
|
},
|
342
402
|
"setting": "插件設置",
|
343
403
|
"settings": {
|
@@ -353,7 +413,7 @@
|
|
353
413
|
"connection": {
|
354
414
|
"args": "啟動參數",
|
355
415
|
"command": "啟動命令",
|
356
|
-
"title": "
|
416
|
+
"title": "連接信息",
|
357
417
|
"type": "連接類型",
|
358
418
|
"url": "服務地址"
|
359
419
|
},
|
@@ -361,46 +421,46 @@
|
|
361
421
|
"envConfigDescription": "這些配置將作為環境變數在 MCP 伺服器啟動時傳遞給進程",
|
362
422
|
"httpTypeNotice": "HTTP 類型的 MCP 插件暫無需要配置的環境變數",
|
363
423
|
"indexUrl": {
|
364
|
-
"title": "
|
365
|
-
"tooltip": "
|
424
|
+
"title": "市場索引",
|
425
|
+
"tooltip": "暫不支援線上編輯,請透過部署時環境變數進行設定"
|
366
426
|
},
|
367
427
|
"messages": {
|
368
|
-
"connectionUpdateFailed": "
|
369
|
-
"connectionUpdateSuccess": "
|
428
|
+
"connectionUpdateFailed": "連接信息更新失敗",
|
429
|
+
"connectionUpdateSuccess": "連接信息更新成功",
|
370
430
|
"envUpdateFailed": "環境變數保存失敗",
|
371
431
|
"envUpdateSuccess": "環境變數保存成功"
|
372
432
|
},
|
373
|
-
"modalDesc": "
|
433
|
+
"modalDesc": "配置插件市場的地址後,可以使用自定義的插件市場",
|
374
434
|
"rules": {
|
375
435
|
"argsRequired": "請輸入啟動參數",
|
376
436
|
"commandRequired": "請輸入啟動命令",
|
377
437
|
"urlRequired": "請輸入服務地址"
|
378
438
|
},
|
379
439
|
"saveSettings": "保存設置",
|
380
|
-
"title": "
|
440
|
+
"title": "設置插件市場"
|
381
441
|
},
|
382
|
-
"showInPortal": "
|
442
|
+
"showInPortal": "請在工作區中查看詳情",
|
383
443
|
"store": {
|
384
444
|
"actions": {
|
385
445
|
"cancel": "取消安裝",
|
386
446
|
"confirmUninstall": "即將卸載該插件,卸載後將清除該插件配置,請確認你的操作",
|
387
447
|
"detail": "詳情",
|
388
448
|
"install": "安裝",
|
389
|
-
"manifest": "
|
390
|
-
"settings": "
|
449
|
+
"manifest": "編輯安裝文件",
|
450
|
+
"settings": "設置",
|
391
451
|
"uninstall": "卸載"
|
392
452
|
},
|
393
|
-
"communityPlugin": "
|
394
|
-
"customPlugin": "
|
453
|
+
"communityPlugin": "三方社區",
|
454
|
+
"customPlugin": "自定義",
|
395
455
|
"empty": "暫無已安裝插件",
|
396
|
-
"emptySelectHint": "
|
456
|
+
"emptySelectHint": "選擇插件以預覽詳細信息",
|
397
457
|
"installAllPlugins": "安裝全部",
|
398
|
-
"networkError": "
|
399
|
-
"placeholder": "
|
400
|
-
"releasedAt": "
|
458
|
+
"networkError": "獲取插件商店失敗,請檢測網路連接後重試",
|
459
|
+
"placeholder": "搜尋插件名稱介紹或關鍵詞...",
|
460
|
+
"releasedAt": "發布於 {{createdAt}}",
|
401
461
|
"tabs": {
|
402
462
|
"installed": "已安裝",
|
403
|
-
"mcp": "MCP
|
463
|
+
"mcp": "MCP 插件",
|
404
464
|
"old": "LobeChat 插件"
|
405
465
|
},
|
406
466
|
"title": "插件商店"
|
@@ -2,6 +2,9 @@
|
|
2
2
|
"ai21": {
|
3
3
|
"description": "AI21 Labs 為企業構建基礎模型和人工智慧系統,加速生成性人工智慧在生產中的應用。"
|
4
4
|
},
|
5
|
+
"ai302": {
|
6
|
+
"description": "302.AI 是一個按需付費的 AI 應用平台,提供市面上最全的 AI API 和 AI 在線應用"
|
7
|
+
},
|
5
8
|
"ai360": {
|
6
9
|
"description": "360 AI 是 360 公司推出的 AI 模型和服務平台,提供多種先進的自然語言處理模型,包括 360GPT2 Pro、360GPT Pro、360GPT Turbo 和 360GPT Turbo Responsibility 8K。這些模型結合了大規模參數和多模態能力,廣泛應用於文本生成、語義理解、對話系統與代碼生成等領域。通過靈活的定價策略,360 AI 滿足多樣化用戶需求,支持開發者集成,推動智能化應用的革新和發展。"
|
7
10
|
},
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.110.0",
|
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",
|
@@ -282,6 +282,7 @@
|
|
282
282
|
"@commitlint/cli": "^19.8.1",
|
283
283
|
"@edge-runtime/vm": "^5.0.0",
|
284
284
|
"@huggingface/tasks": "^0.15.9",
|
285
|
+
"@lobechat/types": "workspace:*",
|
285
286
|
"@lobehub/i18n-cli": "^1.25.1",
|
286
287
|
"@lobehub/lint": "^1.26.2",
|
287
288
|
"@lobehub/market-types": "^1.11.4",
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { LocalFilesDispatchEvents } from './localFile';
|
2
2
|
import { MenuDispatchEvents } from './menu';
|
3
3
|
import { NotificationDispatchEvents } from './notification';
|
4
|
+
import { ProtocolBroadcastEvents, ProtocolDispatchEvents } from './protocol';
|
4
5
|
import { RemoteServerBroadcastEvents, RemoteServerDispatchEvents } from './remoteServer';
|
5
6
|
import { DesktopSettingsDispatchEvents } from './settings';
|
6
7
|
import { ShortcutDispatchEvents } from './shortcut';
|
@@ -25,7 +26,8 @@ export interface ClientDispatchEvents
|
|
25
26
|
UploadFilesDispatchEvents,
|
26
27
|
TrayDispatchEvents,
|
27
28
|
DesktopSettingsDispatchEvents,
|
28
|
-
NotificationDispatchEvents
|
29
|
+
NotificationDispatchEvents,
|
30
|
+
ProtocolDispatchEvents {}
|
29
31
|
|
30
32
|
export type ClientDispatchEventKey = keyof ClientDispatchEvents;
|
31
33
|
|
@@ -40,7 +42,8 @@ export type ClientEventReturnType<T extends ClientDispatchEventKey> = ReturnType
|
|
40
42
|
export interface MainBroadcastEvents
|
41
43
|
extends AutoUpdateBroadcastEvents,
|
42
44
|
RemoteServerBroadcastEvents,
|
43
|
-
SystemBroadcastEvents
|
45
|
+
SystemBroadcastEvents,
|
46
|
+
ProtocolBroadcastEvents {}
|
44
47
|
|
45
48
|
export type MainBroadcastEventKey = keyof MainBroadcastEvents;
|
46
49
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { McpInstallSchema } from '../types';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* 协议安装相关的 Broadcast 事件(主进程 -> 渲染进程)
|
5
|
+
*/
|
6
|
+
export interface ProtocolBroadcastEvents {
|
7
|
+
/**
|
8
|
+
* MCP 插件安装请求事件
|
9
|
+
* 主进程解析协议 URL 后发送给前端
|
10
|
+
*/
|
11
|
+
mcpInstallRequest: (data: {
|
12
|
+
/** 市场来源ID */
|
13
|
+
marketId?: string;
|
14
|
+
/** 插件ID */
|
15
|
+
pluginId: string;
|
16
|
+
/** MCP Schema 对象 */
|
17
|
+
schema: McpInstallSchema;
|
18
|
+
}) => void;
|
19
|
+
}
|
20
|
+
|
21
|
+
/**
|
22
|
+
* 协议处理相关的 Dispatch 事件(渲染进程 -> 主进程)
|
23
|
+
*/
|
24
|
+
export interface ProtocolDispatchEvents {
|
25
|
+
/**
|
26
|
+
* 通知主进程协议URL已被处理
|
27
|
+
*/
|
28
|
+
protocolUrlHandled: (data: { error?: string; success: boolean; url: string }) => Promise<void>;
|
29
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export interface MCPInstallConfig {
|
2
|
+
args?: string[];
|
3
|
+
command?: string;
|
4
|
+
env?: Record<string, string>;
|
5
|
+
headers?: Record<string, string>;
|
6
|
+
type: 'stdio' | 'http';
|
7
|
+
url?: string;
|
8
|
+
}
|
9
|
+
|
10
|
+
export interface McpInstallSchema {
|
11
|
+
author: string;
|
12
|
+
config: MCPInstallConfig;
|
13
|
+
description: string;
|
14
|
+
homepage?: string;
|
15
|
+
icon?: string;
|
16
|
+
identifier: string;
|
17
|
+
name: string;
|
18
|
+
version: string;
|
19
|
+
}
|
@@ -1,8 +1,22 @@
|
|
1
1
|
import { PluginQueryParams, SystemDependency } from '@lobehub/market-sdk';
|
2
2
|
|
3
3
|
import { MCPErrorType } from '@/libs/mcp';
|
4
|
-
import { MCPInstallStep } from '@/store/tool/slices/mcpStore';
|
5
4
|
|
5
|
+
import { CustomPluginMetadata } from '../tool/plugin';
|
6
|
+
|
7
|
+
/* eslint-disable typescript-sort-keys/string-enum */
|
8
|
+
export enum MCPInstallStep {
|
9
|
+
FETCHING_MANIFEST = 'FETCHING_MANIFEST',
|
10
|
+
CHECKING_INSTALLATION = 'CHECKING_INSTALLATION',
|
11
|
+
DEPENDENCIES_REQUIRED = 'DEPENDENCIES_REQUIRED',
|
12
|
+
GETTING_SERVER_MANIFEST = 'GETTING_SERVER_MANIFEST',
|
13
|
+
CONFIGURATION_REQUIRED = 'CONFIGURATION_REQUIRED',
|
14
|
+
INSTALLING_PLUGIN = 'INSTALLING_PLUGIN',
|
15
|
+
COMPLETED = 'COMPLETED',
|
16
|
+
ERROR = 'Error',
|
17
|
+
}
|
18
|
+
|
19
|
+
/* eslint-enable */
|
6
20
|
export interface CheckMcpInstallParams {
|
7
21
|
/**
|
8
22
|
* 安装详情
|
@@ -181,4 +195,27 @@ export interface MCPInstallProgress {
|
|
181
195
|
}>;
|
182
196
|
}
|
183
197
|
|
198
|
+
export interface McpConnection {
|
199
|
+
args?: string[];
|
200
|
+
auth?: {
|
201
|
+
accessToken?: string;
|
202
|
+
token?: string;
|
203
|
+
type: 'none' | 'bearer' | 'oauth2';
|
204
|
+
};
|
205
|
+
// STDIO 连接参数
|
206
|
+
command?: string;
|
207
|
+
env?: Record<string, string>;
|
208
|
+
headers?: Record<string, string>;
|
209
|
+
type: 'http' | 'stdio';
|
210
|
+
// HTTP 连接参数
|
211
|
+
url?: string;
|
212
|
+
}
|
213
|
+
|
214
|
+
// 测试连接参数类型
|
215
|
+
export interface McpConnectionParams {
|
216
|
+
connection: McpConnection;
|
217
|
+
identifier: string;
|
218
|
+
metadata?: CustomPluginMetadata;
|
219
|
+
}
|
220
|
+
|
184
221
|
export type MCPInstallProgressMap = Record<string, MCPInstallProgress | undefined>;
|