@xmanrui/dsh-im 3.0.1 → 3.0.3
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 -2
- package/README.md +2 -2
- package/lib/client.js +37 -40
- package/lib/index.js +205 -204
- package/package.json +1 -1
- package/plugin-src/client/channels/whatsapp/api.js +5 -0
- package/plugin-src/client/channels/whatsapp/index.js +30 -9
- package/plugin-src/client/i18n.js +3 -0
- package/plugin-src/client/index.js +5 -15
- package/plugin-src/client/styles.js +3 -11
- package/plugin-src/host/channels/whatsapp/rpc.mjs +2 -2
- package/src/channels/wecom/wecom-bridge.mjs +48 -11
- package/src/channels/whatsapp/config-store.mjs +1 -0
- package/src/channels/whatsapp/whatsapp-controller.mjs +1 -0
- package/src/channels/whatsapp/whatsapp-runtime.mjs +42 -6
package/README.en.md
CHANGED
|
@@ -129,7 +129,7 @@ Use the proxy URL required by your network and restart the Host after changing i
|
|
|
129
129
|
|
|
130
130
|
Each Telegram bot has its own access-mode control on its bot card. Existing and newly connected bots both default to **Compatible mode**: DMs receive replies, while group messages require a mention of or reply to the bot. Restrictions apply only after explicitly switching that bot to **Safe mode (private-chat allowlist)**. Safe mode ignores every group message and admits only numeric User IDs in that bot's allowlist. Enter one ID per line. Switching back to Compatible mode retains the allowlist without enforcing it, so it is available when Safe mode is enabled again. An empty allowlist in Safe mode rejects all inbound messages for that bot.
|
|
131
131
|
|
|
132
|
-
Each WhatsApp bot also has its own access mode. Existing bots migrate to **Only me**, which is also the default for newly linked bots and accepts only self-chat messages from the linked account. **Selected contacts** additionally accepts direct messages from
|
|
132
|
+
Each WhatsApp bot also has its own access mode. Existing bots migrate to **Only me**, which is also the default for newly linked bots and accepts only self-chat messages from the linked account. **Selected contacts** additionally accepts direct messages from phone numbers in its list and ignores groups. **Open responses** accepts all direct messages, group messages sent by the linked account, and mentions of or replies to that account from members in its separate group number list. Leaving the group number list empty allows every group member; this also lets an owner-only group act as a separate conversation. The two number lists are stored independently. Enter one number with its country or region code per line; a leading `+` is optional. An empty Selected contacts list behaves like Only me, and rejected messages are ignored silently.
|
|
133
133
|
|
|
134
134
|
## Bot commands
|
|
135
135
|
|
|
@@ -194,7 +194,7 @@ If the Slack desktop app has no native Slash Command registered with the same na
|
|
|
194
194
|
- `/session` accepts exactly one Session ID obtained from `/sessionlist`. It neither creates a session nor immediately prompts the model; later messages in the current chat continue the bound session. Regular archived sessions can be bound without being unarchived, while subagent sessions cannot be bound.
|
|
195
195
|
- `/session` locates the session's unique workspace automatically. Binding inside the current workspace replaces only this chat's mapping. A cross-workspace binding switches the bot workspace, clears the old session mappings for all of that bot's chats, and then binds this chat, so it affects the bot's other chats. A reply already being generated may still finish.
|
|
196
196
|
- Workspace switches and session bindings only clear or replace dsh-im chat mappings. They never delete, empty, or archive old Session contents; an old Session can still be listed and bound again.
|
|
197
|
-
- Any user admitted by the current channel access policy can run these commands; there is no separate administrator role. Telegram Compatible mode follows the original DM and group mention/reply rules, while Safe mode admits only allowlisted private users. WhatsApp Only me accepts self-chat only, Selected contacts accepts self-chat plus allowlisted direct messages, and Open responses accepts every direct message, group messages from the linked account, and mentions or replies from
|
|
197
|
+
- Any user admitted by the current channel access policy can run these commands; there is no separate administrator role. Telegram Compatible mode follows the original DM and group mention/reply rules, while Safe mode admits only allowlisted private users. WhatsApp Only me accepts self-chat only, Selected contacts accepts self-chat plus allowlisted direct messages, and Open responses accepts every direct message, group messages from the linked account, and mentions or replies from listed group members; an empty number list allows every group member.
|
|
198
198
|
- Agent Preset names and IDs come from the same Harness Host, and any command-authorized user can change the Preset used by all future new Sessions across this bot's chats. Expose `/presetlist` and `/preset` only to trusted users.
|
|
199
199
|
- The list comes from the Harness Host's global registry and can include local absolute paths for other bots, other channels, or non-IM projects. Restrict the bot's visibility to trusted users.
|
|
200
200
|
- Session results also come from the global Harness Host. Session IDs and titles can belong to other bots, other channels, or non-IM projects, and may contain sensitive metadata. Enable these commands only when every user in the bot's visibility scope is trusted.
|
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ dsh web
|
|
|
132
132
|
|
|
133
133
|
每个 Telegram 机器人都可以在自己的卡片中切换访问模式。旧机器人和新接入机器人均默认使用**兼容模式**:私聊直接响应,群聊仅在提及机器人或回复机器人消息时响应。只有主动切换到**安全模式(私聊白名单)**后,机器人才会忽略全部群聊,并只接受该机器人白名单中的数字 User ID。白名单每行一个 ID、按机器人独立保存;切回兼容模式时会保留但不使用,再切回安全模式即可继续使用。安全模式的空白名单会拒绝该机器人的所有入站消息。
|
|
134
134
|
|
|
135
|
-
每个 WhatsApp
|
|
135
|
+
每个 WhatsApp 机器人也有独立的访问模式。旧机器人升级后和新接入机器人都默认使用**仅自己模式**,只响应已绑定账号的自聊消息。**指定联系人模式**额外接受其号码列表中联系人的私聊并忽略群聊。**开放响应模式**响应所有私聊、已绑定账号自己发出的群聊消息,以及其独立群聊号码列表中成员对该账号的提及或回复;群聊号码列表留空时允许所有群成员,因此也可以把“仅自己”的群当作独立会话使用。两个号码列表分别保存、互不影响;号码需包含国家或地区代码,每行一个,可带开头的 `+`。指定联系人模式的空列表等同于仅自己模式。未授权消息会被静默忽略。
|
|
136
136
|
|
|
137
137
|
## 机器人命令
|
|
138
138
|
|
|
@@ -197,7 +197,7 @@ Slack 桌面端若未注册同名的原生 Slash Command,会拦截直接以 `/
|
|
|
197
197
|
- `/session` 只接受一个由 `/sessionlist` 获得的 Session ID。它不会新建会话或立即向模型发送消息;绑定成功后,当前聊天的后续消息会继续该会话。普通归档会话可以绑定但不会自动取消归档,子代理会话不能绑定。
|
|
198
198
|
- `/session` 会自动定位会话唯一所属的工作区。同工作区绑定只替换当前聊天的映射;跨工作区绑定会切换该机器人的工作区、清除该机器人所有聊天的旧会话映射,再绑定当前聊天,因此会影响该机器人的其他聊天。已经开始生成的回复仍可完成。
|
|
199
199
|
- 工作区切换和会话绑定只会清除或替换 dsh-im 的聊天映射,不会删除、清空或归档任何旧 Session 内容;旧 Session 仍可再次列出和绑定。
|
|
200
|
-
- 任何通过当前渠道访问策略的用户都可以执行这些命令,不另行区分管理员和普通用户。Telegram 兼容模式遵循原有私聊及群聊提及/回复规则;安全模式只允许当前机器人白名单中的私聊用户执行。WhatsApp
|
|
200
|
+
- 任何通过当前渠道访问策略的用户都可以执行这些命令,不另行区分管理员和普通用户。Telegram 兼容模式遵循原有私聊及群聊提及/回复规则;安全模式只允许当前机器人白名单中的私聊用户执行。WhatsApp 仅自己模式只接受自聊,指定联系人模式接受自聊和白名单私聊,开放响应模式接受所有私聊、已绑定账号自己发出的群聊消息,以及允许号码对应群成员的提及或回复;号码列表留空时允许所有群成员。
|
|
201
201
|
- Agent Preset 名称和 ID 来自同一个 Harness Host,且任何有命令权限的用户都能修改该机器人所有聊天未来新 Session 的 Preset;请只向可信用户开放 `/presetlist` 和 `/preset`。
|
|
202
202
|
- 工作区列表来自 Harness Host 的全局登记信息,可能包含其他机器人、其他渠道或非 IM 项目的本机绝对路径。请将机器人可见范围限制给可信用户。
|
|
203
203
|
- 会话列表同样来自该全局 Harness Host;会话 ID 和标题可能属于其他机器人、其他渠道或非 IM 项目,并可能包含敏感元数据。开放命令前请确保所有可见用户都可信。
|
package/lib/client.js
CHANGED
|
@@ -47,7 +47,7 @@ var React20 = __toESM(require("react"), 1);
|
|
|
47
47
|
// package.json
|
|
48
48
|
var package_default = {
|
|
49
49
|
name: "@xmanrui/dsh-im",
|
|
50
|
-
version: "3.0.
|
|
50
|
+
version: "3.0.3",
|
|
51
51
|
description: "\u628A\u4E5D\u79CD IM \u673A\u5668\u4EBA\u548C\u516C\u7F51 AI Office \u63A5\u5165\u672C\u673A DeepSeek Harness\u3002 Connect nine IM channels and a public AI Office to a local DeepSeek Harness.",
|
|
52
52
|
keywords: [
|
|
53
53
|
"deepseek-harness",
|
|
@@ -681,9 +681,12 @@ var EN = Object.freeze({
|
|
|
681
681
|
"\u53EA\u54CD\u5E94\u5DF2\u7ED1\u5B9A WhatsApp \u8D26\u53F7\u7684\u81EA\u804A\u6D88\u606F\u3002": "Only respond to self-chat messages from the linked WhatsApp account.",
|
|
682
682
|
"\u54CD\u5E94\u81EA\u804A\u548C\u767D\u540D\u5355\u8054\u7CFB\u4EBA\u7684\u79C1\u804A\uFF0C\u5FFD\u7565\u7FA4\u804A\u3002": "Respond to self-chat and allowlisted direct messages; ignore group messages.",
|
|
683
683
|
"\u54CD\u5E94\u6240\u6709\u79C1\u804A\u3001\u5DF2\u7ED1\u5B9A\u8D26\u53F7\u81EA\u5DF1\u53D1\u51FA\u7684\u7FA4\u804A\u6D88\u606F\uFF0C\u4EE5\u53CA\u5176\u4ED6\u7FA4\u6210\u5458\u7684\u63D0\u53CA\u6216\u56DE\u590D\u3002": "Respond to all direct messages, group messages sent by the linked account, and mentions or replies from other group members.",
|
|
684
|
+
"\u54CD\u5E94\u6240\u6709\u79C1\u804A\u3001\u5DF2\u7ED1\u5B9A\u8D26\u53F7\u81EA\u5DF1\u53D1\u51FA\u7684\u7FA4\u804A\u6D88\u606F\uFF0C\u4EE5\u53CA\u5141\u8BB8\u6210\u5458\u7684\u63D0\u53CA\u6216\u56DE\u590D\uFF1B\u7FA4\u804A\u53F7\u7801\u5217\u8868\u7559\u7A7A\u65F6\u5141\u8BB8\u6240\u6709\u7FA4\u6210\u5458\u3002": "Respond to all direct messages, group messages sent by the linked account, and mentions or replies from allowed members; leaving the group number list empty allows every group member.",
|
|
684
685
|
"\u5141\u8BB8\u79C1\u804A\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801": "WhatsApp phone numbers allowed to send direct messages",
|
|
686
|
+
"\u5141\u8BB8\u5728\u7FA4\u804A\u4E2D\u547C\u53EB\u673A\u5668\u4EBA\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801": "WhatsApp phone numbers allowed to call the bot in group chats",
|
|
685
687
|
"\u6BCF\u884C\u4E00\u4E2A\u542B\u56FD\u5BB6\u6216\u5730\u533A\u4EE3\u7801\u7684\u53F7\u7801": "One number with country or region code per line",
|
|
686
688
|
"\u53EF\u4EE5\u5305\u542B\u5F00\u5934\u7684 +\uFF0C\u4FDD\u5B58\u65F6\u4F1A\u81EA\u52A8\u79FB\u9664\u3002": "A leading + is allowed and removed when saved.",
|
|
689
|
+
"\u7559\u7A7A\u8868\u793A\u6240\u6709\u7FA4\u6210\u5458\u90FD\u53EF\u4EE5\u901A\u8FC7\u63D0\u53CA\u6216\u56DE\u590D\u547C\u53EB\u673A\u5668\u4EBA\u3002": "Leave empty to let every group member call the bot by mentioning it or replying to it.",
|
|
687
690
|
"\u4EC5\u6307\u5B9A\u8054\u7CFB\u4EBA\u6A21\u5F0F\u4F7F\u7528\u767D\u540D\u5355\uFF0C\u5207\u6362\u6A21\u5F0F\u65F6\u4F1A\u4FDD\u7559\u3002": "Only Selected contacts uses the allowlist; it is retained when modes change.",
|
|
688
691
|
"\u767D\u540D\u5355\u4E3A\u7A7A\uFF1B\u4FDD\u5B58\u540E\u5C06\u53EA\u63A5\u53D7\u81EA\u804A\u6D88\u606F\u3002": "The allowlist is empty; only self-chat messages will be accepted after saving.",
|
|
689
692
|
"\u7535\u8BDD\u53F7\u7801\u5FC5\u987B\u5305\u542B\u56FD\u5BB6\u6216\u5730\u533A\u4EE3\u7801\uFF0C\u6BCF\u884C\u4E00\u4E2A\u3002": "Each phone number must include a country or region code on its own line.",
|
|
@@ -9406,7 +9409,8 @@ function normalizeBot6(value) {
|
|
|
9406
9409
|
accessMode: ["self-only", "private-allowlist", "open"].includes(
|
|
9407
9410
|
value.accessPolicy?.accessMode
|
|
9408
9411
|
) ? value.accessPolicy.accessMode : "self-only",
|
|
9409
|
-
allowedNumbers: Array.isArray(value.accessPolicy?.allowedNumbers) ? [...new Set(value.accessPolicy.allowedNumbers.filter((entry) => typeof entry === "string" && /^[1-9]\d{4,14}$/.test(entry)))] : []
|
|
9412
|
+
allowedNumbers: Array.isArray(value.accessPolicy?.allowedNumbers) ? [...new Set(value.accessPolicy.allowedNumbers.filter((entry) => typeof entry === "string" && /^[1-9]\d{4,14}$/.test(entry)))] : [],
|
|
9413
|
+
groupAllowedNumbers: Array.isArray(value.accessPolicy?.groupAllowedNumbers) ? [...new Set(value.accessPolicy.groupAllowedNumbers.filter((entry) => typeof entry === "string" && /^[1-9]\d{4,14}$/.test(entry)))] : []
|
|
9410
9414
|
},
|
|
9411
9415
|
bot: {
|
|
9412
9416
|
name: text5(value.bot?.name, "WhatsApp\u673A\u5668\u4EBA", 100),
|
|
@@ -9505,7 +9509,8 @@ function accessPolicyFor(account) {
|
|
|
9505
9509
|
) ? account.accessPolicy.accessMode : "self-only";
|
|
9506
9510
|
return {
|
|
9507
9511
|
accessMode,
|
|
9508
|
-
allowedNumbers: Array.isArray(account?.accessPolicy?.allowedNumbers) ? account.accessPolicy.allowedNumbers : []
|
|
9512
|
+
allowedNumbers: Array.isArray(account?.accessPolicy?.allowedNumbers) ? account.accessPolicy.allowedNumbers : [],
|
|
9513
|
+
groupAllowedNumbers: Array.isArray(account?.accessPolicy?.groupAllowedNumbers) ? account.accessPolicy.groupAllowedNumbers : []
|
|
9509
9514
|
};
|
|
9510
9515
|
}
|
|
9511
9516
|
function allowedNumbersFromText(value) {
|
|
@@ -9519,27 +9524,36 @@ function allowedNumbersFromText(value) {
|
|
|
9519
9524
|
function WhatsappAccessSettings({ account, busy = false, onSave }) {
|
|
9520
9525
|
const policy = accessPolicyFor(account);
|
|
9521
9526
|
const sourceNumbers = policy.allowedNumbers.join("\n");
|
|
9527
|
+
const sourceGroupNumbers = policy.groupAllowedNumbers.join("\n");
|
|
9522
9528
|
const helpId = React19.useId();
|
|
9523
9529
|
const [accessMode, setAccessMode] = React19.useState(policy.accessMode);
|
|
9524
9530
|
const [allowedNumbers, setAllowedNumbers] = React19.useState(sourceNumbers);
|
|
9531
|
+
const [groupAllowedNumbers, setGroupAllowedNumbers] = React19.useState(sourceGroupNumbers);
|
|
9525
9532
|
const [error, setError] = React19.useState(null);
|
|
9526
9533
|
React19.useEffect(() => {
|
|
9527
9534
|
setAccessMode(policy.accessMode);
|
|
9528
9535
|
setAllowedNumbers(sourceNumbers);
|
|
9536
|
+
setGroupAllowedNumbers(sourceGroupNumbers);
|
|
9529
9537
|
setError(null);
|
|
9530
|
-
}, [policy.accessMode, sourceNumbers]);
|
|
9538
|
+
}, [policy.accessMode, sourceNumbers, sourceGroupNumbers]);
|
|
9531
9539
|
const save = async (event) => {
|
|
9532
9540
|
event.preventDefault();
|
|
9533
9541
|
setError(null);
|
|
9534
9542
|
try {
|
|
9535
9543
|
const normalized = allowedNumbersFromText(allowedNumbers);
|
|
9544
|
+
const normalizedGroup = allowedNumbersFromText(groupAllowedNumbers);
|
|
9536
9545
|
if (typeof onSave !== "function") throw new Error("WhatsApp \u8BBF\u95EE\u8BBE\u7F6E\u6682\u4E0D\u53EF\u7528\u3002");
|
|
9537
|
-
await onSave({
|
|
9546
|
+
await onSave({
|
|
9547
|
+
accessMode,
|
|
9548
|
+
allowedNumbers: normalized,
|
|
9549
|
+
groupAllowedNumbers: normalizedGroup
|
|
9550
|
+
});
|
|
9538
9551
|
} catch (caught) {
|
|
9539
9552
|
setError(caught?.message ?? "WhatsApp \u8BBF\u95EE\u8BBE\u7F6E\u4FDD\u5B58\u5931\u8D25\u3002");
|
|
9540
9553
|
}
|
|
9541
9554
|
};
|
|
9542
9555
|
const allowlistEnabled = accessMode === "private-allowlist";
|
|
9556
|
+
const groupAllowlistEnabled = accessMode === "open";
|
|
9543
9557
|
const labels = {
|
|
9544
9558
|
"self-only": "\u4EC5\u81EA\u5DF1\u6A21\u5F0F",
|
|
9545
9559
|
"private-allowlist": "\u6307\u5B9A\u8054\u7CFB\u4EBA\u6A21\u5F0F",
|
|
@@ -9588,7 +9602,7 @@ function WhatsappAccessSettings({ account, busy = false, onSave }) {
|
|
|
9588
9602
|
"span",
|
|
9589
9603
|
{ className: "dwa-accessTooltipItem" },
|
|
9590
9604
|
h2("strong", null, "\u5F00\u653E\u54CD\u5E94\u6A21\u5F0F"),
|
|
9591
|
-
h2("span", null, "\u54CD\u5E94\u6240\u6709\u79C1\u804A\u3001\u5DF2\u7ED1\u5B9A\u8D26\u53F7\u81EA\u5DF1\u53D1\u51FA\u7684\u7FA4\u804A\u6D88\u606F\uFF0C\u4EE5\u53CA\
|
|
9605
|
+
h2("span", null, "\u54CD\u5E94\u6240\u6709\u79C1\u804A\u3001\u5DF2\u7ED1\u5B9A\u8D26\u53F7\u81EA\u5DF1\u53D1\u51FA\u7684\u7FA4\u804A\u6D88\u606F\uFF0C\u4EE5\u53CA\u5141\u8BB8\u6210\u5458\u7684\u63D0\u53CA\u6216\u56DE\u590D\uFF1B\u7FA4\u804A\u53F7\u7801\u5217\u8868\u7559\u7A7A\u65F6\u5141\u8BB8\u6240\u6709\u7FA4\u6210\u5458\u3002")
|
|
9592
9606
|
)
|
|
9593
9607
|
)
|
|
9594
9608
|
)
|
|
@@ -9614,22 +9628,23 @@ function WhatsappAccessSettings({ account, busy = false, onSave }) {
|
|
|
9614
9628
|
h2("option", { value: "open" }, "\u5F00\u653E\u54CD\u5E94\u6A21\u5F0F")
|
|
9615
9629
|
)
|
|
9616
9630
|
),
|
|
9617
|
-
allowlistEnabled ? h2(
|
|
9631
|
+
allowlistEnabled || groupAllowlistEnabled ? h2(
|
|
9618
9632
|
"label",
|
|
9619
9633
|
{ className: "dwa-accessField" },
|
|
9620
|
-
h2("span", null, "\u5141\u8BB8\u79C1\u804A\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801"),
|
|
9634
|
+
h2("span", null, allowlistEnabled ? "\u5141\u8BB8\u79C1\u804A\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801" : "\u5141\u8BB8\u5728\u7FA4\u804A\u4E2D\u547C\u53EB\u673A\u5668\u4EBA\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801"),
|
|
9621
9635
|
h2("textarea", {
|
|
9622
|
-
value: allowedNumbers,
|
|
9636
|
+
value: allowlistEnabled ? allowedNumbers : groupAllowedNumbers,
|
|
9623
9637
|
disabled: busy,
|
|
9624
9638
|
rows: 3,
|
|
9625
9639
|
placeholder: "\u6BCF\u884C\u4E00\u4E2A\u542B\u56FD\u5BB6\u6216\u5730\u533A\u4EE3\u7801\u7684\u53F7\u7801",
|
|
9626
|
-
"aria-label": "\u5141\u8BB8\u79C1\u804A\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801",
|
|
9640
|
+
"aria-label": allowlistEnabled ? "\u5141\u8BB8\u79C1\u804A\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801" : "\u5141\u8BB8\u5728\u7FA4\u804A\u4E2D\u547C\u53EB\u673A\u5668\u4EBA\u7684 WhatsApp \u7535\u8BDD\u53F7\u7801",
|
|
9627
9641
|
onChange: (event) => {
|
|
9628
|
-
setAllowedNumbers(event.target.value);
|
|
9642
|
+
if (allowlistEnabled) setAllowedNumbers(event.target.value);
|
|
9643
|
+
else setGroupAllowedNumbers(event.target.value);
|
|
9629
9644
|
setError(null);
|
|
9630
9645
|
}
|
|
9631
9646
|
}),
|
|
9632
|
-
h2("small", null, "\u53EF\u4EE5\u5305\u542B\u5F00\u5934\u7684 +\uFF0C\u4FDD\u5B58\u65F6\u4F1A\u81EA\u52A8\u79FB\u9664\u3002")
|
|
9647
|
+
h2("small", null, allowlistEnabled ? "\u53EF\u4EE5\u5305\u542B\u5F00\u5934\u7684 +\uFF0C\u4FDD\u5B58\u65F6\u4F1A\u81EA\u52A8\u79FB\u9664\u3002" : "\u7559\u7A7A\u8868\u793A\u6240\u6709\u7FA4\u6210\u5458\u90FD\u53EF\u4EE5\u901A\u8FC7\u63D0\u53CA\u6216\u56DE\u590D\u547C\u53EB\u673A\u5668\u4EBA\u3002")
|
|
9633
9648
|
) : null,
|
|
9634
9649
|
allowlistEnabled && allowedNumbers.trim() === "" ? h2(
|
|
9635
9650
|
"p",
|
|
@@ -10329,13 +10344,11 @@ var CSS11 = String.raw`
|
|
|
10329
10344
|
}
|
|
10330
10345
|
.dim-page *, .dim-page *::before, .dim-page *::after { box-sizing: border-box; }
|
|
10331
10346
|
.dim-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
|
|
10332
|
-
.dim-brand {
|
|
10333
|
-
.dim-
|
|
10347
|
+
.dim-brand { min-width: 0; width: max-content; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; margin: -2px -6px; padding: 2px 6px; border-radius: 8px; }
|
|
10348
|
+
.dim-brandHeading { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
|
|
10334
10349
|
.dim-brandName { color: var(--dsw-alias-label-primary, #1f2329); font-size: 20px; line-height: 24px; font-weight: 800; letter-spacing: .04em; }
|
|
10350
|
+
.dim-brandVersion { color: var(--dsw-alias-label-tertiary, #8f959e); font: 500 10px/16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; }
|
|
10335
10351
|
.dim-title p { margin: 0; color: var(--dsw-alias-label-secondary, #646a73); font-size: 12px; line-height: 18px; font-weight: 500; white-space: nowrap; }
|
|
10336
|
-
.dim-versionTooltip { position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: max-content; max-width: min(220px, 80vw); display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--dsw-alias-border-l2, #dfe1e5); border-radius: 7px; color: var(--dsw-alias-label-secondary, #646a73); 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; }
|
|
10337
|
-
.dim-versionTooltip strong { color: var(--dsw-alias-label-primary, #1f2329); font: 600 11px/16px ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
10338
|
-
.dim-brand:hover .dim-versionTooltip, .dim-brand:focus .dim-versionTooltip { opacity: 1; visibility: visible; transform: translateY(0); }
|
|
10339
10352
|
.dim-githubAction { position: relative; display: inline-flex; flex: none; }
|
|
10340
10353
|
.dim-githubLink { min-height: 30px; display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 0 10px; 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); font-size: 12px; line-height: normal; font-weight: 560; text-decoration: none; transition: border-color .15s ease, color .15s ease, background .15s ease; }
|
|
10341
10354
|
.dim-githubLink:hover { border-color: #aeb3bb; color: var(--dsw-alias-label-primary, #1f2329); background: var(--dsw-alias-interactive-bg-hover, #f7f8fa); }
|
|
@@ -10564,8 +10577,6 @@ var CSS11 = String.raw`
|
|
|
10564
10577
|
.dim-panel .ddt-qrFrame, .dim-panel .ddt-countdown { width: min(270px, 100%); }
|
|
10565
10578
|
@container (max-width: 680px) {
|
|
10566
10579
|
.dim-panel .bxf-headingTools, .dim-panel .dxw-tools, .dim-panel .ddt-tools { gap: 6px; }
|
|
10567
|
-
.dim-panel .dim-botCardTop { flex-direction: column; align-items: stretch; }
|
|
10568
|
-
.dim-panel .dim-botHealthGroup { justify-items: start; }
|
|
10569
10580
|
.dim-panel .dim-bindActions { gap: 6px; }
|
|
10570
10581
|
.dim-panel .bxf-headingTools .dim-scanButton, .dim-panel .dxw-tools .dim-scanButton, .dim-panel .ddt-tools .dim-scanButton, .dim-panel .dim-credentialButton { gap: 5px; padding-inline: 8px; font-size: 12px; }
|
|
10571
10582
|
.dim-panel .dim-actionIcon { width: 13px; height: 13px; flex-basis: 13px; }
|
|
@@ -10589,10 +10600,6 @@ var CSS11 = String.raw`
|
|
|
10589
10600
|
.dim-rail { max-height: none; overflow: visible; padding-right: 1px; }
|
|
10590
10601
|
.dim-channel { min-height: 48px; }
|
|
10591
10602
|
}
|
|
10592
|
-
@media (max-width: 720px) {
|
|
10593
|
-
.dim-panel .dim-botCardTop { flex-direction: column; align-items: stretch; }
|
|
10594
|
-
.dim-panel .dim-botHealthGroup { justify-items: start; }
|
|
10595
|
-
}
|
|
10596
10603
|
@media (max-width: 560px) {
|
|
10597
10604
|
.dim-title { flex-direction: column; gap: 10px; }
|
|
10598
10605
|
.dim-title p { white-space: normal; }
|
|
@@ -10755,7 +10762,6 @@ function IMSettingsTab({
|
|
|
10755
10762
|
}) {
|
|
10756
10763
|
const [selected, setSelected] = React20.useState("weixin");
|
|
10757
10764
|
const [loopbackRecovery, setLoopbackRecovery] = React20.useState(null);
|
|
10758
|
-
const versionTooltipId = React20.useId();
|
|
10759
10765
|
const githubTooltipId = React20.useId();
|
|
10760
10766
|
const active = CHANNELS.find((channel4) => channel4.id === selected) ?? CHANNELS[0];
|
|
10761
10767
|
const reportLoopbackRecovery = React20.useCallback((recovery) => {
|
|
@@ -10800,23 +10806,14 @@ function IMSettingsTab({
|
|
|
10800
10806
|
{ className: "dim-title" },
|
|
10801
10807
|
h2(
|
|
10802
10808
|
"div",
|
|
10803
|
-
{
|
|
10804
|
-
className: "dim-brand",
|
|
10805
|
-
tabIndex: 0,
|
|
10806
|
-
"aria-describedby": versionTooltipId
|
|
10807
|
-
},
|
|
10808
|
-
h2("strong", { className: "dim-brandName" }, "DSH-IM"),
|
|
10809
|
-
h2("p", null, "\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA"),
|
|
10809
|
+
{ className: "dim-brand" },
|
|
10810
10810
|
h2(
|
|
10811
|
-
"
|
|
10812
|
-
{
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
|
|
10817
|
-
h2("span", null, "\u5F53\u524D\u7248\u672C"),
|
|
10818
|
-
h2("strong", null, `v${IM_PLUGIN_VERSION}`)
|
|
10819
|
-
)
|
|
10811
|
+
"div",
|
|
10812
|
+
{ className: "dim-brandHeading" },
|
|
10813
|
+
h2("strong", { className: "dim-brandName" }, "DSH-IM"),
|
|
10814
|
+
h2("span", { className: "dim-brandVersion" }, `v${IM_PLUGIN_VERSION}`)
|
|
10815
|
+
),
|
|
10816
|
+
h2("p", null, "\u8BA9 DeepSeek Harness \u89E6\u624B\u53EF\u53CA")
|
|
10820
10817
|
),
|
|
10821
10818
|
h2(
|
|
10822
10819
|
"span",
|