@xmanrui/dsh-im 4.23.0 → 4.24.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/README.en.md +2 -1
- package/README.md +2 -1
- package/lib/client.js +92 -14
- package/lib/index.js +286 -285
- package/package.json +7 -2
- package/plugin-src/client/channels/feishu/index.js +7 -4
- package/plugin-src/client/channels/shared/token-api.js +3 -0
- package/plugin-src/client/channels/telegram/index.js +3 -0
- package/plugin-src/client/channels/telegram/styles.js +12 -0
- package/plugin-src/client/channels/telegram/thinking-traces.js +25 -0
- package/plugin-src/client/i18n.js +8 -1
- package/plugin-src/client/index.js +10 -2
- package/plugin-src/client/styles.js +2 -2
- package/plugin-src/host/channels/shared/rpc.mjs +9 -0
- package/plugin-src/host/channels/shared/thinking-traces-rpc.mjs +11 -0
- package/plugin-src/host/modern-harness-api.mjs +7 -2
- package/scripts/verify-package.mjs +11 -5
- package/src/channels/email/email-runtime.mjs +9 -2
- package/src/channels/email/transports/agent-mail.mjs +14 -3
- package/src/channels/feishu/bridge.mjs +31 -4
- package/src/channels/feishu/feishu-channel.mjs +35 -0
- package/src/channels/feishu/live-cot.mjs +260 -0
- package/src/channels/feishu/slash-command-registry.mjs +17 -0
- package/src/channels/feishu/step-push-mode.mjs +10 -4
- package/src/channels/shared/harness-client.mjs +224 -39
- package/src/channels/shared/text-harness-bridge.mjs +60 -14
- package/src/channels/telegram/config-store.mjs +4 -1
- package/src/channels/telegram/telegram-controller.mjs +13 -1
- package/src/channels/telegram/telegram-runtime.mjs +198 -1
package/README.en.md
CHANGED
|
@@ -54,7 +54,7 @@ Connect IM bots to DeepSeek Harness by scanning a QR code, using an App Manifest
|
|
|
54
54
|
|
|
55
55
|
| Channel | Setup | Messaging and replies |
|
|
56
56
|
| --- | --- | --- |
|
|
57
|
-
| Feishu | Create a bot by QR code, or bind one with App ID + App Secret | Persistent connection for incoming messages;
|
|
57
|
+
| Feishu | Create a bot by QR code, or bind one with App ID + App Secret | Persistent connection for incoming messages; choose a native live process, one live process card, or step-by-step messages |
|
|
58
58
|
| WeChat | Scan a QR code to bind a WeChat bot | Tencent iLink long polling; shows a typing indicator while Harness works, then sends the final reply in 1,800-character chunks |
|
|
59
59
|
| DingTalk | Create a bot by QR code, or bind one with Client ID + Client Secret | DingTalk Stream connection; streaming replies through AI Cards |
|
|
60
60
|
| WeCom | Create an intelligent bot by QR code, or bind one with Bot ID + Secret | Official WebSocket connection; native thinking state, tool progress, and streaming replies |
|
|
@@ -146,6 +146,7 @@ Use the proxy URL required by your network and restart the Host after changing i
|
|
|
146
146
|
| Reasoning effort | Explicitly choose an effort supported by the selected model, or follow the model default. Levels, descriptions, and defaults come from DSH. Switching models restores the new model's default effort. Each bot saves its own choice, which applies only to later new Sessions. |
|
|
147
147
|
| Agent Preset | Each bot can choose an Agent Preset on its settings card. When none is chosen, new Sessions follow the Host's `agent-presets.default`. A channel-level `config.agentPreset` is only the default for later new bots on that channel. Changing the preset never modifies or clears existing Sessions; if the current chat already has a Session, send `/new` and then a regular message to create one with the new selection. |
|
|
148
148
|
| Context enhancement | Open settings from a bot card to enable groups and DMs independently. Both switches default to off, including for existing bots after an upgrade. |
|
|
149
|
+
| Feishu task progress display | Each Feishu bot can hide progress or use Live process, Live process card, or step-by-step messages. Live process uses Feishu's native thinking-process surface for reasoning, tool calls, and results, then sends the final answer separately. It requires Feishu desktop 7.70, mobile 7.74, or newer. |
|
|
149
150
|
| Session channel identity | Sessions from the local Host's IM channels and AI Office are marked with their source. The Web Session list and search results display channel logos in place of prefixes such as “WeChat ·”, preserving DSH's automatic title generation and updates. Existing Sessions receive the prefix when next loaded. |
|
|
150
151
|
|
|
151
152
|
Channel prefixes are appended after DSH produces a title, preserving its complete text and automatic/manual source without pinning automatic titles or making additional model calls. Regeneration, refresh, and restarts do not stack prefixes; actual manual renames retain DSH's normal pinning behavior. This feature uses the current Host's Session events; an explicit remote `harnessBaseUrl` requires the plugin on the destination Host.
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ Connect IM bots to DeepSeek Harness by scanning a QR code, using an App Manifest
|
|
|
57
57
|
|
|
58
58
|
| 渠道 | 接入方式 | 消息与回复 |
|
|
59
59
|
| --- | --- | --- |
|
|
60
|
-
| 飞书 | 扫码创建机器人,或使用 App ID + App Secret 手动绑定 |
|
|
60
|
+
| 飞书 | 扫码创建机器人,或使用 App ID + App Secret 手动绑定 | 长连接接收消息;可选择飞书原生“实时直播”、单张实时过程卡或逐步消息展示任务过程 |
|
|
61
61
|
| 微信 | 使用微信扫码绑定机器人 | 腾讯 iLink 长轮询收发消息;等待 Harness 回答时显示“正在输入”,最终回复按 1,800 字符分段发送 |
|
|
62
62
|
| 钉钉 | 扫码创建机器人,或使用 Client ID + Client Secret 手动绑定 | 钉钉 Stream 长连接;通过 AI Card 流式显示回答 |
|
|
63
63
|
| 企业微信 | 使用企业微信 App 扫码创建智能机器人,或使用 Bot ID + Secret 手动绑定 | 官方 WebSocket 长连接;原生显示“正在思考中”、工具执行进度和流式回答 |
|
|
@@ -149,6 +149,7 @@ dsh web
|
|
|
149
149
|
| 思考强度 | 在模型下方显式选择该模型支持的思考强度,或跟随模型默认。档位、说明和默认值来自 DSH;切换模型后恢复新模型默认强度。每个机器人独立保存,只影响之后新建的会话。 |
|
|
150
150
|
| Agent Preset | 每个机器人可在设置页卡片中选择 Agent Preset。未选择时跟随 Host 的 `agent-presets.default`;渠道级 `config.agentPreset` 只作为该渠道之后新接入机器人的默认值。切换不会修改或清空已有会话;若当前聊天已有会话,需先发送 `/new`,再发送一条普通消息,才会按新选择创建会话。 |
|
|
151
151
|
| 上下文增强 | 从机器人卡片打开设置,分别决定群聊、私聊是否增强;两个开关默认均关闭,旧机器人升级后也不会自动开启。 |
|
|
152
|
+
| 飞书任务过程展示 | 每个飞书机器人可选择不显示过程、实时直播、实时过程卡或逐步消息。实时直播使用飞书原生思考过程展示推理、工具调用和结果,最终答案单独发送;需要飞书 PC 7.70、移动端 7.74 或更新版本。 |
|
|
152
153
|
| 会话渠道标识 | 本机 Host 的 IM 渠道与 AI Office 会话自动标记来源。Web 会话列表和搜索结果将「微信 ·」等前缀显示为渠道 Logo;保留 DSH 原有的自动标题生成与更新。已有会话在下次加载时补上。 |
|
|
153
154
|
|
|
154
155
|
渠道前缀在 DSH 生成标题后追加,完整保留原始标题与自动/手动来源,不会将自动标题锁定为手动命名,也不会额外调用模型。重复生成、刷新或重启不会叠加前缀;真实的手动命名仍遵循 DSH 原有的锁定规则。此功能由当前 Host 的会话事件驱动,显式连接远程 `harnessBaseUrl` 时需在目标 Host 上安装该插件。
|
package/lib/client.js
CHANGED
|
@@ -595,7 +595,7 @@ var React33 = __toESM(require("react"), 1);
|
|
|
595
595
|
// package.json
|
|
596
596
|
var package_default = {
|
|
597
597
|
name: "@xmanrui/dsh-im",
|
|
598
|
-
version: "4.
|
|
598
|
+
version: "4.24.0",
|
|
599
599
|
description: "\u628A\u5341\u4E00\u79CD IM \u6E20\u9053\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect eleven IM channels and a public AI Office to a local DeepSeek Harness.",
|
|
600
600
|
keywords: [
|
|
601
601
|
"deepseek-harness",
|
|
@@ -705,7 +705,12 @@ var package_default = {
|
|
|
705
705
|
"cordis.patch.yml",
|
|
706
706
|
"lib",
|
|
707
707
|
"plugin-src",
|
|
708
|
-
"scripts",
|
|
708
|
+
"scripts/verify-interface-language.mjs",
|
|
709
|
+
"scripts/verify-lan-management.mjs",
|
|
710
|
+
"scripts/verify-model-setting.mjs",
|
|
711
|
+
"scripts/verify-package.mjs",
|
|
712
|
+
"scripts/verify-session-channel-logos.mjs",
|
|
713
|
+
"scripts/verify-session-title-prefix.mjs",
|
|
709
714
|
"src",
|
|
710
715
|
"PROACTIVE_DELIVERY.md",
|
|
711
716
|
"PROACTIVE_DELIVERY.en.md",
|
|
@@ -1444,11 +1449,13 @@ var EN = Object.freeze({
|
|
|
1444
1449
|
"\u67E5\u770B\u5206\u6B65\u76F4\u63A8\u8BF4\u660E": "View step push help",
|
|
1445
1450
|
"\u5F00\u542F\u540E\u9010\u6B65\u63A8\u9001\u5DE5\u5177\u8C03\u7528\u4E0E\u8FC7\u7A0B\u8BF4\u660E": "Push tool calls and process notes step by step",
|
|
1446
1451
|
"\u4EFB\u52A1\u8FC7\u7A0B\u5C55\u793A": "Task progress display",
|
|
1447
|
-
"\u8BBE\u7F6E\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u7684\u5448\u73B0\u65B9\u5F0F\uFF1A\u4E0D\u663E\u793A\u3001\u5B9E\u65F6\u5361\u7247\u6216\u9010\u6B65\u6D88\u606F": "Choose how
|
|
1452
|
+
"\u8BBE\u7F6E\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u7684\u5448\u73B0\u65B9\u5F0F\uFF1A\u4E0D\u663E\u793A\u3001\u539F\u751F\u76F4\u64AD\u3001\u5B9E\u65F6\u5361\u7247\u6216\u9010\u6B65\u6D88\u606F": "Choose how execution is presented: hidden, native live process, one live card, or step-by-step messages",
|
|
1448
1453
|
"\u4E0D\u663E\u793A\u8FC7\u7A0B\uFF08\u53EA\u53D1\u9001\u6700\u7EC8\u7B54\u6848\uFF09": "Hide the process (send the final answer only)",
|
|
1454
|
+
"\u5B9E\u65F6\u76F4\u64AD\uFF08\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\uFF09": "Live process (native Feishu thinking process)",
|
|
1449
1455
|
"\u5B9E\u65F6\u8FC7\u7A0B\u5361\uFF08\u5168\u7A0B\u4E00\u5F20\u5361\u7247\u52A8\u6001\u66F4\u65B0\uFF09": "Live process card (one card updated throughout)",
|
|
1450
1456
|
"\u9010\u6B65\u76F4\u64AD\uFF08\u6BCF\u4E00\u6B65\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF09": "Step-by-step feed (one message per step)",
|
|
1451
1457
|
"\u9002\u5408\u65E5\u5E38\u95EE\u7B54\uFF1A\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E0D\u663E\u793A\u5DE5\u5177\u8C03\u7528\u7B49\u4E2D\u95F4\u6B65\u9AA4\uFF0C\u53EA\u56DE\u590D\u6700\u7EC8\u7ED3\u679C": "For everyday Q&A: tool calls and other interim steps stay hidden, only the final result is replied",
|
|
1458
|
+
"\u4F7F\u7528\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\u5C55\u793A\u63A8\u7406\u3001\u5DE5\u5177\u8C03\u7528\u4E0E\u7ED3\u679C\uFF0C\u6700\u7EC8\u7B54\u6848\u5355\u72EC\u53D1\u9001": "Use Feishu\u2019s native thinking process for reasoning, tool calls, and results, then send the final answer separately",
|
|
1452
1459
|
"\u63A8\u8350\u957F\u4EFB\u52A1\u4F7F\u7528\uFF1A\u8FC7\u7A0B\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u91CC\u5B9E\u65F6\u66F4\u65B0\uFF0C\u4E0D\u5237\u5C4F": "Recommended for long tasks: the process and the final answer update live in one card without flooding the chat",
|
|
1453
1460
|
"\u6BCF\u4E00\u6B65\u90FD\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF08\u542B\u5DE5\u5177\u8C03\u7528\u548C\u8FC7\u7A0B\u8BF4\u660E\uFF09\uFF1B\u6CE8\u610F\u957F\u4EFB\u52A1\u4F1A\u8FDE\u7EED\u53D1\u9001\u8F83\u591A\u6D88\u606F": "Every step is sent as its own message (including tool calls and notes); long tasks may send many messages in a row",
|
|
1454
1461
|
"\u5206\u6B65\u76F4\u63A8\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002": "Could not save the step push setting. Try again.",
|
|
@@ -1847,6 +1854,11 @@ var EN = Object.freeze({
|
|
|
1847
1854
|
"\u63A5\u5165 Telegram \u673A\u5668\u4EBA": "Connect a Telegram bot",
|
|
1848
1855
|
"\u5148\u901A\u8FC7 @BotFather \u83B7\u53D6 Bot Token\uFF0C\u518D\u5728\u8FD9\u91CC\u5B8C\u6210\u63A5\u5165\u3002": "Get a Bot Token from @BotFather, then connect it here.",
|
|
1849
1856
|
"\u586B\u5199 @BotFather \u751F\u6210\u7684 Bot Token": "Enter the Bot Token from @BotFather",
|
|
1857
|
+
"\u4F1A\u8BDD\u884C\u4E3A": "Conversation behavior",
|
|
1858
|
+
"\u601D\u8003\u8FC7\u7A0B\u7559\u75D5": "Thinking traces",
|
|
1859
|
+
"\u5B9E\u65F6\u663E\u793A\u601D\u8003\u6B65\u9AA4\u4E0E\u5DE5\u5177\u8C03\u7528\uFF0C\u6700\u7EC8\u7B54\u6848\u5355\u72EC\u6210\u6761": "Show thinking steps and tool calls as they happen; the final answer arrives as its own message",
|
|
1860
|
+
"\u8BF7\u63D0\u4EA4\u6709\u6548\u7684\u601D\u8003\u8FC7\u7A0B\u7559\u75D5\u8BBE\u7F6E\u3002": "Submit a valid thinking-traces setting.",
|
|
1861
|
+
"\u6B63\u5728\u4F7F\u7528{name}\u2026": "Using {name}\u2026",
|
|
1850
1862
|
"\u8BBF\u95EE\u6A21\u5F0F": "Access mode",
|
|
1851
1863
|
"Telegram \u8BBF\u95EE\u6A21\u5F0F": "Telegram access mode",
|
|
1852
1864
|
"\u67E5\u770B Telegram \u8BBF\u95EE\u6A21\u5F0F\u8BF4\u660E": "View Telegram access mode details",
|
|
@@ -6418,7 +6430,8 @@ var TOKEN_BOT_ENDPOINTS = Object.freeze({
|
|
|
6418
6430
|
setAgentPreset: SET_AGENT_PRESET_ENDPOINT,
|
|
6419
6431
|
setContextEnhancement: "bot.context-enhancement.set",
|
|
6420
6432
|
setAccessPolicy: "bot.access-policy.set",
|
|
6421
|
-
setAlias: "bot.alias.set"
|
|
6433
|
+
setAlias: "bot.alias.set",
|
|
6434
|
+
setThinkingTraces: "bot.thinking-traces.set"
|
|
6422
6435
|
});
|
|
6423
6436
|
function createTokenChannelApi(channel6, connectionSummary, {
|
|
6424
6437
|
normalizeBotExtension = () => ({})
|
|
@@ -6448,6 +6461,8 @@ function createTokenChannelApi(channel6, connectionSummary, {
|
|
|
6448
6461
|
model: normalizeModelSelection(value.model),
|
|
6449
6462
|
agentPreset: normalizeAgentPresetId(value.agentPreset),
|
|
6450
6463
|
contextEnhancement: normalizeContextEnhancementConfig(value.contextEnhancement),
|
|
6464
|
+
// Absent from the backend means ON; only an explicit false opts out.
|
|
6465
|
+
thinkingTraces: value.thinkingTraces !== false,
|
|
6451
6466
|
...Object.hasOwn(value, "accessPolicy") ? { accessPolicy: normalizeAccessPolicy(value.accessPolicy) } : {},
|
|
6452
6467
|
bot: {
|
|
6453
6468
|
...normalizeBotAlias(value.bot),
|
|
@@ -7092,11 +7107,18 @@ var React17 = __toESM(require("react"), 1);
|
|
|
7092
7107
|
// src/channels/feishu/step-push-mode.mjs
|
|
7093
7108
|
var FEISHU_STEP_PUSH_MODES = Object.freeze({
|
|
7094
7109
|
POST: "post",
|
|
7095
|
-
STREAMING_CARD: "streaming_card"
|
|
7110
|
+
STREAMING_CARD: "streaming_card",
|
|
7111
|
+
LIVE_COT: "live_cot"
|
|
7096
7112
|
});
|
|
7097
7113
|
var DEFAULT_FEISHU_STEP_PUSH_MODE = FEISHU_STEP_PUSH_MODES.STREAMING_CARD;
|
|
7098
7114
|
function normalizeFeishuStepPushMode(value) {
|
|
7099
|
-
|
|
7115
|
+
if (value === FEISHU_STEP_PUSH_MODES.STREAMING_CARD) {
|
|
7116
|
+
return FEISHU_STEP_PUSH_MODES.STREAMING_CARD;
|
|
7117
|
+
}
|
|
7118
|
+
if (value === FEISHU_STEP_PUSH_MODES.LIVE_COT) {
|
|
7119
|
+
return FEISHU_STEP_PUSH_MODES.LIVE_COT;
|
|
7120
|
+
}
|
|
7121
|
+
return FEISHU_STEP_PUSH_MODES.POST;
|
|
7100
7122
|
}
|
|
7101
7123
|
|
|
7102
7124
|
// plugin-src/client/channels/feishu/api.js
|
|
@@ -7874,12 +7896,12 @@ function StepPushEditor({ value = false, mode = "post", disabled = false, onSave
|
|
|
7874
7896
|
if (value === true) await onSave?.(false);
|
|
7875
7897
|
return;
|
|
7876
7898
|
}
|
|
7877
|
-
const nextMode =
|
|
7899
|
+
const nextMode = ["streaming_card", "live_cot"].includes(next) ? next : "post";
|
|
7878
7900
|
if (value !== true) await onSave?.(true);
|
|
7879
7901
|
if (nextMode !== mode) await onModeSave?.(nextMode);
|
|
7880
7902
|
});
|
|
7881
7903
|
};
|
|
7882
|
-
const helpText = current === "off" ? "\u9002\u5408\u65E5\u5E38\u95EE\u7B54\uFF1A\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E0D\u663E\u793A\u5DE5\u5177\u8C03\u7528\u7B49\u4E2D\u95F4\u6B65\u9AA4\uFF0C\u53EA\u56DE\u590D\u6700\u7EC8\u7ED3\u679C" : current === "streaming_card" ? "\u63A8\u8350\u957F\u4EFB\u52A1\u4F7F\u7528\uFF1A\u8FC7\u7A0B\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u91CC\u5B9E\u65F6\u66F4\u65B0\uFF0C\u4E0D\u5237\u5C4F" : "\u6BCF\u4E00\u6B65\u90FD\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF08\u542B\u5DE5\u5177\u8C03\u7528\u548C\u8FC7\u7A0B\u8BF4\u660E\uFF09\uFF1B\u6CE8\u610F\u957F\u4EFB\u52A1\u4F1A\u8FDE\u7EED\u53D1\u9001\u8F83\u591A\u6D88\u606F";
|
|
7904
|
+
const helpText = current === "off" ? "\u9002\u5408\u65E5\u5E38\u95EE\u7B54\uFF1A\u6267\u884C\u8FC7\u7A0B\u4E2D\u4E0D\u663E\u793A\u5DE5\u5177\u8C03\u7528\u7B49\u4E2D\u95F4\u6B65\u9AA4\uFF0C\u53EA\u56DE\u590D\u6700\u7EC8\u7ED3\u679C" : current === "live_cot" ? "\u4F7F\u7528\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\u5C55\u793A\u63A8\u7406\u3001\u5DE5\u5177\u8C03\u7528\u4E0E\u7ED3\u679C\uFF0C\u6700\u7EC8\u7B54\u6848\u5355\u72EC\u53D1\u9001" : current === "streaming_card" ? "\u63A8\u8350\u957F\u4EFB\u52A1\u4F7F\u7528\uFF1A\u8FC7\u7A0B\u4E0E\u6700\u7EC8\u7B54\u6848\u90FD\u5728\u540C\u4E00\u5F20\u5361\u7247\u91CC\u5B9E\u65F6\u66F4\u65B0\uFF0C\u4E0D\u5237\u5C4F" : "\u6BCF\u4E00\u6B65\u90FD\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF08\u542B\u5DE5\u5177\u8C03\u7528\u548C\u8FC7\u7A0B\u8BF4\u660E\uFF09\uFF1B\u6CE8\u610F\u957F\u4EFB\u52A1\u4F1A\u8FDE\u7EED\u53D1\u9001\u8F83\u591A\u6D88\u606F";
|
|
7883
7905
|
return h2(
|
|
7884
7906
|
"section",
|
|
7885
7907
|
{
|
|
@@ -7906,7 +7928,7 @@ function StepPushEditor({ value = false, mode = "post", disabled = false, onSave
|
|
|
7906
7928
|
id: helpId,
|
|
7907
7929
|
className: "dim-presetTooltip",
|
|
7908
7930
|
role: "tooltip"
|
|
7909
|
-
}, "\u8BBE\u7F6E\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u7684\u5448\u73B0\u65B9\u5F0F\uFF1A\u4E0D\u663E\u793A\u3001\u5B9E\u65F6\u5361\u7247\u6216\u9010\u6B65\u6D88\u606F")
|
|
7931
|
+
}, "\u8BBE\u7F6E\u4EFB\u52A1\u6267\u884C\u8FC7\u7A0B\u7684\u5448\u73B0\u65B9\u5F0F\uFF1A\u4E0D\u663E\u793A\u3001\u539F\u751F\u76F4\u64AD\u3001\u5B9E\u65F6\u5361\u7247\u6216\u9010\u6B65\u6D88\u606F")
|
|
7910
7932
|
)
|
|
7911
7933
|
),
|
|
7912
7934
|
saving ? h2("span", { className: "dim-feishuGroupControlStatus", role: "status" }, "\u4FDD\u5B58\u4E2D\u2026") : null
|
|
@@ -7921,6 +7943,7 @@ function StepPushEditor({ value = false, mode = "post", disabled = false, onSave
|
|
|
7921
7943
|
onChange: change
|
|
7922
7944
|
},
|
|
7923
7945
|
h2("option", { value: "off" }, "\u4E0D\u663E\u793A\u8FC7\u7A0B\uFF08\u53EA\u53D1\u9001\u6700\u7EC8\u7B54\u6848\uFF09"),
|
|
7946
|
+
h2("option", { value: "live_cot" }, "\u5B9E\u65F6\u76F4\u64AD\uFF08\u98DE\u4E66\u539F\u751F\u601D\u8003\u8FC7\u7A0B\uFF09"),
|
|
7924
7947
|
h2("option", { value: "streaming_card" }, "\u5B9E\u65F6\u8FC7\u7A0B\u5361\uFF08\u5168\u7A0B\u4E00\u5F20\u5361\u7247\u52A8\u6001\u66F4\u65B0\uFF09"),
|
|
7925
7948
|
h2("option", { value: "post" }, "\u9010\u6B65\u76F4\u64AD\uFF08\u6BCF\u4E00\u6B65\u5355\u72EC\u53D1\u4E00\u6761\u6D88\u606F\uFF09")
|
|
7926
7949
|
),
|
|
@@ -10937,12 +10960,57 @@ var unwrapRpcResult6 = api3.unwrapRpcResult;
|
|
|
10937
10960
|
var normalizeSnapshot5 = api3.normalizeSnapshot;
|
|
10938
10961
|
var presentError6 = api3.presentError;
|
|
10939
10962
|
|
|
10963
|
+
// plugin-src/client/channels/telegram/thinking-traces.js
|
|
10964
|
+
function ThinkingTracesSettings({ account, busy, onSave }) {
|
|
10965
|
+
const checked = account.thinkingTraces !== false;
|
|
10966
|
+
return h2(
|
|
10967
|
+
"div",
|
|
10968
|
+
{ className: "dim-accountSettings" },
|
|
10969
|
+
h2("h4", { className: "dim-accountSettingsTitle" }, "\u4F1A\u8BDD\u884C\u4E3A"),
|
|
10970
|
+
h2(
|
|
10971
|
+
"label",
|
|
10972
|
+
{ className: "dim-accountSettingsRow" },
|
|
10973
|
+
h2(
|
|
10974
|
+
"span",
|
|
10975
|
+
{ className: "dim-accountSettingsText" },
|
|
10976
|
+
h2("span", { className: "dim-accountSettingsLabel" }, "\u601D\u8003\u8FC7\u7A0B\u7559\u75D5"),
|
|
10977
|
+
h2(
|
|
10978
|
+
"span",
|
|
10979
|
+
{ className: "dim-accountSettingsHelp" },
|
|
10980
|
+
"\u5B9E\u65F6\u663E\u793A\u601D\u8003\u6B65\u9AA4\u4E0E\u5DE5\u5177\u8C03\u7528\uFF0C\u6700\u7EC8\u7B54\u6848\u5355\u72EC\u6210\u6761"
|
|
10981
|
+
)
|
|
10982
|
+
),
|
|
10983
|
+
h2("input", {
|
|
10984
|
+
type: "checkbox",
|
|
10985
|
+
className: "dim-accountSettingsSwitch",
|
|
10986
|
+
checked,
|
|
10987
|
+
disabled: Boolean(busy),
|
|
10988
|
+
onChange: (event) => {
|
|
10989
|
+
onSave?.({ thinkingTraces: event.target.checked });
|
|
10990
|
+
}
|
|
10991
|
+
})
|
|
10992
|
+
)
|
|
10993
|
+
);
|
|
10994
|
+
}
|
|
10995
|
+
|
|
10940
10996
|
// plugin-src/client/channels/telegram/styles.js
|
|
10941
10997
|
var TELEGRAM_STYLE_ID = "xmanrui-dsh-im-telegram-settings";
|
|
10942
10998
|
var CSS7 = String.raw`
|
|
10943
10999
|
.dtg-page { --ddt-accent: #229ed9; --ddt-accent-deep: #1687bd; --ddt-accent-wash: #eaf7fd; }
|
|
10944
11000
|
.dtg-avatar { color: #fff; background: #229ed9; }
|
|
10945
11001
|
.dtg-avatar svg { display: block; }
|
|
11002
|
+
.dim-accountSettings { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--dsw-alias-border-l2, #eceef1); }
|
|
11003
|
+
.dim-accountSettingsTitle { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary, #646a73); letter-spacing: 0.02em; }
|
|
11004
|
+
.dim-accountSettingsRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; cursor: pointer; }
|
|
11005
|
+
.dim-accountSettingsText { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
11006
|
+
.dim-accountSettingsLabel { font-size: 13px; font-weight: 500; color: var(--dsw-alias-label, #1f2329); }
|
|
11007
|
+
.dim-accountSettingsHelp { font-size: 12px; color: var(--dsw-alias-label-tertiary, #8a919f); }
|
|
11008
|
+
.dim-accountSettingsSwitch { appearance: none; flex: none; width: 32px; height: 19px; margin: 0; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 12px; background: var(--dsw-alias-interactive-bg-hover, #eef0f3); cursor: pointer; position: relative; }
|
|
11009
|
+
.dim-accountSettingsSwitch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--dsw-alias-label-secondary, #646a73); transition: transform 120ms ease, background 120ms ease; }
|
|
11010
|
+
.dim-accountSettingsSwitch:checked { border-color: #229ed9; background: #229ed9; }
|
|
11011
|
+
.dim-accountSettingsSwitch:checked::before { transform: translateX(13px); background: #fff; }
|
|
11012
|
+
.dim-accountSettingsSwitch:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
11013
|
+
@media (prefers-reduced-motion: reduce) { .dim-accountSettingsSwitch::before { transition: none; } }
|
|
10946
11014
|
`;
|
|
10947
11015
|
function installTelegramStyles() {
|
|
10948
11016
|
if (typeof document === "undefined") return () => {
|
|
@@ -10971,7 +11039,9 @@ var channel3 = createTokenChannelSettings({
|
|
|
10971
11039
|
tokenPlaceholder: "\u586B\u5199 @BotFather \u751F\u6210\u7684 Bot Token",
|
|
10972
11040
|
emptyTitle: "\u63A5\u5165 Telegram \u673A\u5668\u4EBA",
|
|
10973
11041
|
emptyDescription: "\u5148\u901A\u8FC7 @BotFather \u83B7\u53D6 Bot Token\uFF0C\u518D\u5728\u8FD9\u91CC\u5B8C\u6210\u63A5\u5165\u3002",
|
|
10974
|
-
platformLabel: "Telegram"
|
|
11042
|
+
platformLabel: "Telegram",
|
|
11043
|
+
AccountSettings: ThinkingTracesSettings,
|
|
11044
|
+
accountSettingsEndpoint: "bot.thinking-traces.set"
|
|
10975
11045
|
});
|
|
10976
11046
|
var TelegramSettingsTab = channel3.SettingsTab;
|
|
10977
11047
|
var TelegramAccountCard = channel3.AccountCard;
|
|
@@ -18261,10 +18331,10 @@ var CSS14 = String.raw`
|
|
|
18261
18331
|
.dim-updateFooter .dim-updateButton:first-child { margin-right: auto; }
|
|
18262
18332
|
.dim-updatePrimary, .dim-updatePrimary:hover:not(:disabled) { border-color: var(--dsw-alias-state-business-primary, #3370ff); color: #fff; background: var(--dsw-alias-state-business-primary, #3370ff); }
|
|
18263
18333
|
.dim-githubAction { position: relative; display: inline-flex; flex: none; }
|
|
18264
|
-
.dim-githubLink {
|
|
18334
|
+
.dim-githubLink { 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); text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease; }
|
|
18335
|
+
.dim-githubLink svg { display: block; }
|
|
18265
18336
|
.dim-githubLink:hover { border-color: #aeb3bb; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
|
|
18266
18337
|
.dim-githubLink:focus-visible { outline: 2px solid color-mix(in srgb, var(--dim-blue) 70%, white); outline-offset: 2px; }
|
|
18267
|
-
.dim-githubArrow { font-size: 13px; line-height: 1; }
|
|
18268
18338
|
.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; }
|
|
18269
18339
|
.dim-githubAction:hover .dim-githubTooltip, .dim-githubAction:focus-within .dim-githubTooltip { opacity: 1; visibility: visible; transform: translateY(0); }
|
|
18270
18340
|
.dim-generalSettingsAction { position: relative; display: inline-flex; flex: none; }
|
|
@@ -19926,8 +19996,16 @@ function IMSettingsTab({
|
|
|
19926
19996
|
"aria-label": "dsh-im GitHub",
|
|
19927
19997
|
"aria-describedby": githubTooltipId
|
|
19928
19998
|
},
|
|
19929
|
-
h2("
|
|
19930
|
-
|
|
19999
|
+
h2("svg", {
|
|
20000
|
+
width: 18,
|
|
20001
|
+
height: 18,
|
|
20002
|
+
viewBox: "0 0 16 16",
|
|
20003
|
+
fill: "currentColor",
|
|
20004
|
+
focusable: "false",
|
|
20005
|
+
"aria-hidden": "true"
|
|
20006
|
+
}, h2("path", {
|
|
20007
|
+
d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.65 7.65 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"
|
|
20008
|
+
}))
|
|
19931
20009
|
),
|
|
19932
20010
|
h2("span", {
|
|
19933
20011
|
id: githubTooltipId,
|