@xmanrui/dsh-im 5.9.1 → 5.11.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/PROACTIVE_DELIVERY.en.md +33 -9
- package/PROACTIVE_DELIVERY.md +33 -9
- package/README.en.md +42 -7
- package/README.md +46 -8
- package/bin/dsh-im.mjs +65 -0
- package/docs/client-integration.md +4 -0
- package/lib/client.js +1735 -203
- package/lib/index.js +367 -341
- package/package.json +7 -6
- package/plugin-src/client/access-policy-settings.js +210 -12
- package/plugin-src/client/bot-general-settings.js +44 -3
- package/plugin-src/client/delivery-settings.js +2 -0
- package/plugin-src/client/delivery-sync-settings.js +269 -0
- package/plugin-src/client/global-settings.js +45 -7
- package/plugin-src/client/i18n-ru.js +112 -0
- package/plugin-src/client/i18n.js +110 -0
- package/plugin-src/client/im-channels.js +419 -0
- package/plugin-src/client/index.js +50 -2
- package/plugin-src/client/model-setting.js +6 -3
- package/plugin-src/client/styles.js +23 -7
- package/plugin-src/client/update-panel.js +2 -1
- package/plugin-src/host/channel-list-rpc.mjs +280 -0
- package/plugin-src/host/channels/dingtalk/production.mjs +28 -10
- package/plugin-src/host/channels/dingtalk/rpc.mjs +10 -1
- package/plugin-src/host/channels/feishu/production.mjs +50 -37
- package/plugin-src/host/channels/feishu/rpc.mjs +10 -1
- package/plugin-src/host/channels/matrix/production.mjs +28 -10
- package/plugin-src/host/channels/matrix/rpc.mjs +10 -0
- package/plugin-src/host/channels/qq/production.mjs +30 -11
- package/plugin-src/host/channels/qq/rpc.mjs +10 -1
- package/plugin-src/host/channels/shared/access-policy-production.mjs +9 -0
- package/plugin-src/host/channels/shared/binding-events.mjs +109 -0
- package/plugin-src/host/channels/shared/production.mjs +14 -1
- package/plugin-src/host/channels/shared/reply-content-rpc.mjs +17 -0
- package/plugin-src/host/channels/shared/rpc.mjs +9 -0
- package/plugin-src/host/channels/shared/workspace-rpc.mjs +1 -0
- package/plugin-src/host/channels/slack/production.mjs +28 -10
- package/plugin-src/host/channels/slack/rpc.mjs +10 -0
- package/plugin-src/host/channels/telegram/production.mjs +5 -0
- package/plugin-src/host/channels/wecom/production.mjs +28 -10
- package/plugin-src/host/channels/wecom/rpc.mjs +10 -1
- package/plugin-src/host/channels/wecom-app/production.mjs +28 -10
- package/plugin-src/host/channels/wecom-app/rpc.mjs +9 -0
- package/plugin-src/host/channels/weixin/production.mjs +28 -10
- package/plugin-src/host/channels/weixin/rpc.mjs +10 -1
- package/plugin-src/host/channels/whatsapp/production.mjs +28 -10
- package/plugin-src/host/channels/whatsapp/rpc.mjs +10 -1
- package/plugin-src/host/delivery-adapter.mjs +35 -20
- package/plugin-src/host/delivery-service.mjs +99 -1
- package/plugin-src/host/delivery-suggestions.mjs +31 -1
- package/plugin-src/host/delivery-sync-rpc.mjs +100 -0
- package/plugin-src/host/harness-connection.mjs +2 -1
- package/plugin-src/host/harness-peer.mjs +3 -1
- package/plugin-src/host/host-language-rpc.mjs +16 -2
- package/plugin-src/host/host-language.mjs +29 -0
- package/plugin-src/host/index.mjs +30 -1
- package/plugin-src/host/modern-harness-api.mjs +5 -1
- package/plugin-src/host/root-scope.mjs +32 -0
- package/plugin-src/host/session-sync-coordinator.mjs +290 -122
- package/plugin-src/host/session-sync-targets.mjs +71 -0
- package/plugin-src/management-rpc.mjs +18 -2
- package/scripts/verify-package.mjs +48 -10
- package/src/channels/dingtalk/dingtalk-bridge.mjs +50 -6
- package/src/channels/dingtalk/state-store.mjs +56 -0
- package/src/channels/discord/discord-api.mjs +2 -1
- package/src/channels/feishu/bridge.mjs +154 -58
- package/src/channels/feishu/feishu-cards.mjs +10 -4
- package/src/channels/feishu/feishu-runtime.mjs +11 -3
- package/src/channels/feishu/message-utils.mjs +106 -30
- package/src/channels/feishu/slash-command-panel.mjs +26 -0
- package/src/channels/feishu/state-store.mjs +14 -0
- package/src/channels/matrix/matrix-api.mjs +2 -1
- package/src/channels/qq/qq-bridge.mjs +114 -14
- package/src/channels/qq/state-store.mjs +55 -1
- package/src/channels/shared/access-policy.mjs +60 -7
- package/src/channels/shared/action-card.mjs +83 -7
- package/src/channels/shared/bot-workspace-store.mjs +255 -11
- package/src/channels/shared/busy-message-dispatcher.mjs +2 -2
- package/src/channels/shared/channel-capabilities.mjs +44 -0
- package/src/channels/shared/command-catalog.mjs +68 -3
- package/src/channels/shared/command-permission.mjs +6 -2
- package/src/channels/shared/conversation-state-store.mjs +16 -0
- package/src/channels/shared/deferred-delivery-coordinator.mjs +6 -1
- package/src/channels/shared/deferred-delivery.mjs +4 -0
- package/src/channels/shared/delivery-sync-settings-store.mjs +86 -0
- package/src/channels/shared/delivery-sync-settings.mjs +122 -0
- package/src/channels/shared/diagnostic-details.mjs +6 -1
- package/src/channels/shared/failure-log-file.mjs +79 -0
- package/src/channels/shared/harness-client.mjs +259 -96
- package/src/channels/shared/i18n-en/diagnostics.mjs +1 -0
- package/src/channels/shared/i18n-en/feishu.mjs +2 -2
- package/src/channels/shared/i18n-en/shared-a.mjs +13 -2
- package/src/channels/shared/i18n-en/shared-b.mjs +73 -4
- package/src/channels/shared/i18n-en/shared-d.mjs +144 -0
- package/src/channels/shared/i18n-en/weixin.mjs +4 -0
- package/src/channels/shared/i18n-en.mjs +2 -0
- package/src/channels/shared/i18n-ru/diagnostics.mjs +1 -0
- package/src/channels/shared/i18n-ru/feishu.mjs +2 -2
- package/src/channels/shared/i18n-ru/shared-a.mjs +13 -2
- package/src/channels/shared/i18n-ru/shared-b.mjs +72 -4
- package/src/channels/shared/i18n-ru/shared-d.mjs +144 -0
- package/src/channels/shared/i18n-ru/weixin.mjs +4 -0
- package/src/channels/shared/i18n-ru.mjs +2 -0
- package/src/channels/shared/inbound-access.mjs +10 -0
- package/src/channels/shared/interface-language-store.mjs +49 -10
- package/src/channels/shared/interface-language.mjs +19 -1
- package/src/channels/shared/markdown-chunks.mjs +5 -0
- package/src/channels/shared/message-failure.mjs +22 -1
- package/src/channels/shared/model-setting.mjs +6 -3
- package/src/channels/shared/new-command.mjs +158 -4
- package/src/channels/shared/plan-goal-command.mjs +132 -0
- package/src/channels/shared/qrcode.mjs +5 -0
- package/src/channels/shared/reply-content.mjs +102 -0
- package/src/channels/shared/reset-command.mjs +46 -0
- package/src/channels/shared/semantic/artifact.mjs +133 -29
- package/src/channels/shared/semantic/reply-reference.mjs +18 -3
- package/src/channels/shared/session-nav-command.mjs +999 -0
- package/src/channels/shared/session-ring-support.mjs +184 -0
- package/src/channels/shared/session-ring.mjs +202 -0
- package/src/channels/shared/session-title.mjs +11 -0
- package/src/channels/shared/status-command.mjs +2 -1
- package/src/channels/shared/text-harness-bridge.mjs +166 -7
- package/src/channels/shared/workspace-command.mjs +567 -31
- package/src/channels/shared/workspace-session.mjs +52 -4
- package/src/channels/slack/slack-api.mjs +2 -1
- package/src/channels/telegram/config-store.mjs +10 -2
- package/src/channels/telegram/telegram-api.mjs +19 -1
- package/src/channels/telegram/telegram-rich-message.mjs +17 -5
- package/src/channels/telegram/telegram-runtime.mjs +14 -1
- package/src/channels/wecom/state-store.mjs +13 -1
- package/src/channels/wecom/wecom-bridge.mjs +183 -26
- package/src/channels/wecom-app/state-store.mjs +13 -1
- package/src/channels/wecom-app/wecom-app-bridge.mjs +44 -4
- package/src/channels/weixin/state-store.mjs +13 -1
- package/src/channels/weixin/weixin-bridge.mjs +71 -4
package/lib/client.js
CHANGED
|
@@ -607,12 +607,12 @@ async function callManagementRpc(connection, channel7, method, payload, signal)
|
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
// plugin-src/client/index.js
|
|
610
|
-
var
|
|
610
|
+
var React50 = __toESM(require("react"), 1);
|
|
611
611
|
|
|
612
612
|
// package.json
|
|
613
613
|
var package_default = {
|
|
614
614
|
name: "@xmanrui/dsh-im",
|
|
615
|
-
version: "5.
|
|
615
|
+
version: "5.11.0",
|
|
616
616
|
icon: "./assets/logo-plugin-message-link-gradient.webp",
|
|
617
617
|
description: "\u628A\u5FAE\u4FE1\u3001\u98DE\u4E66\u3001\u4F01\u5FAE\u3001\u9489\u9489\u3001QQ\u3001Telegram\u3001WhatsApp\u3001Slack\u3001Discord\u3001Matrix\u63A5\u5165DSH\u3002 Connect Telegram, WhatsApp, Slack, Discord, Matrix, WeChat, Feishu, WeCom, DingTalk, and QQ to DSH.",
|
|
618
618
|
keywords: [
|
|
@@ -693,18 +693,19 @@ var package_default = {
|
|
|
693
693
|
client: {
|
|
694
694
|
inject: [
|
|
695
695
|
"@deepseek-ai/dsh-client-connection",
|
|
696
|
-
"@deepseek-ai/dsh-client-
|
|
696
|
+
"@deepseek-ai/dsh-client-locale",
|
|
697
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
697
698
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
698
|
-
"@deepseek-ai/dsh-client-ui-
|
|
699
|
-
"@deepseek-ai/dsh-client-locale"
|
|
699
|
+
"@deepseek-ai/dsh-client-ui-workspace"
|
|
700
700
|
],
|
|
701
701
|
platform: "web"
|
|
702
702
|
},
|
|
703
703
|
compatibility: {
|
|
704
|
-
dsh: "0.2.
|
|
704
|
+
dsh: "0.2.2-rc.5",
|
|
705
705
|
dshReleases: {
|
|
706
706
|
"0.2.0-rc.2": "compatible",
|
|
707
|
-
"0.2.1-rc.2": "compatible"
|
|
707
|
+
"0.2.1-rc.2": "compatible",
|
|
708
|
+
"0.2.2-rc.5": "compatible"
|
|
708
709
|
},
|
|
709
710
|
profiles: [
|
|
710
711
|
"web"
|
|
@@ -982,6 +983,7 @@ var image_input_default = {
|
|
|
982
983
|
|
|
983
984
|
// src/channels/shared/i18n-en/diagnostics.mjs
|
|
984
985
|
var diagnostics_default = Object.freeze({
|
|
986
|
+
"\u65E0\u6CD5\u8BFB\u53D6\u6240\u9009\u6A21\u578B\u7684\u5217\u8868\uFF0C\u6A21\u578B\u8BBE\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not load the selected model\u2019s catalog. The model setting was not saved. Try again.",
|
|
985
987
|
"\u5F02\u5E38\u7C7B\u578B": "Exception types",
|
|
986
988
|
"\u4E8C\u7EF4\u7801\u7F16\u7801\u5668": "QR encoder",
|
|
987
989
|
"\u4E8C\u7EF4\u7801\u56FE\u7247\u683C\u5F0F": "QR image format",
|
|
@@ -1207,6 +1209,7 @@ var connection_error_en_default = {
|
|
|
1207
1209
|
|
|
1208
1210
|
// src/channels/shared/i18n-ru/diagnostics.mjs
|
|
1209
1211
|
var diagnostics_default2 = Object.freeze({
|
|
1212
|
+
"\u65E0\u6CD5\u8BFB\u53D6\u6240\u9009\u6A21\u578B\u7684\u5217\u8868\uFF0C\u6A21\u578B\u8BBE\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439. \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0438 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443.",
|
|
1210
1213
|
"\u5F02\u5E38\u7C7B\u578B": "\u0422\u0438\u043F \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F",
|
|
1211
1214
|
"\u4E8C\u7EF4\u7801\u7F16\u7801\u5668": "\u041A\u043E\u0434\u0438\u0440\u043E\u0432\u0449\u0438\u043A QR-\u043A\u043E\u0434\u0430",
|
|
1212
1215
|
"\u4E8C\u7EF4\u7801\u56FE\u7247\u683C\u5F0F": "\u0424\u043E\u0440\u043C\u0430\u0442 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F QR-\u043A\u043E\u0434\u0430",
|
|
@@ -1509,7 +1512,9 @@ var weixin_default = {
|
|
|
1509
1512
|
"\u5FAE\u4FE1\u670D\u52A1\u6CA1\u6709\u8FD4\u56DE\u4E8C\u7EF4\u7801\u4EE4\u724C\u3002": "\u0421\u0435\u0440\u0432\u0438\u0441 WeChat \u043D\u0435 \u0432\u0435\u0440\u043D\u0443\u043B \u0442\u043E\u043A\u0435\u043D QR-\u043A\u043E\u0434\u0430.",
|
|
1510
1513
|
"\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u56DE\u590D\u6D88\u606F\u3002": "\u0421\u0435\u0440\u0432\u0438\u0441 WeChat \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435-\u043E\u0442\u0432\u0435\u0442.",
|
|
1511
1514
|
"\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u4E0A\u4F20\u8BF7\u6C42\u3002": "\u0421\u0435\u0440\u0432\u0438\u0441 WeChat \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0437\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443 \u0444\u0430\u0439\u043B\u0430.",
|
|
1512
|
-
"\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002": "\u0421\u0435\u0440\u0432\u0438\u0441 WeChat \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0444\u0430\u0439\u043B\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435."
|
|
1515
|
+
"\u5FAE\u4FE1\u670D\u52A1\u62D2\u7EDD\u4E86\u6587\u4EF6\u6D88\u606F\u3002": "\u0421\u0435\u0440\u0432\u0438\u0441 WeChat \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u043B \u0444\u0430\u0439\u043B\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435.",
|
|
1516
|
+
"/plan \u8FDB\u5165\u8BA1\u5212\u6A21\u5F0F\uFF08/plan off \u9000\u51FA\uFF0C\u53EF\u9644\u5E26\u8BF4\u660E\u6587\u5B57\uFF09": "/plan \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0435\u0436\u0438\u043C \u043F\u043B\u0430\u043D\u0430 (/plan off \u2014 \u0432\u044B\u0445\u043E\u0434; \u043C\u043E\u0436\u043D\u043E \u043F\u0440\u0438\u043B\u043E\u0436\u0438\u0442\u044C \u043F\u043E\u044F\u0441\u043D\u0435\u043D\u0438\u0435)",
|
|
1517
|
+
"/goal [\u76EE\u6807] \u8BBE\u7F6E\u76EE\u6807\uFF08clear \u6E05\u9664\u3001edit \u4FEE\u6539\u3001pause \u6682\u505C\u3001resume \u6062\u590D\uFF1B\u4E0D\u5E26\u53C2\u6570\u67E5\u770B\uFF09": "/goal [\u0446\u0435\u043B\u044C] \u0417\u0430\u0434\u0430\u0442\u044C \u0446\u0435\u043B\u044C (clear \u2014 \u0443\u0434\u0430\u043B\u0438\u0442\u044C, edit \u2014 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C, pause \u2014 \u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C, resume \u2014 \u0432\u043E\u0437\u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C; \u0431\u0435\u0437 \u0430\u0440\u0433\u0443\u043C\u0435\u043D\u0442\u0430 \u2014 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440)"
|
|
1513
1518
|
};
|
|
1514
1519
|
|
|
1515
1520
|
// plugin-src/client/i18n-ru.js
|
|
@@ -1577,10 +1582,46 @@ var COMPOSED = Object.freeze({
|
|
|
1577
1582
|
"\u64CD\u4F5C\u5931\u8D25\uFF1A{error}": "\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C: {error}",
|
|
1578
1583
|
"\u72B6\u6001\u5237\u65B0\u5931\u8D25\uFF1A{error}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435: {error}",
|
|
1579
1584
|
"\u72B6\u6001\u81EA\u52A8\u5237\u65B0\u5931\u8D25\uFF1A{error}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438: {error}",
|
|
1580
|
-
"\u8BF7\u8F93\u5165 -1\u30010 \u6216 1~{max} \u4E4B\u95F4\u7684\u6574\u6570\u3002": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 -1, 0 \u0438\u043B\u0438 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u043E\u0442 1 \u0434\u043E {max}."
|
|
1585
|
+
"\u8BF7\u8F93\u5165 -1\u30010 \u6216 1~{max} \u4E4B\u95F4\u7684\u6574\u6570\u3002": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 -1, 0 \u0438\u043B\u0438 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u043E\u0442 1 \u0434\u043E {max}.",
|
|
1586
|
+
"\u67E5\u770B\u4F1A\u8BDD {sessionId}": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0435\u0430\u043D\u0441 {sessionId}",
|
|
1587
|
+
"\u590D\u5236\u4F1A\u8BDD ID {sessionId}": "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID \u0441\u0435\u0430\u043D\u0441\u0430 {sessionId}",
|
|
1588
|
+
"{count} \u4E2A\u4F1A\u8BDD": "\u0421\u0435\u0430\u043D\u0441\u043E\u0432: {count}",
|
|
1589
|
+
"\u4E8B\u4EF6 {seq}": "\u0421\u043E\u0431\u044B\u0442\u0438\u0435 {seq}",
|
|
1590
|
+
"\u8BFB\u53D6\u5931\u8D25\uFF1A{error}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u0441\u0435\u0430\u043D\u0441: {error}",
|
|
1591
|
+
"\u5DF2\u663E\u793A {shown} / {total} \u6761\u6B63\u6587": "\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439: {shown} / {total}",
|
|
1592
|
+
"\u52A0\u8F7D\u5931\u8D25\uFF1A{error}": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u0435\u0430\u043D\u0441\u044B \u043A\u0430\u043D\u0430\u043B\u043E\u0432: {error}"
|
|
1581
1593
|
});
|
|
1582
1594
|
var CLIENT = Object.freeze({
|
|
1583
1595
|
...COMPOSED,
|
|
1596
|
+
// Read-only channel session directory and transcript viewer.
|
|
1597
|
+
"\u5FAE\u4FE1\u5BA2\u670D": "\u0421\u043B\u0443\u0436\u0431\u0430 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0438 WeChat",
|
|
1598
|
+
"\u6D4F\u89C8\u5668\u672A\u5141\u8BB8\u8BBF\u95EE\u526A\u8D34\u677F": "\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043D\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u043B \u0434\u043E\u0441\u0442\u0443\u043F \u043A \u0431\u0443\u0444\u0435\u0440\u0443 \u043E\u0431\u043C\u0435\u043D\u0430",
|
|
1599
|
+
"\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.channels\uFF0C\u8BF7\u68C0\u67E5 dsh-im host \u662F\u5426\u5DF2\u91CD\u8F7D": "\u0412 \u043E\u0442\u0432\u0435\u0442\u0435 Host \u043D\u0435\u0442 value.channels. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435, \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D \u043B\u0438 dsh-im host",
|
|
1600
|
+
"\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.messages\uFF0C\u8BF7\u68C0\u67E5 dsh-im host \u662F\u5426\u5DF2\u91CD\u8F7D": "\u0412 \u043E\u0442\u0432\u0435\u0442\u0435 Host \u043D\u0435\u0442 value.messages. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435, \u043F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D \u043B\u0438 dsh-im host",
|
|
1601
|
+
"\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.messages": "\u0412 \u043E\u0442\u0432\u0435\u0442\u0435 Host \u043D\u0435\u0442 value.messages",
|
|
1602
|
+
"\u67E5\u770B\u8BE5\u4F1A\u8BDD\u7684\u7528\u6237\u4E0E\u52A9\u624B\u6B63\u6587": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0432 \u044D\u0442\u043E\u043C \u0441\u0435\u0430\u043D\u0441\u0435",
|
|
1603
|
+
"\u590D\u5236\u5931\u8D25": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C",
|
|
1604
|
+
"\u590D\u5236 ID": "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C ID",
|
|
1605
|
+
"\u901A\u9053 / \u4F1A\u8BDD\u952E": "\u041A\u0430\u043D\u0430\u043B / \u043A\u043B\u044E\u0447 \u0431\u0435\u0441\u0435\u0434\u044B",
|
|
1606
|
+
"DSH \u4F1A\u8BDD ID": "ID \u0441\u0435\u0430\u043D\u0441\u0430 DSH",
|
|
1607
|
+
"\u64CD\u4F5C": "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F",
|
|
1608
|
+
"\u52A9\u624B": "\u0410\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442",
|
|
1609
|
+
"\u672C\u6761\u6D88\u606F\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD\u3002": "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0434\u043B\u0438\u043D\u043D\u043E\u0435 \u0438 \u0431\u044B\u043B\u043E \u043E\u0431\u0440\u0435\u0437\u0430\u043D\u043E.",
|
|
1610
|
+
"\u4F1A\u8BDD\u5185\u5BB9": "\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0441\u0435\u0430\u043D\u0441\u0430",
|
|
1611
|
+
"\u53EA\u8BFB\u663E\u793A\u7528\u6237\u4E0E\u52A9\u624B\u6B63\u6587\uFF1B\u7CFB\u7EDF\u63D0\u793A\u3001\u5DE5\u5177\u8C03\u7528\u548C\u5185\u90E8\u63A8\u7406\u4E0D\u663E\u793A\u3002": "\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430. \u0421\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438, \u0432\u044B\u0437\u043E\u0432\u044B \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u0438 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0435 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u043A\u0440\u044B\u0442\u044B.",
|
|
1612
|
+
"\u8FD4\u56DE\u5217\u8868": "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A \u0441\u043F\u0438\u0441\u043A\u0443",
|
|
1613
|
+
"\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F": "\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u043D\u043D\u0438\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F",
|
|
1614
|
+
"\u52A0\u8F7D\u4E2D\u2026": "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026",
|
|
1615
|
+
"\u6CA1\u6709\u53EF\u663E\u793A\u7684\u7528\u6237\u6216\u52A9\u624B\u6B63\u6587\u3002": "\u041D\u0435\u0442 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F \u0438\u043B\u0438 \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F.",
|
|
1616
|
+
"\u4F1A\u8BDD\u8BB0\u5F55": "\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0441\u0435\u0430\u043D\u0441\u043E\u0432",
|
|
1617
|
+
"\u8FD4\u56DE IM\u673A\u5668\u4EBA": "\u041D\u0430\u0437\u0430\u0434 \u043A IM-\u0431\u043E\u0442\u0430\u043C",
|
|
1618
|
+
"\u53EA\u8BFB\u5217\u51FA\u5404 IM \u901A\u9053\u5F53\u524D\u7ED1\u5B9A\u7684 DSH \u4F1A\u8BDD\uFF1B\u70B9\u51FB\u4F1A\u8BDD ID \u67E5\u770B\u6B63\u6587\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u7ED1\u5B9A\u3002": "\u0421\u043F\u0438\u0441\u043E\u043A \u0441\u0435\u0430\u043D\u0441\u043E\u0432 DSH, \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0445 \u043A \u043A\u0430\u043D\u0430\u043B\u0430\u043C IM, \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 ID \u0441\u0435\u0430\u043D\u0441\u0430, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F; \u043F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F.",
|
|
1619
|
+
"\u6B63\u5728\u8BFB\u53D6\u901A\u9053\u4F1A\u8BDD\u2026": "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u0435\u0430\u043D\u0441\u044B \u043A\u0430\u043D\u0430\u043B\u043E\u0432\u2026",
|
|
1620
|
+
"\u5C1A\u672A\u53D1\u73B0\u5DF2\u7ED1\u5B9A DSH \u4F1A\u8BDD\u7684\u901A\u9053\u3002": "\u041A\u0430\u043D\u0430\u043B\u044B \u0441 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u043C\u0438 \u0441\u0435\u0430\u043D\u0441\u0430\u043C\u0438 DSH \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B.",
|
|
1621
|
+
"limit \u6216 offset \u53C2\u6570\u65E0\u6548": "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B limit \u0438\u043B\u0438 offset",
|
|
1622
|
+
"\u8BE5\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u901A\u9053\u7ED1\u5B9A\uFF0C\u53EF\u80FD\u5DF2\u89E3\u7ED1": "\u0421\u0435\u0430\u043D\u0441 \u043D\u0435 \u043F\u0440\u0438\u043D\u0430\u0434\u043B\u0435\u0436\u0438\u0442 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0439 \u043F\u0440\u0438\u0432\u044F\u0437\u043A\u0435 \u043A\u0430\u043D\u0430\u043B\u0430; \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u043E\u043D \u0431\u044B\u043B \u043E\u0442\u0432\u044F\u0437\u0430\u043D",
|
|
1623
|
+
"\u5BBF\u4E3B sessionQuery \u670D\u52A1\u5C1A\u672A\u5C31\u7EEA": "\u0421\u043B\u0443\u0436\u0431\u0430 sessionQuery \u043D\u0430 Host \u0435\u0449\u0451 \u043D\u0435 \u0433\u043E\u0442\u043E\u0432\u0430",
|
|
1624
|
+
"\u8BE5\u4F1A\u8BDD\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "\u0421\u0435\u0430\u043D\u0441 \u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.",
|
|
1584
1625
|
// Settings shell: sidebar entry, group history, group policy, bot aliases.
|
|
1585
1626
|
"\u4FA7\u8FB9\u680F\u5165\u53E3": "\u041F\u0443\u043D\u043A\u0442 \u0432 \u0431\u043E\u043A\u043E\u0432\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438",
|
|
1586
1627
|
"\u81EA\u52A8\u6A21\u5F0F\uFF1A\u672A\u914D\u7F6E\u6E20\u9053\u65F6\u663E\u793A\uFF0C\u914D\u7F6E\u81F3\u5C11\u4E00\u4E2A\u6E20\u9053\u540E\u9690\u85CF\u3002\u9690\u85CF\u540E\u4ECD\u53EF\u4ECE\u63D2\u4EF6\u8BE6\u60C5\u6216\u8BBE\u7F6E\u8FDB\u5165\uFF0C\u4E0D\u5F71\u54CD\u673A\u5668\u4EBA\u540E\u53F0\u8FD0\u884C\u3002": "\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438: \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C, \u043F\u043E\u043A\u0430 \u043D\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043D \u043D\u0438 \u043E\u0434\u0438\u043D \u043A\u0430\u043D\u0430\u043B, \u0437\u0430\u0442\u0435\u043C \u0441\u043A\u0440\u044B\u0432\u0430\u0442\u044C. \u041F\u043B\u0430\u0433\u0438\u043D \u043E\u0441\u0442\u0430\u0451\u0442\u0441\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0438\u0437 \u043F\u043E\u0434\u0440\u043E\u0431\u043D\u043E\u0441\u0442\u0435\u0439 \u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A; \u0431\u043E\u0442\u044B \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0430\u044E\u0442 \u0440\u0430\u0431\u043E\u0442\u0430\u0442\u044C \u0432 \u0444\u043E\u043D\u0435.",
|
|
@@ -1651,6 +1692,43 @@ var CLIENT = Object.freeze({
|
|
|
1651
1692
|
"\u673A\u5668\u4EBA\u8BBE\u7F6E\u9875\u7B7E": "\u0412\u043A\u043B\u0430\u0434\u043A\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0431\u043E\u0442\u0430",
|
|
1652
1693
|
"\u6295\u9012\u8BBE\u7F6E": "\u0414\u043E\u0441\u0442\u0430\u0432\u043A\u0430",
|
|
1653
1694
|
"\u8BBF\u95EE\u8BBE\u7F6E": "\u0414\u043E\u0441\u0442\u0443\u043F",
|
|
1695
|
+
"\u4E0D\u80FD\u6267\u884C\u547D\u4EE4": "\u041D\u0435\u043B\u044C\u0437\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u044B",
|
|
1696
|
+
"\u53EF\u4EE5\u6267\u884C\u6307\u5B9A\u7684\u547D\u4EE4": "\u041C\u043E\u0436\u043D\u043E \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0442\u044C \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B",
|
|
1697
|
+
"\u9009\u62E9\u547D\u4EE4\uFF08{count}\uFF09": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u044B ({count})",
|
|
1698
|
+
"\u9009\u62E9\u5141\u8BB8\u7684\u547D\u4EE4": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043D\u043D\u044B\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B",
|
|
1699
|
+
"\u9ED8\u8BA4\u52FE\u9009 new\u3001stop\u3001help\u3001status\u3001compact\u3001clear\u3002": "\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0432\u044B\u0431\u0440\u0430\u043D\u044B new, stop, help, status, compact, clear.",
|
|
1700
|
+
"\u641C\u7D22\u547D\u4EE4\u2026": "\u041F\u043E\u0438\u0441\u043A \u043A\u043E\u043C\u0430\u043D\u0434\u2026",
|
|
1701
|
+
"\u641C\u7D22\u547D\u4EE4": "\u041F\u043E\u0438\u0441\u043A \u043A\u043E\u043C\u0430\u043D\u0434",
|
|
1702
|
+
"\u5DF2\u9009 {count} \u9879": "\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {count}",
|
|
1703
|
+
"\u6062\u590D\u9ED8\u8BA4": "\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",
|
|
1704
|
+
"\u5168\u90E8\u547D\u4EE4": "\u0412\u0441\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B",
|
|
1705
|
+
"\u5B8C\u6210": "\u0413\u043E\u0442\u043E\u0432\u043E",
|
|
1706
|
+
"/new \u65B0\u4F1A\u8BDD": "/new \u041D\u043E\u0432\u044B\u0439 \u0441\u0435\u0430\u043D\u0441",
|
|
1707
|
+
"/stop \u505C\u6B62\u4EFB\u52A1": "/stop \u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0437\u0430\u0434\u0430\u0447\u0443",
|
|
1708
|
+
"/help \u5E2E\u52A9": "/help \u0421\u043F\u0440\u0430\u0432\u043A\u0430",
|
|
1709
|
+
"/status \u8FDE\u63A5\u72B6\u6001": "/status \u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F",
|
|
1710
|
+
"/compact \u538B\u7F29\u4E0A\u4E0B\u6587": "/compact \u0421\u0436\u0430\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442",
|
|
1711
|
+
"/clear \u6E05\u7A7A\u4E0A\u4E0B\u6587": "/clear \u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442",
|
|
1712
|
+
"/m \u6216 /menu \u83DC\u5355": "/m \u0438\u043B\u0438 /menu \u041C\u0435\u043D\u044E",
|
|
1713
|
+
"/version \u7248\u672C": "/version \u0412\u0435\u0440\u0441\u0438\u044F",
|
|
1714
|
+
"/models \u6A21\u578B\u5217\u8868": "/models \u0421\u043F\u0438\u0441\u043E\u043A \u043C\u043E\u0434\u0435\u043B\u0435\u0439",
|
|
1715
|
+
"/model \u6A21\u578B\u5207\u6362": "/model \u0421\u043C\u0435\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C",
|
|
1716
|
+
"/reasonings \u63A8\u7406\u7B49\u7EA7": "/reasonings \u0423\u0440\u043E\u0432\u043D\u0438 \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u044F",
|
|
1717
|
+
"/reasoning \u63A8\u7406\u7B49\u7EA7\u5207\u6362": "/reasoning \u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0440\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u044F",
|
|
1718
|
+
"/presets \u9884\u8BBE\u5217\u8868": "/presets \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0435\u0441\u0435\u0442\u043E\u0432",
|
|
1719
|
+
"/preset \u9884\u8BBE\u5207\u6362": "/preset \u0421\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0440\u0435\u0441\u0435\u0442",
|
|
1720
|
+
"/permissionlist \u6743\u9650\u5217\u8868": "/permissionlist \u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0430\u0432",
|
|
1721
|
+
"/permission \u6743\u9650\u5207\u6362": "/permission \u0421\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u0430",
|
|
1722
|
+
"/history \u5386\u53F2\u6D88\u606F": "/history \u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439",
|
|
1723
|
+
"/workspace \u5DE5\u4F5C\u533A": "/workspace \u0420\u0430\u0431\u043E\u0447\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C",
|
|
1724
|
+
"/workspaces \u5DE5\u4F5C\u533A\u5217\u8868": "/workspaces \u0421\u043F\u0438\u0441\u043E\u043A \u0440\u0430\u0431\u043E\u0447\u0438\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439",
|
|
1725
|
+
"/sessionlist \u4F1A\u8BDD\u5217\u8868": "/sessionlist \u0421\u043F\u0438\u0441\u043E\u043A \u0441\u0435\u0430\u043D\u0441\u043E\u0432",
|
|
1726
|
+
"/session \u7ED1\u5B9A\u4F1A\u8BDD": "/session \u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u0441\u0435\u0430\u043D\u0441",
|
|
1727
|
+
"/batch \u6279\u91CF\u8F93\u5165": "/batch \u041F\u0430\u043A\u0435\u0442\u043D\u044B\u0439 \u0432\u0432\u043E\u0434",
|
|
1728
|
+
"/send \u53D1\u9001\u6279\u91CF": "/send \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442",
|
|
1729
|
+
"/cancel \u53D6\u6D88\u6279\u91CF": "/cancel \u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0430\u043A\u0435\u0442",
|
|
1730
|
+
"/steer \u8865\u5145\u6307\u4EE4": "/steer \u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u043D\u0441\u0442\u0440\u0443\u043A\u0446\u0438\u044E",
|
|
1731
|
+
"/repair \u4FEE\u590D": "/repair \u0418\u0441\u043F\u0440\u0430\u0432\u0438\u0442\u044C",
|
|
1654
1732
|
"\u67E5\u770B\u8BBF\u95EE\u6743\u9650\u8BF4\u660E": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043F\u0440\u0430\u0432 \u0434\u043E\u0441\u0442\u0443\u043F\u0430",
|
|
1655
1733
|
"\u5141\u8BB8\u6240\u6709\u7528\u6237": "\u0412\u0441\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438",
|
|
1656
1734
|
"\u4EC5\u767D\u540D\u5355\u7528\u6237": "\u0422\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430",
|
|
@@ -2029,6 +2107,7 @@ var CLIENT = Object.freeze({
|
|
|
2029
2107
|
"\u67E5\u770B\u6A21\u578B\u8BBE\u7F6E\u8BF4\u660E": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u043C\u043E\u0434\u0435\u043B\u0438",
|
|
2030
2108
|
"\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B": "\u041A\u0430\u043A \u043C\u043E\u0434\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",
|
|
2031
2109
|
"\u6A21\u578B\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043C\u043E\u0434\u0435\u043B\u044C. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443.",
|
|
2110
|
+
"\u65E0\u6CD5\u8BFB\u53D6\u6240\u9009\u6A21\u578B\u7684\u5217\u8868\uFF0C\u6A21\u578B\u8BBE\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u043C\u043E\u0434\u0435\u043B\u0435\u0439. \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043C\u043E\u0434\u0435\u043B\u0438 \u043D\u0435 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443.",
|
|
2032
2111
|
"\u6A21\u578B\u65E0\u6548\u3002": "\u041D\u0435\u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C.",
|
|
2033
2112
|
"\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002": "\u041C\u043E\u0434\u0435\u043B\u044C \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438\u043B\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.",
|
|
2034
2113
|
"\u5F53\u524D\u6A21\u578B\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u6A21\u578B\u6216\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B\u3002": "\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u043C\u043E\u0434\u0435\u043B\u044C \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. \u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044E \u043C\u043E\u0434\u0435\u043B\u044C \u0438\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.",
|
|
@@ -2525,6 +2604,7 @@ var CLIENT = Object.freeze({
|
|
|
2525
2604
|
"\u5148\u5728\u5BF9\u5E94\u5E73\u53F0\u4E0E\u673A\u5668\u4EBA\u804A\u4E00\u6761\u6D88\u606F\uFF0C\u518D\u5237\u65B0\u3002": "\u0421\u043D\u0430\u0447\u0430\u043B\u0430 \u043D\u0430\u043F\u0438\u0448\u0438\u0442\u0435 \u0431\u043E\u0442\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043D\u0430 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0435, \u0437\u0430\u0442\u0435\u043C \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u043F\u0438\u0441\u043E\u043A.",
|
|
2526
2605
|
"\u5DF2\u6DFB\u52A0": "\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E",
|
|
2527
2606
|
"\u624B\u52A8\u586B\u5199\uFF08\u9AD8\u7EA7\uFF09": "\u0412\u0432\u0435\u0441\u0442\u0438 \u0432\u0440\u0443\u0447\u043D\u0443\u044E (\u0434\u043B\u044F \u043E\u043F\u044B\u0442\u043D\u044B\u0445)",
|
|
2607
|
+
"\u76EE\u6807\u662F\u7EC6\u7C92\u5EA6\u8BBE\u7F6E\uFF1A\u67D0\u4E2A\u673A\u5668\u4EBA\u4E00\u65E6\u914D\u7F6E\u4E86\u76EE\u6807\uFF08\u54EA\u6015\u5173\u95ED\u4F1A\u8BDD\u540C\u6B65\uFF09\uFF0C\u8BE5\u673A\u5668\u4EBA\u7684\u6295\u9012\u5C31\u6309\u76EE\u6807\u8D70\u3002\u5982\u9700\u4F7F\u7528\u300C\u901A\u7528\u8BBE\u7F6E \u2192 \u6295\u9012\u300D\u91CC\u7684\u7B80\u5355\u5F00\u5173\uFF0C\u8BF7\u5148\u5220\u9664\u8BE5\u673A\u5668\u4EBA\u7684\u5168\u90E8\u76EE\u6807\u3002": "\u0426\u0435\u043B\u0438 \u2014 \u0442\u043E\u043D\u043A\u0430\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430: \u043A\u0430\u043A \u0442\u043E\u043B\u044C\u043A\u043E \u0443 \u0431\u043E\u0442\u0430 \u0435\u0441\u0442\u044C \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u043D\u0430 \u0446\u0435\u043B\u044C (\u0434\u0430\u0436\u0435 \u0441 \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u043E\u0439 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0435\u0439), \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430 \u044D\u0442\u043E\u0433\u043E \u0431\u043E\u0442\u0430 \u0438\u0434\u0451\u0442 \u043F\u043E \u0446\u0435\u043B\u044F\u043C. \u0427\u0442\u043E\u0431\u044B \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043F\u0440\u043E\u0441\u0442\u044B\u0435 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u0438 \u0432 \xAB\u041E\u0431\u0449\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u0414\u043E\u0441\u0442\u0430\u0432\u043A\u0430\xBB, \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u0443\u0434\u0430\u043B\u0438\u0442\u0435 \u0432\u0441\u0435 \u0446\u0435\u043B\u0438 \u044D\u0442\u043E\u0433\u043E \u0431\u043E\u0442\u0430.",
|
|
2528
2608
|
"\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\uFF0C\u8BF7\u5230\u76EE\u6807\u4F1A\u8BDD\u786E\u8BA4\u3002": "\u0422\u0435\u0441\u0442\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0435\u0433\u043E \u0432 \u0446\u0435\u043B\u0435\u0432\u043E\u0439 \u0431\u0435\u0441\u0435\u0434\u0435.",
|
|
2529
2609
|
"\u6D4B\u8BD5\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "\u0422\u0435\u0441\u0442\u043E\u0432\u0430\u044F \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.",
|
|
2530
2610
|
"\u5DF2\u590D\u5236\u8C03\u7528\u53C2\u6570": "\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0432\u044B\u0437\u043E\u0432\u0430 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u044B",
|
|
@@ -2579,6 +2659,15 @@ var CLIENT = Object.freeze({
|
|
|
2579
2659
|
"\u5C06\u65B0\u6D88\u606F\u8865\u5145\u5230\u5F53\u524D\u4EFB\u52A1": "\u0414\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u043E\u0432\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0432 \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0437\u0430\u0434\u0430\u0447\u0443",
|
|
2580
2660
|
"\u65E0\u6CD5\u8BFB\u53D6\u6D88\u606F\u5904\u7406\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043F\u043E\u0437\u0436\u0435.",
|
|
2581
2661
|
"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u6D88\u606F\u5904\u7406\u65B9\u5F0F\u3002": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u0440\u0440\u0435\u043A\u0442\u043D\u044B\u0439 \u0441\u043F\u043E\u0441\u043E\u0431 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0438 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439.",
|
|
2662
|
+
"\u6295\u9012\u5185\u5BB9": "\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043E\u0442\u0432\u0435\u0442\u0430",
|
|
2663
|
+
"\u8FC7\u7A0B\u6B63\u6587": "\u0422\u0435\u043A\u0441\u0442 \u043F\u0440\u043E\u0446\u0435\u0441\u0441\u0430",
|
|
2664
|
+
"\u5DE5\u5177\u6B65\u9AA4": "\u0428\u0430\u0433\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432",
|
|
2665
|
+
"\u601D\u8003\u8FC7\u7A0B": "\u0420\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u044F",
|
|
2666
|
+
"\u6700\u7EC8\u56DE\u7B54\u59CB\u7EC8\u53D1\u9001\uFF1B\u5173\u95ED\u7684\u9879\u4E0D\u518D\u63A8\u9001\u3002": "\u0418\u0442\u043E\u0433\u043E\u0432\u044B\u0439 \u043E\u0442\u0432\u0435\u0442 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0432\u0441\u0435\u0433\u0434\u0430; \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0435 \u0447\u0430\u0441\u0442\u0438 \u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F.",
|
|
2667
|
+
"\u6B63\u5728\u6267\u884C\u65F6\u52A9\u624B\u7684\u8BF4\u660E\u6587\u5B57": "\u041F\u043E\u044F\u0441\u043D\u0435\u043D\u0438\u044F \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442\u0430 \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u0440\u0430\u0431\u043E\u0442\u044B",
|
|
2668
|
+
"\u5DE5\u5177\u8C03\u7528\u3001\u7ED3\u679C\u4E0E\u5931\u8D25\u63D0\u793A": "\u0412\u044B\u0437\u043E\u0432\u044B \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432, \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u0438 \u043E\u0448\u0438\u0431\u043A\u0438",
|
|
2669
|
+
"\u6A21\u578B\u7684\u63A8\u7406\u8FC7\u7A0B\uFF08\u6E20\u9053\u652F\u6301\u65F6\uFF09": "\u0420\u0430\u0441\u0441\u0443\u0436\u0434\u0435\u043D\u0438\u044F \u043C\u043E\u0434\u0435\u043B\u0438, \u0435\u0441\u043B\u0438 \u043A\u0430\u043D\u0430\u043B \u0438\u0445 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442",
|
|
2670
|
+
"\u8BF7\u9009\u62E9\u8981\u6295\u9012\u7684\u56DE\u590D\u5185\u5BB9\u3002": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u043A\u0430\u043A\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043E\u0442\u0432\u0435\u0442\u0430 \u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C.",
|
|
2582
2671
|
"\u901A\u7528\u8BBE\u7F6E": "\u041E\u0431\u0449\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438",
|
|
2583
2672
|
"\u901A\u7528\u8BBE\u7F6E\u5206\u7C7B": "\u0420\u0430\u0437\u0434\u0435\u043B\u044B \u043E\u0431\u0449\u0438\u0445 \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A",
|
|
2584
2673
|
"\u9644\u4EF6": "\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F",
|
|
@@ -2723,6 +2812,7 @@ var CLIENT = Object.freeze({
|
|
|
2723
2812
|
"dsh-im 4.25.0 \u652F\u6301\u5230 DSH v0.1.6-alpha.2\u3002": "dsh-im 4.25.0 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 DSH \u0434\u043E v0.1.6-alpha.2.",
|
|
2724
2813
|
"dsh-im 4.39.0 \u4EC5\u652F\u6301 DSH 0.2.0-rc.2\u3002": "dsh-im 4.39.0 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E DSH 0.2.0-rc.2.",
|
|
2725
2814
|
"dsh-im 5.0.0 \u4EC5\u652F\u6301 DSH 0.2.1-rc.2\u3002": "dsh-im 5.0.0 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E DSH 0.2.1-rc.2.",
|
|
2815
|
+
"dsh-im 5.10.0 \u8D77\u652F\u6301 DSH 0.2.2-rc.5\u3002": "dsh-im 5.10.0 \u0438 \u043D\u043E\u0432\u0435\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442 DSH 0.2.2-rc.5.",
|
|
2726
2816
|
"\u91CD\u65B0\u68C0\u67E5": "\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0441\u043D\u043E\u0432\u0430",
|
|
2727
2817
|
"\u5237\u65B0\u72B6\u6001": "\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435",
|
|
2728
2818
|
"\u624B\u5DE5\u66F4\u65B0": "\u0420\u0443\u0447\u043D\u043E\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435",
|
|
@@ -2838,6 +2928,31 @@ var CLIENT = Object.freeze({
|
|
|
2838
2928
|
"\u7ED1\u5B9A\u5DF2\u4FDD\u5B58\u3002": "\u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430.",
|
|
2839
2929
|
"\u5DF2\u89E3\u9664\u7ED1\u5B9A\uFF0C\u804A\u5929\u8BB0\u5F55\u4FDD\u7559\u3002": "\u041F\u0440\u0438\u0432\u044F\u0437\u043A\u0430 \u0441\u043D\u044F\u0442\u0430, \u0438\u0441\u0442\u043E\u0440\u0438\u044F \u0447\u0430\u0442\u0430 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0430.",
|
|
2840
2930
|
"\u8FD8\u6CA1\u6709 DS Bot\uFF0C\u8BF7\u5148\u5728 DS Bot \u4E2D\u521B\u5EFA\u673A\u5668\u4EBA\u540E\u5237\u65B0\u3002": "DS Bot \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u0431\u043E\u0442\u0430 \u0432 DS Bot \u0438 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.",
|
|
2931
|
+
"\u6295\u9012": "\u0414\u043E\u0441\u0442\u0430\u0432\u043A\u0430",
|
|
2932
|
+
"\u4F1A\u8BDD\u540C\u6B65": "\u0421\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u044F \u0441\u0435\u0441\u0441\u0438\u0439",
|
|
2933
|
+
"\u53EA\u5BF9\u5DF2\u5F00\u542F\u4F1A\u8BDD\u540C\u6B65\u7684\u76EE\u6807\u751F\u6548\uFF1A\u5728 Web GUI \u91CC\u8F93\u5165\u7684\u56DE\u5408\u3001\u5B9A\u65F6\u63D0\u9192\u3001\u5B50\u4EE3\u7406\u901A\u77E5\u7B49\u201C\u4E0D\u662F\u672C\u804A\u5929\u53D1\u8D77\u201D\u7684\u56DE\u5408\uFF0C\u5176\u56DE\u7B54\u4F1A\u8F6C\u53D1\u5230\u8FD9\u4E9B\u76EE\u6807\u3002\u6D88\u606F\u8BED\u8A00\u540C\u65F6\u5F71\u54CD\u673A\u5668\u4EBA\u53D1\u9001\u7684\u547D\u4EE4\u83DC\u5355\u6587\u672C\u3002": "\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043B\u044F \u0446\u0435\u043B\u0435\u0439 \u0441 \u0432\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0439 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0438: \u043E\u0442\u0432\u0435\u0442\u044B \u0445\u043E\u0434\u043E\u0432, \u043D\u0430\u0447\u0430\u0442\u044B\u0445 \u043D\u0435 \u0432 \u044D\u0442\u043E\u043C \u0447\u0430\u0442\u0435 (\u0432\u0432\u043E\u0434 \u0438\u0437 Web GUI, \u043D\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u043D\u0438\u044F \u043F\u043E \u0440\u0430\u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044E, \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u0441\u0443\u0431\u0430\u0433\u0435\u043D\u0442\u043E\u0432), \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u044D\u0442\u0438\u043C \u0446\u0435\u043B\u044F\u043C. \u042F\u0437\u044B\u043A \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0442\u0430\u043A\u0436\u0435 \u043C\u0435\u043D\u044F\u0435\u0442 \u0442\u0435\u043A\u0441\u0442 \u043C\u0435\u043D\u044E \u043A\u043E\u043C\u0430\u043D\u0434, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043F\u0440\u0438\u0441\u044B\u043B\u0430\u0435\u0442 \u0431\u043E\u0442.",
|
|
2934
|
+
"\u67E5\u770B\u4F1A\u8BDD\u540C\u6B65\u8BF4\u660E": "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u043A\u0443 \u043F\u043E \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0439",
|
|
2935
|
+
"\u63D2\u4EF6\u6D88\u606F\u8BED\u8A00": "\u042F\u0437\u044B\u043A \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043F\u043B\u0430\u0433\u0438\u043D\u0430",
|
|
2936
|
+
"\u8DDF\u968F DSH \u754C\u9762\u8BED\u8A00": "\u041A\u0430\u043A \u0432 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 DSH",
|
|
2937
|
+
"\u4E2D\u6587": "\u4E2D\u6587",
|
|
2938
|
+
"English": "English",
|
|
2939
|
+
"\u0420\u0443\u0441\u0441\u043A\u0438\u0439": "\u0420\u0443\u0441\u0441\u043A\u0438\u0439",
|
|
2940
|
+
"\u955C\u50CF Web \u4E2D\u8F93\u5165\u7684\u6D88\u606F": "\u0417\u0435\u0440\u043A\u0430\u043B\u0438\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F, \u043D\u0430\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0432 Web",
|
|
2941
|
+
"\u8F93\u5165\u524D\u7F00\u56FE\u6807": "\u0418\u043A\u043E\u043D\u043A\u0430 \u0432\u0432\u043E\u0434\u0430",
|
|
2942
|
+
"\u6295\u9012\u6A21\u578B\u56DE\u7B54": "\u0414\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u044B \u043C\u043E\u0434\u0435\u043B\u0438",
|
|
2943
|
+
"\u56DE\u7B54\u524D\u7F00\u56FE\u6807": "\u0418\u043A\u043E\u043D\u043A\u0430 \u043E\u0442\u0432\u0435\u0442\u0430",
|
|
2944
|
+
"\u6700\u591A 32 \u4E2A\u5B57\u7B26\uFF1B\u7559\u7A7A\u5219\u4E0D\u6DFB\u52A0\u524D\u7F00\u3002": "\u0414\u043E 32 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432; \u043F\u0443\u0441\u0442\u043E\u0435 \u043F\u043E\u043B\u0435 \u2014 \u0431\u0435\u0437 \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u0430.",
|
|
2945
|
+
"\u4FDD\u5B58\u6295\u9012\u8BBE\u7F6E": "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438",
|
|
2946
|
+
"\u6B63\u5728\u8BFB\u53D6\u6295\u9012\u8BBE\u7F6E\u2026": "\u0427\u0438\u0442\u0430\u044E \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438\u2026",
|
|
2947
|
+
"\u6295\u9012\u540C\u6B65\u8BBE\u7F6E\u901A\u9053\u4E0D\u53EF\u7528\u3002": "\u041A\u0430\u043D\u0430\u043B \u043D\u0430\u0441\u0442\u0440\u043E\u0435\u043A \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.",
|
|
2948
|
+
"\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002": "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438 \u0432\u0435\u0440\u043D\u0443\u043B\u0438 \u043D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D\u044B\u0439 \u043E\u0442\u0432\u0435\u0442.",
|
|
2949
|
+
"\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u0438\u043B\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438. \u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u0435 \u043F\u043E\u043F\u044B\u0442\u043A\u0443 \u043F\u043E\u0437\u0436\u0435.",
|
|
2950
|
+
"\u65E0\u6548\u7684\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF1A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\uFF0C\u56FE\u6807\u662F\u4E0D\u8D85\u8FC7 32 \u4E2A\u5B57\u7B26\u7684\u6587\u672C\u3002": "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0438: \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u044C \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u0438\u043C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\u043C, \u0430 \u0438\u043A\u043E\u043D\u043A\u0430 \u2014 \u0442\u0435\u043A\u0441\u0442\u043E\u043C \u043D\u0435 \u0434\u043B\u0438\u043D\u043D\u0435\u0435 32 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432.",
|
|
2951
|
+
"\u53EA\u5BF9\u5DF2\u5F00\u542F\u4F1A\u8BDD\u540C\u6B65\u7684\u76EE\u6807\u751F\u6548\uFF1B\u6D88\u606F\u8BED\u8A00\u540C\u65F6\u5F71\u54CD\u673A\u5668\u4EBA\u53D1\u9001\u7684\u547D\u4EE4\u83DC\u5355\u6587\u672C\u3002": "\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043B\u044F \u0446\u0435\u043B\u0435\u0439 \u0441 \u0432\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u043E\u0439 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441\u0435\u0441\u0441\u0438\u0439; \u044F\u0437\u044B\u043A \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0442\u0430\u043A\u0436\u0435 \u043C\u0435\u043D\u044F\u0435\u0442 \u0442\u0435\u043A\u0441\u0442 \u043C\u0435\u043D\u044E \u043A\u043E\u043C\u0430\u043D\u0434, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043F\u0440\u0438\u0441\u044B\u043B\u0430\u0435\u0442 \u0431\u043E\u0442.",
|
|
2952
|
+
"\u9ED8\u8BA4\u8DDF\u968F DSH \u754C\u9762\u8BED\u8A00\uFF1B\u53EF\u4EE5\u5355\u72EC\u56FA\u5B9A\u673A\u5668\u4EBA\u6D88\u606F\u7684\u8BED\u8A00\u3002": "\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u044F\u0437\u044B\u043A\u0443 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 DSH; \u044F\u0437\u044B\u043A \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0431\u043E\u0442\u0430 \u043C\u043E\u0436\u043D\u043E \u0437\u0430\u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E.",
|
|
2953
|
+
"\u8BED\u8A00\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002": "\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u044F\u0437\u044B\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430.",
|
|
2954
|
+
"\u5728 Web GUI \u4E2D\u53D1\u9001\u7684\u6D88\u606F\u4F1A\u4F5C\u4E3A\u4E00\u6761\u5E26\u524D\u7F00\u7684\u6D88\u606F\u8F6C\u53D1\u5230\u672C\u804A\u5929\u7684\u4F1A\u8BDD\u540C\u6B65\u76EE\u6807\u3002": "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435, \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0435 \u0432 Web GUI, \u043F\u0435\u0440\u0435\u0441\u044B\u043B\u0430\u0435\u0442\u0441\u044F \u0446\u0435\u043B\u0438 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0439 \u044D\u0442\u043E\u0433\u043E \u0447\u0430\u0442\u0430 \u0441 \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u043E\u043C-\u0438\u043A\u043E\u043D\u043A\u043E\u0439.",
|
|
2955
|
+
"\u5176\u4ED6\u56DE\u5408\uFF08Web \u8F93\u5165\u3001\u5B9A\u65F6\u63D0\u9192\u3001\u5B50\u4EE3\u7406\u901A\u77E5\u7B49\uFF09\u7684\u6A21\u578B\u56DE\u7B54\u4F1A\u53D1\u9001\u5230\u4F1A\u8BDD\u540C\u6B65\u76EE\u6807\u3002": "\u041E\u0442\u0432\u0435\u0442\u044B \u043C\u043E\u0434\u0435\u043B\u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0445\u043E\u0434\u0430\u0445 (\u0432\u0432\u043E\u0434 \u0432 Web, \u043D\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u043D\u0438\u044F \u043F\u043E \u0440\u0430\u0441\u043F\u0438\u0441\u0430\u043D\u0438\u044E, \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u0441\u0443\u0431\u0430\u0433\u0435\u043D\u0442\u043E\u0432 \u0438 \u0442. \u043F.) \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u0446\u0435\u043B\u0438 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0435\u0441\u0441\u0438\u0439.",
|
|
2841
2956
|
"DS Bot \u6682\u4E0D\u53EF\u7528": "DS Bot \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D"
|
|
2842
2957
|
});
|
|
2843
2958
|
var SHARED = Object.freeze({
|
|
@@ -2897,7 +3012,14 @@ var COMPOSED2 = Object.freeze({
|
|
|
2897
3012
|
"\u64CD\u4F5C\u5931\u8D25\uFF1A{error}": "Operation failed: {error}",
|
|
2898
3013
|
"\u72B6\u6001\u5237\u65B0\u5931\u8D25\uFF1A{error}": "Status refresh failed: {error}",
|
|
2899
3014
|
"\u72B6\u6001\u81EA\u52A8\u5237\u65B0\u5931\u8D25\uFF1A{error}": "Automatic status refresh failed: {error}",
|
|
2900
|
-
"\u8BF7\u8F93\u5165 -1\u30010 \u6216 1~{max} \u4E4B\u95F4\u7684\u6574\u6570\u3002": "Enter -1, 0, or an integer from 1 to {max}."
|
|
3015
|
+
"\u8BF7\u8F93\u5165 -1\u30010 \u6216 1~{max} \u4E4B\u95F4\u7684\u6574\u6570\u3002": "Enter -1, 0, or an integer from 1 to {max}.",
|
|
3016
|
+
"\u67E5\u770B\u4F1A\u8BDD {sessionId}": "View session {sessionId}",
|
|
3017
|
+
"\u590D\u5236\u4F1A\u8BDD ID {sessionId}": "Copy session ID {sessionId}",
|
|
3018
|
+
"{count} \u4E2A\u4F1A\u8BDD": "{count} sessions",
|
|
3019
|
+
"\u4E8B\u4EF6 {seq}": "Event {seq}",
|
|
3020
|
+
"\u8BFB\u53D6\u5931\u8D25\uFF1A{error}": "Could not read the session: {error}",
|
|
3021
|
+
"\u5DF2\u663E\u793A {shown} / {total} \u6761\u6B63\u6587": "Showing {shown} / {total} messages",
|
|
3022
|
+
"\u52A0\u8F7D\u5931\u8D25\uFF1A{error}": "Could not load channel sessions: {error}"
|
|
2901
3023
|
});
|
|
2902
3024
|
var EN = Object.freeze({
|
|
2903
3025
|
...COMPOSED2,
|
|
@@ -3047,6 +3169,43 @@ var EN = Object.freeze({
|
|
|
3047
3169
|
"\u65E0\u6CD5\u89E3\u6790\u8BE5\u7FA4\u804A\uFF0C\u8BF7\u91CD\u8BD5\u6216\u586B\u5199\u6570\u5B57\u7FA4 ID\u3002": "Could not resolve this group. Try again or enter the numeric group ID.",
|
|
3048
3170
|
"\u8BE5\u7FA4\u5DF2\u5728\u5217\u8868\u4E2D\uFF0C\u8BF7\u7F16\u8F91\u4E0A\u65B9\u7684\u5361\u7247\u3002": "This group is already in the list. Edit its card above instead.",
|
|
3049
3171
|
"\u8BBF\u95EE\u8BBE\u7F6E": "Access settings",
|
|
3172
|
+
"\u4E0D\u80FD\u6267\u884C\u547D\u4EE4": "Cannot run commands",
|
|
3173
|
+
"\u53EF\u4EE5\u6267\u884C\u6307\u5B9A\u7684\u547D\u4EE4": "Can run specified commands",
|
|
3174
|
+
"\u9009\u62E9\u547D\u4EE4\uFF08{count}\uFF09": "Choose commands ({count})",
|
|
3175
|
+
"\u9009\u62E9\u5141\u8BB8\u7684\u547D\u4EE4": "Choose allowed commands",
|
|
3176
|
+
"\u9ED8\u8BA4\u52FE\u9009 new\u3001stop\u3001help\u3001status\u3001compact\u3001clear\u3002": "By default, new, stop, help, status, compact, and clear are selected.",
|
|
3177
|
+
"\u641C\u7D22\u547D\u4EE4\u2026": "Search commands\u2026",
|
|
3178
|
+
"\u641C\u7D22\u547D\u4EE4": "Search commands",
|
|
3179
|
+
"\u5DF2\u9009 {count} \u9879": "{count} selected",
|
|
3180
|
+
"\u6062\u590D\u9ED8\u8BA4": "Restore defaults",
|
|
3181
|
+
"\u5168\u90E8\u547D\u4EE4": "All commands",
|
|
3182
|
+
"\u5B8C\u6210": "Done",
|
|
3183
|
+
"/new \u65B0\u4F1A\u8BDD": "/new New session",
|
|
3184
|
+
"/stop \u505C\u6B62\u4EFB\u52A1": "/stop Stop task",
|
|
3185
|
+
"/help \u5E2E\u52A9": "/help Help",
|
|
3186
|
+
"/status \u8FDE\u63A5\u72B6\u6001": "/status Connection status",
|
|
3187
|
+
"/compact \u538B\u7F29\u4E0A\u4E0B\u6587": "/compact Compact context",
|
|
3188
|
+
"/clear \u6E05\u7A7A\u4E0A\u4E0B\u6587": "/clear Clear context",
|
|
3189
|
+
"/m \u6216 /menu \u83DC\u5355": "/m or /menu Menu",
|
|
3190
|
+
"/version \u7248\u672C": "/version Version",
|
|
3191
|
+
"/models \u6A21\u578B\u5217\u8868": "/models Model list",
|
|
3192
|
+
"/model \u6A21\u578B\u5207\u6362": "/model Switch model",
|
|
3193
|
+
"/reasonings \u63A8\u7406\u7B49\u7EA7": "/reasonings Reasoning levels",
|
|
3194
|
+
"/reasoning \u63A8\u7406\u7B49\u7EA7\u5207\u6362": "/reasoning Switch reasoning level",
|
|
3195
|
+
"/presets \u9884\u8BBE\u5217\u8868": "/presets Preset list",
|
|
3196
|
+
"/preset \u9884\u8BBE\u5207\u6362": "/preset Switch preset",
|
|
3197
|
+
"/permissionlist \u6743\u9650\u5217\u8868": "/permissionlist Permission list",
|
|
3198
|
+
"/permission \u6743\u9650\u5207\u6362": "/permission Switch permission",
|
|
3199
|
+
"/history \u5386\u53F2\u6D88\u606F": "/history Message history",
|
|
3200
|
+
"/workspace \u5DE5\u4F5C\u533A": "/workspace Workspace",
|
|
3201
|
+
"/workspaces \u5DE5\u4F5C\u533A\u5217\u8868": "/workspaces Workspace list",
|
|
3202
|
+
"/sessionlist \u4F1A\u8BDD\u5217\u8868": "/sessionlist Session list",
|
|
3203
|
+
"/session \u7ED1\u5B9A\u4F1A\u8BDD": "/session Bind session",
|
|
3204
|
+
"/batch \u6279\u91CF\u8F93\u5165": "/batch Batch input",
|
|
3205
|
+
"/send \u53D1\u9001\u6279\u91CF": "/send Send batch",
|
|
3206
|
+
"/cancel \u53D6\u6D88\u6279\u91CF": "/cancel Cancel batch",
|
|
3207
|
+
"/steer \u8865\u5145\u6307\u4EE4": "/steer Add instruction",
|
|
3208
|
+
"/repair \u4FEE\u590D": "/repair Repair",
|
|
3050
3209
|
"\u67E5\u770B\u8BBF\u95EE\u6743\u9650\u8BF4\u660E": "View access permission details",
|
|
3051
3210
|
"\u5141\u8BB8\u6240\u6709\u7528\u6237": "Allow all users",
|
|
3052
3211
|
"\u4EC5\u767D\u540D\u5355\u7528\u6237": "Allowlisted users only",
|
|
@@ -3113,6 +3272,7 @@ var EN = Object.freeze({
|
|
|
3113
3272
|
"dsh-im 4.25.0 \u652F\u6301\u5230 DSH v0.1.6-alpha.2\u3002": "dsh-im 4.25.0 supports DSH up to v0.1.6-alpha.2.",
|
|
3114
3273
|
"dsh-im 4.39.0 \u4EC5\u652F\u6301 DSH 0.2.0-rc.2\u3002": "dsh-im 4.39.0 only supports DSH 0.2.0-rc.2.",
|
|
3115
3274
|
"dsh-im 5.0.0 \u4EC5\u652F\u6301 DSH 0.2.1-rc.2\u3002": "dsh-im 5.0.0 only supports DSH 0.2.1-rc.2.",
|
|
3275
|
+
"dsh-im 5.10.0 \u8D77\u652F\u6301 DSH 0.2.2-rc.5\u3002": "dsh-im 5.10.0 and later support DSH 0.2.2-rc.5.",
|
|
3116
3276
|
"\u91CD\u65B0\u68C0\u67E5": "Check again",
|
|
3117
3277
|
"\u5237\u65B0\u72B6\u6001": "Refresh status",
|
|
3118
3278
|
"\u624B\u5DE5\u66F4\u65B0": "Manual update",
|
|
@@ -3479,6 +3639,7 @@ var EN = Object.freeze({
|
|
|
3479
3639
|
"\u67E5\u770B\u6A21\u578B\u8BBE\u7F6E\u8BF4\u660E": "View model setting help",
|
|
3480
3640
|
"\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B": "Follow the default model",
|
|
3481
3641
|
"\u6A21\u578B\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not update the model. Try again.",
|
|
3642
|
+
"\u65E0\u6CD5\u8BFB\u53D6\u6240\u9009\u6A21\u578B\u7684\u5217\u8868\uFF0C\u6A21\u578B\u8BBE\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not load the selected model\u2019s catalog. The model setting was not saved. Try again.",
|
|
3482
3643
|
"\u6A21\u578B\u65E0\u6548\u3002": "The model is invalid.",
|
|
3483
3644
|
"\u6A21\u578B\u4E0D\u5B58\u5728\u6216\u4E0D\u53EF\u7528\u3002": "The model does not exist or is unavailable.",
|
|
3484
3645
|
"\u5F53\u524D\u6A21\u578B\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u6A21\u578B\u6216\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B\u3002": "The current model is unavailable. Choose another model or follow the default.",
|
|
@@ -3963,6 +4124,7 @@ var EN = Object.freeze({
|
|
|
3963
4124
|
"\u5148\u5728\u5BF9\u5E94\u5E73\u53F0\u4E0E\u673A\u5668\u4EBA\u804A\u4E00\u6761\u6D88\u606F\uFF0C\u518D\u5237\u65B0\u3002": "Send the bot a message on the platform, then refresh.",
|
|
3964
4125
|
"\u5DF2\u6DFB\u52A0": "Added",
|
|
3965
4126
|
"\u624B\u52A8\u586B\u5199\uFF08\u9AD8\u7EA7\uFF09": "Enter manually (advanced)",
|
|
4127
|
+
"\u76EE\u6807\u662F\u7EC6\u7C92\u5EA6\u8BBE\u7F6E\uFF1A\u67D0\u4E2A\u673A\u5668\u4EBA\u4E00\u65E6\u914D\u7F6E\u4E86\u76EE\u6807\uFF08\u54EA\u6015\u5173\u95ED\u4F1A\u8BDD\u540C\u6B65\uFF09\uFF0C\u8BE5\u673A\u5668\u4EBA\u7684\u6295\u9012\u5C31\u6309\u76EE\u6807\u8D70\u3002\u5982\u9700\u4F7F\u7528\u300C\u901A\u7528\u8BBE\u7F6E \u2192 \u6295\u9012\u300D\u91CC\u7684\u7B80\u5355\u5F00\u5173\uFF0C\u8BF7\u5148\u5220\u9664\u8BE5\u673A\u5668\u4EBA\u7684\u5168\u90E8\u76EE\u6807\u3002": "Targets are a fine-grained setting: once a bot has any target (even with session sync off), delivery for that bot follows the targets. To use the simple switches under General settings \u2192 Delivery, delete all of that bot\u2019s targets first.",
|
|
3966
4128
|
"\u6D4B\u8BD5\u6D88\u606F\u5DF2\u53D1\u9001\uFF0C\u8BF7\u5230\u76EE\u6807\u4F1A\u8BDD\u786E\u8BA4\u3002": "Test message sent. Confirm it in the target conversation.",
|
|
3967
4129
|
"\u6D4B\u8BD5\u53D1\u9001\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "Test delivery failed. Try again later.",
|
|
3968
4130
|
"\u5DF2\u590D\u5236\u8C03\u7528\u53C2\u6570": "Call parameters copied",
|
|
@@ -4016,6 +4178,15 @@ var EN = Object.freeze({
|
|
|
4016
4178
|
"\u5C06\u65B0\u6D88\u606F\u8865\u5145\u5230\u5F53\u524D\u4EFB\u52A1": "Add new messages to the current task",
|
|
4017
4179
|
"\u65E0\u6CD5\u8BFB\u53D6\u6D88\u606F\u5904\u7406\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "Could not read message handling settings. Try again later.",
|
|
4018
4180
|
"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u6D88\u606F\u5904\u7406\u65B9\u5F0F\u3002": "Choose a valid message handling mode.",
|
|
4181
|
+
"\u6295\u9012\u5185\u5BB9": "Reply content",
|
|
4182
|
+
"\u8FC7\u7A0B\u6B63\u6587": "Process prose",
|
|
4183
|
+
"\u5DE5\u5177\u6B65\u9AA4": "Tool steps",
|
|
4184
|
+
"\u601D\u8003\u8FC7\u7A0B": "Reasoning",
|
|
4185
|
+
"\u6700\u7EC8\u56DE\u7B54\u59CB\u7EC8\u53D1\u9001\uFF1B\u5173\u95ED\u7684\u9879\u4E0D\u518D\u63A8\u9001\u3002": "The final answer is always sent; switched-off parts are not pushed.",
|
|
4186
|
+
"\u6B63\u5728\u6267\u884C\u65F6\u52A9\u624B\u7684\u8BF4\u660E\u6587\u5B57": "What the assistant writes while working",
|
|
4187
|
+
"\u5DE5\u5177\u8C03\u7528\u3001\u7ED3\u679C\u4E0E\u5931\u8D25\u63D0\u793A": "Tool calls, results and failures",
|
|
4188
|
+
"\u6A21\u578B\u7684\u63A8\u7406\u8FC7\u7A0B\uFF08\u6E20\u9053\u652F\u6301\u65F6\uFF09": "The model's reasoning, where the channel shows it",
|
|
4189
|
+
"\u8BF7\u9009\u62E9\u8981\u6295\u9012\u7684\u56DE\u590D\u5185\u5BB9\u3002": "Choose which parts of the reply to deliver.",
|
|
4019
4190
|
"\u901A\u7528\u8BBE\u7F6E": "General settings",
|
|
4020
4191
|
"\u901A\u7528\u8BBE\u7F6E\u5206\u7C7B": "General settings categories",
|
|
4021
4192
|
"\u9644\u4EF6": "Attachments",
|
|
@@ -4147,6 +4318,59 @@ var EN = Object.freeze({
|
|
|
4147
4318
|
"\u7531\u6388\u6743\u7ED3\u679C\u81EA\u52A8\u586B\u5165\uFF0C\u65E0\u9700\u624B\u5DE5\u586B\u5199\u3002": "Filled in from the authorization; no need to type it.",
|
|
4148
4319
|
"\u5237\u65B0\u4F1A\u8BDD\u5217\u8868": "Refresh the session list",
|
|
4149
4320
|
"\u817E\u8BAF Agent \u90AE\u7BB1\u9700\u8981\u5FAE\u4FE1\u626B\u7801\u6388\u6743\u3002\u70B9\u4E0B\u9762\u7684\u6309\u94AE\u751F\u6210\u6388\u6743\u94FE\u63A5\uFF0C\u5728\u6253\u5F00\u7684\u9875\u9762\u91CC\u7528\u5FAE\u4FE1\u626B\u7801\u767B\u5F55\u5E76\u786E\u8BA4\u3002": "The Tencent Agent mailbox authorizes with a WeChat QR code. Generate an authorization link, then scan it with WeChat on the page that opens and confirm.",
|
|
4321
|
+
"\u6295\u9012": "Delivery",
|
|
4322
|
+
"\u4F1A\u8BDD\u540C\u6B65": "Session sync",
|
|
4323
|
+
"\u53EA\u5BF9\u5DF2\u5F00\u542F\u4F1A\u8BDD\u540C\u6B65\u7684\u76EE\u6807\u751F\u6548\uFF1A\u5728 Web GUI \u91CC\u8F93\u5165\u7684\u56DE\u5408\u3001\u5B9A\u65F6\u63D0\u9192\u3001\u5B50\u4EE3\u7406\u901A\u77E5\u7B49\u201C\u4E0D\u662F\u672C\u804A\u5929\u53D1\u8D77\u201D\u7684\u56DE\u5408\uFF0C\u5176\u56DE\u7B54\u4F1A\u8F6C\u53D1\u5230\u8FD9\u4E9B\u76EE\u6807\u3002\u6D88\u606F\u8BED\u8A00\u540C\u65F6\u5F71\u54CD\u673A\u5668\u4EBA\u53D1\u9001\u7684\u547D\u4EE4\u83DC\u5355\u6587\u672C\u3002": "Applies to targets with Session sync turned on: answers of turns this chat did not start (Web GUI input, schedule reminders, subagent notices) are forwarded to those targets. The message language also changes the command menus the bot sends.",
|
|
4324
|
+
"\u67E5\u770B\u4F1A\u8BDD\u540C\u6B65\u8BF4\u660E": "Show Session sync help",
|
|
4325
|
+
"\u63D2\u4EF6\u6D88\u606F\u8BED\u8A00": "Plugin message language",
|
|
4326
|
+
"\u8DDF\u968F DSH \u754C\u9762\u8BED\u8A00": "Same as the DSH interface",
|
|
4327
|
+
"\u4E2D\u6587": "\u4E2D\u6587",
|
|
4328
|
+
"English": "English",
|
|
4329
|
+
"\u0420\u0443\u0441\u0441\u043A\u0438\u0439": "\u0420\u0443\u0441\u0441\u043A\u0438\u0439",
|
|
4330
|
+
"\u955C\u50CF Web \u4E2D\u8F93\u5165\u7684\u6D88\u606F": "Mirror messages typed in the Web UI",
|
|
4331
|
+
"\u8F93\u5165\u524D\u7F00\u56FE\u6807": "Input prefix icon",
|
|
4332
|
+
"\u6295\u9012\u6A21\u578B\u56DE\u7B54": "Deliver model answers",
|
|
4333
|
+
"\u56DE\u7B54\u524D\u7F00\u56FE\u6807": "Answer prefix icon",
|
|
4334
|
+
"\u6700\u591A 32 \u4E2A\u5B57\u7B26\uFF1B\u7559\u7A7A\u5219\u4E0D\u6DFB\u52A0\u524D\u7F00\u3002": "Up to 32 characters; leave it empty for no prefix.",
|
|
4335
|
+
"\u4FDD\u5B58\u6295\u9012\u8BBE\u7F6E": "Save delivery settings",
|
|
4336
|
+
"\u6B63\u5728\u8BFB\u53D6\u6295\u9012\u8BBE\u7F6E\u2026": "Loading delivery settings\u2026",
|
|
4337
|
+
"\u6295\u9012\u540C\u6B65\u8BBE\u7F6E\u901A\u9053\u4E0D\u53EF\u7528\u3002": "The delivery sync settings channel is unavailable.",
|
|
4338
|
+
"\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002": "The delivery settings returned an unrecognized response.",
|
|
4339
|
+
"\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "Could not load or save the delivery settings. Try again later.",
|
|
4340
|
+
"\u65E0\u6548\u7684\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF1A\u5F00\u5173\u5FC5\u987B\u662F\u5E03\u5C14\u503C\uFF0C\u56FE\u6807\u662F\u4E0D\u8D85\u8FC7 32 \u4E2A\u5B57\u7B26\u7684\u6587\u672C\u3002": "Invalid delivery settings: a switch must be a boolean and an icon is text of at most 32 characters.",
|
|
4341
|
+
"\u53EA\u5BF9\u5DF2\u5F00\u542F\u4F1A\u8BDD\u540C\u6B65\u7684\u76EE\u6807\u751F\u6548\uFF1B\u6D88\u606F\u8BED\u8A00\u540C\u65F6\u5F71\u54CD\u673A\u5668\u4EBA\u53D1\u9001\u7684\u547D\u4EE4\u83DC\u5355\u6587\u672C\u3002": "Applies to targets with Session sync turned on; the message language also changes the command menus the bot sends.",
|
|
4342
|
+
"\u9ED8\u8BA4\u8DDF\u968F DSH \u754C\u9762\u8BED\u8A00\uFF1B\u53EF\u4EE5\u5355\u72EC\u56FA\u5B9A\u673A\u5668\u4EBA\u6D88\u606F\u7684\u8BED\u8A00\u3002": "Follows the DSH interface language by default; you can pin the language of the bot messages separately.",
|
|
4343
|
+
"\u8BED\u8A00\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002": "The language setting is unavailable.",
|
|
4344
|
+
"\u5728 Web GUI \u4E2D\u53D1\u9001\u7684\u6D88\u606F\u4F1A\u4F5C\u4E3A\u4E00\u6761\u5E26\u524D\u7F00\u7684\u6D88\u606F\u8F6C\u53D1\u5230\u672C\u804A\u5929\u7684\u4F1A\u8BDD\u540C\u6B65\u76EE\u6807\u3002": "A message sent in the Web GUI is forwarded to the Session sync target of this chat, prefixed with the icon.",
|
|
4345
|
+
"\u5176\u4ED6\u56DE\u5408\uFF08Web \u8F93\u5165\u3001\u5B9A\u65F6\u63D0\u9192\u3001\u5B50\u4EE3\u7406\u901A\u77E5\u7B49\uFF09\u7684\u6A21\u578B\u56DE\u7B54\u4F1A\u53D1\u9001\u5230\u4F1A\u8BDD\u540C\u6B65\u76EE\u6807\u3002": "Model answers of other turns (Web input, schedule reminders, subagent notices and so on) are sent to the Session sync target.",
|
|
4346
|
+
"\u5FAE\u4FE1\u5BA2\u670D": "WeCom Customer Service",
|
|
4347
|
+
"\u6D4F\u89C8\u5668\u672A\u5141\u8BB8\u8BBF\u95EE\u526A\u8D34\u677F": "The browser did not allow clipboard access",
|
|
4348
|
+
"\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.channels\uFF0C\u8BF7\u68C0\u67E5 dsh-im host \u662F\u5426\u5DF2\u91CD\u8F7D": "The Host response is missing value.channels. Reload the dsh-im Host and try again.",
|
|
4349
|
+
"\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.messages\uFF0C\u8BF7\u68C0\u67E5 dsh-im host \u662F\u5426\u5DF2\u91CD\u8F7D": "The Host response is missing value.messages. Reload the dsh-im Host and try again.",
|
|
4350
|
+
"\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.messages": "The Host response is missing value.messages",
|
|
4351
|
+
"\u67E5\u770B\u8BE5\u4F1A\u8BDD\u7684\u7528\u6237\u4E0E\u52A9\u624B\u6B63\u6587": "View the user and assistant messages in this session",
|
|
4352
|
+
"\u590D\u5236\u5931\u8D25": "Copy failed",
|
|
4353
|
+
"\u590D\u5236 ID": "Copy ID",
|
|
4354
|
+
"\u901A\u9053 / \u4F1A\u8BDD\u952E": "Channel / conversation key",
|
|
4355
|
+
"DSH \u4F1A\u8BDD ID": "DSH session ID",
|
|
4356
|
+
"\u64CD\u4F5C": "Actions",
|
|
4357
|
+
"\u52A9\u624B": "Assistant",
|
|
4358
|
+
"\u672C\u6761\u6D88\u606F\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD\u3002": "This message was too long and has been truncated.",
|
|
4359
|
+
"\u4F1A\u8BDD\u5185\u5BB9": "Session content",
|
|
4360
|
+
"\u53EA\u8BFB\u663E\u793A\u7528\u6237\u4E0E\u52A9\u624B\u6B63\u6587\uFF1B\u7CFB\u7EDF\u63D0\u793A\u3001\u5DE5\u5177\u8C03\u7528\u548C\u5185\u90E8\u63A8\u7406\u4E0D\u663E\u793A\u3002": "Read-only user and assistant messages. System prompts, tool calls, and internal reasoning are hidden.",
|
|
4361
|
+
"\u8FD4\u56DE\u5217\u8868": "Back to list",
|
|
4362
|
+
"\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F": "Load earlier messages",
|
|
4363
|
+
"\u52A0\u8F7D\u4E2D\u2026": "Loading\u2026",
|
|
4364
|
+
"\u6CA1\u6709\u53EF\u663E\u793A\u7684\u7528\u6237\u6216\u52A9\u624B\u6B63\u6587\u3002": "No user or assistant messages to display.",
|
|
4365
|
+
"\u4F1A\u8BDD\u8BB0\u5F55": "Session history",
|
|
4366
|
+
"\u8FD4\u56DE IM\u673A\u5668\u4EBA": "Back to IM bots",
|
|
4367
|
+
"\u53EA\u8BFB\u5217\u51FA\u5404 IM \u901A\u9053\u5F53\u524D\u7ED1\u5B9A\u7684 DSH \u4F1A\u8BDD\uFF1B\u70B9\u51FB\u4F1A\u8BDD ID \u67E5\u770B\u6B63\u6587\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u7ED1\u5B9A\u3002": "Read-only list of DSH sessions bound to each IM channel. Select a session ID to view its messages; bindings are not changed.",
|
|
4368
|
+
"\u6B63\u5728\u8BFB\u53D6\u901A\u9053\u4F1A\u8BDD\u2026": "Loading channel sessions\u2026",
|
|
4369
|
+
"\u5C1A\u672A\u53D1\u73B0\u5DF2\u7ED1\u5B9A DSH \u4F1A\u8BDD\u7684\u901A\u9053\u3002": "No channels with bound DSH sessions were found.",
|
|
4370
|
+
"limit \u6216 offset \u53C2\u6570\u65E0\u6548": "The limit or offset parameter is invalid",
|
|
4371
|
+
"\u8BE5\u4F1A\u8BDD\u4E0D\u5C5E\u4E8E\u6307\u5B9A\u901A\u9053\u7ED1\u5B9A\uFF0C\u53EF\u80FD\u5DF2\u89E3\u7ED1": "The session is not bound to the specified channel, or the binding was removed",
|
|
4372
|
+
"\u5BBF\u4E3B sessionQuery \u670D\u52A1\u5C1A\u672A\u5C31\u7EEA": "The Host sessionQuery service is not ready",
|
|
4373
|
+
"\u8BE5\u4F1A\u8BDD\u6682\u65F6\u65E0\u6CD5\u8BFB\u53D6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002": "The session cannot be read right now. Try again later.",
|
|
4150
4374
|
"\u8BF7\u6C42\u5931\u8D25": "The request failed"
|
|
4151
4375
|
});
|
|
4152
4376
|
var en = EN;
|
|
@@ -4274,16 +4498,16 @@ var DYNAMIC_PHRASES = Object.freeze([
|
|
|
4274
4498
|
["\u8FDE\u63A5\u72B6\u6001", "connection status", "\u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F"],
|
|
4275
4499
|
["\u4E8C\u7EF4\u7801", "QR code", "QR-\u043A\u043E\u0434"]
|
|
4276
4500
|
]);
|
|
4277
|
-
function translateDynamic(
|
|
4278
|
-
if (locale === "zh") return
|
|
4501
|
+
function translateDynamic(text9, locale = imLocale()) {
|
|
4502
|
+
if (locale === "zh") return text9;
|
|
4279
4503
|
const column = locale === "ru" ? "ru" : "en";
|
|
4280
4504
|
for (const rule of DYNAMIC_RULES) {
|
|
4281
|
-
const match = rule.pattern.exec(
|
|
4505
|
+
const match = rule.pattern.exec(text9);
|
|
4282
4506
|
if (!match) continue;
|
|
4283
4507
|
return (rule[column] ?? rule.en)(match);
|
|
4284
4508
|
}
|
|
4285
4509
|
const at = column === "ru" ? 2 : 1;
|
|
4286
|
-
let output =
|
|
4510
|
+
let output = text9;
|
|
4287
4511
|
for (const row of DYNAMIC_PHRASES) output = output.replaceAll(row[0], row[at]);
|
|
4288
4512
|
return output;
|
|
4289
4513
|
}
|
|
@@ -4535,13 +4759,13 @@ var DIAGNOSTIC_MESSAGE_EMAIL = /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+/u;
|
|
|
4535
4759
|
var DIAGNOSTIC_MESSAGE_OPAQUE = /\b[A-Za-z0-9_\-+/=]{32,}\b/u;
|
|
4536
4760
|
function safeDiagnosticMessage(value) {
|
|
4537
4761
|
if (typeof value !== "string") return void 0;
|
|
4538
|
-
const
|
|
4539
|
-
if (!/^[\x20-\x7e]+$/u.test(
|
|
4540
|
-
if (!DIAGNOSTIC_MESSAGE_SHAPES.some((shape) => shape.test(
|
|
4541
|
-
if (DIAGNOSTIC_MESSAGE_DENY.test(
|
|
4542
|
-
if (DIAGNOSTIC_MESSAGE_URL.test(
|
|
4543
|
-
if (DIAGNOSTIC_MESSAGE_OPAQUE.test(
|
|
4544
|
-
return
|
|
4762
|
+
const text9 = value.replace(/[\u0000-\u001f\u007f]/gu, " ").replace(/\s+/gu, " ").trim();
|
|
4763
|
+
if (!/^[\x20-\x7e]+$/u.test(text9)) return void 0;
|
|
4764
|
+
if (!DIAGNOSTIC_MESSAGE_SHAPES.some((shape) => shape.test(text9))) return void 0;
|
|
4765
|
+
if (DIAGNOSTIC_MESSAGE_DENY.test(text9)) return void 0;
|
|
4766
|
+
if (DIAGNOSTIC_MESSAGE_URL.test(text9) || DIAGNOSTIC_MESSAGE_EMAIL.test(text9)) return void 0;
|
|
4767
|
+
if (DIAGNOSTIC_MESSAGE_OPAQUE.test(text9)) return void 0;
|
|
4768
|
+
return text9;
|
|
4545
4769
|
}
|
|
4546
4770
|
function normalizeDiagnosticDetails(value) {
|
|
4547
4771
|
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
@@ -4582,7 +4806,7 @@ function normalizeDiagnosticDetails(value) {
|
|
|
4582
4806
|
if (typeof value.occurredAt === "string" && /^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d{3}Z$/.test(value.occurredAt) && Number.isFinite(Date.parse(value.occurredAt))) result2.occurredAt = value.occurredAt;
|
|
4583
4807
|
if (Number.isInteger(value.httpStatus) && value.httpStatus >= 100 && value.httpStatus <= 599) result2.httpStatus = value.httpStatus;
|
|
4584
4808
|
const provider = typeof value.providerCode === "number" && Number.isSafeInteger(value.providerCode) ? String(value.providerCode) : value.providerCode;
|
|
4585
|
-
if (typeof provider === "string" && /^-?\d{1,12}
|
|
4809
|
+
if (typeof provider === "string" && (/^-?\d{1,12}$/u.test(provider) || /^[A-Z][A-Z0-9_]{1,63}$/u.test(provider))) result2.providerCode = provider;
|
|
4586
4810
|
if (typeof value.pluginVersion === "string" && /^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/.test(value.pluginVersion) && value.pluginVersion.length <= 64) result2.pluginVersion = value.pluginVersion;
|
|
4587
4811
|
if (["succeeded", "failed", "not-attempted", "unknown"].includes(value.rollback)) result2.rollback = value.rollback;
|
|
4588
4812
|
if (typeof value.causeMessage === "string") {
|
|
@@ -4712,7 +4936,7 @@ function ConnectionError({ error: value, warning = false, showMessage = true })
|
|
|
4712
4936
|
["\u53C2\u8003\u53F7", details.referenceId],
|
|
4713
4937
|
["\u53D1\u751F\u65F6\u95F4", details.occurredAt],
|
|
4714
4938
|
["\u63D2\u4EF6\u7248\u672C", details.pluginVersion]
|
|
4715
|
-
].filter(([,
|
|
4939
|
+
].filter(([, text9]) => text9 !== void 0 && text9 !== "");
|
|
4716
4940
|
return h2(
|
|
4717
4941
|
"div",
|
|
4718
4942
|
{ className: "dim-connectionDiagnostic", "data-connection-diagnostic": true, "data-weixin-diagnostic": details.channel === "weixin" || /^WX-CONN/.test(details.referenceId ?? "") || void 0, role: isWarning ? "status" : void 0, "data-warning": isWarning || void 0 },
|
|
@@ -4725,9 +4949,9 @@ function ConnectionError({ error: value, warning = false, showMessage = true })
|
|
|
4725
4949
|
h2(
|
|
4726
4950
|
"dl",
|
|
4727
4951
|
{ style: { display: "grid", gridTemplateColumns: "auto minmax(0, 1fr)", gap: "4px 12px", margin: "10px 0" } },
|
|
4728
|
-
...fields.flatMap(([label,
|
|
4952
|
+
...fields.flatMap(([label, text9]) => [
|
|
4729
4953
|
h2("dt", { key: `${label}-label` }, label),
|
|
4730
|
-
React3.createElement("dd", { key: label, style: { margin: 0, overflowWrap: "anywhere" } }, String(
|
|
4954
|
+
React3.createElement("dd", { key: label, style: { margin: 0, overflowWrap: "anywhere" } }, String(text9))
|
|
4731
4955
|
])
|
|
4732
4956
|
),
|
|
4733
4957
|
!details.referenceId ? h2("p", null, "\u672A\u53D6\u5F97 Host \u8BCA\u65AD\u53C2\u8003\u53F7\u3002") : null,
|
|
@@ -4753,15 +4977,15 @@ function ConnectionError({ error: value, warning = false, showMessage = true })
|
|
|
4753
4977
|
}
|
|
4754
4978
|
function normalizeConnectionError(value, fallbackCode = "operation-failed", fallbackMessage = "\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u67E5\u770B\u539F\u56E0\u548C\u8BCA\u65AD\u8BE6\u60C5\u3002") {
|
|
4755
4979
|
const source = value && typeof value === "object" ? value : {};
|
|
4756
|
-
const
|
|
4980
|
+
const text9 = (v, fallback, n) => typeof v === "string" && v.trim() ? v.trim().slice(0, n) : fallback;
|
|
4757
4981
|
const details = normalizeDiagnosticDetails({
|
|
4758
4982
|
...source.details,
|
|
4759
4983
|
referenceId: source.details?.referenceId ?? source.referenceId,
|
|
4760
4984
|
hint: source.details?.hint ?? source.hint
|
|
4761
4985
|
});
|
|
4762
4986
|
return {
|
|
4763
|
-
code:
|
|
4764
|
-
message:
|
|
4987
|
+
code: text9(source.code, fallbackCode, 100),
|
|
4988
|
+
message: text9(source.message, fallbackMessage, 500),
|
|
4765
4989
|
...Object.keys(details).length ? { details } : {},
|
|
4766
4990
|
...source.hint ? { hint: details.hint } : {},
|
|
4767
4991
|
...source.referenceId ? { referenceId: details.referenceId } : {}
|
|
@@ -5081,7 +5305,8 @@ function ModelEditor({ model = null, disabled = false, onSave }) {
|
|
|
5081
5305
|
await onSave?.(next);
|
|
5082
5306
|
close(true);
|
|
5083
5307
|
} catch (cause) {
|
|
5084
|
-
setError(cause
|
|
5308
|
+
setError(normalizeConnectionError(cause, "model-update-failed", "\u6A21\u578B\u4FEE\u6539\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002"));
|
|
5309
|
+
close(true);
|
|
5085
5310
|
} finally {
|
|
5086
5311
|
savingRef.current = false;
|
|
5087
5312
|
setSaving(false);
|
|
@@ -5183,6 +5408,7 @@ function ModelEditor({ model = null, disabled = false, onSave }) {
|
|
|
5183
5408
|
saving ? h2("span", { className: "dim-presetStatus", role: "status" }, "\u4FDD\u5B58\u4E2D\u2026") : null
|
|
5184
5409
|
),
|
|
5185
5410
|
row("model", "\u6A21\u578B", entry?.name ?? (current ? modelSelectionId(current) : localizeText("\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B"))),
|
|
5411
|
+
error ? h2("div", { role: "alert" }, h2(ConnectionError, { error })) : null,
|
|
5186
5412
|
row("effort", "\u601D\u8003\u5F3A\u5EA6", effortLabel, effortDisabled),
|
|
5187
5413
|
pane ? h2(
|
|
5188
5414
|
"div",
|
|
@@ -5233,10 +5459,10 @@ function ModelEditor({ model = null, disabled = false, onSave }) {
|
|
|
5233
5459
|
className: "dim-modelHint",
|
|
5234
5460
|
role: "status"
|
|
5235
5461
|
}, effortHint) : null,
|
|
5236
|
-
error
|
|
5462
|
+
!error && !currentAvailable ? h2(
|
|
5237
5463
|
"p",
|
|
5238
|
-
{ className: "dim-presetError", role:
|
|
5239
|
-
|
|
5464
|
+
{ className: "dim-presetError", role: "status" },
|
|
5465
|
+
"\u5F53\u524D\u6A21\u578B\u5DF2\u4E0D\u53EF\u7528\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u6A21\u578B\u6216\u8DDF\u968F\u9ED8\u8BA4\u6A21\u578B\u3002"
|
|
5240
5466
|
) : null
|
|
5241
5467
|
);
|
|
5242
5468
|
}
|
|
@@ -5263,9 +5489,12 @@ var ACCESS_POLICY_CONVERSATION_TYPES = Object.freeze(["direct", "group"]);
|
|
|
5263
5489
|
var ACCESS_POLICY_USER_ID_MAX_LENGTH = 256;
|
|
5264
5490
|
var POLICY_KEYS = ["direct", "group"];
|
|
5265
5491
|
var SCOPE_KEYS = ["mode", "open", "allowlist"];
|
|
5266
|
-
var OPEN_KEYS = ["defaultCanExecuteCommands", "commandPermissionOverrides"];
|
|
5492
|
+
var OPEN_KEYS = ["defaultCanExecuteCommands", "commandPermissionOverrides", "commandAllowlist"];
|
|
5493
|
+
var OPEN_REQUIRED_KEYS = ["defaultCanExecuteCommands", "commandPermissionOverrides"];
|
|
5267
5494
|
var ALLOWLIST_KEYS = ["users"];
|
|
5268
|
-
var USER_KEYS = ["id", "canExecuteCommands"];
|
|
5495
|
+
var USER_KEYS = ["id", "canExecuteCommands", "commandAllowlist"];
|
|
5496
|
+
var USER_REQUIRED_KEYS = ["id", "canExecuteCommands"];
|
|
5497
|
+
var COMMAND_ALLOWLIST_LIMIT = 100;
|
|
5269
5498
|
var CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f\u202a-\u202e\u2066-\u2069]/;
|
|
5270
5499
|
function invalidAccessPolicy(message) {
|
|
5271
5500
|
const error = new TypeError(message);
|
|
@@ -5275,6 +5504,31 @@ function invalidAccessPolicy(message) {
|
|
|
5275
5504
|
function hasExactKeys(input, keys) {
|
|
5276
5505
|
return input && typeof input === "object" && !Array.isArray(input) && [Object.prototype, null].includes(Object.getPrototypeOf(input)) && Reflect.ownKeys(input).length === keys.length && keys.every((key) => Object.hasOwn(input, key));
|
|
5277
5506
|
}
|
|
5507
|
+
function hasAllowedKeys(input, required, optional = []) {
|
|
5508
|
+
if (!input || typeof input !== "object" || Array.isArray(input) || ![Object.prototype, null].includes(Object.getPrototypeOf(input))) return false;
|
|
5509
|
+
const keys = Reflect.ownKeys(input);
|
|
5510
|
+
return required.every((key) => Object.hasOwn(input, key)) && keys.every((key) => required.includes(key) || optional.includes(key));
|
|
5511
|
+
}
|
|
5512
|
+
function normalizeCommandName(value) {
|
|
5513
|
+
if (typeof value !== "string") return null;
|
|
5514
|
+
const first = value.trim().split(/\s+/u)[0];
|
|
5515
|
+
if (!first) return null;
|
|
5516
|
+
const name2 = (first.startsWith("/") ? first.slice(1) : first).toLowerCase();
|
|
5517
|
+
return /^[a-z0-9][a-z0-9:_-]{0,63}$/u.test(name2) ? name2 : null;
|
|
5518
|
+
}
|
|
5519
|
+
function validateCommandAllowlist(input, label) {
|
|
5520
|
+
if (input === void 0) return null;
|
|
5521
|
+
if (!Array.isArray(input)) throw invalidAccessPolicy(`${label}\u5FC5\u987B\u662F\u547D\u4EE4\u540D\u6570\u7EC4\u3002`);
|
|
5522
|
+
if (input.length > COMMAND_ALLOWLIST_LIMIT) {
|
|
5523
|
+
throw invalidAccessPolicy(`${label}\u6700\u591A\u5305\u542B ${COMMAND_ALLOWLIST_LIMIT} \u4E2A\u547D\u4EE4\u3002`);
|
|
5524
|
+
}
|
|
5525
|
+
const names = input.map((value) => {
|
|
5526
|
+
const name2 = normalizeCommandName(value);
|
|
5527
|
+
if (!name2) throw invalidAccessPolicy(`${label}\u5305\u542B\u65E0\u6548\u547D\u4EE4\u540D\u3002`);
|
|
5528
|
+
return name2;
|
|
5529
|
+
});
|
|
5530
|
+
return Object.freeze([...new Set(names)]);
|
|
5531
|
+
}
|
|
5278
5532
|
function normalizeAccessPolicyUserId(value) {
|
|
5279
5533
|
if (typeof value === "number") {
|
|
5280
5534
|
if (!Number.isFinite(value)) throw invalidAccessPolicy("\u7528\u6237\u6807\u8BC6\u65E0\u6548\u3002");
|
|
@@ -5290,15 +5544,17 @@ function normalizeAccessPolicyUserId(value) {
|
|
|
5290
5544
|
return id6;
|
|
5291
5545
|
}
|
|
5292
5546
|
function validateAccessPolicyUser(input) {
|
|
5293
|
-
if (!
|
|
5294
|
-
throw invalidAccessPolicy("\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\
|
|
5547
|
+
if (!hasAllowedKeys(input, USER_REQUIRED_KEYS, USER_KEYS)) {
|
|
5548
|
+
throw invalidAccessPolicy("\u7528\u6237\u6761\u76EE\u5FC5\u987B\u5305\u542B\u7528\u6237\u6807\u8BC6\u3001\u547D\u4EE4\u6743\u9650\u548C\u53EF\u9009\u7684\u547D\u4EE4\u767D\u540D\u5355\u3002");
|
|
5295
5549
|
}
|
|
5296
5550
|
if (typeof input.canExecuteCommands !== "boolean") {
|
|
5297
5551
|
throw invalidAccessPolicy("\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");
|
|
5298
5552
|
}
|
|
5553
|
+
const commandAllowlist = validateCommandAllowlist(input.commandAllowlist, "\u7528\u6237\u547D\u4EE4\u767D\u540D\u5355");
|
|
5299
5554
|
return Object.freeze({
|
|
5300
5555
|
id: normalizeAccessPolicyUserId(input.id),
|
|
5301
|
-
canExecuteCommands: input.canExecuteCommands
|
|
5556
|
+
canExecuteCommands: input.canExecuteCommands,
|
|
5557
|
+
...commandAllowlist === null ? {} : { commandAllowlist }
|
|
5302
5558
|
});
|
|
5303
5559
|
}
|
|
5304
5560
|
function validateUsers(input, { listMessage, duplicateMessage }) {
|
|
@@ -5310,8 +5566,8 @@ function validateUsers(input, { listMessage, duplicateMessage }) {
|
|
|
5310
5566
|
return Object.freeze(users);
|
|
5311
5567
|
}
|
|
5312
5568
|
function validateOpenSettings(input) {
|
|
5313
|
-
if (!
|
|
5314
|
-
throw invalidAccessPolicy("\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\u3002");
|
|
5569
|
+
if (!hasAllowedKeys(input, OPEN_REQUIRED_KEYS, OPEN_KEYS)) {
|
|
5570
|
+
throw invalidAccessPolicy("\u5F00\u653E\u6A21\u5F0F\u8BBE\u7F6E\u5FC5\u987B\u5B8C\u6574\uFF08\u53EF\u9009\u7684 commandAllowlist \u9664\u5916\uFF09\u3002");
|
|
5315
5571
|
}
|
|
5316
5572
|
if (typeof input.defaultCanExecuteCommands !== "boolean") {
|
|
5317
5573
|
throw invalidAccessPolicy("\u5F00\u653E\u6A21\u5F0F\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650\u5FC5\u987B\u662F\u5E03\u5C14\u503C\u3002");
|
|
@@ -5321,7 +5577,8 @@ function validateOpenSettings(input) {
|
|
|
5321
5577
|
commandPermissionOverrides: validateUsers(input.commandPermissionOverrides, {
|
|
5322
5578
|
listMessage: "\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u5FC5\u987B\u662F\u6570\u7EC4\u3002",
|
|
5323
5579
|
duplicateMessage: "\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u6743\u9650\u8986\u76D6\u7528\u6237\u4E0D\u80FD\u5305\u542B\u91CD\u590D\u7684\u7528\u6237\u6807\u8BC6\u3002"
|
|
5324
|
-
})
|
|
5580
|
+
}),
|
|
5581
|
+
...input.commandAllowlist === void 0 ? {} : { commandAllowlist: validateCommandAllowlist(input.commandAllowlist, "\u5F00\u653E\u6A21\u5F0F\u547D\u4EE4\u767D\u540D\u5355") }
|
|
5325
5582
|
});
|
|
5326
5583
|
}
|
|
5327
5584
|
function validateAllowlistSettings(input) {
|
|
@@ -9281,6 +9538,8 @@ function normalizeFeishuVoiceConfig(value) {
|
|
|
9281
9538
|
var SLASH_COMMAND_MANIFEST = Object.freeze([
|
|
9282
9539
|
{ command: "menu", icon: "skill_outlined", default: "\u6253\u5F00\u529F\u80FD\u83DC\u5355", en_us: "Open the feature menu" },
|
|
9283
9540
|
{ command: "new", icon: "ai-deepthink_outlined", default: "\u5F00\u542F\u5168\u65B0\u4F1A\u8BDD", en_us: "Start a fresh session" },
|
|
9541
|
+
{ command: "fork", icon: "ai-deepthink_outlined", default: "\u4ECE\u5F53\u524D\u4F1A\u8BDD\u5206\u652F\u4E00\u4E2A\u65B0\u4F1A\u8BDD", en_us: "Branch a new session from the current one" },
|
|
9542
|
+
{ command: "reset", icon: "ai-deepthink_outlined", default: "\u91CD\u7F6E\u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587\uFF08\u4FDD\u7559\u4F1A\u8BDD\u7F16\u53F7\uFF09", en_us: "Reset the current session context (keep the number)" },
|
|
9284
9543
|
{ command: "help", icon: "promptword_outlined", default: "\u67E5\u770B\u5E2E\u52A9", en_us: "Show help" },
|
|
9285
9544
|
{ command: "status", icon: "ai-functions_outlined", default: "\u67E5\u770B\u673A\u5668\u4EBA\u72B6\u6001", en_us: "Show bot status" },
|
|
9286
9545
|
{ command: "compact", icon: "ai-block_outlined", default: "\u538B\u7F29\u5F53\u524D\u4F1A\u8BDD\u4E0A\u4E0B\u6587", en_us: "Compact the current session" },
|
|
@@ -9295,6 +9554,14 @@ var SLASH_COMMAND_MANIFEST = Object.freeze([
|
|
|
9295
9554
|
{ command: "workspace", icon: "folder_outlined", default: "\u67E5\u770B\u5E76\u5207\u6362\u5DE5\u4F5C\u533A", en_us: "View and switch workspace" },
|
|
9296
9555
|
{ command: "conv", icon: "folder_outlined", default: "\u8BBE\u7F6E\u5F53\u524D\u5BF9\u8BDD\u4E13\u5C5E\u5DE5\u4F5C\u533A", en_us: "Set the workspace for this conversation" },
|
|
9297
9556
|
{ command: "session", icon: "chat-ai_outlined", default: "\u7ED1\u5B9A\u5DF2\u6709\u4F1A\u8BDD", en_us: "Bind an existing session" },
|
|
9557
|
+
{ command: "sessionarchive", icon: "folder_outlined", default: "\u5F52\u6863\u4E00\u4E2A\u4F1A\u8BDD", en_us: "Archive a session" },
|
|
9558
|
+
{ command: "ls", icon: "chat-ai_outlined", default: "\u5217\u51FA\u672C\u804A\u5929\u4F7F\u7528\u8FC7\u7684\u4F1A\u8BDD\uFF08\u6309\u804A\u5929/\u8BDD\u9898\u9694\u79BB\uFF09", en_us: "List this chat's sessions (per chat / per topic)" },
|
|
9559
|
+
{ command: "go", icon: "chat-ai_outlined", default: "\u5207\u6362\u5230\u6307\u5B9A\u7F16\u53F7\u7684\u4F1A\u8BDD", en_us: "Switch to a session by number" },
|
|
9560
|
+
{ command: "prev", icon: "chat-ai_outlined", default: "\u56DE\u5230\u4E0A\u4E00\u4E2A\u4F1A\u8BDD", en_us: "Go back to the previous session" },
|
|
9561
|
+
{ command: "next", icon: "chat-ai_outlined", default: "\u524D\u8FDB\u5230\u4E0B\u4E00\u4E2A\u4F1A\u8BDD", en_us: "Go forward to the next session" },
|
|
9562
|
+
{ command: "drop", icon: "chat-ai_outlined", default: "\u4ECE\u4F1A\u8BDD\u5217\u8868\u79FB\u9664\u4E00\u6761\u8BB0\u5F55", en_us: "Remove one entry from the session list" },
|
|
9563
|
+
{ command: "title", icon: "chat-ai_outlined", default: "\u67E5\u770B\u6216\u91CD\u547D\u540D\u4F1A\u8BDD\u6807\u9898", en_us: "Show or rename a session title" },
|
|
9564
|
+
{ command: "tail", icon: "chat-ai_outlined", default: "\u9884\u89C8\u6216\u5BFC\u51FA\u4F1A\u8BDD\u5185\u5BB9", en_us: "Preview or export session content" },
|
|
9298
9565
|
{ command: "models", icon: "ai-functions_outlined", default: "\u5217\u51FA\u53EF\u7528\u6A21\u578B", en_us: "List available models" },
|
|
9299
9566
|
{ command: "model", icon: "ai-agent_outlined", default: "\u67E5\u770B\u6216\u5207\u6362\u5F53\u524D\u6A21\u578B", en_us: "Show or switch the current model" },
|
|
9300
9567
|
{ command: "reasoninglist", icon: "ai-deepthink_outlined", default: "\u5217\u51FA\u53EF\u7528\u63A8\u7406\u7B49\u7EA7", en_us: "List available reasoning efforts" },
|
|
@@ -9320,7 +9587,7 @@ var DEFAULT_SLASH_PANEL_CONFIG = Object.freeze({
|
|
|
9320
9587
|
order: Object.freeze([])
|
|
9321
9588
|
});
|
|
9322
9589
|
var MAX_SLASH_PANEL_COMMANDS = 100;
|
|
9323
|
-
function
|
|
9590
|
+
function normalizeCommandName2(value) {
|
|
9324
9591
|
if (typeof value !== "string") return null;
|
|
9325
9592
|
const name2 = value.trim().replace(/^\//u, "").toLowerCase();
|
|
9326
9593
|
return name2 || null;
|
|
@@ -9336,7 +9603,7 @@ function normalizeSlashPanelConfig(value) {
|
|
|
9336
9603
|
const order = [];
|
|
9337
9604
|
const seen = /* @__PURE__ */ new Set();
|
|
9338
9605
|
for (const candidate of Array.isArray(value.order) ? value.order : []) {
|
|
9339
|
-
const name2 =
|
|
9606
|
+
const name2 = normalizeCommandName2(candidate);
|
|
9340
9607
|
if (!name2 || seen.has(name2) || !manifestHas(name2)) continue;
|
|
9341
9608
|
seen.add(name2);
|
|
9342
9609
|
order.push(name2);
|
|
@@ -17778,8 +18045,8 @@ function MailboxPanel({ busy, error, onSubmit, onCancel, rpcCall, endpoints }) {
|
|
|
17778
18045
|
);
|
|
17779
18046
|
}
|
|
17780
18047
|
function shortenSessionId(sessionId) {
|
|
17781
|
-
const
|
|
17782
|
-
return
|
|
18048
|
+
const text9 = String(sessionId ?? "");
|
|
18049
|
+
return text9.length <= 20 ? text9 : `${text9.slice(0, 8)}\u2026${text9.slice(-6)}`;
|
|
17783
18050
|
}
|
|
17784
18051
|
function sessionLabel(session) {
|
|
17785
18052
|
const title = String(session?.title ?? "").trim();
|
|
@@ -18392,7 +18659,8 @@ var MatrixAccountCard = channel6.AccountCard;
|
|
|
18392
18659
|
|
|
18393
18660
|
// src/channels/shared/interface-language.mjs
|
|
18394
18661
|
var LANGUAGE_TAG = /^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$/u;
|
|
18395
|
-
var HOST_LANGUAGE_SOURCES = Object.freeze(["config", "settings", "mirror"]);
|
|
18662
|
+
var HOST_LANGUAGE_SOURCES = Object.freeze(["config", "explicit", "settings", "mirror"]);
|
|
18663
|
+
var MESSAGE_LANGUAGE_TAGS = Object.freeze(["zh", "en", "ru"]);
|
|
18396
18664
|
function normalizeInterfaceLanguageTag(value) {
|
|
18397
18665
|
if (typeof value !== "string") return null;
|
|
18398
18666
|
const trimmed = value.trim();
|
|
@@ -18525,14 +18793,45 @@ var ACCESS_CHANNEL_DEFINITIONS = Object.freeze({
|
|
|
18525
18793
|
groupSupported: false
|
|
18526
18794
|
})
|
|
18527
18795
|
});
|
|
18796
|
+
var DEFAULT_COMMAND_ALLOWLIST = Object.freeze(["new", "stop", "help", "status", "compact", "clear"]);
|
|
18797
|
+
var COMMAND_CHOICES = Object.freeze([
|
|
18798
|
+
["new", "/new \u65B0\u4F1A\u8BDD"],
|
|
18799
|
+
["stop", "/stop \u505C\u6B62\u4EFB\u52A1"],
|
|
18800
|
+
["help", "/help \u5E2E\u52A9"],
|
|
18801
|
+
["status", "/status \u8FDE\u63A5\u72B6\u6001"],
|
|
18802
|
+
["compact", "/compact \u538B\u7F29\u4E0A\u4E0B\u6587"],
|
|
18803
|
+
["clear", "/clear \u6E05\u7A7A\u4E0A\u4E0B\u6587"],
|
|
18804
|
+
["menu", "/m \u6216 /menu \u83DC\u5355"],
|
|
18805
|
+
["version", "/version \u7248\u672C"],
|
|
18806
|
+
["models", "/models \u6A21\u578B\u5217\u8868"],
|
|
18807
|
+
["model", "/model \u6A21\u578B\u5207\u6362"],
|
|
18808
|
+
["reasoninglist", "/reasonings \u63A8\u7406\u7B49\u7EA7"],
|
|
18809
|
+
["reasoning", "/reasoning \u63A8\u7406\u7B49\u7EA7\u5207\u6362"],
|
|
18810
|
+
["presetlist", "/presets \u9884\u8BBE\u5217\u8868"],
|
|
18811
|
+
["preset", "/preset \u9884\u8BBE\u5207\u6362"],
|
|
18812
|
+
["permissionlist", "/permissionlist \u6743\u9650\u5217\u8868"],
|
|
18813
|
+
["permission", "/permission \u6743\u9650\u5207\u6362"],
|
|
18814
|
+
["history", "/history \u5386\u53F2\u6D88\u606F"],
|
|
18815
|
+
["workspace", "/workspace \u5DE5\u4F5C\u533A"],
|
|
18816
|
+
["workspacelist", "/workspaces \u5DE5\u4F5C\u533A\u5217\u8868"],
|
|
18817
|
+
["sessionlist", "/sessionlist \u4F1A\u8BDD\u5217\u8868"],
|
|
18818
|
+
["session", "/session \u7ED1\u5B9A\u4F1A\u8BDD"],
|
|
18819
|
+
["batch", "/batch \u6279\u91CF\u8F93\u5165"],
|
|
18820
|
+
["send", "/send \u53D1\u9001\u6279\u91CF"],
|
|
18821
|
+
["cancel", "/cancel \u53D6\u6D88\u6279\u91CF"],
|
|
18822
|
+
["steer", "/steer \u8865\u5145\u6307\u4EE4"],
|
|
18823
|
+
["repair", "/repair \u4FEE\u590D"]
|
|
18824
|
+
]);
|
|
18528
18825
|
function clonePolicy(policy) {
|
|
18529
18826
|
const cloneScope = (scope) => ({
|
|
18530
18827
|
mode: scope.mode,
|
|
18531
18828
|
open: {
|
|
18532
18829
|
defaultCanExecuteCommands: scope.open.defaultCanExecuteCommands,
|
|
18533
18830
|
commandPermissionOverrides: scope.open.commandPermissionOverrides.map((user) => ({
|
|
18534
|
-
...user
|
|
18535
|
-
|
|
18831
|
+
...user,
|
|
18832
|
+
...user.commandAllowlist === void 0 ? {} : { commandAllowlist: [...user.commandAllowlist] }
|
|
18833
|
+
})),
|
|
18834
|
+
...scope.open.commandAllowlist === void 0 ? {} : { commandAllowlist: [...scope.open.commandAllowlist] }
|
|
18536
18835
|
},
|
|
18537
18836
|
allowlist: {
|
|
18538
18837
|
users: scope.allowlist.users.map((user) => ({ ...user }))
|
|
@@ -18587,6 +18886,37 @@ function ScenePolicyEditor({
|
|
|
18587
18886
|
}
|
|
18588
18887
|
});
|
|
18589
18888
|
const updateUser = (index, patch) => updateUsers(users.map((user, userIndex) => userIndex === index ? { ...user, ...patch } : user));
|
|
18889
|
+
const [commandPickerOpen, setCommandPickerOpen] = React29.useState(false);
|
|
18890
|
+
const [commandQuery, setCommandQuery] = React29.useState("");
|
|
18891
|
+
const commandMode = policy.open.defaultCanExecuteCommands ? "allow" : policy.open.commandAllowlist?.length ? "custom" : "deny";
|
|
18892
|
+
const allowedCommands = new Set(policy.open.commandAllowlist ?? []);
|
|
18893
|
+
const updateOpen = (patch) => onChange({
|
|
18894
|
+
...policy,
|
|
18895
|
+
open: { ...policy.open, ...patch }
|
|
18896
|
+
});
|
|
18897
|
+
const changeCommandMode = (nextMode) => {
|
|
18898
|
+
if (nextMode === "allow") {
|
|
18899
|
+
updateOpen({ defaultCanExecuteCommands: true, commandAllowlist: void 0 });
|
|
18900
|
+
setCommandPickerOpen(false);
|
|
18901
|
+
return;
|
|
18902
|
+
}
|
|
18903
|
+
if (nextMode === "custom") {
|
|
18904
|
+
updateOpen({
|
|
18905
|
+
defaultCanExecuteCommands: false,
|
|
18906
|
+
commandAllowlist: policy.open.commandAllowlist?.length ? [...policy.open.commandAllowlist] : [...DEFAULT_COMMAND_ALLOWLIST]
|
|
18907
|
+
});
|
|
18908
|
+
return;
|
|
18909
|
+
}
|
|
18910
|
+
updateOpen({ defaultCanExecuteCommands: false, commandAllowlist: void 0 });
|
|
18911
|
+
setCommandPickerOpen(false);
|
|
18912
|
+
};
|
|
18913
|
+
const toggleCommand = (name2, checked) => {
|
|
18914
|
+
const next = new Set(allowedCommands);
|
|
18915
|
+
if (checked) next.add(name2);
|
|
18916
|
+
else if (next.size > 1) next.delete(name2);
|
|
18917
|
+
else return;
|
|
18918
|
+
updateOpen({ commandAllowlist: [...next] });
|
|
18919
|
+
};
|
|
18590
18920
|
return h2(
|
|
18591
18921
|
"fieldset",
|
|
18592
18922
|
{
|
|
@@ -18646,24 +18976,222 @@ function ScenePolicyEditor({
|
|
|
18646
18976
|
)
|
|
18647
18977
|
),
|
|
18648
18978
|
allowlist ? null : h2(
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
h2("span", null, "\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650"),
|
|
18979
|
+
React29.Fragment,
|
|
18980
|
+
null,
|
|
18652
18981
|
h2(
|
|
18653
|
-
"
|
|
18982
|
+
"label",
|
|
18983
|
+
{ className: "dim-accessField" },
|
|
18984
|
+
h2("span", null, "\u547D\u4EE4\u6743\u9650"),
|
|
18985
|
+
h2(
|
|
18986
|
+
"select",
|
|
18987
|
+
{
|
|
18988
|
+
value: commandMode,
|
|
18989
|
+
"aria-label": [localizeText(title), localizeText("\u9ED8\u8BA4\u547D\u4EE4\u6743\u9650")].join(" "),
|
|
18990
|
+
onChange: (event) => changeCommandMode(event.target.value)
|
|
18991
|
+
},
|
|
18992
|
+
h2("option", { value: "deny" }, "\u4E0D\u80FD\u6267\u884C\u547D\u4EE4"),
|
|
18993
|
+
h2("option", { value: "allow" }, "\u53EF\u4EE5\u6267\u884C\u547D\u4EE4"),
|
|
18994
|
+
h2("option", { value: "custom" }, "\u53EF\u4EE5\u6267\u884C\u6307\u5B9A\u7684\u547D\u4EE4")
|
|
18995
|
+
)
|
|
18996
|
+
),
|
|
18997
|
+
commandMode !== "custom" ? null : h2(
|
|
18998
|
+
"div",
|
|
18654
18999
|
{
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
onChange: (event) => onChange({
|
|
18658
|
-
...policy,
|
|
18659
|
-
open: {
|
|
18660
|
-
...policy.open,
|
|
18661
|
-
defaultCanExecuteCommands: commandValue(event.target.value)
|
|
18662
|
-
}
|
|
18663
|
-
})
|
|
19000
|
+
className: "dim-accessField dim-accessCommandPicker",
|
|
19001
|
+
style: { position: "relative" }
|
|
18664
19002
|
},
|
|
18665
|
-
h2("
|
|
18666
|
-
|
|
19003
|
+
h2("button", {
|
|
19004
|
+
type: "button",
|
|
19005
|
+
className: "dim-deliveryButton",
|
|
19006
|
+
"aria-expanded": commandPickerOpen,
|
|
19007
|
+
onClick: () => setCommandPickerOpen((value) => !value)
|
|
19008
|
+
}, localizeTemplate("\u9009\u62E9\u547D\u4EE4\uFF08{count}\uFF09", { count: allowedCommands.size })),
|
|
19009
|
+
commandPickerOpen ? h2(
|
|
19010
|
+
"div",
|
|
19011
|
+
{
|
|
19012
|
+
role: "presentation",
|
|
19013
|
+
style: {
|
|
19014
|
+
position: "fixed",
|
|
19015
|
+
inset: 0,
|
|
19016
|
+
zIndex: 1e3,
|
|
19017
|
+
display: "flex",
|
|
19018
|
+
alignItems: "center",
|
|
19019
|
+
justifyContent: "center",
|
|
19020
|
+
padding: 24,
|
|
19021
|
+
background: "rgba(0, 0, 0, 0.42)"
|
|
19022
|
+
},
|
|
19023
|
+
onClick: () => setCommandPickerOpen(false)
|
|
19024
|
+
},
|
|
19025
|
+
h2(
|
|
19026
|
+
"div",
|
|
19027
|
+
{
|
|
19028
|
+
role: "dialog",
|
|
19029
|
+
"aria-modal": "true",
|
|
19030
|
+
"aria-label": "\u9009\u62E9\u5141\u8BB8\u7684\u547D\u4EE4",
|
|
19031
|
+
onClick: (event) => event.stopPropagation(),
|
|
19032
|
+
style: {
|
|
19033
|
+
width: "min(560px, 100%)",
|
|
19034
|
+
maxHeight: "min(680px, calc(100vh - 48px))",
|
|
19035
|
+
display: "flex",
|
|
19036
|
+
flexDirection: "column",
|
|
19037
|
+
gap: 12,
|
|
19038
|
+
padding: 20,
|
|
19039
|
+
borderRadius: 14,
|
|
19040
|
+
border: "1px solid var(--dsw-alias-border-l1)",
|
|
19041
|
+
background: "var(--dsw-alias-bg-overlay)",
|
|
19042
|
+
color: "var(--dsw-alias-label-primary)",
|
|
19043
|
+
boxShadow: "0 24px 64px rgba(0, 0, 0, 0.38)"
|
|
19044
|
+
}
|
|
19045
|
+
},
|
|
19046
|
+
h2(
|
|
19047
|
+
"div",
|
|
19048
|
+
{ style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 } },
|
|
19049
|
+
h2(
|
|
19050
|
+
"div",
|
|
19051
|
+
null,
|
|
19052
|
+
h2("strong", { style: { fontSize: 15 } }, "\u9009\u62E9\u5141\u8BB8\u7684\u547D\u4EE4"),
|
|
19053
|
+
h2(
|
|
19054
|
+
"p",
|
|
19055
|
+
{ style: { margin: "4px 0 0", fontSize: 12, lineHeight: 1.5, color: "var(--dsw-alias-label-secondary)" } },
|
|
19056
|
+
"\u9ED8\u8BA4\u52FE\u9009 new\u3001stop\u3001help\u3001status\u3001compact\u3001clear\u3002"
|
|
19057
|
+
)
|
|
19058
|
+
),
|
|
19059
|
+
h2("button", {
|
|
19060
|
+
type: "button",
|
|
19061
|
+
"aria-label": "\u5173\u95ED",
|
|
19062
|
+
onClick: () => setCommandPickerOpen(false),
|
|
19063
|
+
style: {
|
|
19064
|
+
flex: "0 0 auto",
|
|
19065
|
+
width: 28,
|
|
19066
|
+
height: 28,
|
|
19067
|
+
padding: 0,
|
|
19068
|
+
border: "1px solid var(--dsw-alias-border-l1)",
|
|
19069
|
+
borderRadius: 7,
|
|
19070
|
+
background: "transparent",
|
|
19071
|
+
color: "var(--dsw-alias-label-secondary)",
|
|
19072
|
+
cursor: "pointer",
|
|
19073
|
+
fontSize: 16,
|
|
19074
|
+
lineHeight: "24px"
|
|
19075
|
+
}
|
|
19076
|
+
}, "\xD7")
|
|
19077
|
+
),
|
|
19078
|
+
h2("input", {
|
|
19079
|
+
type: "search",
|
|
19080
|
+
value: commandQuery,
|
|
19081
|
+
placeholder: "\u641C\u7D22\u547D\u4EE4\u2026",
|
|
19082
|
+
"aria-label": "\u641C\u7D22\u547D\u4EE4",
|
|
19083
|
+
onChange: (event) => setCommandQuery(event.target.value),
|
|
19084
|
+
style: {
|
|
19085
|
+
width: "100%",
|
|
19086
|
+
boxSizing: "border-box",
|
|
19087
|
+
padding: "8px 10px",
|
|
19088
|
+
border: "1px solid var(--dsw-alias-border-l1)",
|
|
19089
|
+
borderRadius: 8,
|
|
19090
|
+
background: "var(--dsw-alias-bg-base)",
|
|
19091
|
+
color: "var(--dsw-alias-label-primary)",
|
|
19092
|
+
fontSize: 12
|
|
19093
|
+
}
|
|
19094
|
+
}),
|
|
19095
|
+
h2(
|
|
19096
|
+
"div",
|
|
19097
|
+
{
|
|
19098
|
+
style: {
|
|
19099
|
+
display: "grid",
|
|
19100
|
+
gridTemplateColumns: "repeat(2, minmax(0, 1fr))",
|
|
19101
|
+
gap: 4,
|
|
19102
|
+
overflow: "auto",
|
|
19103
|
+
paddingRight: 4,
|
|
19104
|
+
flex: "1 1 auto",
|
|
19105
|
+
minHeight: 0
|
|
19106
|
+
}
|
|
19107
|
+
},
|
|
19108
|
+
COMMAND_CHOICES.filter(([name2, label]) => {
|
|
19109
|
+
const query = commandQuery.trim().toLowerCase();
|
|
19110
|
+
return !query || name2.includes(query) || label.toLowerCase().includes(query);
|
|
19111
|
+
}).map(([name2, label]) => {
|
|
19112
|
+
const checked = allowedCommands.has(name2);
|
|
19113
|
+
return h2(
|
|
19114
|
+
"button",
|
|
19115
|
+
{
|
|
19116
|
+
key: name2,
|
|
19117
|
+
type: "button",
|
|
19118
|
+
role: "checkbox",
|
|
19119
|
+
"aria-checked": checked,
|
|
19120
|
+
onClick: () => toggleCommand(name2, !checked),
|
|
19121
|
+
style: {
|
|
19122
|
+
display: "flex",
|
|
19123
|
+
alignItems: "center",
|
|
19124
|
+
gap: 8,
|
|
19125
|
+
minWidth: 0,
|
|
19126
|
+
padding: "6px 8px",
|
|
19127
|
+
borderRadius: 6,
|
|
19128
|
+
cursor: "pointer",
|
|
19129
|
+
fontSize: 12,
|
|
19130
|
+
textAlign: "left",
|
|
19131
|
+
color: "inherit",
|
|
19132
|
+
border: checked ? "1px solid var(--dsw-alias-brand-primary)" : "1px solid transparent",
|
|
19133
|
+
background: checked ? "var(--dsw-alias-bg-layer-2)" : "transparent"
|
|
19134
|
+
}
|
|
19135
|
+
},
|
|
19136
|
+
h2("span", {
|
|
19137
|
+
style: {
|
|
19138
|
+
flex: "0 0 16px",
|
|
19139
|
+
width: 16,
|
|
19140
|
+
height: 16,
|
|
19141
|
+
lineHeight: "16px",
|
|
19142
|
+
textAlign: "center",
|
|
19143
|
+
borderRadius: 4,
|
|
19144
|
+
fontSize: 11,
|
|
19145
|
+
color: checked ? "#fff" : "transparent",
|
|
19146
|
+
background: checked ? "var(--dsw-alias-brand-primary)" : "transparent",
|
|
19147
|
+
border: checked ? "none" : "1px solid var(--dsw-alias-border-l2)"
|
|
19148
|
+
}
|
|
19149
|
+
}, "\u2713"),
|
|
19150
|
+
h2("span", {
|
|
19151
|
+
style: { overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis" }
|
|
19152
|
+
}, label)
|
|
19153
|
+
);
|
|
19154
|
+
})
|
|
19155
|
+
),
|
|
19156
|
+
h2(
|
|
19157
|
+
"div",
|
|
19158
|
+
{
|
|
19159
|
+
style: {
|
|
19160
|
+
display: "flex",
|
|
19161
|
+
alignItems: "center",
|
|
19162
|
+
justifyContent: "space-between",
|
|
19163
|
+
gap: 8,
|
|
19164
|
+
paddingTop: 4
|
|
19165
|
+
}
|
|
19166
|
+
},
|
|
19167
|
+
h2(
|
|
19168
|
+
"span",
|
|
19169
|
+
{ style: { fontSize: 12, color: "var(--dsw-alias-label-secondary)" } },
|
|
19170
|
+
localizeTemplate("\u5DF2\u9009 {count} \u9879", { count: allowedCommands.size })
|
|
19171
|
+
),
|
|
19172
|
+
h2(
|
|
19173
|
+
"div",
|
|
19174
|
+
{ style: { display: "flex", gap: 8 } },
|
|
19175
|
+
h2("button", {
|
|
19176
|
+
type: "button",
|
|
19177
|
+
className: "dim-deliveryButton",
|
|
19178
|
+
onClick: () => updateOpen({ commandAllowlist: [...DEFAULT_COMMAND_ALLOWLIST] })
|
|
19179
|
+
}, "\u6062\u590D\u9ED8\u8BA4"),
|
|
19180
|
+
h2("button", {
|
|
19181
|
+
type: "button",
|
|
19182
|
+
className: "dim-deliveryButton",
|
|
19183
|
+
onClick: () => updateOpen({ commandAllowlist: COMMAND_CHOICES.map(([name2]) => name2) })
|
|
19184
|
+
}, "\u5168\u90E8\u547D\u4EE4"),
|
|
19185
|
+
h2("button", {
|
|
19186
|
+
type: "button",
|
|
19187
|
+
className: "dim-deliveryButton",
|
|
19188
|
+
"data-kind": "primary",
|
|
19189
|
+
onClick: () => setCommandPickerOpen(false)
|
|
19190
|
+
}, "\u5B8C\u6210")
|
|
19191
|
+
)
|
|
19192
|
+
)
|
|
19193
|
+
)
|
|
19194
|
+
) : null
|
|
18667
19195
|
)
|
|
18668
19196
|
)
|
|
18669
19197
|
),
|
|
@@ -18873,20 +19401,54 @@ function AccessPolicySettingsPage({ channel: channel7, account, rpcCall, onSaved
|
|
|
18873
19401
|
|
|
18874
19402
|
// plugin-src/client/bot-general-settings.js
|
|
18875
19403
|
var React30 = __toESM(require("react"), 1);
|
|
19404
|
+
|
|
19405
|
+
// src/channels/shared/reply-content.mjs
|
|
19406
|
+
var SET_REPLY_CONTENT_ENDPOINT = "bot.reply-content.set";
|
|
19407
|
+
var REPLY_CONTENT_KEYS = Object.freeze(["narration", "tools", "thinking"]);
|
|
19408
|
+
var DEFAULT_REPLY_CONTENT = Object.freeze({
|
|
19409
|
+
narration: true,
|
|
19410
|
+
tools: true,
|
|
19411
|
+
thinking: true
|
|
19412
|
+
});
|
|
19413
|
+
function booleanOr(value, fallback) {
|
|
19414
|
+
return typeof value === "boolean" ? value : fallback;
|
|
19415
|
+
}
|
|
19416
|
+
function normalizeReplyContent(value) {
|
|
19417
|
+
const source = value && typeof value === "object" && !Array.isArray(value) ? value : {};
|
|
19418
|
+
return Object.freeze({
|
|
19419
|
+
narration: booleanOr(source.narration, DEFAULT_REPLY_CONTENT.narration),
|
|
19420
|
+
tools: booleanOr(source.tools, DEFAULT_REPLY_CONTENT.tools),
|
|
19421
|
+
thinking: booleanOr(source.thinking, DEFAULT_REPLY_CONTENT.thinking)
|
|
19422
|
+
});
|
|
19423
|
+
}
|
|
19424
|
+
|
|
19425
|
+
// plugin-src/client/bot-general-settings.js
|
|
19426
|
+
var REPLY_CONTENT_ROWS = Object.freeze([
|
|
19427
|
+
["narration", "\u8FC7\u7A0B\u6B63\u6587", "\u6B63\u5728\u6267\u884C\u65F6\u52A9\u624B\u7684\u8BF4\u660E\u6587\u5B57"],
|
|
19428
|
+
["tools", "\u5DE5\u5177\u6B65\u9AA4", "\u5DE5\u5177\u8C03\u7528\u3001\u7ED3\u679C\u4E0E\u5931\u8D25\u63D0\u793A"],
|
|
19429
|
+
["thinking", "\u601D\u8003\u8FC7\u7A0B", "\u6A21\u578B\u7684\u63A8\u7406\u8FC7\u7A0B\uFF08\u6E20\u9053\u652F\u6301\u65F6\uFF09"]
|
|
19430
|
+
]);
|
|
18876
19431
|
function settingsFromResult(result2, botId) {
|
|
18877
19432
|
if (result2?.ok !== true) throw new Error(result2?.error?.message || "\u65E0\u6CD5\u8BFB\u53D6\u901A\u7528\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
|
|
18878
19433
|
const bot = result2.value?.bots?.find((entry) => entry.botId === botId);
|
|
18879
19434
|
if (!bot) throw new Error("\u627E\u4E0D\u5230\u8981\u4FEE\u6539\u7684\u673A\u5668\u4EBA\u3002");
|
|
18880
19435
|
return {
|
|
18881
19436
|
busyMessageMode: normalizeBusyMessageMode(bot.busyMessageMode),
|
|
18882
|
-
stepCardPanels: normalizeFeishuStepCardPanels(bot.stepCardPanels)
|
|
19437
|
+
stepCardPanels: normalizeFeishuStepCardPanels(bot.stepCardPanels),
|
|
19438
|
+
replyContent: normalizeReplyContent(bot.replyContent)
|
|
18883
19439
|
};
|
|
18884
19440
|
}
|
|
19441
|
+
var SAVE_ENDPOINTS = Object.freeze({
|
|
19442
|
+
busyMessageMode: SET_MESSAGE_MODE_ENDPOINT,
|
|
19443
|
+
stepCardPanels: FEISHU_ENDPOINTS.setStepCardPanels,
|
|
19444
|
+
replyContent: SET_REPLY_CONTENT_ENDPOINT
|
|
19445
|
+
});
|
|
18885
19446
|
function BotGeneralSettingsPage({ channel: channel7, account, rpcCall }) {
|
|
18886
19447
|
const modeId = React30.useId();
|
|
18887
19448
|
const [settings, setSettings] = React30.useState(() => ({
|
|
18888
19449
|
busyMessageMode: "queue",
|
|
18889
|
-
stepCardPanels: normalizeFeishuStepCardPanels()
|
|
19450
|
+
stepCardPanels: normalizeFeishuStepCardPanels(),
|
|
19451
|
+
replyContent: normalizeReplyContent()
|
|
18890
19452
|
}));
|
|
18891
19453
|
const [savedSettings, setSavedSettings] = React30.useState(null);
|
|
18892
19454
|
const [busy, setBusy] = React30.useState(false);
|
|
@@ -18925,8 +19487,7 @@ function BotGeneralSettingsPage({ channel: channel7, account, rpcCall }) {
|
|
|
18925
19487
|
setBusy(true);
|
|
18926
19488
|
setFeedback(null);
|
|
18927
19489
|
try {
|
|
18928
|
-
const
|
|
18929
|
-
const saved = settingsFromResult(await rpcCall(endpoint, {
|
|
19490
|
+
const saved = settingsFromResult(await rpcCall(SAVE_ENDPOINTS[field2], {
|
|
18930
19491
|
botId: account.botId,
|
|
18931
19492
|
[field2]: value
|
|
18932
19493
|
}), account.botId);
|
|
@@ -18981,6 +19542,50 @@ function BotGeneralSettingsPage({ channel: channel7, account, rpcCall }) {
|
|
|
18981
19542
|
)
|
|
18982
19543
|
)
|
|
18983
19544
|
),
|
|
19545
|
+
h2(
|
|
19546
|
+
"div",
|
|
19547
|
+
{ className: "dim-botGeneralRow dim-botGeneralPanelRow" },
|
|
19548
|
+
h2(
|
|
19549
|
+
"div",
|
|
19550
|
+
{ className: "dim-botGeneralText" },
|
|
19551
|
+
h2("label", { className: "dim-botGeneralTitle", htmlFor: `${modeId}-reply-content` }, "\u6295\u9012\u5185\u5BB9"),
|
|
19552
|
+
h2("p", {
|
|
19553
|
+
className: "dim-botGeneralHelp",
|
|
19554
|
+
id: `${modeId}-reply-content-description`
|
|
19555
|
+
}, "\u6700\u7EC8\u56DE\u7B54\u59CB\u7EC8\u53D1\u9001\uFF1B\u5173\u95ED\u7684\u9879\u4E0D\u518D\u63A8\u9001\u3002")
|
|
19556
|
+
)
|
|
19557
|
+
),
|
|
19558
|
+
...REPLY_CONTENT_ROWS.map(([field2, label, help]) => h2(
|
|
19559
|
+
"div",
|
|
19560
|
+
{
|
|
19561
|
+
key: field2,
|
|
19562
|
+
className: "dim-botGeneralRow dim-botGeneralPanelRow"
|
|
19563
|
+
},
|
|
19564
|
+
h2(
|
|
19565
|
+
"div",
|
|
19566
|
+
{ className: "dim-botGeneralText" },
|
|
19567
|
+
h2("label", { className: "dim-botGeneralTitle", htmlFor: `${modeId}-${field2}` }, label),
|
|
19568
|
+
h2("p", { className: "dim-botGeneralHelp" }, help)
|
|
19569
|
+
),
|
|
19570
|
+
h2(
|
|
19571
|
+
"div",
|
|
19572
|
+
{ className: "dim-botGeneralControl" },
|
|
19573
|
+
h2("input", {
|
|
19574
|
+
id: `${modeId}-${field2}`,
|
|
19575
|
+
type: "checkbox",
|
|
19576
|
+
role: "switch",
|
|
19577
|
+
className: "dim-contextSwitch",
|
|
19578
|
+
checked: settings.replyContent[field2],
|
|
19579
|
+
disabled: busy || savedSettings === null,
|
|
19580
|
+
"aria-label": label,
|
|
19581
|
+
"aria-describedby": `${modeId}-reply-content-description`,
|
|
19582
|
+
onChange: (event) => void save("replyContent", {
|
|
19583
|
+
...settings.replyContent,
|
|
19584
|
+
[field2]: event.target.checked
|
|
19585
|
+
})
|
|
19586
|
+
})
|
|
19587
|
+
)
|
|
19588
|
+
)),
|
|
18984
19589
|
channel7 === "feishu" ? [
|
|
18985
19590
|
["thinkingExpanded", "\u5C55\u5F00\u601D\u8003\u8FC7\u7A0B"],
|
|
18986
19591
|
["toolsExpanded", "\u5C55\u5F00\u5DE5\u5177\u6458\u8981"]
|
|
@@ -21267,8 +21872,8 @@ function isListMode(mode) {
|
|
|
21267
21872
|
function modeLabel(value) {
|
|
21268
21873
|
return GROUP_TRIGGER_MODE_OPTIONS.find((option) => option.value === value)?.label ?? GROUP_TRIGGER_MODE_OPTIONS[0].label;
|
|
21269
21874
|
}
|
|
21270
|
-
function splitMemberIds(
|
|
21271
|
-
return String(
|
|
21875
|
+
function splitMemberIds(text9) {
|
|
21876
|
+
return String(text9 ?? "").split(/[\s,;]+/).map((item) => item.trim()).filter(Boolean);
|
|
21272
21877
|
}
|
|
21273
21878
|
function entryFromConfig(value) {
|
|
21274
21879
|
const mode = GROUP_TRIGGER_MODE_OPTIONS.some((option) => option.value === value?.mode) ? value.mode : "off";
|
|
@@ -21814,18 +22419,18 @@ function validSuggestions(definition, value) {
|
|
|
21814
22419
|
});
|
|
21815
22420
|
}
|
|
21816
22421
|
function maskRouteValue(value) {
|
|
21817
|
-
const
|
|
21818
|
-
if (!
|
|
21819
|
-
const at =
|
|
22422
|
+
const text9 = String(value ?? "").trim();
|
|
22423
|
+
if (!text9) return "";
|
|
22424
|
+
const at = text9.indexOf("@");
|
|
21820
22425
|
if (at > 0) {
|
|
21821
|
-
const local =
|
|
21822
|
-
const domain =
|
|
22426
|
+
const local = text9.slice(0, at);
|
|
22427
|
+
const domain = text9.slice(at);
|
|
21823
22428
|
const visible = local.length <= 4 ? `${local.slice(0, 1)}\u2022\u2022${local.slice(-1)}` : `${local.slice(0, 3)}\u2026${local.slice(-2)}`;
|
|
21824
22429
|
return `${visible}${domain}`;
|
|
21825
22430
|
}
|
|
21826
|
-
if (
|
|
21827
|
-
if (
|
|
21828
|
-
return `${
|
|
22431
|
+
if (text9.length <= 6) return `${text9.slice(0, 2)}\u2026${text9.slice(-1)}`;
|
|
22432
|
+
if (text9.length <= 12) return `${text9.slice(0, 3)}\u2026${text9.slice(-3)}`;
|
|
22433
|
+
return `${text9.slice(0, 5)}\u2026${text9.slice(-4)}`;
|
|
21829
22434
|
}
|
|
21830
22435
|
function suggestionFallbackName(definition, suggestion) {
|
|
21831
22436
|
const displayName = suggestionDisplayName(suggestion);
|
|
@@ -21932,6 +22537,11 @@ function TargetForm({
|
|
|
21932
22537
|
"div",
|
|
21933
22538
|
{ className: "dim-targetFormHeading" },
|
|
21934
22539
|
h2("h3", null, editing ? "\u7F16\u8F91\u6295\u9012\u76EE\u6807" : "\u65B0\u5EFA\u6295\u9012\u76EE\u6807"),
|
|
22540
|
+
h2(
|
|
22541
|
+
"p",
|
|
22542
|
+
{ style: { color: "#92400e", background: "#fffbeb", padding: "8px 10px", borderRadius: "6px", fontSize: "12px", lineHeight: 1.5 } },
|
|
22543
|
+
"\u76EE\u6807\u662F\u7EC6\u7C92\u5EA6\u8BBE\u7F6E\uFF1A\u67D0\u4E2A\u673A\u5668\u4EBA\u4E00\u65E6\u914D\u7F6E\u4E86\u76EE\u6807\uFF08\u54EA\u6015\u5173\u95ED\u4F1A\u8BDD\u540C\u6B65\uFF09\uFF0C\u8BE5\u673A\u5668\u4EBA\u7684\u6295\u9012\u5C31\u6309\u76EE\u6807\u8D70\u3002\u5982\u9700\u4F7F\u7528\u300C\u901A\u7528\u8BBE\u7F6E \u2192 \u6295\u9012\u300D\u91CC\u7684\u7B80\u5355\u5F00\u5173\uFF0C\u8BF7\u5148\u5220\u9664\u8BE5\u673A\u5668\u4EBA\u7684\u5168\u90E8\u76EE\u6807\u3002"
|
|
22544
|
+
),
|
|
21935
22545
|
editing ? initialValue?.sessionSync?.enabled ? h2("p", null, "\u4FEE\u6539\u63A5\u6536\u4F4D\u7F6E\u4F1A\u5173\u95ED\u4F1A\u8BDD\u53CC\u5411\u540C\u6B65\u3002") : null : h2("p", null, source === "suggestion" ? "\u5DF2\u4ECE\u4F1A\u8BDD\u81EA\u52A8\u586B\u5165\u76EE\u6807\u4FE1\u606F\uFF1B\u786E\u8BA4\u540E\u518D\u4FDD\u5B58\u3002" : "\u8BF7\u624B\u52A8\u586B\u5199\u4ECE\u5BF9\u5E94\u5E73\u53F0\u53D6\u5F97\u7684\u539F\u751F\u6807\u8BC6\u3002")
|
|
21936
22546
|
),
|
|
21937
22547
|
h2(
|
|
@@ -22554,8 +23164,313 @@ function DeliveryTargetSettingsPage({
|
|
|
22554
23164
|
);
|
|
22555
23165
|
}
|
|
22556
23166
|
|
|
22557
|
-
// plugin-src/client/
|
|
23167
|
+
// plugin-src/client/delivery-sync-settings.js
|
|
22558
23168
|
var React41 = __toESM(require("react"), 1);
|
|
23169
|
+
|
|
23170
|
+
// src/channels/shared/delivery-sync-settings.mjs
|
|
23171
|
+
var DELIVERY_SYNC_ICON_MAX_LENGTH = 32;
|
|
23172
|
+
var DEFAULT_DELIVERY_SYNC_SETTINGS = Object.freeze({
|
|
23173
|
+
// Mirror the user's own Web input into the chat. Off by default: a chat that
|
|
23174
|
+
// receives every desktop keystroke is noisy until the reader asks for it.
|
|
23175
|
+
mirrorUserInput: false,
|
|
23176
|
+
// Deliver the model answer of a turn that did not start in this chat. Off by
|
|
23177
|
+
// default like the input mirror: mirroring is something the reader asks for,
|
|
23178
|
+
// never something a fresh or unreadable document starts on its own.
|
|
23179
|
+
deliverModelAnswers: false,
|
|
23180
|
+
inputIcon: "",
|
|
23181
|
+
modelIcon: ""
|
|
23182
|
+
});
|
|
23183
|
+
var CONTROL_CHARACTER = /[\u0000-\u001f\u007f-\u009f]/u;
|
|
23184
|
+
function isRecord9(value) {
|
|
23185
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
23186
|
+
}
|
|
23187
|
+
function normalizeDeliverySyncIcon(value) {
|
|
23188
|
+
if (typeof value !== "string") return "";
|
|
23189
|
+
const trimmed = value.trim();
|
|
23190
|
+
if (!trimmed) return "";
|
|
23191
|
+
if (trimmed.length > DELIVERY_SYNC_ICON_MAX_LENGTH) return "";
|
|
23192
|
+
if (CONTROL_CHARACTER.test(trimmed)) return "";
|
|
23193
|
+
return trimmed;
|
|
23194
|
+
}
|
|
23195
|
+
function booleanOr2(value, fallback) {
|
|
23196
|
+
return typeof value === "boolean" ? value : fallback;
|
|
23197
|
+
}
|
|
23198
|
+
function normalizeDeliverySyncSettings(value) {
|
|
23199
|
+
if (!isRecord9(value)) return null;
|
|
23200
|
+
return Object.freeze({
|
|
23201
|
+
mirrorUserInput: booleanOr2(value.mirrorUserInput, DEFAULT_DELIVERY_SYNC_SETTINGS.mirrorUserInput),
|
|
23202
|
+
deliverModelAnswers: booleanOr2(
|
|
23203
|
+
value.deliverModelAnswers,
|
|
23204
|
+
DEFAULT_DELIVERY_SYNC_SETTINGS.deliverModelAnswers
|
|
23205
|
+
),
|
|
23206
|
+
inputIcon: normalizeDeliverySyncIcon(value.inputIcon),
|
|
23207
|
+
modelIcon: normalizeDeliverySyncIcon(value.modelIcon)
|
|
23208
|
+
});
|
|
23209
|
+
}
|
|
23210
|
+
|
|
23211
|
+
// plugin-src/client/delivery-sync-settings.js
|
|
23212
|
+
var DELIVERY_SYNC_SETTINGS_RPC_CHANNEL = "/dsh-im-delivery-sync";
|
|
23213
|
+
var DELIVERY_SYNC_SETTINGS_ENDPOINTS = Object.freeze({
|
|
23214
|
+
get: "settings.delivery-sync.get",
|
|
23215
|
+
set: "settings.delivery-sync.set",
|
|
23216
|
+
getLanguage: "settings.language.get",
|
|
23217
|
+
setLanguage: "settings.language.set"
|
|
23218
|
+
});
|
|
23219
|
+
var MESSAGE_LANGUAGE_OPTIONS = Object.freeze([
|
|
23220
|
+
{ value: "auto", label: "\u8DDF\u968F DSH \u754C\u9762\u8BED\u8A00" },
|
|
23221
|
+
{ value: "zh", label: "\u4E2D\u6587" },
|
|
23222
|
+
{ value: "en", label: "English" },
|
|
23223
|
+
{ value: "ru", label: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439" }
|
|
23224
|
+
]);
|
|
23225
|
+
function unwrap(result2) {
|
|
23226
|
+
if (result2?.ok === true) return result2.value;
|
|
23227
|
+
if (result2?.ok === false) {
|
|
23228
|
+
const error = new Error(result2.error?.message || "\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
|
|
23229
|
+
error.code = result2.error?.code;
|
|
23230
|
+
throw error;
|
|
23231
|
+
}
|
|
23232
|
+
return result2;
|
|
23233
|
+
}
|
|
23234
|
+
function messageLanguageFromSnapshot(snapshot) {
|
|
23235
|
+
if (snapshot?.source !== "explicit") return "auto";
|
|
23236
|
+
const language = snapshot.language;
|
|
23237
|
+
return MESSAGE_LANGUAGE_OPTIONS.some((option) => option.value === language) ? language : "auto";
|
|
23238
|
+
}
|
|
23239
|
+
function DeliverySyncSettings({ rpcCall, languageRpcCall = null }) {
|
|
23240
|
+
const [values, setValues] = React41.useState(DEFAULT_DELIVERY_SYNC_SETTINGS);
|
|
23241
|
+
const [language, setLanguage] = React41.useState("auto");
|
|
23242
|
+
const [savedLanguage, setSavedLanguage] = React41.useState("auto");
|
|
23243
|
+
const [phase, setPhase] = React41.useState("loading");
|
|
23244
|
+
const [error, setError] = React41.useState(null);
|
|
23245
|
+
const [saved, setSaved] = React41.useState(false);
|
|
23246
|
+
const mounted = React41.useRef(false);
|
|
23247
|
+
const busy = React41.useRef(false);
|
|
23248
|
+
const id6 = React41.useId();
|
|
23249
|
+
const languageAvailable = typeof languageRpcCall === "function";
|
|
23250
|
+
const load = React41.useCallback(async (signal) => {
|
|
23251
|
+
setPhase("loading");
|
|
23252
|
+
setError(null);
|
|
23253
|
+
setSaved(false);
|
|
23254
|
+
try {
|
|
23255
|
+
if (typeof rpcCall !== "function") throw new Error("\u6295\u9012\u540C\u6B65\u8BBE\u7F6E\u901A\u9053\u4E0D\u53EF\u7528\u3002");
|
|
23256
|
+
const settings = normalizeDeliverySyncSettings(
|
|
23257
|
+
unwrap(await rpcCall(DELIVERY_SYNC_SETTINGS_ENDPOINTS.get, {}, signal))
|
|
23258
|
+
);
|
|
23259
|
+
if (!settings) throw new Error("\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002");
|
|
23260
|
+
const snapshot = languageAvailable ? unwrap(await languageRpcCall(DELIVERY_SYNC_SETTINGS_ENDPOINTS.getLanguage, {}, signal)) : null;
|
|
23261
|
+
if (signal?.aborted || !mounted.current) return;
|
|
23262
|
+
setValues(settings);
|
|
23263
|
+
const current = messageLanguageFromSnapshot(snapshot);
|
|
23264
|
+
setLanguage(current);
|
|
23265
|
+
setSavedLanguage(current);
|
|
23266
|
+
setPhase("ready");
|
|
23267
|
+
} catch (caught) {
|
|
23268
|
+
if (signal?.aborted || !mounted.current) return;
|
|
23269
|
+
setError(caught.message || "\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
|
|
23270
|
+
setPhase("error");
|
|
23271
|
+
}
|
|
23272
|
+
}, [languageAvailable, languageRpcCall, rpcCall]);
|
|
23273
|
+
React41.useEffect(() => {
|
|
23274
|
+
mounted.current = true;
|
|
23275
|
+
const controller = new AbortController();
|
|
23276
|
+
void load(controller.signal);
|
|
23277
|
+
return () => {
|
|
23278
|
+
mounted.current = false;
|
|
23279
|
+
controller.abort();
|
|
23280
|
+
};
|
|
23281
|
+
}, [load]);
|
|
23282
|
+
const edit = (patch) => {
|
|
23283
|
+
setValues((current) => ({ ...current, ...patch }));
|
|
23284
|
+
setSaved(false);
|
|
23285
|
+
setError(null);
|
|
23286
|
+
};
|
|
23287
|
+
const save = async (event) => {
|
|
23288
|
+
event.preventDefault();
|
|
23289
|
+
if (busy.current || phase !== "ready") return;
|
|
23290
|
+
busy.current = true;
|
|
23291
|
+
setPhase("saving");
|
|
23292
|
+
setError(null);
|
|
23293
|
+
setSaved(false);
|
|
23294
|
+
try {
|
|
23295
|
+
if (languageAvailable && language !== savedLanguage) {
|
|
23296
|
+
unwrap(await languageRpcCall(
|
|
23297
|
+
DELIVERY_SYNC_SETTINGS_ENDPOINTS.setLanguage,
|
|
23298
|
+
{ language }
|
|
23299
|
+
));
|
|
23300
|
+
if (mounted.current) setSavedLanguage(language);
|
|
23301
|
+
}
|
|
23302
|
+
const settings = normalizeDeliverySyncSettings(unwrap(await rpcCall(
|
|
23303
|
+
DELIVERY_SYNC_SETTINGS_ENDPOINTS.set,
|
|
23304
|
+
{
|
|
23305
|
+
...values,
|
|
23306
|
+
inputIcon: normalizeDeliverySyncIcon(values.inputIcon),
|
|
23307
|
+
modelIcon: normalizeDeliverySyncIcon(values.modelIcon)
|
|
23308
|
+
}
|
|
23309
|
+
)));
|
|
23310
|
+
if (!settings) throw new Error("\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\u8FD4\u56DE\u4E86\u65E0\u6CD5\u8BC6\u522B\u7684\u54CD\u5E94\u3002");
|
|
23311
|
+
if (!mounted.current) return;
|
|
23312
|
+
setValues(settings);
|
|
23313
|
+
setSaved(true);
|
|
23314
|
+
} catch (caught) {
|
|
23315
|
+
if (mounted.current) setError(caught.message || "\u65E0\u6CD5\u8BFB\u53D6\u6216\u4FDD\u5B58\u4F1A\u8BDD\u540C\u6B65\u8BBE\u7F6E\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002");
|
|
23316
|
+
} finally {
|
|
23317
|
+
busy.current = false;
|
|
23318
|
+
if (mounted.current) setPhase("ready");
|
|
23319
|
+
}
|
|
23320
|
+
};
|
|
23321
|
+
const disabled = phase !== "ready";
|
|
23322
|
+
const iconHint = "\u6700\u591A 32 \u4E2A\u5B57\u7B26\uFF1B\u7559\u7A7A\u5219\u4E0D\u6DFB\u52A0\u524D\u7F00\u3002";
|
|
23323
|
+
const rows = [
|
|
23324
|
+
{
|
|
23325
|
+
key: "mirrorUserInput",
|
|
23326
|
+
icon: "inputIcon",
|
|
23327
|
+
title: "\u955C\u50CF Web \u4E2D\u8F93\u5165\u7684\u6D88\u606F",
|
|
23328
|
+
help: "\u5728 Web GUI \u4E2D\u53D1\u9001\u7684\u6D88\u606F\u4F1A\u4F5C\u4E3A\u4E00\u6761\u5E26\u524D\u7F00\u7684\u6D88\u606F\u8F6C\u53D1\u5230\u672C\u804A\u5929\u7684\u4F1A\u8BDD\u540C\u6B65\u76EE\u6807\u3002",
|
|
23329
|
+
iconLabel: "\u8F93\u5165\u524D\u7F00\u56FE\u6807"
|
|
23330
|
+
},
|
|
23331
|
+
{
|
|
23332
|
+
key: "deliverModelAnswers",
|
|
23333
|
+
icon: "modelIcon",
|
|
23334
|
+
title: "\u6295\u9012\u6A21\u578B\u56DE\u7B54",
|
|
23335
|
+
help: "\u5176\u4ED6\u56DE\u5408\uFF08Web \u8F93\u5165\u3001\u5B9A\u65F6\u63D0\u9192\u3001\u5B50\u4EE3\u7406\u901A\u77E5\u7B49\uFF09\u7684\u6A21\u578B\u56DE\u7B54\u4F1A\u53D1\u9001\u5230\u4F1A\u8BDD\u540C\u6B65\u76EE\u6807\u3002",
|
|
23336
|
+
iconLabel: "\u56DE\u7B54\u524D\u7F00\u56FE\u6807"
|
|
23337
|
+
}
|
|
23338
|
+
];
|
|
23339
|
+
const helpId = `${id6}-help`;
|
|
23340
|
+
const head = h2(
|
|
23341
|
+
"div",
|
|
23342
|
+
{ className: "dim-globalHead" },
|
|
23343
|
+
h2(
|
|
23344
|
+
"div",
|
|
23345
|
+
{ className: "dim-globalHeadTitle" },
|
|
23346
|
+
h2("h3", null, "\u4F1A\u8BDD\u540C\u6B65"),
|
|
23347
|
+
h2(
|
|
23348
|
+
"div",
|
|
23349
|
+
{ className: "dim-globalTtlHelp" },
|
|
23350
|
+
h2("button", {
|
|
23351
|
+
type: "button",
|
|
23352
|
+
className: "dim-channelHelpButton dim-globalTtlHelpButton",
|
|
23353
|
+
"aria-label": "\u67E5\u770B\u4F1A\u8BDD\u540C\u6B65\u8BF4\u660E",
|
|
23354
|
+
"aria-describedby": helpId
|
|
23355
|
+
}, h2("span", { "aria-hidden": "true" }, "?")),
|
|
23356
|
+
h2("div", {
|
|
23357
|
+
id: helpId,
|
|
23358
|
+
className: "dim-globalTtlTooltip dim-deliverySyncTooltip",
|
|
23359
|
+
role: "tooltip"
|
|
23360
|
+
}, "\u53EA\u5BF9\u5DF2\u5F00\u542F\u4F1A\u8BDD\u540C\u6B65\u7684\u76EE\u6807\u751F\u6548\uFF1A\u5728 Web GUI \u91CC\u8F93\u5165\u7684\u56DE\u5408\u3001\u5B9A\u65F6\u63D0\u9192\u3001\u5B50\u4EE3\u7406\u901A\u77E5\u7B49\u201C\u4E0D\u662F\u672C\u804A\u5929\u53D1\u8D77\u201D\u7684\u56DE\u5408\uFF0C\u5176\u56DE\u7B54\u4F1A\u8F6C\u53D1\u5230\u8FD9\u4E9B\u76EE\u6807\u3002\u6D88\u606F\u8BED\u8A00\u540C\u65F6\u5F71\u54CD\u673A\u5668\u4EBA\u53D1\u9001\u7684\u547D\u4EE4\u83DC\u5355\u6587\u672C\u3002")
|
|
23361
|
+
)
|
|
23362
|
+
)
|
|
23363
|
+
);
|
|
23364
|
+
const languageField = h2(
|
|
23365
|
+
"div",
|
|
23366
|
+
{ className: "dim-deliverySyncField" },
|
|
23367
|
+
h2(
|
|
23368
|
+
"div",
|
|
23369
|
+
{ className: "dim-deliverySyncLabel" },
|
|
23370
|
+
h2("label", { htmlFor: `${id6}-language` }, "\u63D2\u4EF6\u6D88\u606F\u8BED\u8A00"),
|
|
23371
|
+
h2(
|
|
23372
|
+
"p",
|
|
23373
|
+
{ className: "dim-deliverySyncHelp", id: `${id6}-language-help` },
|
|
23374
|
+
languageAvailable ? "\u9ED8\u8BA4\u8DDF\u968F DSH \u754C\u9762\u8BED\u8A00\uFF1B\u53EF\u4EE5\u5355\u72EC\u56FA\u5B9A\u673A\u5668\u4EBA\u6D88\u606F\u7684\u8BED\u8A00\u3002" : "\u8BED\u8A00\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002"
|
|
23375
|
+
)
|
|
23376
|
+
),
|
|
23377
|
+
h2("select", {
|
|
23378
|
+
id: `${id6}-language`,
|
|
23379
|
+
className: "dim-globalTtlInput dim-deliverySyncSelect",
|
|
23380
|
+
value: language,
|
|
23381
|
+
disabled: disabled || !languageAvailable,
|
|
23382
|
+
"aria-describedby": `${id6}-language-help`,
|
|
23383
|
+
onChange: (event) => {
|
|
23384
|
+
setLanguage(event.target.value);
|
|
23385
|
+
setSaved(false);
|
|
23386
|
+
setError(null);
|
|
23387
|
+
}
|
|
23388
|
+
}, ...MESSAGE_LANGUAGE_OPTIONS.map((option) => h2("option", {
|
|
23389
|
+
key: option.value,
|
|
23390
|
+
value: option.value
|
|
23391
|
+
}, option.label)))
|
|
23392
|
+
);
|
|
23393
|
+
const iconFields = rows.map((row) => h2(
|
|
23394
|
+
"div",
|
|
23395
|
+
{ className: "dim-deliverySyncField", key: row.key },
|
|
23396
|
+
h2(
|
|
23397
|
+
"div",
|
|
23398
|
+
{ className: "dim-deliverySyncLabel" },
|
|
23399
|
+
h2(
|
|
23400
|
+
"label",
|
|
23401
|
+
{ className: "dim-deliverySyncCheckLabel", htmlFor: `${id6}-${row.key}` },
|
|
23402
|
+
h2("input", {
|
|
23403
|
+
id: `${id6}-${row.key}`,
|
|
23404
|
+
type: "checkbox",
|
|
23405
|
+
checked: values[row.key] === true,
|
|
23406
|
+
disabled,
|
|
23407
|
+
"aria-describedby": `${id6}-${row.key}-help`,
|
|
23408
|
+
onChange: (event) => edit({ [row.key]: event.target.checked })
|
|
23409
|
+
}),
|
|
23410
|
+
h2("span", null, row.title)
|
|
23411
|
+
),
|
|
23412
|
+
h2("p", { className: "dim-deliverySyncHelp", id: `${id6}-${row.key}-help` }, row.help)
|
|
23413
|
+
),
|
|
23414
|
+
h2(
|
|
23415
|
+
"div",
|
|
23416
|
+
{ className: "dim-deliverySyncIcon" },
|
|
23417
|
+
h2("input", {
|
|
23418
|
+
id: `${id6}-${row.icon}`,
|
|
23419
|
+
className: "dim-globalTtlInput dim-deliverySyncIconInput",
|
|
23420
|
+
type: "text",
|
|
23421
|
+
value: values[row.icon],
|
|
23422
|
+
maxLength: 32,
|
|
23423
|
+
autoComplete: "off",
|
|
23424
|
+
placeholder: "\u{1F514}",
|
|
23425
|
+
"aria-label": row.iconLabel,
|
|
23426
|
+
"aria-describedby": `${id6}-${row.icon}-help`,
|
|
23427
|
+
disabled,
|
|
23428
|
+
onChange: (event) => edit({ [row.icon]: event.target.value })
|
|
23429
|
+
}),
|
|
23430
|
+
h2("p", { className: "dim-deliverySyncHelp", id: `${id6}-${row.icon}-help` }, iconHint)
|
|
23431
|
+
)
|
|
23432
|
+
));
|
|
23433
|
+
const actions = h2(
|
|
23434
|
+
"div",
|
|
23435
|
+
{ className: "dim-imageSettingsActions" },
|
|
23436
|
+
h2("button", {
|
|
23437
|
+
type: "submit",
|
|
23438
|
+
className: "dim-deliveryButton dim-globalSaveButton",
|
|
23439
|
+
"data-kind": "primary",
|
|
23440
|
+
disabled
|
|
23441
|
+
}, phase === "saving" ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58\u6295\u9012\u8BBE\u7F6E"),
|
|
23442
|
+
phase === "error" ? h2("button", {
|
|
23443
|
+
type: "button",
|
|
23444
|
+
className: "dim-deliveryButton dim-globalSaveButton",
|
|
23445
|
+
onClick: () => void load()
|
|
23446
|
+
}, "\u91CD\u8BD5") : null
|
|
23447
|
+
);
|
|
23448
|
+
return h2(
|
|
23449
|
+
"section",
|
|
23450
|
+
{
|
|
23451
|
+
className: "dim-globalSection dim-deliverySyncSettings",
|
|
23452
|
+
"aria-label": "\u4F1A\u8BDD\u540C\u6B65",
|
|
23453
|
+
"aria-busy": phase === "loading" || phase === "saving"
|
|
23454
|
+
},
|
|
23455
|
+
head,
|
|
23456
|
+
h2(
|
|
23457
|
+
"form",
|
|
23458
|
+
{ onSubmit: save },
|
|
23459
|
+
h2("div", { className: "dim-deliverySyncFields" }, languageField, ...iconFields),
|
|
23460
|
+
actions
|
|
23461
|
+
),
|
|
23462
|
+
error ? h2("p", {
|
|
23463
|
+
className: "dim-globalInline dim-deliverySyncFeedback",
|
|
23464
|
+
"data-tone": "error",
|
|
23465
|
+
role: "alert"
|
|
23466
|
+
}, error) : null,
|
|
23467
|
+
saved ? h2("p", { className: "dim-globalInline dim-deliverySyncFeedback", role: "status" }, "\u5DF2\u4FDD\u5B58") : null,
|
|
23468
|
+
phase === "loading" ? h2("p", { className: "dim-globalInline dim-deliverySyncFeedback", role: "status" }, "\u6B63\u5728\u8BFB\u53D6\u6295\u9012\u8BBE\u7F6E\u2026") : null
|
|
23469
|
+
);
|
|
23470
|
+
}
|
|
23471
|
+
|
|
23472
|
+
// plugin-src/client/group-history-settings.js
|
|
23473
|
+
var React42 = __toESM(require("react"), 1);
|
|
22559
23474
|
var GROUP_HISTORY_SETTINGS_ENDPOINTS = Object.freeze({
|
|
22560
23475
|
get: "settings.group-history.get",
|
|
22561
23476
|
set: "settings.group-history.set"
|
|
@@ -22565,14 +23480,14 @@ function result(value) {
|
|
|
22565
23480
|
return value?.ok === true ? value.value : value;
|
|
22566
23481
|
}
|
|
22567
23482
|
function GroupHistorySettings({ rpcCall }) {
|
|
22568
|
-
const [days, setDays] =
|
|
22569
|
-
const [phase, setPhase] =
|
|
22570
|
-
const [error, setError] =
|
|
22571
|
-
const [notice, setNotice] =
|
|
22572
|
-
const mounted =
|
|
22573
|
-
const busy =
|
|
22574
|
-
const id6 =
|
|
22575
|
-
const load =
|
|
23483
|
+
const [days, setDays] = React42.useState("14");
|
|
23484
|
+
const [phase, setPhase] = React42.useState("loading");
|
|
23485
|
+
const [error, setError] = React42.useState(null);
|
|
23486
|
+
const [notice, setNotice] = React42.useState(null);
|
|
23487
|
+
const mounted = React42.useRef(false);
|
|
23488
|
+
const busy = React42.useRef(false);
|
|
23489
|
+
const id6 = React42.useId();
|
|
23490
|
+
const load = React42.useCallback(async (signal) => {
|
|
22576
23491
|
setPhase("loading");
|
|
22577
23492
|
setError(null);
|
|
22578
23493
|
try {
|
|
@@ -22588,7 +23503,7 @@ function GroupHistorySettings({ rpcCall }) {
|
|
|
22588
23503
|
setPhase("error");
|
|
22589
23504
|
}
|
|
22590
23505
|
}, [rpcCall]);
|
|
22591
|
-
|
|
23506
|
+
React42.useEffect(() => {
|
|
22592
23507
|
mounted.current = true;
|
|
22593
23508
|
const controller = new AbortController();
|
|
22594
23509
|
void load(controller.signal);
|
|
@@ -22675,7 +23590,7 @@ function GroupHistorySettings({ rpcCall }) {
|
|
|
22675
23590
|
}
|
|
22676
23591
|
|
|
22677
23592
|
// plugin-src/client/sidebar-settings.js
|
|
22678
|
-
var
|
|
23593
|
+
var React43 = __toESM(require("react"), 1);
|
|
22679
23594
|
var SIDEBAR_SETTINGS_RPC_CHANNEL = "/dsh-im-sidebar";
|
|
22680
23595
|
var SIDEBAR_SETTINGS_ENDPOINTS = Object.freeze({
|
|
22681
23596
|
get: "settings.sidebar-entry.get",
|
|
@@ -22741,16 +23656,16 @@ function installSidebarVisibilitySync({
|
|
|
22741
23656
|
};
|
|
22742
23657
|
}
|
|
22743
23658
|
function SidebarSettings({ rpcCall }) {
|
|
22744
|
-
const [mode, setMode] =
|
|
22745
|
-
const [phase, setPhase] =
|
|
22746
|
-
const [error, setError] =
|
|
22747
|
-
const [saved, setSaved] =
|
|
22748
|
-
const mounted =
|
|
22749
|
-
const busy =
|
|
22750
|
-
const failedMode =
|
|
22751
|
-
const id6 =
|
|
23659
|
+
const [mode, setMode] = React43.useState("auto");
|
|
23660
|
+
const [phase, setPhase] = React43.useState("loading");
|
|
23661
|
+
const [error, setError] = React43.useState(null);
|
|
23662
|
+
const [saved, setSaved] = React43.useState(false);
|
|
23663
|
+
const mounted = React43.useRef(false);
|
|
23664
|
+
const busy = React43.useRef(false);
|
|
23665
|
+
const failedMode = React43.useRef(null);
|
|
23666
|
+
const id6 = React43.useId();
|
|
22752
23667
|
const disabled = phase === "loading" || phase === "saving";
|
|
22753
|
-
const load =
|
|
23668
|
+
const load = React43.useCallback(async (signal) => {
|
|
22754
23669
|
setPhase("loading");
|
|
22755
23670
|
setError(null);
|
|
22756
23671
|
setSaved(false);
|
|
@@ -22766,7 +23681,7 @@ function SidebarSettings({ rpcCall }) {
|
|
|
22766
23681
|
setPhase("error");
|
|
22767
23682
|
}
|
|
22768
23683
|
}, [rpcCall]);
|
|
22769
|
-
|
|
23684
|
+
React43.useEffect(() => {
|
|
22770
23685
|
mounted.current = true;
|
|
22771
23686
|
const abort = new AbortController();
|
|
22772
23687
|
void load(abort.signal);
|
|
@@ -22861,7 +23776,7 @@ function SidebarSettings({ rpcCall }) {
|
|
|
22861
23776
|
}
|
|
22862
23777
|
|
|
22863
23778
|
// plugin-src/client/global-settings.js
|
|
22864
|
-
var
|
|
23779
|
+
var React44 = __toESM(require("react"), 1);
|
|
22865
23780
|
|
|
22866
23781
|
// src/channels/shared/inbound-ttl.mjs
|
|
22867
23782
|
var DEFAULT_INBOUND_TTL_HOURS = 168;
|
|
@@ -22906,6 +23821,12 @@ var GLOBAL_SETTINGS_RPC_CHANNEL = "/dsh-im-settings";
|
|
|
22906
23821
|
var GLOBAL_SETTINGS_TAB_ID = "global-settings";
|
|
22907
23822
|
var ATTACHMENTS_TAB_ID = "dim-general-settings-tab-attachments";
|
|
22908
23823
|
var ATTACHMENTS_PANEL_ID = "dim-general-settings-panel-attachments";
|
|
23824
|
+
var DELIVERY_PANEL_ID = "dim-general-settings-panel-delivery";
|
|
23825
|
+
var GLOBAL_SETTINGS_TABS = Object.freeze([
|
|
23826
|
+
{ key: "general", label: "\u901A\u7528" },
|
|
23827
|
+
{ key: "attachments", label: "\u9644\u4EF6" },
|
|
23828
|
+
{ key: "delivery", label: "\u6295\u9012" }
|
|
23829
|
+
]);
|
|
22909
23830
|
var GLOBAL_SETTINGS_ENDPOINTS = Object.freeze({
|
|
22910
23831
|
getTtl: "settings.inbound-ttl.get",
|
|
22911
23832
|
setTtl: "settings.inbound-ttl.set",
|
|
@@ -22946,14 +23867,14 @@ function GlobalButton({ children, kind = "secondary", className = "", ...props }
|
|
|
22946
23867
|
}, children);
|
|
22947
23868
|
}
|
|
22948
23869
|
function ImageInputSettings({ rpcCall }) {
|
|
22949
|
-
const [values, setValues] =
|
|
22950
|
-
const [phase, setPhase] =
|
|
22951
|
-
const [error, setError] =
|
|
22952
|
-
const [saved, setSaved] =
|
|
22953
|
-
const mounted =
|
|
22954
|
-
const saving =
|
|
22955
|
-
const id6 =
|
|
22956
|
-
const load =
|
|
23870
|
+
const [values, setValues] = React44.useState(DEFAULT_IMAGE_INPUT_SETTINGS);
|
|
23871
|
+
const [phase, setPhase] = React44.useState("loading");
|
|
23872
|
+
const [error, setError] = React44.useState(null);
|
|
23873
|
+
const [saved, setSaved] = React44.useState(false);
|
|
23874
|
+
const mounted = React44.useRef(false);
|
|
23875
|
+
const saving = React44.useRef(false);
|
|
23876
|
+
const id6 = React44.useId();
|
|
23877
|
+
const load = React44.useCallback(async (signal) => {
|
|
22957
23878
|
setPhase("loading");
|
|
22958
23879
|
setError(null);
|
|
22959
23880
|
try {
|
|
@@ -22969,7 +23890,7 @@ function ImageInputSettings({ rpcCall }) {
|
|
|
22969
23890
|
setPhase("error");
|
|
22970
23891
|
}
|
|
22971
23892
|
}, [rpcCall]);
|
|
22972
|
-
|
|
23893
|
+
React44.useEffect(() => {
|
|
22973
23894
|
mounted.current = true;
|
|
22974
23895
|
const controller = new AbortController();
|
|
22975
23896
|
void load(controller.signal);
|
|
@@ -23076,29 +23997,29 @@ function ImageInputSettings({ rpcCall }) {
|
|
|
23076
23997
|
);
|
|
23077
23998
|
}
|
|
23078
23999
|
function AttachmentSettingsPanel({ rpcCall }) {
|
|
23079
|
-
const [phase, setPhase] =
|
|
23080
|
-
const [loadError, setLoadError] =
|
|
23081
|
-
const [ttlInput, setTtlInput] =
|
|
23082
|
-
const [savedTtl, setSavedTtl] =
|
|
23083
|
-
const [ttlError, setTtlError] =
|
|
23084
|
-
const [saveError, setSaveError] =
|
|
23085
|
-
const [saveSucceeded, setSaveSucceeded] =
|
|
23086
|
-
const [isSaving, setIsSaving] =
|
|
23087
|
-
const [sweepConfirming, setSweepConfirming] =
|
|
23088
|
-
const [sweeping, setSweeping] =
|
|
23089
|
-
const ttlErrorId =
|
|
23090
|
-
const ttlHintsId =
|
|
23091
|
-
const sweepTriggerId =
|
|
23092
|
-
const sweepConfirmId =
|
|
23093
|
-
const sweepConfirmTextId =
|
|
23094
|
-
const sweepConfirmButtonId =
|
|
23095
|
-
const mounted =
|
|
23096
|
-
const saving =
|
|
23097
|
-
const invoke =
|
|
24000
|
+
const [phase, setPhase] = React44.useState("loading");
|
|
24001
|
+
const [loadError, setLoadError] = React44.useState(null);
|
|
24002
|
+
const [ttlInput, setTtlInput] = React44.useState("");
|
|
24003
|
+
const [savedTtl, setSavedTtl] = React44.useState(null);
|
|
24004
|
+
const [ttlError, setTtlError] = React44.useState(false);
|
|
24005
|
+
const [saveError, setSaveError] = React44.useState(null);
|
|
24006
|
+
const [saveSucceeded, setSaveSucceeded] = React44.useState(false);
|
|
24007
|
+
const [isSaving, setIsSaving] = React44.useState(false);
|
|
24008
|
+
const [sweepConfirming, setSweepConfirming] = React44.useState(false);
|
|
24009
|
+
const [sweeping, setSweeping] = React44.useState(false);
|
|
24010
|
+
const ttlErrorId = React44.useId();
|
|
24011
|
+
const ttlHintsId = React44.useId();
|
|
24012
|
+
const sweepTriggerId = React44.useId();
|
|
24013
|
+
const sweepConfirmId = React44.useId();
|
|
24014
|
+
const sweepConfirmTextId = React44.useId();
|
|
24015
|
+
const sweepConfirmButtonId = React44.useId();
|
|
24016
|
+
const mounted = React44.useRef(true);
|
|
24017
|
+
const saving = React44.useRef(false);
|
|
24018
|
+
const invoke = React44.useCallback(async (endpoint, payload = {}, signal) => {
|
|
23098
24019
|
if (typeof rpcCall !== "function") throw new Error("\u901A\u7528\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002");
|
|
23099
24020
|
return unwrapRpcResult17(await rpcCall(endpoint, payload, signal));
|
|
23100
24021
|
}, [rpcCall]);
|
|
23101
|
-
const loadSettings =
|
|
24022
|
+
const loadSettings = React44.useCallback(async ({ signal } = {}) => {
|
|
23102
24023
|
setPhase("loading");
|
|
23103
24024
|
setLoadError(null);
|
|
23104
24025
|
try {
|
|
@@ -23122,7 +24043,7 @@ function AttachmentSettingsPanel({ rpcCall }) {
|
|
|
23122
24043
|
setPhase("error");
|
|
23123
24044
|
}
|
|
23124
24045
|
}, [invoke]);
|
|
23125
|
-
|
|
24046
|
+
React44.useEffect(() => {
|
|
23126
24047
|
mounted.current = true;
|
|
23127
24048
|
const controller = new AbortController();
|
|
23128
24049
|
void loadSettings({ signal: controller.signal });
|
|
@@ -23131,7 +24052,7 @@ function AttachmentSettingsPanel({ rpcCall }) {
|
|
|
23131
24052
|
controller.abort();
|
|
23132
24053
|
};
|
|
23133
24054
|
}, [loadSettings]);
|
|
23134
|
-
|
|
24055
|
+
React44.useEffect(() => {
|
|
23135
24056
|
if (!sweepConfirming) return;
|
|
23136
24057
|
globalThis.document?.getElementById(sweepConfirmButtonId)?.focus();
|
|
23137
24058
|
}, [sweepConfirmButtonId, sweepConfirming]);
|
|
@@ -23355,9 +24276,37 @@ function AttachmentSettingsPanel({ rpcCall }) {
|
|
|
23355
24276
|
h2(ImageInputSettings, { rpcCall })
|
|
23356
24277
|
);
|
|
23357
24278
|
}
|
|
23358
|
-
function GlobalSettingsPanel({ rpcCall }) {
|
|
23359
|
-
const [tab, setTab] =
|
|
23360
|
-
const tabs =
|
|
24279
|
+
function GlobalSettingsPanel({ rpcCall, deliverySyncRpcCall = null, languageRpcCall = null }) {
|
|
24280
|
+
const [tab, setTab] = React44.useState("general");
|
|
24281
|
+
const tabs = GLOBAL_SETTINGS_TABS;
|
|
24282
|
+
const selectTab = (next) => {
|
|
24283
|
+
setTab(next);
|
|
24284
|
+
globalThis.document?.getElementById(`dim-general-settings-tab-${next}`)?.focus();
|
|
24285
|
+
};
|
|
24286
|
+
const step = (key) => {
|
|
24287
|
+
const at = tabs.findIndex((item) => item.key === tab);
|
|
24288
|
+
if (key === "Home") return tabs[0].key;
|
|
24289
|
+
if (key === "End") return tabs[tabs.length - 1].key;
|
|
24290
|
+
const delta = key === "ArrowLeft" ? -1 : 1;
|
|
24291
|
+
return tabs[(at + delta + tabs.length) % tabs.length].key;
|
|
24292
|
+
};
|
|
24293
|
+
const panel = tab === "attachments" ? h2(AttachmentSettingsPanel, { rpcCall }) : tab === "delivery" ? h2("div", {
|
|
24294
|
+
id: DELIVERY_PANEL_ID,
|
|
24295
|
+
className: "dim-generalSettingsTabPanel",
|
|
24296
|
+
role: "tabpanel",
|
|
24297
|
+
"aria-labelledby": `dim-general-settings-tab-delivery`
|
|
24298
|
+
}, h2(DeliverySyncSettings, {
|
|
24299
|
+
// This page has its own management channel: falling back to the
|
|
24300
|
+
// loopback-only settings call would hide a missing channel behind a
|
|
24301
|
+
// request the panel cannot actually use.
|
|
24302
|
+
rpcCall: deliverySyncRpcCall,
|
|
24303
|
+
languageRpcCall
|
|
24304
|
+
})) : h2("div", {
|
|
24305
|
+
id: "dim-general-settings-panel-general",
|
|
24306
|
+
className: "dim-generalSettingsTabPanel",
|
|
24307
|
+
role: "tabpanel",
|
|
24308
|
+
"aria-labelledby": "dim-general-settings-tab-general"
|
|
24309
|
+
}, h2(SidebarSettings, { rpcCall }), h2(GroupHistorySettings, { rpcCall }));
|
|
23361
24310
|
return h2(
|
|
23362
24311
|
"section",
|
|
23363
24312
|
{ className: "dim-generalSettingsPage", "aria-label": "\u901A\u7528\u8BBE\u7F6E" },
|
|
@@ -23381,19 +24330,12 @@ function GlobalSettingsPanel({ rpcCall }) {
|
|
|
23381
24330
|
onKeyDown: (event) => {
|
|
23382
24331
|
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
|
|
23383
24332
|
event.preventDefault();
|
|
23384
|
-
|
|
23385
|
-
setTab(next);
|
|
23386
|
-
globalThis.document?.getElementById(`dim-general-settings-tab-${next}`)?.focus();
|
|
24333
|
+
selectTab(step(event.key));
|
|
23387
24334
|
}
|
|
23388
24335
|
}, item.label))
|
|
23389
24336
|
)
|
|
23390
24337
|
),
|
|
23391
|
-
|
|
23392
|
-
id: "dim-general-settings-panel-general",
|
|
23393
|
-
className: "dim-generalSettingsTabPanel",
|
|
23394
|
-
role: "tabpanel",
|
|
23395
|
-
"aria-labelledby": "dim-general-settings-tab-general"
|
|
23396
|
-
}, h2(SidebarSettings, { rpcCall }), h2(GroupHistorySettings, { rpcCall })) : h2(AttachmentSettingsPanel, { rpcCall })
|
|
24338
|
+
panel
|
|
23397
24339
|
);
|
|
23398
24340
|
}
|
|
23399
24341
|
|
|
@@ -23568,14 +24510,14 @@ var CSS15 = String.raw`
|
|
|
23568
24510
|
.dim-githubLink:focus-visible { outline: 2px solid color-mix(in srgb, var(--dim-blue) 70%, white); outline-offset: 2px; }
|
|
23569
24511
|
.dim-updateTooltip, .dim-githubTooltip { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: max-content; max-width: min(220px, 80vw); padding: 6px 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-3, #fff); box-shadow: 0 8px 24px rgb(31 35 41 / 14%); font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; opacity: 0; visibility: hidden; transform: translateY(-3px); pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
|
|
23570
24512
|
.dim-updateAction:hover .dim-updateTooltip, .dim-updateTrigger:focus-visible + .dim-updateTooltip, .dim-githubAction:hover .dim-githubTooltip, .dim-githubAction:focus-within .dim-githubTooltip { opacity: 1; visibility: visible; transform: translateY(0); }
|
|
23571
|
-
.dim-generalSettingsAction { position: relative; display: inline-flex; flex: none; }
|
|
23572
|
-
.dim-generalSettingsButton { width: 30px; height: 30px; display: grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 8px; color: var(--dsw-alias-label-secondary, #646a73); background: var(--dsw-alias-bg-layer-1, #fff); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease; }
|
|
23573
|
-
.dim-generalSettingsButton svg { display: block; }
|
|
23574
|
-
.dim-generalSettingsButton:hover { border-color: #aeb3bb; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
|
|
24513
|
+
.dim-sessionHistoryAction, .dim-generalSettingsAction { position: relative; display: inline-flex; flex: none; }
|
|
24514
|
+
.dim-sessionHistoryButton, .dim-generalSettingsButton { width: 30px; height: 30px; display: grid; place-items: center; flex: none; padding: 0; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 8px; color: var(--dsw-alias-label-secondary, #646a73); background: var(--dsw-alias-bg-layer-1, #fff); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease; }
|
|
24515
|
+
.dim-sessionHistoryButton svg, .dim-generalSettingsButton svg { display: block; }
|
|
24516
|
+
.dim-sessionHistoryButton:hover, .dim-generalSettingsButton:hover { border-color: #aeb3bb; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
|
|
23575
24517
|
.dim-generalSettingsButton[aria-current="page"] { border-color: color-mix(in srgb, var(--dim-blue) 42%, var(--dsw-alias-border-l2, #dfe1e5)); color: var(--dim-blue); background: var(--dim-blue-soft); }
|
|
23576
|
-
.dim-generalSettingsButton:focus-visible { outline: 2px solid color-mix(in srgb, var(--dim-blue) 70%, white); outline-offset: 2px; }
|
|
23577
|
-
.dim-generalSettingsTooltip { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: max-content; padding: 6px 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-3, #fff); box-shadow: 0 8px 24px rgb(31 35 41 / 14%); font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; opacity: 0; visibility: hidden; transform: translateY(-3px); pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
|
|
23578
|
-
.dim-generalSettingsAction:hover .dim-generalSettingsTooltip, .dim-generalSettingsButton:focus-visible + .dim-generalSettingsTooltip { opacity: 1; visibility: visible; transform: translateY(0); }
|
|
24518
|
+
.dim-sessionHistoryButton:focus-visible, .dim-generalSettingsButton:focus-visible { outline: 2px solid color-mix(in srgb, var(--dim-blue) 70%, white); outline-offset: 2px; }
|
|
24519
|
+
.dim-sessionHistoryTooltip, .dim-generalSettingsTooltip { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: max-content; padding: 6px 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-bg-layer-3, #fff); box-shadow: 0 8px 24px rgb(31 35 41 / 14%); font-size: 11px; line-height: 16px; font-weight: 500; white-space: nowrap; opacity: 0; visibility: hidden; transform: translateY(-3px); pointer-events: none; transition: opacity .15s ease, transform .15s ease, visibility .15s ease; }
|
|
24520
|
+
.dim-sessionHistoryAction:hover .dim-sessionHistoryTooltip, .dim-sessionHistoryButton:focus-visible + .dim-sessionHistoryTooltip, .dim-generalSettingsAction:hover .dim-generalSettingsTooltip, .dim-generalSettingsButton:focus-visible + .dim-generalSettingsTooltip { opacity: 1; visibility: visible; transform: translateY(0); }
|
|
23579
24521
|
.dim-generalSettingsButton[aria-current="page"] + .dim-generalSettingsTooltip { opacity: 0; visibility: hidden; transform: translateY(-3px); }
|
|
23580
24522
|
.dim-layout { display: grid; grid-template-columns: 174px 1px minmax(0, 1fr); gap: 24px; align-items: start; }
|
|
23581
24523
|
.dim-rail { display: grid; align-content: start; gap: 8px; padding: 0 4px 1px 1px; }
|
|
@@ -24276,6 +25218,22 @@ var CSS15 = String.raw`
|
|
|
24276
25218
|
.dim-directoryPickerSpinner { animation-duration: 1.8s; }
|
|
24277
25219
|
.dim-collapsibleBody, .dim-collapsibleChevron { transition: none !important; }
|
|
24278
25220
|
}
|
|
25221
|
+
/* Delivery-sync settings (General settings -> Delivery tab) */
|
|
25222
|
+
.dim-deliverySyncSettings { container-type: inline-size; }
|
|
25223
|
+
.dim-deliverySyncSettings .dim-globalHead { position: relative; }
|
|
25224
|
+
.dim-deliverySyncSettings .dim-globalTtlHelp { position: static; }
|
|
25225
|
+
.dim-globalTtlTooltip.dim-deliverySyncTooltip { width: min(360px, 100%); max-width: none; color: var(--dsw-alias-label-secondary, #646a73); font-size: 11px; line-height: 17px; white-space: normal; overflow-wrap: anywhere; }
|
|
25226
|
+
.dim-deliverySyncFields { min-width: 0; display: grid; gap: 16px; margin-top: 12px; }
|
|
25227
|
+
.dim-deliverySyncField { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 200px); align-items: start; gap: 8px 16px; }
|
|
25228
|
+
.dim-deliverySyncLabel { min-width: 0; display: grid; gap: 4px; }
|
|
25229
|
+
.dim-deliverySyncLabel > label { color: var(--dsw-alias-label-primary, #1f2329); font-size: 14px; line-height: 22px; }
|
|
25230
|
+
.dim-deliverySyncCheckLabel { display: flex; align-items: center; gap: 8px; }
|
|
25231
|
+
.dim-deliverySyncCheckLabel input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--dsw-alias-state-business-primary, #3370ff); }
|
|
25232
|
+
.dim-deliverySyncHelp { margin: 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
|
|
25233
|
+
.dim-deliverySyncIcon { min-width: 0; display: grid; gap: 4px; }
|
|
25234
|
+
.dim-deliverySyncFields .dim-globalTtlInput { width: 100%; min-width: 0; }
|
|
25235
|
+
.dim-deliverySyncFeedback { margin: 10px 0 0; }
|
|
25236
|
+
@container (max-width: 460px) { .dim-deliverySyncField { grid-template-columns: minmax(0, 1fr); } }
|
|
24279
25237
|
`;
|
|
24280
25238
|
function installImStyles() {
|
|
24281
25239
|
if (typeof document === "undefined") return () => {
|
|
@@ -24551,7 +25509,7 @@ function installSessionChannelLogos(document2 = globalThis.document) {
|
|
|
24551
25509
|
}
|
|
24552
25510
|
|
|
24553
25511
|
// plugin-src/client/ds-bot-session-avatars.js
|
|
24554
|
-
var
|
|
25512
|
+
var React45 = __toESM(require("react"), 1);
|
|
24555
25513
|
var DS_BOT_SESSIONS_ENDPOINT = "ds-bot.sessions.list";
|
|
24556
25514
|
function installDsBotSessionAvatars(ctx, {
|
|
24557
25515
|
rpcCall,
|
|
@@ -24582,8 +25540,8 @@ function installDsBotSessionAvatars(ctx, {
|
|
|
24582
25540
|
return () => listeners.delete(listener);
|
|
24583
25541
|
};
|
|
24584
25542
|
function SessionAvatar({ sessionId }) {
|
|
24585
|
-
const bot =
|
|
24586
|
-
return bot ?
|
|
25543
|
+
const bot = React45.useSyncExternalStore(subscribe, () => bots.get(sessionId) ?? null);
|
|
25544
|
+
return bot ? React45.createElement(DsBotAvatar, { bot, size: 16 }) : null;
|
|
24587
25545
|
}
|
|
24588
25546
|
const schedule = () => {
|
|
24589
25547
|
clearTimeoutFn(timer);
|
|
@@ -24634,7 +25592,7 @@ function installDsBotSessionAvatars(ctx, {
|
|
|
24634
25592
|
}
|
|
24635
25593
|
|
|
24636
25594
|
// plugin-src/client/update-panel.js
|
|
24637
|
-
var
|
|
25595
|
+
var React46 = __toESM(require("react"), 1);
|
|
24638
25596
|
var import_react_dom4 = require("react-dom");
|
|
24639
25597
|
var import_valid = __toESM(require_valid(), 1);
|
|
24640
25598
|
var import_rcompare = __toESM(require_rcompare(), 1);
|
|
@@ -24727,11 +25685,11 @@ function manualUpdateCommand(snapshot) {
|
|
|
24727
25685
|
return `dsh plugin --profile ${profileArgument} add -w @xmanrui/dsh-im@${version}`;
|
|
24728
25686
|
}
|
|
24729
25687
|
function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
|
|
24730
|
-
const [copyState, setCopyState] =
|
|
24731
|
-
const commandRef =
|
|
24732
|
-
const mounted =
|
|
24733
|
-
const copying =
|
|
24734
|
-
|
|
25688
|
+
const [copyState, setCopyState] = React46.useState("idle");
|
|
25689
|
+
const commandRef = React46.useRef(null);
|
|
25690
|
+
const mounted = React46.useRef(false);
|
|
25691
|
+
const copying = React46.useRef(false);
|
|
25692
|
+
React46.useEffect(() => {
|
|
24735
25693
|
mounted.current = true;
|
|
24736
25694
|
return () => {
|
|
24737
25695
|
mounted.current = false;
|
|
@@ -24763,7 +25721,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
|
|
|
24763
25721
|
{ className: "dim-updateManual", "aria-label": "\u624B\u5DE5\u66F4\u65B0" },
|
|
24764
25722
|
h2("h4", { className: "dim-updateManualHeading" }, "\u624B\u5DE5\u66F4\u65B0"),
|
|
24765
25723
|
command ? h2(
|
|
24766
|
-
|
|
25724
|
+
React46.Fragment,
|
|
24767
25725
|
null,
|
|
24768
25726
|
h2("p", { className: "dim-updateManualHint" }, "\u81EA\u52A8\u66F4\u65B0\u5931\u8D25\u53EF\u4EE5\u4F7F\u7528\u547D\u4EE4\u66F4\u65B0\uFF1A"),
|
|
24769
25727
|
h2(
|
|
@@ -24799,7 +25757,7 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
|
|
|
24799
25757
|
"aria-hidden": "true",
|
|
24800
25758
|
focusable: "false"
|
|
24801
25759
|
}, copyState === "copied" ? h2("path", { d: "m4 10 4 4 8-8" }) : h2(
|
|
24802
|
-
|
|
25760
|
+
React46.Fragment,
|
|
24803
25761
|
null,
|
|
24804
25762
|
h2("rect", { x: 7, y: 7, width: 10, height: 11, rx: 1.5 }),
|
|
24805
25763
|
h2("path", { d: "M5 13H3.5A1.5 1.5 0 0 1 2 11.5v-8A1.5 1.5 0 0 1 3.5 2h8A1.5 1.5 0 0 1 13 3.5V5" })
|
|
@@ -24824,10 +25782,10 @@ function ManualUpdateCommand({ command, disabled, sourceInstall, desktop }) {
|
|
|
24824
25782
|
);
|
|
24825
25783
|
}
|
|
24826
25784
|
function UpdateDialog({ children, onClose }) {
|
|
24827
|
-
const dialogRef =
|
|
24828
|
-
const titleId =
|
|
24829
|
-
const descriptionId =
|
|
24830
|
-
|
|
25785
|
+
const dialogRef = React46.useRef(null);
|
|
25786
|
+
const titleId = React46.useId();
|
|
25787
|
+
const descriptionId = React46.useId();
|
|
25788
|
+
React46.useEffect(() => {
|
|
24831
25789
|
const previous = globalThis.document?.activeElement;
|
|
24832
25790
|
dialogRef.current?.focus?.();
|
|
24833
25791
|
return () => {
|
|
@@ -24885,20 +25843,20 @@ function UpdateDialog({ children, onClose }) {
|
|
|
24885
25843
|
return typeof document !== "undefined" && document.body ? (0, import_react_dom4.createPortal)(content, document.body) : content;
|
|
24886
25844
|
}
|
|
24887
25845
|
function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
24888
|
-
const tooltipId =
|
|
24889
|
-
const [snapshot, setSnapshot] =
|
|
24890
|
-
const [action, setAction] =
|
|
24891
|
-
const [error, setError] =
|
|
24892
|
-
const [open, setOpen] =
|
|
24893
|
-
const [uncertainInstall, setUncertainInstall] =
|
|
24894
|
-
const mounted =
|
|
24895
|
-
const busy =
|
|
24896
|
-
const readController =
|
|
24897
|
-
const pollReadController =
|
|
24898
|
-
const installRequest =
|
|
24899
|
-
const onStatusRef =
|
|
25846
|
+
const tooltipId = React46.useId();
|
|
25847
|
+
const [snapshot, setSnapshot] = React46.useState(null);
|
|
25848
|
+
const [action, setAction] = React46.useState("status");
|
|
25849
|
+
const [error, setError] = React46.useState(null);
|
|
25850
|
+
const [open, setOpen] = React46.useState(false);
|
|
25851
|
+
const [uncertainInstall, setUncertainInstall] = React46.useState(false);
|
|
25852
|
+
const mounted = React46.useRef(false);
|
|
25853
|
+
const busy = React46.useRef(false);
|
|
25854
|
+
const readController = React46.useRef(null);
|
|
25855
|
+
const pollReadController = React46.useRef(null);
|
|
25856
|
+
const installRequest = React46.useRef(null);
|
|
25857
|
+
const onStatusRef = React46.useRef(onStatus);
|
|
24900
25858
|
onStatusRef.current = onStatus;
|
|
24901
|
-
const accept =
|
|
25859
|
+
const accept = React46.useCallback((next) => {
|
|
24902
25860
|
setSnapshot(next);
|
|
24903
25861
|
onStatusRef.current?.(next);
|
|
24904
25862
|
}, []);
|
|
@@ -24907,7 +25865,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
24907
25865
|
setUncertainInstall(false);
|
|
24908
25866
|
accept(next);
|
|
24909
25867
|
};
|
|
24910
|
-
const invoke =
|
|
25868
|
+
const invoke = React46.useCallback(async (endpoint, payload = {}, signal) => {
|
|
24911
25869
|
if (typeof rpcCall !== "function") {
|
|
24912
25870
|
const unavailable = new Error("\u5F53\u524D Host \u4E0D\u652F\u6301\u66F4\u65B0\u63A5\u53E3\uFF0C\u8BF7\u5148\u624B\u52A8\u66F4\u65B0\u63D2\u4EF6\u5E76\u91CD\u542F\u3002");
|
|
24913
25871
|
unavailable.code = "update-unavailable";
|
|
@@ -24915,7 +25873,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
24915
25873
|
}
|
|
24916
25874
|
return unwrapSnapshot(await rpcCall(endpoint, payload, signal));
|
|
24917
25875
|
}, [rpcCall]);
|
|
24918
|
-
|
|
25876
|
+
React46.useEffect(() => {
|
|
24919
25877
|
mounted.current = true;
|
|
24920
25878
|
busy.current = true;
|
|
24921
25879
|
const controller = new AbortController();
|
|
@@ -24938,7 +25896,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
24938
25896
|
const activeJob = ACTIVE_STATES4.has(snapshot?.job?.state);
|
|
24939
25897
|
const restartRequired = snapshot?.job?.state === "restart-required" || snapshot?.blockedReason === "pending-restart";
|
|
24940
25898
|
const shouldPoll = activeJob || uncertainInstall;
|
|
24941
|
-
|
|
25899
|
+
React46.useEffect(() => {
|
|
24942
25900
|
if (!shouldPoll) return void 0;
|
|
24943
25901
|
let controller;
|
|
24944
25902
|
const scheduler = createPollScheduler({
|
|
@@ -25039,7 +25997,7 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
25039
25997
|
const buttonLabel = action === "checking" ? "\u68C0\u67E5\u4E2D\u2026" : action === "starting" || activeJob ? "\u6B63\u5728\u66F4\u65B0\u2026" : restartRequired ? "\u5F85\u624B\u52A8\u91CD\u542F" : snapshot?.canInstall ? "\u66F4\u65B0\u81F3" : "\u68C0\u67E5\u66F4\u65B0";
|
|
25040
25998
|
const buttonDescription = localizeText(buttonLabel) + (buttonLabel === "\u66F4\u65B0\u81F3" ? ` v${snapshot.latestVersion}` : "");
|
|
25041
25999
|
return h2(
|
|
25042
|
-
|
|
26000
|
+
React46.Fragment,
|
|
25043
26001
|
null,
|
|
25044
26002
|
h2(
|
|
25045
26003
|
"span",
|
|
@@ -25089,25 +26047,25 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
25089
26047
|
h2("dt", null, "\u8FD0\u884C\u7248\u672C"),
|
|
25090
26048
|
h2("dd", null, `v${snapshot?.runningVersion ?? clientVersion}`),
|
|
25091
26049
|
snapshot?.installedVersion && snapshot.installedVersion !== snapshot.runningVersion ? h2(
|
|
25092
|
-
|
|
26050
|
+
React46.Fragment,
|
|
25093
26051
|
null,
|
|
25094
26052
|
h2("dt", null, "\u5DF2\u5B89\u88C5\u7248\u672C"),
|
|
25095
26053
|
h2("dd", null, `v${snapshot.installedVersion}`)
|
|
25096
26054
|
) : null,
|
|
25097
26055
|
targetVersion ? h2(
|
|
25098
|
-
|
|
26056
|
+
React46.Fragment,
|
|
25099
26057
|
null,
|
|
25100
26058
|
h2("dt", null, "\u76EE\u6807\u7248\u672C"),
|
|
25101
26059
|
h2("dd", null, `v${targetVersion}`)
|
|
25102
26060
|
) : null,
|
|
25103
26061
|
latestVersion ? h2(
|
|
25104
|
-
|
|
26062
|
+
React46.Fragment,
|
|
25105
26063
|
null,
|
|
25106
26064
|
h2("dt", null, "\u6700\u65B0\u7248\u672C"),
|
|
25107
26065
|
h2("dd", null, `v${latestVersion}`)
|
|
25108
26066
|
) : null,
|
|
25109
26067
|
historicalTargetVersion ? h2(
|
|
25110
|
-
|
|
26068
|
+
React46.Fragment,
|
|
25111
26069
|
null,
|
|
25112
26070
|
h2("dt", null, "\u4E0A\u6B21\u66F4\u65B0\u76EE\u6807"),
|
|
25113
26071
|
h2("dd", null, `v${historicalTargetVersion}`)
|
|
@@ -25146,7 +26104,8 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
25146
26104
|
h2("strong", null, "DSH \u7248\u672C\u517C\u5BB9\u8BF4\u660E"),
|
|
25147
26105
|
h2("p", { className: "dim-updateManualHint" }, "dsh-im 4.25.0 \u652F\u6301\u5230 DSH v0.1.6-alpha.2\u3002"),
|
|
25148
26106
|
h2("p", { className: "dim-updateManualHint" }, "dsh-im 4.39.0 \u4EC5\u652F\u6301 DSH 0.2.0-rc.2\u3002"),
|
|
25149
|
-
h2("p", { className: "dim-updateManualHint" }, "dsh-im 5.0.0 \u4EC5\u652F\u6301 DSH 0.2.1-rc.2\u3002")
|
|
26107
|
+
h2("p", { className: "dim-updateManualHint" }, "dsh-im 5.0.0 \u4EC5\u652F\u6301 DSH 0.2.1-rc.2\u3002"),
|
|
26108
|
+
h2("p", { className: "dim-updateManualHint" }, "dsh-im 5.10.0 \u8D77\u652F\u6301 DSH 0.2.2-rc.5\u3002")
|
|
25150
26109
|
),
|
|
25151
26110
|
h2(ManualUpdateCommand, {
|
|
25152
26111
|
key: manualCommand ?? "unavailable",
|
|
@@ -25184,8 +26143,8 @@ function UpdatePanel({ rpcCall, clientVersion, onStatus }) {
|
|
|
25184
26143
|
}
|
|
25185
26144
|
|
|
25186
26145
|
// plugin-src/client/panel-error-boundary.js
|
|
25187
|
-
var
|
|
25188
|
-
var IMPanelErrorBoundary = class extends
|
|
26146
|
+
var React47 = __toESM(require("react"), 1);
|
|
26147
|
+
var IMPanelErrorBoundary = class extends React47.Component {
|
|
25189
26148
|
state = { failed: false };
|
|
25190
26149
|
static getDerivedStateFromError() {
|
|
25191
26150
|
return { failed: true };
|
|
@@ -25205,9 +26164,9 @@ var IMPanelErrorBoundary = class extends React46.Component {
|
|
|
25205
26164
|
};
|
|
25206
26165
|
|
|
25207
26166
|
// plugin-src/client/plugin-page.js
|
|
25208
|
-
var
|
|
26167
|
+
var React48 = __toESM(require("react"), 1);
|
|
25209
26168
|
var IM_MAIN_PANEL_ID = "xmanrui-dsh-im";
|
|
25210
|
-
var h3 =
|
|
26169
|
+
var h3 = React48.createElement;
|
|
25211
26170
|
function OpenImAction({ subject, packageName, onOpen, t }) {
|
|
25212
26171
|
if (subject?.kind !== "bundle" && subject?.kind !== "row") return null;
|
|
25213
26172
|
if (subject.pkg?.name !== packageName) return null;
|
|
@@ -25306,6 +26265,520 @@ function installImPluginPage(ctx, { packageName, renderPanel, sidebarVisible = f
|
|
|
25306
26265
|
return controller;
|
|
25307
26266
|
}
|
|
25308
26267
|
|
|
26268
|
+
// plugin-src/client/im-channels.js
|
|
26269
|
+
var React49 = __toESM(require("react"), 1);
|
|
26270
|
+
var CHANNEL_LIST_RPC_CHANNEL = "/dsh-im-channels";
|
|
26271
|
+
var CHANNEL_SESSIONS_PANEL_ID = "xmanrui-dsh-im-channels";
|
|
26272
|
+
var CHANNEL_LABELS = Object.freeze({
|
|
26273
|
+
matrix: "Matrix",
|
|
26274
|
+
telegram: "Telegram",
|
|
26275
|
+
whatsapp: "WhatsApp",
|
|
26276
|
+
wecom: "\u5FAE\u4FE1\u5BA2\u670D",
|
|
26277
|
+
"wecom-app": "\u4F01\u4E1A\u5FAE\u4FE1",
|
|
26278
|
+
feishu: "\u98DE\u4E66",
|
|
26279
|
+
dingtalk: "\u9489\u9489",
|
|
26280
|
+
slack: "Slack",
|
|
26281
|
+
discord: "Discord",
|
|
26282
|
+
line: "LINE",
|
|
26283
|
+
qq: "QQ"
|
|
26284
|
+
});
|
|
26285
|
+
var styles = Object.freeze({
|
|
26286
|
+
header: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 16, marginBottom: 20 },
|
|
26287
|
+
title: { margin: 0, fontSize: 22, fontWeight: 650 },
|
|
26288
|
+
description: { margin: "6px 0 0", opacity: 0.68, lineHeight: 1.6 },
|
|
26289
|
+
button: { border: "1px solid var(--dim-border, #444)", borderRadius: 6, background: "transparent", color: "inherit", padding: "6px 12px", cursor: "pointer", whiteSpace: "nowrap" },
|
|
26290
|
+
group: { marginBottom: 22 },
|
|
26291
|
+
groupTitle: { display: "flex", alignItems: "center", gap: 8, margin: "0 0 8px", fontSize: 16 },
|
|
26292
|
+
count: { opacity: 0.58, fontSize: 12, fontWeight: 400 },
|
|
26293
|
+
tableWrap: { overflowX: "auto", border: "1px solid var(--dim-border, #444)", borderRadius: 8 },
|
|
26294
|
+
table: { width: "100%", borderCollapse: "collapse", fontSize: 13 },
|
|
26295
|
+
th: { textAlign: "left", padding: "10px 12px", borderBottom: "1px solid var(--dim-border, #444)", opacity: 0.65, fontWeight: 500 },
|
|
26296
|
+
td: { padding: "10px 12px", borderBottom: "1px solid var(--dim-border, #333)", verticalAlign: "top" },
|
|
26297
|
+
code: { fontFamily: "ui-monospace, SFMono-Regular, Consolas, monospace", fontSize: 12, overflowWrap: "anywhere" },
|
|
26298
|
+
secondary: { display: "block", marginTop: 4, opacity: 0.55, fontSize: 11 },
|
|
26299
|
+
muted: { opacity: 0.65, padding: "24px 0" },
|
|
26300
|
+
error: { padding: 12, marginBottom: 16, borderRadius: 6, background: "var(--dim-error-bg, rgba(220, 70, 70, .12))", color: "var(--dim-error, #e17777)", whiteSpace: "pre-wrap", overflowWrap: "anywhere" },
|
|
26301
|
+
actions: { display: "flex", flexWrap: "wrap", gap: 8, alignItems: "center" },
|
|
26302
|
+
messageList: { display: "flex", flexDirection: "column", gap: 12, marginTop: 16 },
|
|
26303
|
+
message: { maxWidth: 920, padding: "12px 14px", border: "1px solid var(--dim-border, #444)", borderRadius: 10, background: "var(--dim-bg-secondary, rgba(127, 127, 127, .06))" },
|
|
26304
|
+
userMessage: { borderColor: "var(--dim-accent-border, rgba(80, 140, 220, .45))", background: "var(--dim-accent-bg, rgba(80, 140, 220, .08))" },
|
|
26305
|
+
messageMeta: { display: "flex", justifyContent: "space-between", gap: 12, marginBottom: 7, opacity: 0.62, fontSize: 12 },
|
|
26306
|
+
messageText: { whiteSpace: "pre-wrap", overflowWrap: "anywhere", lineHeight: 1.65, fontSize: 14 },
|
|
26307
|
+
detailMeta: { margin: "8px 0 0", opacity: 0.68, lineHeight: 1.7, overflowWrap: "anywhere" }
|
|
26308
|
+
});
|
|
26309
|
+
function formatTime(value) {
|
|
26310
|
+
if (!Number.isFinite(value)) return "";
|
|
26311
|
+
try {
|
|
26312
|
+
const locale = imLocale();
|
|
26313
|
+
const tag = locale === "zh" ? "zh-CN" : locale === "ru" ? "ru-RU" : "en-US";
|
|
26314
|
+
return new Date(value).toLocaleString(tag, { hour12: false });
|
|
26315
|
+
} catch {
|
|
26316
|
+
return "";
|
|
26317
|
+
}
|
|
26318
|
+
}
|
|
26319
|
+
function text8(value) {
|
|
26320
|
+
return String(value == null ? "" : value);
|
|
26321
|
+
}
|
|
26322
|
+
function errorText(error) {
|
|
26323
|
+
return error instanceof Error ? error.message : text8(error);
|
|
26324
|
+
}
|
|
26325
|
+
async function copyText2(value) {
|
|
26326
|
+
if (globalThis.navigator?.clipboard?.writeText) {
|
|
26327
|
+
await globalThis.navigator.clipboard.writeText(value);
|
|
26328
|
+
return;
|
|
26329
|
+
}
|
|
26330
|
+
const area = document.createElement("textarea");
|
|
26331
|
+
area.value = value;
|
|
26332
|
+
area.style.position = "fixed";
|
|
26333
|
+
area.style.opacity = "0";
|
|
26334
|
+
document.body.appendChild(area);
|
|
26335
|
+
area.select();
|
|
26336
|
+
const copied = document.execCommand("copy");
|
|
26337
|
+
area.remove();
|
|
26338
|
+
if (!copied) throw new Error("\u6D4F\u89C8\u5668\u672A\u5141\u8BB8\u8BBF\u95EE\u526A\u8D34\u677F");
|
|
26339
|
+
}
|
|
26340
|
+
var ChannelListPage = class extends React49.Component {
|
|
26341
|
+
constructor(props) {
|
|
26342
|
+
super(props);
|
|
26343
|
+
this.state = {
|
|
26344
|
+
channels: null,
|
|
26345
|
+
error: null,
|
|
26346
|
+
refreshing: false,
|
|
26347
|
+
copyStatus: null,
|
|
26348
|
+
selected: null,
|
|
26349
|
+
detail: null,
|
|
26350
|
+
detailError: null,
|
|
26351
|
+
detailLoading: false,
|
|
26352
|
+
loadingEarlier: false
|
|
26353
|
+
};
|
|
26354
|
+
this.reload = this.reload.bind(this);
|
|
26355
|
+
this.openSession = this.openSession.bind(this);
|
|
26356
|
+
this.backToList = this.backToList.bind(this);
|
|
26357
|
+
this.loadEarlier = this.loadEarlier.bind(this);
|
|
26358
|
+
this.copySession = this.copySession.bind(this);
|
|
26359
|
+
this.unmounted = false;
|
|
26360
|
+
this.request = null;
|
|
26361
|
+
this.detailRequest = null;
|
|
26362
|
+
this.copyTimer = null;
|
|
26363
|
+
}
|
|
26364
|
+
componentDidMount() {
|
|
26365
|
+
void this.reload();
|
|
26366
|
+
}
|
|
26367
|
+
componentWillUnmount() {
|
|
26368
|
+
this.unmounted = true;
|
|
26369
|
+
this.request?.abort();
|
|
26370
|
+
this.detailRequest?.abort();
|
|
26371
|
+
if (this.copyTimer) clearTimeout(this.copyTimer);
|
|
26372
|
+
}
|
|
26373
|
+
rpc(method, payload, signal) {
|
|
26374
|
+
const call = this.props.channelListRpcCall || ((endpoint, body, rpcSignal) => callManagementRpc(this.props.ctx.connection, CHANNEL_LIST_RPC_CHANNEL, endpoint, body, rpcSignal));
|
|
26375
|
+
return call(method, payload, signal);
|
|
26376
|
+
}
|
|
26377
|
+
async reload() {
|
|
26378
|
+
this.request?.abort();
|
|
26379
|
+
const controller = new AbortController();
|
|
26380
|
+
this.request = controller;
|
|
26381
|
+
this.setState({ refreshing: true, error: null });
|
|
26382
|
+
try {
|
|
26383
|
+
const result2 = await this.rpc("list.channels", {}, controller.signal);
|
|
26384
|
+
if (controller.signal.aborted) return;
|
|
26385
|
+
if (!result2 || result2.ok !== true) {
|
|
26386
|
+
throw new Error(result2?.error?.message || result2?.error?.code || "failed to list channels");
|
|
26387
|
+
}
|
|
26388
|
+
if (!Array.isArray(result2.value?.channels)) {
|
|
26389
|
+
throw new Error("\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.channels\uFF0C\u8BF7\u68C0\u67E5 dsh-im host \u662F\u5426\u5DF2\u91CD\u8F7D");
|
|
26390
|
+
}
|
|
26391
|
+
if (!this.unmounted) this.setState({ channels: result2.value.channels });
|
|
26392
|
+
} catch (error) {
|
|
26393
|
+
if (controller.signal.aborted || this.unmounted) return;
|
|
26394
|
+
this.setState({ channels: null, error: errorText(error) });
|
|
26395
|
+
} finally {
|
|
26396
|
+
if (this.request === controller) {
|
|
26397
|
+
this.request = null;
|
|
26398
|
+
if (!this.unmounted) this.setState({ refreshing: false });
|
|
26399
|
+
}
|
|
26400
|
+
}
|
|
26401
|
+
}
|
|
26402
|
+
async openSession(group, row) {
|
|
26403
|
+
const selected = {
|
|
26404
|
+
channel: group.channel,
|
|
26405
|
+
key: text8(row.key),
|
|
26406
|
+
botId: text8(row.botId),
|
|
26407
|
+
sessionId: text8(row.sessionId)
|
|
26408
|
+
};
|
|
26409
|
+
this.detailRequest?.abort();
|
|
26410
|
+
const controller = new AbortController();
|
|
26411
|
+
this.detailRequest = controller;
|
|
26412
|
+
this.setState({
|
|
26413
|
+
selected,
|
|
26414
|
+
detail: null,
|
|
26415
|
+
detailError: null,
|
|
26416
|
+
detailLoading: true,
|
|
26417
|
+
loadingEarlier: false
|
|
26418
|
+
});
|
|
26419
|
+
try {
|
|
26420
|
+
const result2 = await this.rpc("session.read", selected, controller.signal);
|
|
26421
|
+
if (controller.signal.aborted || this.detailRequest !== controller) return;
|
|
26422
|
+
if (!result2 || result2.ok !== true) {
|
|
26423
|
+
throw new Error(result2?.error?.message || result2?.error?.code || "failed to read session");
|
|
26424
|
+
}
|
|
26425
|
+
if (!Array.isArray(result2.value?.messages)) {
|
|
26426
|
+
throw new Error("\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.messages\uFF0C\u8BF7\u68C0\u67E5 dsh-im host \u662F\u5426\u5DF2\u91CD\u8F7D");
|
|
26427
|
+
}
|
|
26428
|
+
this.setState({ detail: result2.value, detailError: null });
|
|
26429
|
+
} catch (error) {
|
|
26430
|
+
if (controller.signal.aborted || this.unmounted || this.detailRequest !== controller) return;
|
|
26431
|
+
this.setState({ detailError: errorText(error) });
|
|
26432
|
+
} finally {
|
|
26433
|
+
if (this.detailRequest === controller) {
|
|
26434
|
+
this.detailRequest = null;
|
|
26435
|
+
if (!this.unmounted) this.setState({ detailLoading: false });
|
|
26436
|
+
}
|
|
26437
|
+
}
|
|
26438
|
+
}
|
|
26439
|
+
backToList() {
|
|
26440
|
+
this.detailRequest?.abort();
|
|
26441
|
+
this.detailRequest = null;
|
|
26442
|
+
this.setState({
|
|
26443
|
+
selected: null,
|
|
26444
|
+
detail: null,
|
|
26445
|
+
detailError: null,
|
|
26446
|
+
detailLoading: false,
|
|
26447
|
+
loadingEarlier: false
|
|
26448
|
+
});
|
|
26449
|
+
}
|
|
26450
|
+
async loadEarlier() {
|
|
26451
|
+
const { selected, detail } = this.state;
|
|
26452
|
+
if (!selected || !detail?.hasMore || this.detailRequest) return;
|
|
26453
|
+
const controller = new AbortController();
|
|
26454
|
+
this.detailRequest = controller;
|
|
26455
|
+
this.setState({ loadingEarlier: true, detailError: null });
|
|
26456
|
+
try {
|
|
26457
|
+
const result2 = await this.rpc("session.read", {
|
|
26458
|
+
...selected,
|
|
26459
|
+
offset: detail.nextOffset,
|
|
26460
|
+
limit: detail.limit
|
|
26461
|
+
}, controller.signal);
|
|
26462
|
+
if (controller.signal.aborted || this.detailRequest !== controller) return;
|
|
26463
|
+
if (!result2 || result2.ok !== true) {
|
|
26464
|
+
throw new Error(result2?.error?.message || result2?.error?.code || "failed to read earlier messages");
|
|
26465
|
+
}
|
|
26466
|
+
if (!Array.isArray(result2.value?.messages)) throw new Error("\u5BBF\u4E3B\u54CD\u5E94\u7F3A\u5C11 value.messages");
|
|
26467
|
+
const earlier = result2.value;
|
|
26468
|
+
this.setState((previous) => {
|
|
26469
|
+
if (!previous.detail) return null;
|
|
26470
|
+
const prependCount = Math.max(0, previous.detail.offset - earlier.offset);
|
|
26471
|
+
return {
|
|
26472
|
+
detail: {
|
|
26473
|
+
...previous.detail,
|
|
26474
|
+
offset: earlier.offset,
|
|
26475
|
+
hasMore: earlier.hasMore,
|
|
26476
|
+
nextOffset: earlier.nextOffset,
|
|
26477
|
+
messages: [
|
|
26478
|
+
...earlier.messages.slice(0, prependCount),
|
|
26479
|
+
...previous.detail.messages
|
|
26480
|
+
]
|
|
26481
|
+
}
|
|
26482
|
+
};
|
|
26483
|
+
});
|
|
26484
|
+
} catch (error) {
|
|
26485
|
+
if (controller.signal.aborted || this.unmounted || this.detailRequest !== controller) return;
|
|
26486
|
+
this.setState({ detailError: errorText(error) });
|
|
26487
|
+
} finally {
|
|
26488
|
+
if (this.detailRequest === controller) {
|
|
26489
|
+
this.detailRequest = null;
|
|
26490
|
+
if (!this.unmounted) this.setState({ loadingEarlier: false });
|
|
26491
|
+
}
|
|
26492
|
+
}
|
|
26493
|
+
}
|
|
26494
|
+
async copySession(sessionId) {
|
|
26495
|
+
try {
|
|
26496
|
+
await copyText2(sessionId);
|
|
26497
|
+
if (!this.unmounted) this.setState({ copyStatus: { sessionId, ok: true } });
|
|
26498
|
+
} catch {
|
|
26499
|
+
if (!this.unmounted) this.setState({ copyStatus: { sessionId, ok: false } });
|
|
26500
|
+
}
|
|
26501
|
+
if (this.copyTimer) clearTimeout(this.copyTimer);
|
|
26502
|
+
this.copyTimer = setTimeout(() => {
|
|
26503
|
+
if (!this.unmounted) this.setState({ copyStatus: null });
|
|
26504
|
+
}, 1800);
|
|
26505
|
+
}
|
|
26506
|
+
renderRow(group, row) {
|
|
26507
|
+
const sessionId = text8(row.sessionId);
|
|
26508
|
+
const status = this.state.copyStatus?.sessionId === sessionId ? this.state.copyStatus : null;
|
|
26509
|
+
return h2(
|
|
26510
|
+
"tr",
|
|
26511
|
+
{ key: `${group.channel}:${row.botId}:${row.key}:${sessionId}` },
|
|
26512
|
+
h2(
|
|
26513
|
+
"td",
|
|
26514
|
+
{ style: styles.td },
|
|
26515
|
+
h2("code", { style: styles.code }, text8(row.key)),
|
|
26516
|
+
h2("span", { style: styles.secondary }, `bot\uFF1A${text8(row.botId)}`)
|
|
26517
|
+
),
|
|
26518
|
+
h2(
|
|
26519
|
+
"td",
|
|
26520
|
+
{ style: styles.td },
|
|
26521
|
+
h2("button", {
|
|
26522
|
+
type: "button",
|
|
26523
|
+
style: { ...styles.button, ...styles.code, padding: "4px 6px", textAlign: "left" },
|
|
26524
|
+
className: "im-channel-session-open",
|
|
26525
|
+
onClick: () => {
|
|
26526
|
+
void this.openSession(group, row);
|
|
26527
|
+
},
|
|
26528
|
+
"aria-label": localizeTemplate("\u67E5\u770B\u4F1A\u8BDD {sessionId}", { sessionId }),
|
|
26529
|
+
title: "\u67E5\u770B\u8BE5\u4F1A\u8BDD\u7684\u7528\u6237\u4E0E\u52A9\u624B\u6B63\u6587"
|
|
26530
|
+
}, sessionId)
|
|
26531
|
+
),
|
|
26532
|
+
h2(
|
|
26533
|
+
"td",
|
|
26534
|
+
{ style: { ...styles.td, width: 88 } },
|
|
26535
|
+
h2("button", {
|
|
26536
|
+
type: "button",
|
|
26537
|
+
style: styles.button,
|
|
26538
|
+
className: "im-channel-session-copy",
|
|
26539
|
+
onClick: () => {
|
|
26540
|
+
void this.copySession(sessionId);
|
|
26541
|
+
},
|
|
26542
|
+
"aria-label": localizeTemplate("\u590D\u5236\u4F1A\u8BDD ID {sessionId}", { sessionId })
|
|
26543
|
+
}, status ? status.ok ? "\u5DF2\u590D\u5236" : "\u590D\u5236\u5931\u8D25" : "\u590D\u5236 ID")
|
|
26544
|
+
)
|
|
26545
|
+
);
|
|
26546
|
+
}
|
|
26547
|
+
renderGroup(group) {
|
|
26548
|
+
const label = CHANNEL_LABELS[group.channel] || group.channel;
|
|
26549
|
+
const rows = Array.isArray(group.sessions) ? group.sessions : [];
|
|
26550
|
+
return h2(
|
|
26551
|
+
"section",
|
|
26552
|
+
{ key: group.channel, className: "im-channel-group", style: styles.group },
|
|
26553
|
+
h2(
|
|
26554
|
+
"h2",
|
|
26555
|
+
{ style: styles.groupTitle },
|
|
26556
|
+
label,
|
|
26557
|
+
group.channel === label ? null : h2("span", { style: styles.count }, group.channel),
|
|
26558
|
+
h2("span", { style: styles.count }, localizeTemplate("{count} \u4E2A\u4F1A\u8BDD", { count: rows.length }))
|
|
26559
|
+
),
|
|
26560
|
+
h2(
|
|
26561
|
+
"div",
|
|
26562
|
+
{ style: styles.tableWrap },
|
|
26563
|
+
h2(
|
|
26564
|
+
"table",
|
|
26565
|
+
{ style: styles.table },
|
|
26566
|
+
h2("thead", null, h2(
|
|
26567
|
+
"tr",
|
|
26568
|
+
null,
|
|
26569
|
+
h2("th", { style: styles.th }, "\u901A\u9053 / \u4F1A\u8BDD\u952E"),
|
|
26570
|
+
h2("th", { style: styles.th }, "DSH \u4F1A\u8BDD ID"),
|
|
26571
|
+
h2("th", { style: styles.th }, "\u64CD\u4F5C")
|
|
26572
|
+
)),
|
|
26573
|
+
h2("tbody", null, rows.map((row) => this.renderRow(group, row)))
|
|
26574
|
+
)
|
|
26575
|
+
)
|
|
26576
|
+
);
|
|
26577
|
+
}
|
|
26578
|
+
renderMessage(message) {
|
|
26579
|
+
const role = message.role === "user" ? "\u7528\u6237" : "\u52A9\u624B";
|
|
26580
|
+
const time = formatTime(message.time);
|
|
26581
|
+
return h2(
|
|
26582
|
+
"article",
|
|
26583
|
+
{
|
|
26584
|
+
key: message.id || `${message.seq}:${message.role}`,
|
|
26585
|
+
className: `im-channel-message im-channel-message-${message.role}`,
|
|
26586
|
+
style: { ...styles.message, ...message.role === "user" ? styles.userMessage : null }
|
|
26587
|
+
},
|
|
26588
|
+
h2(
|
|
26589
|
+
"div",
|
|
26590
|
+
{ style: styles.messageMeta },
|
|
26591
|
+
h2("strong", null, role),
|
|
26592
|
+
h2("span", null, time || (Number.isInteger(message.seq) ? localizeTemplate("\u4E8B\u4EF6 {seq}", { seq: message.seq }) : ""))
|
|
26593
|
+
),
|
|
26594
|
+
h2("div", { style: styles.messageText }, text8(message.text)),
|
|
26595
|
+
message.truncated ? h2("div", { style: styles.secondary }, "\u672C\u6761\u6D88\u606F\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD\u3002") : null
|
|
26596
|
+
);
|
|
26597
|
+
}
|
|
26598
|
+
renderDetail() {
|
|
26599
|
+
const { selected, detail, detailError, detailLoading, loadingEarlier, copyStatus } = this.state;
|
|
26600
|
+
const label = CHANNEL_LABELS[selected.channel] || selected.channel;
|
|
26601
|
+
const copyState = copyStatus?.sessionId === selected.sessionId ? copyStatus : null;
|
|
26602
|
+
let body;
|
|
26603
|
+
if (detailLoading && !detail) {
|
|
26604
|
+
body = h2("p", { style: styles.muted }, "\u52A0\u8F7D\u4E2D\u2026");
|
|
26605
|
+
} else if (!detail) {
|
|
26606
|
+
body = null;
|
|
26607
|
+
} else if (detail.messages.length === 0) {
|
|
26608
|
+
body = h2("p", { style: styles.muted }, "\u6CA1\u6709\u53EF\u663E\u793A\u7684\u7528\u6237\u6216\u52A9\u624B\u6B63\u6587\u3002");
|
|
26609
|
+
} else {
|
|
26610
|
+
body = h2(
|
|
26611
|
+
"div",
|
|
26612
|
+
{ className: "im-channel-message-list", style: styles.messageList },
|
|
26613
|
+
detail.messages.map((message) => this.renderMessage(message))
|
|
26614
|
+
);
|
|
26615
|
+
}
|
|
26616
|
+
return h2(
|
|
26617
|
+
React49.Fragment,
|
|
26618
|
+
null,
|
|
26619
|
+
h2(
|
|
26620
|
+
"header",
|
|
26621
|
+
{ style: { ...styles.header, flexWrap: "wrap" } },
|
|
26622
|
+
h2(
|
|
26623
|
+
"div",
|
|
26624
|
+
null,
|
|
26625
|
+
h2("h1", { style: styles.title }, "\u4F1A\u8BDD\u5185\u5BB9"),
|
|
26626
|
+
h2("p", { style: styles.detailMeta }, `${label} \xB7 ${selected.key}`),
|
|
26627
|
+
h2("code", { style: styles.code }, selected.sessionId),
|
|
26628
|
+
h2("p", { style: styles.description }, "\u53EA\u8BFB\u663E\u793A\u7528\u6237\u4E0E\u52A9\u624B\u6B63\u6587\uFF1B\u7CFB\u7EDF\u63D0\u793A\u3001\u5DE5\u5177\u8C03\u7528\u548C\u5185\u90E8\u63A8\u7406\u4E0D\u663E\u793A\u3002")
|
|
26629
|
+
),
|
|
26630
|
+
h2(
|
|
26631
|
+
"div",
|
|
26632
|
+
{ style: styles.actions },
|
|
26633
|
+
this.renderBackToIm(),
|
|
26634
|
+
h2("button", { type: "button", className: "im-channel-back", style: styles.button, onClick: this.backToList }, "\u8FD4\u56DE\u5217\u8868"),
|
|
26635
|
+
h2("button", {
|
|
26636
|
+
type: "button",
|
|
26637
|
+
className: "im-channel-detail-refresh",
|
|
26638
|
+
style: styles.button,
|
|
26639
|
+
disabled: detailLoading || loadingEarlier,
|
|
26640
|
+
onClick: () => {
|
|
26641
|
+
void this.openSession(selected, selected);
|
|
26642
|
+
}
|
|
26643
|
+
}, detailLoading ? "\u5237\u65B0\u4E2D\u2026" : "\u5237\u65B0"),
|
|
26644
|
+
h2("button", {
|
|
26645
|
+
type: "button",
|
|
26646
|
+
className: "im-channel-detail-copy",
|
|
26647
|
+
style: styles.button,
|
|
26648
|
+
onClick: () => {
|
|
26649
|
+
void this.copySession(selected.sessionId);
|
|
26650
|
+
}
|
|
26651
|
+
}, copyState ? copyState.ok ? "\u5DF2\u590D\u5236" : "\u590D\u5236\u5931\u8D25" : "\u590D\u5236 ID")
|
|
26652
|
+
)
|
|
26653
|
+
),
|
|
26654
|
+
detailError ? h2(
|
|
26655
|
+
"div",
|
|
26656
|
+
{ role: "alert", style: styles.error },
|
|
26657
|
+
localizeTemplate("\u8BFB\u53D6\u5931\u8D25\uFF1A{error}", { error: localizeText(detailError) })
|
|
26658
|
+
) : null,
|
|
26659
|
+
detail ? h2(
|
|
26660
|
+
"div",
|
|
26661
|
+
{ style: { marginBottom: 12 } },
|
|
26662
|
+
h2(
|
|
26663
|
+
"p",
|
|
26664
|
+
{ style: { ...styles.description, margin: "0 0 10px" } },
|
|
26665
|
+
localizeTemplate("\u5DF2\u663E\u793A {shown} / {total} \u6761\u6B63\u6587", {
|
|
26666
|
+
shown: detail.messages.length,
|
|
26667
|
+
total: detail.total
|
|
26668
|
+
})
|
|
26669
|
+
),
|
|
26670
|
+
detail.hasMore ? h2("button", {
|
|
26671
|
+
type: "button",
|
|
26672
|
+
className: "im-channel-load-earlier",
|
|
26673
|
+
style: styles.button,
|
|
26674
|
+
onClick: this.loadEarlier,
|
|
26675
|
+
disabled: loadingEarlier
|
|
26676
|
+
}, loadingEarlier ? "\u52A0\u8F7D\u4E2D\u2026" : "\u52A0\u8F7D\u66F4\u65E9\u6D88\u606F") : null
|
|
26677
|
+
) : null,
|
|
26678
|
+
body
|
|
26679
|
+
);
|
|
26680
|
+
}
|
|
26681
|
+
renderBackToIm() {
|
|
26682
|
+
return this.props.onBackToIm ? h2("button", {
|
|
26683
|
+
type: "button",
|
|
26684
|
+
className: "im-channel-back-to-im",
|
|
26685
|
+
style: styles.button,
|
|
26686
|
+
onClick: this.props.onBackToIm
|
|
26687
|
+
}, "\u8FD4\u56DE IM\u673A\u5668\u4EBA") : null;
|
|
26688
|
+
}
|
|
26689
|
+
render() {
|
|
26690
|
+
const { channels, error, refreshing, selected } = this.state;
|
|
26691
|
+
if (selected) {
|
|
26692
|
+
return h2(
|
|
26693
|
+
"div",
|
|
26694
|
+
{ className: "dim-pluginPage im-channel-session-detail" },
|
|
26695
|
+
h2("div", { className: "dim-pluginPageContent" }, this.renderDetail())
|
|
26696
|
+
);
|
|
26697
|
+
}
|
|
26698
|
+
let body;
|
|
26699
|
+
if (error) {
|
|
26700
|
+
body = h2(
|
|
26701
|
+
"div",
|
|
26702
|
+
{ role: "alert", style: styles.error },
|
|
26703
|
+
localizeTemplate("\u52A0\u8F7D\u5931\u8D25\uFF1A{error}", { error: localizeText(error) })
|
|
26704
|
+
);
|
|
26705
|
+
} else if (!channels) {
|
|
26706
|
+
body = h2("p", { style: styles.muted }, "\u6B63\u5728\u8BFB\u53D6\u901A\u9053\u4F1A\u8BDD\u2026");
|
|
26707
|
+
} else if (channels.length === 0) {
|
|
26708
|
+
body = h2("p", { style: styles.muted }, "\u5C1A\u672A\u53D1\u73B0\u5DF2\u7ED1\u5B9A DSH \u4F1A\u8BDD\u7684\u901A\u9053\u3002");
|
|
26709
|
+
} else {
|
|
26710
|
+
body = channels.map((group) => this.renderGroup(group));
|
|
26711
|
+
}
|
|
26712
|
+
return h2(
|
|
26713
|
+
"div",
|
|
26714
|
+
{ className: "dim-pluginPage im-channel-sessions-page" },
|
|
26715
|
+
h2(
|
|
26716
|
+
"div",
|
|
26717
|
+
{ className: "dim-pluginPageContent" },
|
|
26718
|
+
h2(
|
|
26719
|
+
"header",
|
|
26720
|
+
{ style: { ...styles.header, flexWrap: "wrap" } },
|
|
26721
|
+
h2(
|
|
26722
|
+
"div",
|
|
26723
|
+
null,
|
|
26724
|
+
h2("h1", { style: styles.title }, "\u4F1A\u8BDD\u8BB0\u5F55"),
|
|
26725
|
+
h2("p", { style: styles.description }, "\u53EA\u8BFB\u5217\u51FA\u5404 IM \u901A\u9053\u5F53\u524D\u7ED1\u5B9A\u7684 DSH \u4F1A\u8BDD\uFF1B\u70B9\u51FB\u4F1A\u8BDD ID \u67E5\u770B\u6B63\u6587\uFF0C\u4E0D\u4F1A\u4FEE\u6539\u7ED1\u5B9A\u3002")
|
|
26726
|
+
),
|
|
26727
|
+
h2(
|
|
26728
|
+
"div",
|
|
26729
|
+
{ style: styles.actions },
|
|
26730
|
+
this.renderBackToIm(),
|
|
26731
|
+
h2(
|
|
26732
|
+
"button",
|
|
26733
|
+
{ type: "button", className: "im-channel-refresh", style: styles.button, onClick: this.reload, disabled: refreshing },
|
|
26734
|
+
refreshing ? "\u5237\u65B0\u4E2D\u2026" : "\u5237\u65B0"
|
|
26735
|
+
)
|
|
26736
|
+
)
|
|
26737
|
+
),
|
|
26738
|
+
body
|
|
26739
|
+
)
|
|
26740
|
+
);
|
|
26741
|
+
}
|
|
26742
|
+
};
|
|
26743
|
+
function ChannelSessionsPanel(props) {
|
|
26744
|
+
return h2(ChannelListPage, props);
|
|
26745
|
+
}
|
|
26746
|
+
function installChannelSessionsPage(ctx, { channelListRpcCall }) {
|
|
26747
|
+
let navigate = null;
|
|
26748
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
26749
|
+
const publish = (value) => {
|
|
26750
|
+
navigate = value;
|
|
26751
|
+
for (const listener of listeners) listener();
|
|
26752
|
+
};
|
|
26753
|
+
const controller = {
|
|
26754
|
+
available: () => navigate !== null,
|
|
26755
|
+
open: () => navigate?.(),
|
|
26756
|
+
subscribe(listener) {
|
|
26757
|
+
listeners.add(listener);
|
|
26758
|
+
return () => listeners.delete(listener);
|
|
26759
|
+
}
|
|
26760
|
+
};
|
|
26761
|
+
if (typeof ctx.inject === "function") {
|
|
26762
|
+
ctx.inject(["layout"], (pageCtx) => pageCtx.slots.inject("main", () => {
|
|
26763
|
+
const stopMain = pageCtx.slots.register({
|
|
26764
|
+
name: "main",
|
|
26765
|
+
key: CHANNEL_SESSIONS_PANEL_ID,
|
|
26766
|
+
locale: IM_LOCALE_NAMESPACE,
|
|
26767
|
+
inject: () => ({
|
|
26768
|
+
channelListRpcCall,
|
|
26769
|
+
onBackToIm: () => pageCtx.layout.selectPanel(IM_MAIN_PANEL_ID)
|
|
26770
|
+
})
|
|
26771
|
+
}, ChannelSessionsPanel);
|
|
26772
|
+
publish(() => pageCtx.layout.selectPanel(CHANNEL_SESSIONS_PANEL_ID));
|
|
26773
|
+
return () => {
|
|
26774
|
+
publish(null);
|
|
26775
|
+
stopMain();
|
|
26776
|
+
};
|
|
26777
|
+
}));
|
|
26778
|
+
}
|
|
26779
|
+
return controller;
|
|
26780
|
+
}
|
|
26781
|
+
|
|
25309
26782
|
// plugin-src/client/index.js
|
|
25310
26783
|
var name = "im-settings";
|
|
25311
26784
|
var inject = ["slots", "connection", "locale", "workspaces"];
|
|
@@ -25475,33 +26948,37 @@ function IMSettingsTab({
|
|
|
25475
26948
|
updateRpcCall,
|
|
25476
26949
|
deliveryRpcCall,
|
|
25477
26950
|
globalSettingsRpcCall,
|
|
26951
|
+
deliverySyncRpcCall,
|
|
26952
|
+
languageRpcCall,
|
|
25478
26953
|
workspaceDirectoryPicker,
|
|
26954
|
+
onOpenSessionHistory,
|
|
25479
26955
|
preferredSectionId,
|
|
25480
26956
|
browserLocation = globalThis.location,
|
|
25481
26957
|
navigateToRecoveryUrl = replacePageLocation
|
|
25482
26958
|
}) {
|
|
25483
|
-
const [selected, setSelected] =
|
|
25484
|
-
const [loopbackRecovery, setLoopbackRecovery] =
|
|
25485
|
-
const [runningVersion, setRunningVersion] =
|
|
25486
|
-
const [deliverySettings, setDeliverySettings] =
|
|
26959
|
+
const [selected, setSelected] = React50.useState(() => preferredSectionId === GLOBAL_SETTINGS_TAB_ID || CHANNELS.some((channel7) => channel7.id === preferredSectionId) ? preferredSectionId : "weixin");
|
|
26960
|
+
const [loopbackRecovery, setLoopbackRecovery] = React50.useState(null);
|
|
26961
|
+
const [runningVersion, setRunningVersion] = React50.useState(IM_PLUGIN_VERSION);
|
|
26962
|
+
const [deliverySettings, setDeliverySettings] = React50.useState(null);
|
|
25487
26963
|
const emailEnabled = useEmailChannelEnabled(emailRpcCall);
|
|
25488
|
-
const visibleChannels =
|
|
26964
|
+
const visibleChannels = React50.useMemo(
|
|
25489
26965
|
() => CHANNELS.filter((channel7) => channel7.id !== "email" || emailEnabled),
|
|
25490
26966
|
[emailEnabled]
|
|
25491
26967
|
);
|
|
25492
|
-
const githubTooltipId =
|
|
25493
|
-
const
|
|
26968
|
+
const githubTooltipId = React50.useId();
|
|
26969
|
+
const sessionHistoryTooltipId = React50.useId();
|
|
26970
|
+
const generalSettingsTooltipId = React50.useId();
|
|
25494
26971
|
const globalSettingsSelected = selected === GLOBAL_SETTINGS_TAB_ID;
|
|
25495
26972
|
const active = visibleChannels.find((channel7) => channel7.id === selected) ?? visibleChannels[0];
|
|
25496
26973
|
const activeTabId = globalSettingsSelected ? "dim-general-settings-trigger" : `dim-tab-${active.id}`;
|
|
25497
26974
|
const activePanelId = globalSettingsSelected ? `dim-panel-${GLOBAL_SETTINGS_TAB_ID}` : `dim-panel-${active.id}`;
|
|
25498
|
-
const reportLoopbackRecovery =
|
|
26975
|
+
const reportLoopbackRecovery = React50.useCallback((recovery) => {
|
|
25499
26976
|
setLoopbackRecovery((current) => current?.url === recovery.url ? current : recovery);
|
|
25500
26977
|
}, []);
|
|
25501
|
-
const reportUpdateStatus =
|
|
26978
|
+
const reportUpdateStatus = React50.useCallback((snapshot) => {
|
|
25502
26979
|
setRunningVersion(snapshot.runningVersion);
|
|
25503
26980
|
}, []);
|
|
25504
|
-
const rpcCalls =
|
|
26981
|
+
const rpcCalls = React50.useMemo(() => createLoopbackAwareRpcCalls({
|
|
25505
26982
|
dingtalkRpcCall,
|
|
25506
26983
|
discordRpcCall,
|
|
25507
26984
|
feishuRpcCall,
|
|
@@ -25516,6 +26993,8 @@ function IMSettingsTab({
|
|
|
25516
26993
|
updateRpcCall,
|
|
25517
26994
|
deliveryRpcCall,
|
|
25518
26995
|
globalSettingsRpcCall,
|
|
26996
|
+
deliverySyncRpcCall,
|
|
26997
|
+
languageRpcCall,
|
|
25519
26998
|
imessageRpcCall,
|
|
25520
26999
|
emailRpcCall,
|
|
25521
27000
|
matrixRpcCall
|
|
@@ -25529,6 +27008,7 @@ function IMSettingsTab({
|
|
|
25529
27008
|
deliveryRpcCall,
|
|
25530
27009
|
feishuRpcCall,
|
|
25531
27010
|
globalSettingsRpcCall,
|
|
27011
|
+
deliverySyncRpcCall,
|
|
25532
27012
|
imessageRpcCall,
|
|
25533
27013
|
emailRpcCall,
|
|
25534
27014
|
matrixRpcCall,
|
|
@@ -25543,7 +27023,7 @@ function IMSettingsTab({
|
|
|
25543
27023
|
weixinRpcCall,
|
|
25544
27024
|
whatsappRpcCall
|
|
25545
27025
|
]);
|
|
25546
|
-
const botSettingsContext =
|
|
27026
|
+
const botSettingsContext = React50.useMemo(() => Object.freeze({
|
|
25547
27027
|
openBotSettings: setDeliverySettings
|
|
25548
27028
|
}), []);
|
|
25549
27029
|
return h2(
|
|
@@ -25604,6 +27084,38 @@ function IMSettingsTab({
|
|
|
25604
27084
|
role: "tooltip"
|
|
25605
27085
|
}, "\u5E2E\u52A9\u4E0E\u53CD\u9988 \xB7 \u524D\u5F80 GitHub")
|
|
25606
27086
|
),
|
|
27087
|
+
onOpenSessionHistory ? h2(
|
|
27088
|
+
"span",
|
|
27089
|
+
{ className: "dim-sessionHistoryAction" },
|
|
27090
|
+
h2("button", {
|
|
27091
|
+
type: "button",
|
|
27092
|
+
className: "dim-sessionHistoryButton",
|
|
27093
|
+
"aria-label": "\u4F1A\u8BDD\u8BB0\u5F55",
|
|
27094
|
+
"aria-describedby": sessionHistoryTooltipId,
|
|
27095
|
+
onClick: onOpenSessionHistory
|
|
27096
|
+
}, h2(
|
|
27097
|
+
"svg",
|
|
27098
|
+
{
|
|
27099
|
+
width: 18,
|
|
27100
|
+
height: 18,
|
|
27101
|
+
viewBox: "0 0 24 24",
|
|
27102
|
+
fill: "none",
|
|
27103
|
+
stroke: "currentColor",
|
|
27104
|
+
strokeWidth: 2,
|
|
27105
|
+
strokeLinecap: "round",
|
|
27106
|
+
strokeLinejoin: "round",
|
|
27107
|
+
focusable: "false",
|
|
27108
|
+
"aria-hidden": "true"
|
|
27109
|
+
},
|
|
27110
|
+
h2("path", { d: "M21 15a3 3 0 0 1-3 3H7l-4 3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3Z" }),
|
|
27111
|
+
h2("path", { d: "M8 8h8M8 12h5" })
|
|
27112
|
+
)),
|
|
27113
|
+
h2("span", {
|
|
27114
|
+
id: sessionHistoryTooltipId,
|
|
27115
|
+
className: "dim-sessionHistoryTooltip",
|
|
27116
|
+
role: "tooltip"
|
|
27117
|
+
}, "\u4F1A\u8BDD\u8BB0\u5F55")
|
|
27118
|
+
) : null,
|
|
25607
27119
|
h2(
|
|
25608
27120
|
"span",
|
|
25609
27121
|
{ className: "dim-generalSettingsAction" },
|
|
@@ -25674,7 +27186,11 @@ function IMSettingsTab({
|
|
|
25674
27186
|
h2(
|
|
25675
27187
|
BotSettingsContext.Provider,
|
|
25676
27188
|
{ value: botSettingsContext },
|
|
25677
|
-
globalSettingsSelected ? h2(GlobalSettingsPanel, {
|
|
27189
|
+
globalSettingsSelected ? h2(GlobalSettingsPanel, {
|
|
27190
|
+
rpcCall: rpcCalls.globalSettingsRpcCall,
|
|
27191
|
+
deliverySyncRpcCall: rpcCalls.deliverySyncRpcCall,
|
|
27192
|
+
languageRpcCall: rpcCalls.languageRpcCall
|
|
27193
|
+
}) : deliverySettings?.channel === active.id ? h2(DeliveryTargetSettingsPage, {
|
|
25678
27194
|
channel: active.id,
|
|
25679
27195
|
account: deliverySettings,
|
|
25680
27196
|
rpcCall: rpcCalls.deliveryRpcCall,
|
|
@@ -25764,6 +27280,9 @@ function apply(ctx) {
|
|
|
25764
27280
|
const updateRpcCall = (endpoint, payload, signal) => managementRpc(ctx.connection, UPDATE_RPC_CHANNEL, endpoint, payload, signal);
|
|
25765
27281
|
const deliveryRpcCall = (endpoint, payload, signal) => managementRpc(ctx.connection, DELIVERY_RPC_CHANNEL, endpoint, payload, signal);
|
|
25766
27282
|
const globalSettingsRpcCall = (endpoint, payload, signal) => managementRpc(ctx.connection, Object.values(SIDEBAR_SETTINGS_ENDPOINTS).includes(endpoint) ? SIDEBAR_SETTINGS_RPC_CHANNEL : GLOBAL_SETTINGS_RPC_CHANNEL, endpoint, payload, signal);
|
|
27283
|
+
const deliverySyncRpcCall = (endpoint, payload, signal) => managementRpc(ctx.connection, DELIVERY_SYNC_SETTINGS_RPC_CHANNEL, endpoint, payload, signal);
|
|
27284
|
+
const languageRpcCall = (endpoint, payload, signal) => managementRpc(ctx.connection, HOST_LANGUAGE_RPC_CHANNEL, endpoint, payload, signal);
|
|
27285
|
+
const channelListRpcCall = (endpoint, payload, signal) => managementRpc(ctx.connection, CHANNEL_LIST_RPC_CHANNEL, endpoint, payload, signal);
|
|
25767
27286
|
const workspaceDirectoryPicker = Object.freeze({
|
|
25768
27287
|
listDirectory: (path, signal) => callWorkspaceDirectoryApi(ctx, "listDirectory", path, signal),
|
|
25769
27288
|
pickDirectory: () => callWorkspaceDirectoryApi(ctx, "pickDirectory")
|
|
@@ -25786,17 +27305,29 @@ function apply(ctx) {
|
|
|
25786
27305
|
updateRpcCall,
|
|
25787
27306
|
deliveryRpcCall,
|
|
25788
27307
|
globalSettingsRpcCall,
|
|
27308
|
+
languageRpcCall,
|
|
27309
|
+
deliverySyncRpcCall,
|
|
27310
|
+
channelListRpcCall,
|
|
25789
27311
|
workspaceDirectoryPicker
|
|
25790
27312
|
};
|
|
25791
27313
|
const subscribeLocale = (listener) => typeof ctx.on === "function" ? ctx.on("locale/change", listener) : () => {
|
|
25792
27314
|
};
|
|
25793
27315
|
const localeSnapshot = () => ctx.locale.getLocale?.()?.active ?? "";
|
|
25794
27316
|
function IMPanel({ preferredSectionId }) {
|
|
25795
|
-
|
|
27317
|
+
React50.useSyncExternalStore(subscribeLocale, localeSnapshot, localeSnapshot);
|
|
27318
|
+
const historyAvailable = React50.useSyncExternalStore(
|
|
27319
|
+
channelSessionsPage.subscribe,
|
|
27320
|
+
channelSessionsPage.available,
|
|
27321
|
+
channelSessionsPage.available
|
|
27322
|
+
);
|
|
25796
27323
|
return h2(
|
|
25797
27324
|
IMPanelErrorBoundary,
|
|
25798
27325
|
null,
|
|
25799
|
-
h2(IMSettingsTab, {
|
|
27326
|
+
h2(IMSettingsTab, {
|
|
27327
|
+
...panelDependencies,
|
|
27328
|
+
preferredSectionId,
|
|
27329
|
+
onOpenSessionHistory: historyAvailable ? channelSessionsPage.open : void 0
|
|
27330
|
+
})
|
|
25800
27331
|
);
|
|
25801
27332
|
}
|
|
25802
27333
|
const buildPanelElement = (props = {}) => h2(IMPanel, {
|
|
@@ -25806,6 +27337,7 @@ function apply(ctx) {
|
|
|
25806
27337
|
packageName: package_default.name,
|
|
25807
27338
|
renderPanel: buildPanelElement
|
|
25808
27339
|
});
|
|
27340
|
+
const channelSessionsPage = installChannelSessionsPage(ctx, { channelListRpcCall });
|
|
25809
27341
|
ctx.effect(() => {
|
|
25810
27342
|
sidebarSync = installSidebarVisibilitySync({
|
|
25811
27343
|
rpcCall: (endpoint, payload, signal) => callManagementRpc(ctx.connection, SIDEBAR_SETTINGS_RPC_CHANNEL, endpoint, payload, signal),
|