@lobehub/chat 0.111.6 → 0.112.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/.i18nrc.js +1 -0
- package/CHANGELOG.md +59 -0
- package/locales/en_US/chat.json +12 -12
- package/locales/en_US/common.json +4 -4
- package/locales/en_US/error.json +16 -14
- package/locales/en_US/market.json +2 -2
- package/locales/en_US/migration.json +4 -4
- package/locales/en_US/plugin.json +75 -38
- package/locales/en_US/setting.json +7 -7
- package/locales/fr_FR/chat.json +11 -11
- package/locales/fr_FR/common.json +4 -4
- package/locales/fr_FR/error.json +12 -10
- package/locales/fr_FR/plugin.json +42 -5
- package/locales/fr_FR/setting.json +12 -12
- package/locales/fr_FR/welcome.json +3 -3
- package/locales/ja_JP/chat.json +1 -1
- package/locales/ja_JP/common.json +4 -4
- package/locales/ja_JP/error.json +16 -14
- package/locales/ja_JP/migration.json +4 -4
- package/locales/ja_JP/plugin.json +70 -33
- package/locales/ja_JP/setting.json +1 -1
- package/locales/ko_KR/chat.json +1 -1
- package/locales/ko_KR/common.json +4 -4
- package/locales/ko_KR/error.json +16 -14
- package/locales/ko_KR/migration.json +4 -4
- package/locales/ko_KR/plugin.json +71 -34
- package/locales/ko_KR/setting.json +1 -1
- package/locales/ru_RU/chat.json +1 -1
- package/locales/ru_RU/common.json +4 -4
- package/locales/ru_RU/error.json +16 -14
- package/locales/ru_RU/market.json +2 -2
- package/locales/ru_RU/migration.json +4 -4
- package/locales/ru_RU/plugin.json +71 -34
- package/locales/ru_RU/setting.json +1 -1
- package/locales/zh_CN/chat.json +1 -1
- package/locales/zh_CN/error.json +2 -0
- package/locales/zh_CN/plugin.json +42 -5
- package/locales/zh_CN/setting.json +1 -1
- package/locales/zh_TW/chat.json +1 -1
- package/locales/zh_TW/common.json +4 -4
- package/locales/zh_TW/error.json +16 -14
- package/locales/zh_TW/market.json +2 -2
- package/locales/zh_TW/migration.json +4 -4
- package/locales/zh_TW/plugin.json +98 -61
- package/locales/zh_TW/setting.json +1 -1
- package/package.json +4 -2
- package/scripts/i18nWorkflow/genDiff.ts +7 -8
- package/scripts/i18nWorkflow/utils.ts +0 -14
- package/scripts/readmeWorkflow/syncPluginIndex.ts +9 -11
- package/src/app/api/plugins/route.ts +2 -4
- package/src/app/api/proxy/route.ts +10 -0
- package/src/app/chat/features/ChatInput/ActionBar/Tools/ToolItem.tsx +3 -8
- package/src/app/chat/features/ChatInput/ActionBar/Tools/index.tsx +3 -3
- package/src/app/chat/features/Conversation/ChatList/Error/index.tsx +6 -0
- package/src/app/chat/features/Conversation/ChatList/Messages/Function.tsx +1 -1
- package/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/Settings.tsx +7 -5
- package/src/app/chat/features/Conversation/ChatList/Plugins/Inspector/index.tsx +2 -2
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/DefaultType/index.tsx +6 -4
- package/src/app/chat/features/Conversation/ChatList/Plugins/Render/index.tsx +2 -2
- package/src/app/chat/features/Migration/ExportConfigButton.tsx +1 -1
- package/src/app/market/features/AgentDetailContent/AgentInfo/index.tsx +1 -0
- package/src/app/market/features/AgentDetailContent/AgentInfo/style.ts +1 -9
- package/src/app/settings/common/Common.tsx +5 -7
- package/src/components/FileList/FileItem.tsx +4 -2
- package/src/components/HotKeys/index.tsx +5 -4
- package/src/const/plugin.ts +1 -0
- package/src/features/AgentSetting/AgentPlugin/AddPluginButton.tsx +2 -2
- package/src/features/AgentSetting/AgentPlugin/LocalPluginItem.tsx +19 -53
- package/src/features/AgentSetting/AgentPlugin/index.tsx +5 -11
- package/src/features/AgentSetting/store/initialState.ts +1 -1
- package/src/features/PluginDetailModal/APIs.tsx +44 -0
- package/src/features/PluginDetailModal/Meta.tsx +59 -0
- package/src/features/PluginDetailModal/index.tsx +79 -0
- package/src/features/PluginDevModal/PluginPreview.tsx +8 -10
- package/src/features/PluginDevModal/UrlManifestForm.tsx +131 -0
- package/src/features/PluginDevModal/index.tsx +31 -32
- package/src/features/PluginSettings/index.tsx +1 -1
- package/src/features/PluginStore/AddPluginButton.tsx +47 -0
- package/src/features/PluginStore/InstalledPluginList.tsx +54 -0
- package/src/features/PluginStore/OnlineList.tsx +95 -0
- package/src/features/PluginStore/PluginItem/Action.tsx +118 -0
- package/src/features/PluginStore/PluginItem/EditCustomPlugin.tsx +50 -0
- package/src/features/PluginStore/PluginItem/PluginTag.tsx +58 -0
- package/src/features/PluginStore/PluginItem/index.tsx +73 -0
- package/src/features/PluginStore/index.tsx +20 -92
- package/src/hooks/usePlatform.ts +15 -0
- package/src/locales/default/chat.ts +1 -1
- package/src/locales/default/error.ts +2 -0
- package/src/locales/default/plugin.ts +41 -4
- package/src/locales/default/setting.ts +1 -1
- package/src/services/__tests__/__snapshots__/plugin.test.ts.snap +154 -0
- package/src/services/__tests__/chat.test.ts +1 -1
- package/src/services/__tests__/global.test.ts +57 -0
- package/src/services/__tests__/openai/OpenAPI_V3.json +245 -0
- package/src/services/__tests__/openai/plugin.json +22 -0
- package/src/services/__tests__/plugin.test.ts +90 -1
- package/src/services/__tests__/share.test.ts +86 -0
- package/src/services/_url.ts +2 -0
- package/src/services/global.ts +15 -0
- package/src/services/plugin.ts +99 -15
- package/src/services/share.ts +34 -0
- package/src/store/chat/actions/enhance.test.ts +15 -15
- package/src/store/chat/actions/message.test.ts +3 -2
- package/src/store/chat/actions/plugin.test.ts +281 -0
- package/src/store/chat/actions/plugin.ts +22 -3
- package/src/store/chat/actions/share.ts +2 -2
- package/src/store/chat/actions/topic.test.ts +12 -4
- package/src/store/global/slices/common.ts +2 -2
- package/src/store/session/selectors.ts +1 -1
- package/src/store/session/slices/agent/selectors.ts +1 -1
- package/src/store/tool/helpers.ts +8 -1
- package/src/store/tool/slices/customPlugin/action.ts +4 -1
- package/src/store/tool/slices/plugin/selectors.test.ts +22 -3
- package/src/store/tool/slices/plugin/selectors.ts +24 -5
- package/src/store/tool/slices/store/selectors.test.ts +18 -1
- package/src/store/tool/slices/store/selectors.ts +14 -3
- package/src/styles/antdOverride.ts +7 -0
- package/src/types/openai/chat.ts +0 -1
- package/src/types/openai/plugin.ts +57 -0
- package/src/types/tool/index.ts +1 -2
- package/src/types/tool/plugin.ts +13 -1
- package/src/types/tool/tool.ts +1 -0
- package/src/types/translate.ts +0 -1
- package/src/utils/platform.ts +8 -5
- package/src/features/PluginDevModal/UrlModeForm.tsx +0 -98
- package/src/features/PluginSettingsModal/index.tsx +0 -59
- package/src/features/PluginStore/PluginItem.tsx +0 -82
- package/src/features/PluginStore/PluginSettings.tsx +0 -40
- package/src/services/latestVersion.ts +0 -11
- package/src/services/shareGPT.ts +0 -28
|
@@ -6,8 +6,25 @@
|
|
|
6
6
|
"on": "查看插件调用信息",
|
|
7
7
|
"response": "返回结果"
|
|
8
8
|
},
|
|
9
|
+
"detailModal": {
|
|
10
|
+
"info": {
|
|
11
|
+
"description": "API 描述",
|
|
12
|
+
"name": "API 名称"
|
|
13
|
+
},
|
|
14
|
+
"tabs": {
|
|
15
|
+
"info": "插件能力",
|
|
16
|
+
"manifest": "安装文件",
|
|
17
|
+
"settings": "设置"
|
|
18
|
+
},
|
|
19
|
+
"title": "插件详情"
|
|
20
|
+
},
|
|
9
21
|
"dev": {
|
|
10
22
|
"confirmDeleteDevPlugin": "即将删除该本地插件,删除后将无法找回,是否删除该插件?",
|
|
23
|
+
"customParams": {
|
|
24
|
+
"useProxy": {
|
|
25
|
+
"label": "通过代理安装(如遇到跨域访问错误,可尝试开启该选项后重新安装)"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
11
28
|
"deleteSuccess": "插件删除成功",
|
|
12
29
|
"manifest": {
|
|
13
30
|
"identifier": {
|
|
@@ -64,6 +81,10 @@
|
|
|
64
81
|
},
|
|
65
82
|
"metaConfig": "插件元信息配置",
|
|
66
83
|
"modalDesc": "添加自定义插件后,可用于插件开发验证,也可直接在会话中使用。插件开发请参考<1>开发文档↗</>",
|
|
84
|
+
"openai": {
|
|
85
|
+
"importUrl": "从 URL 链接导入",
|
|
86
|
+
"schema": "Schema"
|
|
87
|
+
},
|
|
67
88
|
"preview": {
|
|
68
89
|
"card": "预览插件展示效果",
|
|
69
90
|
"desc": "预览插件描述",
|
|
@@ -75,15 +96,23 @@
|
|
|
75
96
|
"manifest": "功能描述清单 (Manifest)",
|
|
76
97
|
"meta": "插件元信息"
|
|
77
98
|
},
|
|
78
|
-
"title":
|
|
99
|
+
"title": {
|
|
100
|
+
"create": "添加自定义插件",
|
|
101
|
+
"edit": "编辑自定义插件"
|
|
102
|
+
},
|
|
103
|
+
"type": {
|
|
104
|
+
"lobe": "LobeChat 插件",
|
|
105
|
+
"openai": "OpenAI 插件"
|
|
106
|
+
},
|
|
79
107
|
"update": "更新",
|
|
80
108
|
"updateSuccess": "插件设置更新成功"
|
|
81
109
|
},
|
|
82
110
|
"error": {
|
|
83
111
|
"fetchError": "请求该 manifest 链接失败,请确保链接的有效性,并检查链接是否允许跨域访问",
|
|
84
112
|
"installError": "插件 {{name}} 安装失败",
|
|
85
|
-
"manifestInvalid": "
|
|
113
|
+
"manifestInvalid": "manifest 不符合规范,校验结果: \n\n {{error}}",
|
|
86
114
|
"noManifest": "描述文件不存在",
|
|
115
|
+
"openAPIInvalid": "OpenAPI 解析失败,错误: \n\n {{error}}",
|
|
87
116
|
"reinstallError": "插件 {{name}} 刷新失败",
|
|
88
117
|
"urlError": "该链接没有返回 JSON 格式的内容, 请确保是有效的链接"
|
|
89
118
|
},
|
|
@@ -113,8 +142,17 @@
|
|
|
113
142
|
"title": "设置插件市场"
|
|
114
143
|
},
|
|
115
144
|
"store": {
|
|
145
|
+
"actions": {
|
|
146
|
+
"confirmUninstall": "即将卸载该插件,卸载后将清除该插件配置,请确认你的操作",
|
|
147
|
+
"detail": "详情",
|
|
148
|
+
"install": "安装",
|
|
149
|
+
"manifest": "编辑安装文件",
|
|
150
|
+
"settings": "设置",
|
|
151
|
+
"uninstall": "卸载"
|
|
152
|
+
},
|
|
153
|
+
"communityPlugin": "三方社区",
|
|
154
|
+
"customPlugin": "自定义",
|
|
116
155
|
"empty": "暂无已安装插件",
|
|
117
|
-
"install": "安装",
|
|
118
156
|
"installAllPlugins": "安装全部",
|
|
119
157
|
"networkError": "获取插件商店失败,请检测网络连接后重试",
|
|
120
158
|
"placeholder": "搜索插件名称介绍或关键词...",
|
|
@@ -123,7 +161,6 @@
|
|
|
123
161
|
"all": "全部",
|
|
124
162
|
"installed": "已安装"
|
|
125
163
|
},
|
|
126
|
-
"title": "插件商店"
|
|
127
|
-
"uninstall": "卸载"
|
|
164
|
+
"title": "插件商店"
|
|
128
165
|
}
|
|
129
166
|
}
|
package/locales/zh_TW/chat.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"agentDefaultMessage": "你好,我是 **{{name}}**,你可以立即與我開始對話,也可以前往 [助手設置](/chat/settings#session={{id}}) 完善我的信息。",
|
|
3
3
|
"agentDefaultMessageWithSystemRole": "你好,我是 **{{name}}**,{{systemRole}},讓我們開始對話吧!",
|
|
4
|
-
"backToBottom": "
|
|
4
|
+
"backToBottom": "返回底部",
|
|
5
5
|
"clearCurrentMessages": "清空當前對話",
|
|
6
6
|
"confirmClearCurrentMessages": "即將清空當前對話,清空後將無法找回,請確認你的操作",
|
|
7
7
|
"confirmRemoveSessionItemAlert": "即將刪除該助手,刪除後將無法找回,請確認你的操作",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"lang": {
|
|
53
53
|
"en": "英文",
|
|
54
54
|
"en-US": "英文",
|
|
55
|
+
"fr-FR": "法語",
|
|
55
56
|
"ja-JP": "日文",
|
|
56
57
|
"ko-KR": "韓文",
|
|
57
58
|
"ru-RU": "俄文",
|
|
58
59
|
"zh": "簡體中文",
|
|
59
60
|
"zh-CN": "簡體中文",
|
|
60
|
-
"zh-TW": "繁體中文"
|
|
61
|
-
"fr-FR": "法語"
|
|
61
|
+
"zh-TW": "繁體中文"
|
|
62
62
|
},
|
|
63
63
|
"layoutInitializing": "正在載入版面配置...",
|
|
64
64
|
"noDescription": "暫無描述",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"temp": "臨時",
|
|
83
83
|
"updateAgent": "更新助理資訊",
|
|
84
84
|
"upgradeVersion": {
|
|
85
|
+
"action": "升級",
|
|
85
86
|
"hasNew": "有可用更新",
|
|
86
|
-
"newVersion": "有新版本可用:{{version}}"
|
|
87
|
-
"action": "升級"
|
|
87
|
+
"newVersion": "有新版本可用:{{version}}"
|
|
88
88
|
}
|
|
89
89
|
}
|
package/locales/zh_TW/error.json
CHANGED
|
@@ -15,18 +15,20 @@
|
|
|
15
15
|
"503": "抱歉,伺服器目前無法處理您的請求,可能是因為過載或正在進行維護。請稍後再試。",
|
|
16
16
|
"504": "抱歉,伺服器沒有收到上游伺服器的回應。請稍後再試。",
|
|
17
17
|
"InvalidAccessCode": "密碼不正確或為空。請輸入正確的存取密碼,或新增自定義的 OpenAI API Key。",
|
|
18
|
+
"NoAPIKey": "OpenAI API 金鑰為空,請添加自訂 OpenAI API 金鑰",
|
|
18
19
|
"OpenAIBizError": "請求 OpenAI 服務出錯。請根據以下資訊進行排查或重試。",
|
|
19
|
-
"PluginMarketIndexNotFound": "抱歉,伺服器找不到外掛索引。請檢查索引地址是否正確",
|
|
20
|
-
"PluginMarketIndexInvalid": "抱歉,外掛索引驗證失敗。請檢查索引檔案格式是否正確",
|
|
21
|
-
"PluginMetaNotFound": "抱歉,索引中找不到該外掛。請檢查索引中的外掛設定資訊",
|
|
22
|
-
"PluginMetaInvalid": "抱歉,外掛的元資料驗證失敗。請檢查外掛元資料格式是否正確",
|
|
23
|
-
"PluginManifestNotFound": "抱歉,伺服器找不到該外掛的描述檔案 (manifest.json)。請檢查外掛描述檔案地址是否正確",
|
|
24
|
-
"PluginManifestInvalid": "抱歉,外掛的描述檔案驗證失敗。請檢查描述檔案格式是否正確",
|
|
25
20
|
"PluginApiNotFound": "抱歉,外掛描述檔案中不存在該 API。請檢查您的請求方法與外掛清單 API 是否相符",
|
|
26
21
|
"PluginApiParamsError": "抱歉,該外掛請求的輸入參數驗證失敗。請檢查輸入參數與 API 描述資訊是否相符",
|
|
27
|
-
"
|
|
22
|
+
"PluginGatewayError": "很抱歉,插件網關出現錯誤,請檢查插件網關配置是否正確",
|
|
23
|
+
"PluginManifestInvalid": "抱歉,外掛的描述檔案驗證失敗。請檢查描述檔案格式是否正確",
|
|
24
|
+
"PluginManifestNotFound": "抱歉,伺服器找不到該外掛的描述檔案 (manifest.json)。請檢查外掛描述檔案地址是否正確",
|
|
25
|
+
"PluginMarketIndexInvalid": "抱歉,外掛索引驗證失敗。請檢查索引檔案格式是否正確",
|
|
26
|
+
"PluginMarketIndexNotFound": "抱歉,伺服器找不到外掛索引。請檢查索引地址是否正確",
|
|
27
|
+
"PluginMetaInvalid": "抱歉,外掛的元資料驗證失敗。請檢查外掛元資料格式是否正確",
|
|
28
|
+
"PluginMetaNotFound": "抱歉,索引中找不到該外掛。請檢查索引中的外掛設定資訊",
|
|
29
|
+
"PluginOpenApiInitError": "很抱歉,OpenAPI 客戶端初始化失敗,請檢查 OpenAPI 的配置信息是否正確",
|
|
28
30
|
"PluginServerError": "外掛伺服器請求回傳錯誤。請根據下面的錯誤資訊檢查您的外掛描述檔案、外掛設定或伺服器實作",
|
|
29
|
-
"
|
|
31
|
+
"PluginSettingsInvalid": "該外掛需要正確設定後才可以使用。請檢查您的設定是否正確"
|
|
30
32
|
},
|
|
31
33
|
"stt": {
|
|
32
34
|
"responseError": "服務請求失敗,請檢查配置或重試"
|
|
@@ -36,16 +38,16 @@
|
|
|
36
38
|
},
|
|
37
39
|
"unlock": {
|
|
38
40
|
"apikey": {
|
|
39
|
-
"
|
|
41
|
+
"addProxyUrl": "添加 OpenAI 代理地址(可選)",
|
|
40
42
|
"description": "輸入你的 OpenAI API Key 即可開始會話。應用程式不會記錄你的 API Key",
|
|
41
|
-
"
|
|
43
|
+
"title": "使用自定義 API Key"
|
|
42
44
|
},
|
|
45
|
+
"closeMessage": "關閉提示",
|
|
43
46
|
"confirm": "確認並重試",
|
|
44
47
|
"password": {
|
|
45
48
|
"description": "管理員已啟用應用程式加密,輸入應用程式密碼後即可解鎖應用程式。密碼只需填寫一次。",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
}
|
|
49
|
-
"closeMessage": "關閉提示"
|
|
49
|
+
"placeholder": "請輸入密碼",
|
|
50
|
+
"title": "輸入密碼解鎖應用程式"
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"title": "大容量"
|
|
18
18
|
},
|
|
19
19
|
"performance": {
|
|
20
|
-
"
|
|
21
|
-
"
|
|
20
|
+
"desc": "百萬條消息自動索引,檢索查詢毫秒級響應",
|
|
21
|
+
"title": "高性能"
|
|
22
22
|
},
|
|
23
23
|
"use": {
|
|
24
24
|
"desc": "支持標題、描述、標籤、消息內容乃至翻譯文本檢索,日常搜索效率大大提升",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"title": "LobeChat 資料進化",
|
|
29
29
|
"upgrade": {
|
|
30
30
|
"error": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"subTitle": "非常抱歉,資料庫升級過程發生異常。請嘗試以下方案:A. 清空本地數據後,重新導入備份數據; B.點擊「重新升級」按鈕。<br><br> 如仍然出錯,請 <1>提交問題</1> ,我們將會第一時間幫你排查",
|
|
32
|
+
"title": "資料庫升級失敗"
|
|
33
33
|
},
|
|
34
34
|
"success": {
|
|
35
35
|
"subTitle": "LobeChat 的資料庫已經升級到最新版本,立即開始體驗吧",
|
|
@@ -1,129 +1,166 @@
|
|
|
1
1
|
{
|
|
2
2
|
"debug": {
|
|
3
|
-
"arguments": "
|
|
4
|
-
"function_call": "
|
|
5
|
-
"off": "
|
|
6
|
-
"on": "
|
|
7
|
-
"response": "
|
|
3
|
+
"arguments": "參數",
|
|
4
|
+
"function_call": "函式呼叫",
|
|
5
|
+
"off": "關閉偵錯",
|
|
6
|
+
"on": "查看插件呼叫資訊",
|
|
7
|
+
"response": "回應"
|
|
8
|
+
},
|
|
9
|
+
"detailModal": {
|
|
10
|
+
"info": {
|
|
11
|
+
"description": "API 描述",
|
|
12
|
+
"name": "API 名稱"
|
|
13
|
+
},
|
|
14
|
+
"tabs": {
|
|
15
|
+
"info": "插件能力",
|
|
16
|
+
"manifest": "安裝檔案",
|
|
17
|
+
"settings": "設定"
|
|
18
|
+
},
|
|
19
|
+
"title": "插件詳情"
|
|
8
20
|
},
|
|
9
21
|
"dev": {
|
|
10
|
-
"confirmDeleteDevPlugin": "
|
|
11
|
-
"
|
|
22
|
+
"confirmDeleteDevPlugin": "您確定要刪除此本機外掛嗎?一旦刪除,將無法復原。",
|
|
23
|
+
"customParams": {
|
|
24
|
+
"useProxy": {
|
|
25
|
+
"label": "透過代理安裝(若遇到跨域訪問錯誤,可嘗試開啟該選項後重新安裝)"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"deleteSuccess": "外掛已成功刪除",
|
|
12
29
|
"manifest": {
|
|
13
30
|
"identifier": {
|
|
14
|
-
"desc": "
|
|
15
|
-
"label": "
|
|
31
|
+
"desc": "外掛的唯一識別碼",
|
|
32
|
+
"label": "識別碼"
|
|
16
33
|
},
|
|
17
34
|
"mode": {
|
|
18
|
-
"local": "
|
|
19
|
-
"local-tooltip": "
|
|
20
|
-
"url": "
|
|
35
|
+
"local": "視覺設定",
|
|
36
|
+
"local-tooltip": "目前不支援視覺設定",
|
|
37
|
+
"url": "線上連結"
|
|
21
38
|
},
|
|
22
39
|
"name": {
|
|
23
|
-
"desc": "
|
|
24
|
-
"label": "
|
|
25
|
-
"placeholder": "
|
|
40
|
+
"desc": "外掛的名稱",
|
|
41
|
+
"label": "名稱",
|
|
42
|
+
"placeholder": "搜尋引擎"
|
|
26
43
|
}
|
|
27
44
|
},
|
|
28
45
|
"meta": {
|
|
29
46
|
"author": {
|
|
30
|
-
"desc": "
|
|
47
|
+
"desc": "外掛的作者",
|
|
31
48
|
"label": "作者"
|
|
32
49
|
},
|
|
33
50
|
"avatar": {
|
|
34
|
-
"desc": "
|
|
35
|
-
"label": "
|
|
51
|
+
"desc": "外掛的圖示,可以是 Emoji 或網址",
|
|
52
|
+
"label": "圖示"
|
|
36
53
|
},
|
|
37
54
|
"description": {
|
|
38
|
-
"desc": "
|
|
55
|
+
"desc": "外掛的描述",
|
|
39
56
|
"label": "描述",
|
|
40
|
-
"placeholder": "
|
|
57
|
+
"placeholder": "從搜尋引擎取得資訊"
|
|
41
58
|
},
|
|
42
|
-
"formFieldRequired": "
|
|
59
|
+
"formFieldRequired": "此欄位必填",
|
|
43
60
|
"homepage": {
|
|
44
|
-
"desc": "
|
|
61
|
+
"desc": "外掛的官方首頁",
|
|
45
62
|
"label": "首頁"
|
|
46
63
|
},
|
|
47
64
|
"identifier": {
|
|
48
|
-
"desc": "
|
|
49
|
-
"errorDuplicate": "
|
|
50
|
-
"label": "
|
|
51
|
-
"pattenErrorMessage": "
|
|
65
|
+
"desc": "外掛的唯一識別碼,只支援英數字元、連字號 -,以及底線 _",
|
|
66
|
+
"errorDuplicate": "此識別碼已被其他外掛使用,請更改識別碼",
|
|
67
|
+
"label": "識別碼",
|
|
68
|
+
"pattenErrorMessage": "只允許英數字元、連字號 -,以及底線 _"
|
|
52
69
|
},
|
|
53
70
|
"manifest": {
|
|
54
|
-
"desc": "LobeChat
|
|
55
|
-
"label": "
|
|
71
|
+
"desc": "LobeChat 會使用此連結安裝外掛",
|
|
72
|
+
"label": "插件描述檔 (Manifest) URL",
|
|
56
73
|
"preview": "預覽 Manifest",
|
|
57
|
-
"refresh": "
|
|
74
|
+
"refresh": "重新載入"
|
|
58
75
|
},
|
|
59
76
|
"title": {
|
|
60
|
-
"desc": "
|
|
61
|
-
"label": "
|
|
62
|
-
"placeholder": "
|
|
77
|
+
"desc": "外掛的名稱",
|
|
78
|
+
"label": "名稱",
|
|
79
|
+
"placeholder": "搜尋引擎"
|
|
63
80
|
}
|
|
64
81
|
},
|
|
65
|
-
"metaConfig": "
|
|
66
|
-
"modalDesc": "
|
|
82
|
+
"metaConfig": "外掛後設資料設定",
|
|
83
|
+
"modalDesc": "添加自訂插件後,可用於插件開發驗證,也可直接在會話中使用。插件開發請參考<1>開發文件↗</>",
|
|
84
|
+
"openai": {
|
|
85
|
+
"importUrl": "從 URL 連結匯入",
|
|
86
|
+
"schema": "Schema"
|
|
87
|
+
},
|
|
67
88
|
"preview": {
|
|
68
|
-
"card": "
|
|
69
|
-
"desc": "
|
|
70
|
-
"title": "
|
|
89
|
+
"card": "外掛顯示預覽",
|
|
90
|
+
"desc": "外掛描述預覽",
|
|
91
|
+
"title": "外掛名稱預覽"
|
|
71
92
|
},
|
|
72
93
|
"save": "安裝插件",
|
|
73
|
-
"saveSuccess": "
|
|
94
|
+
"saveSuccess": "外掛設定已成功儲存",
|
|
74
95
|
"tabs": {
|
|
75
96
|
"manifest": "功能描述清單 (Manifest)",
|
|
76
|
-
"meta": "
|
|
97
|
+
"meta": "外掛後設資料"
|
|
98
|
+
},
|
|
99
|
+
"title": {
|
|
100
|
+
"create": "新增自訂插件",
|
|
101
|
+
"edit": "編輯自訂插件"
|
|
102
|
+
},
|
|
103
|
+
"type": {
|
|
104
|
+
"lobe": "LobeChat 插件",
|
|
105
|
+
"openai": "OpenAI 插件"
|
|
77
106
|
},
|
|
78
|
-
"title": "添加自定義插件",
|
|
79
107
|
"update": "更新",
|
|
80
|
-
"updateSuccess": "
|
|
108
|
+
"updateSuccess": "外掛設定已成功更新"
|
|
81
109
|
},
|
|
82
110
|
"error": {
|
|
83
|
-
"fetchError": "請求該 manifest
|
|
111
|
+
"fetchError": "請求該 manifest 連結失敗,請確保連結的有效性,並檢查連結是否允許跨域訪問",
|
|
84
112
|
"installError": "插件 {{name}} 安裝失敗",
|
|
85
|
-
"manifestInvalid": "
|
|
86
|
-
"noManifest": "
|
|
113
|
+
"manifestInvalid": "manifest 不符合規範,校驗結果: \n\n {{error}}",
|
|
114
|
+
"noManifest": "描述檔不存在",
|
|
115
|
+
"openAPIInvalid": "OpenAPI 解析失敗,錯誤: \n\n {{error}}",
|
|
87
116
|
"reinstallError": "插件 {{name}} 刷新失敗",
|
|
88
|
-
"urlError": "
|
|
117
|
+
"urlError": "該連結沒有返回 JSON 格式的內容, 請確保是有效的連結"
|
|
89
118
|
},
|
|
90
119
|
"list": {
|
|
91
120
|
"item": {
|
|
92
121
|
"deprecated.title": "已刪除",
|
|
93
|
-
"local.config": "
|
|
94
|
-
"local.title": "
|
|
122
|
+
"local.config": "設定",
|
|
123
|
+
"local.title": "本機"
|
|
95
124
|
}
|
|
96
125
|
},
|
|
97
126
|
"loading": {
|
|
98
|
-
"content": "
|
|
99
|
-
"plugin": "
|
|
127
|
+
"content": "呼叫插件中...",
|
|
128
|
+
"plugin": "外掛執行中..."
|
|
100
129
|
},
|
|
101
|
-
"pluginList": "
|
|
130
|
+
"pluginList": "外掛清單",
|
|
102
131
|
"plugins": {
|
|
103
132
|
"loading": "插件檢測中...",
|
|
104
133
|
"unknown": "未知插件"
|
|
105
134
|
},
|
|
106
|
-
"setting": "
|
|
135
|
+
"setting": "插件設置",
|
|
107
136
|
"settings": {
|
|
108
137
|
"indexUrl": {
|
|
109
|
-
"title": "
|
|
110
|
-
"tooltip": "
|
|
138
|
+
"title": "外掛市集索引",
|
|
139
|
+
"tooltip": "目前不支援編輯"
|
|
111
140
|
},
|
|
112
|
-
"modalDesc": "
|
|
113
|
-
"title": "
|
|
141
|
+
"modalDesc": "設定外掛市集的網址後,您可以使用自訂的外掛市集",
|
|
142
|
+
"title": "設定外掛市集"
|
|
114
143
|
},
|
|
115
144
|
"store": {
|
|
145
|
+
"actions": {
|
|
146
|
+
"confirmUninstall": "即將卸載該插件,卸載後將清除該插件配置,請確認你的操作",
|
|
147
|
+
"detail": "詳情",
|
|
148
|
+
"install": "安裝",
|
|
149
|
+
"manifest": "編輯安裝檔案",
|
|
150
|
+
"settings": "設定",
|
|
151
|
+
"uninstall": "卸載"
|
|
152
|
+
},
|
|
153
|
+
"communityPlugin": "社群外掛",
|
|
154
|
+
"customPlugin": "自訂插件",
|
|
116
155
|
"empty": "暫無已安裝插件",
|
|
117
|
-
"install": "安裝",
|
|
118
156
|
"installAllPlugins": "安裝全部",
|
|
119
|
-
"networkError": "
|
|
120
|
-
"
|
|
157
|
+
"networkError": "獲取插件商店失敗,請檢查網路連線後重試",
|
|
158
|
+
"placeholder": "搜尋插件名稱介紹或關鍵字...",
|
|
159
|
+
"releasedAt": "發佈於 {{createdAt}}",
|
|
121
160
|
"tabs": {
|
|
122
161
|
"all": "全部",
|
|
123
162
|
"installed": "已安裝"
|
|
124
163
|
},
|
|
125
|
-
"title": "插件商店"
|
|
126
|
-
"uninstall": "卸載",
|
|
127
|
-
"placeholder": "搜尋插件名稱介紹或關鍵字..."
|
|
164
|
+
"title": "插件商店"
|
|
128
165
|
}
|
|
129
166
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.112.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",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@ant-design/icons": "^5",
|
|
75
75
|
"@icons-pack/react-simple-icons": "^9",
|
|
76
76
|
"@lobehub/chat-plugin-sdk": "latest",
|
|
77
|
-
"@lobehub/chat-plugins-gateway": "
|
|
77
|
+
"@lobehub/chat-plugins-gateway": "latest",
|
|
78
78
|
"@lobehub/tts": "latest",
|
|
79
79
|
"@lobehub/ui": "latest",
|
|
80
80
|
"@vercel/analytics": "^1",
|
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"use-merge-value": "^1",
|
|
126
126
|
"utility-types": "^3",
|
|
127
127
|
"uuid": "^9",
|
|
128
|
+
"yaml": "^2",
|
|
128
129
|
"zod": "^3",
|
|
129
130
|
"zustand": "^4.4",
|
|
130
131
|
"zustand-utils": "^1"
|
|
@@ -158,6 +159,7 @@
|
|
|
158
159
|
"glob": "^10",
|
|
159
160
|
"husky": "^8",
|
|
160
161
|
"jsdom": "^23.0.0",
|
|
162
|
+
"just-diff": "^6",
|
|
161
163
|
"lint-staged": "^15",
|
|
162
164
|
"lodash": "^4",
|
|
163
165
|
"markdown-table": "^3",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { consola } from 'consola';
|
|
2
2
|
import { colors } from 'consola/utils';
|
|
3
|
+
import { diff } from 'just-diff';
|
|
3
4
|
import { unset } from 'lodash';
|
|
4
5
|
import { existsSync } from 'node:fs';
|
|
5
6
|
|
|
@@ -9,7 +10,7 @@ import {
|
|
|
9
10
|
localesResourcesFilepath,
|
|
10
11
|
outputLocaleJsonFilepath,
|
|
11
12
|
} from './const';
|
|
12
|
-
import {
|
|
13
|
+
import { readJSON, tagWhite, writeJSON } from './utils';
|
|
13
14
|
|
|
14
15
|
export const genDiff = () => {
|
|
15
16
|
consola.start(`Diff between Dev/Prod local...`);
|
|
@@ -22,15 +23,13 @@ export const genDiff = () => {
|
|
|
22
23
|
if (!existsSync(filepath)) continue;
|
|
23
24
|
const prodJSON = readJSON(filepath);
|
|
24
25
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
if (
|
|
26
|
+
const diffResult = diff(prodJSON, devJSON as any);
|
|
27
|
+
const remove = diffResult.filter((item) => item.op === 'remove');
|
|
28
|
+
if (remove.length === 0) {
|
|
28
29
|
consola.success(tagWhite(ns), colors.gray(filepath));
|
|
29
30
|
continue;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
consola.warn(tagYellow(ns), diffKeys);
|
|
33
|
-
|
|
34
33
|
const clearLocals = [];
|
|
35
34
|
|
|
36
35
|
for (const locale of [i18nConfig.entryLocale, ...i18nConfig.outputLocales]) {
|
|
@@ -38,8 +37,8 @@ export const genDiff = () => {
|
|
|
38
37
|
if (!existsSync(localeFilepath)) continue;
|
|
39
38
|
const localeJSON = readJSON(localeFilepath);
|
|
40
39
|
|
|
41
|
-
for (const
|
|
42
|
-
unset(localeJSON,
|
|
40
|
+
for (const item of remove) {
|
|
41
|
+
unset(localeJSON, item.path);
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
writeJSON(localeFilepath, localeJSON);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { consola } from 'consola';
|
|
2
2
|
import { colors } from 'consola/utils';
|
|
3
3
|
import { tocForResources } from 'i18next-resources-for-ts';
|
|
4
|
-
import { isObject } from 'lodash';
|
|
5
4
|
import { readFileSync, writeFileSync } from 'node:fs';
|
|
6
5
|
import { resolve } from 'node:path';
|
|
7
6
|
|
|
@@ -58,19 +57,6 @@ export const genToc = (files: string[], locale: string) => {
|
|
|
58
57
|
return toc;
|
|
59
58
|
};
|
|
60
59
|
|
|
61
|
-
export const diff = (obj1: any, obj2: any, prefix: string = ''): string[] => {
|
|
62
|
-
let result: string[] = [];
|
|
63
|
-
for (const key in obj1) {
|
|
64
|
-
if (!obj2[key]) continue;
|
|
65
|
-
if (isObject(obj1[key]) && isObject(obj2[key])) {
|
|
66
|
-
result = [...result, ...diff(obj1[key], obj2[key], `${prefix}${key}.`)];
|
|
67
|
-
} else if (obj1[key] !== obj2[key]) {
|
|
68
|
-
result.push(`${prefix}${key}`);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return result;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
60
|
export const tagBlue = (text: string) => colors.bgBlueBright(colors.black(` ${text} `));
|
|
75
61
|
export const tagYellow = (text: string) => colors.bgYellowBright(colors.black(` ${text} `));
|
|
76
62
|
export const tagGreen = (text: string) => colors.bgGreenBright(colors.black(` ${text} `));
|
|
@@ -6,18 +6,16 @@ import { fetchPluginIndex, genLink, genTags, readReadme, updateReadme, writeRead
|
|
|
6
6
|
|
|
7
7
|
const genPluginTable = (data: DataItem[], lang: string) => {
|
|
8
8
|
const isCN = lang === 'zh-CN';
|
|
9
|
-
const content = data
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
[item.meta.description, genTags(item.meta.tags)].join('<br/>'),
|
|
18
|
-
]);
|
|
9
|
+
const content = data.map((item) => [
|
|
10
|
+
[
|
|
11
|
+
genLink(item.meta.title, PLGUIN_URL),
|
|
12
|
+
`<sup>By **${item.author}** on **${item.createAt}**</sup>`,
|
|
13
|
+
].join('<br/>'),
|
|
14
|
+
genLink(item.homepage.split('github.com/')[1], item.homepage),
|
|
15
|
+
[item.meta.description, genTags(item.meta.tags)].join('<br/>'),
|
|
16
|
+
]);
|
|
19
17
|
return markdownTable([
|
|
20
|
-
isCN ? ['
|
|
18
|
+
isCN ? ['最近新增', '仓库', '插件描述'] : ['Recent Submits', 'Repository', 'Description'],
|
|
21
19
|
...content,
|
|
22
20
|
]);
|
|
23
21
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createGatewayOnEdgeRuntime } from '@lobehub/chat-plugins-gateway';
|
|
2
2
|
|
|
3
3
|
import { PLUGINS_INDEX_URL } from '@/const/url';
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
export const POST = createLobeChatPluginGateway({ pluginsIndexUrl: PLUGINS_INDEX_URL });
|
|
5
|
+
export const POST = createGatewayOnEdgeRuntime({ pluginsIndexUrl: PLUGINS_INDEX_URL });
|