dsh-remote-web 0.6.10-beta.7 → 0.6.10-beta.8
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/lib/client.js +28 -5
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -4475,7 +4475,10 @@ window.__ModuleLoader__.load({
|
|
|
4475
4475
|
// 已绑定态同样保留:它是常驻的用途说明(不是一次性引导气泡),不占用任何按钮。
|
|
4476
4476
|
var wxPlan = (wx && wx.plan) ? String(wx.plan) : "free";
|
|
4477
4477
|
var wxIsPaid = wxPlan !== "free";
|
|
4478
|
-
|
|
4478
|
+
// ★ 判据是「wx.caps 是不是数组」,**空数组也算权威**(与服务端/bridge 同一口径):
|
|
4479
|
+
// 通道下发 `caps: []` = 后台把这一档清空了(契约 §4.1)。若当成"没给"而回退本地面板镜像,
|
|
4480
|
+
// 面板就会展示出一个用户**实际没有**的能力清单 —— 展示与判定分叉,正是业主红线。
|
|
4481
|
+
var wxCaps = (wx && Array.isArray(wx.caps)) ? wx.caps : null;
|
|
4479
4482
|
var wxHas = function (cap) {
|
|
4480
4483
|
var list = wxCaps || (wxIsPaid ? WECHAT_PAID_CAPS : WECHAT_FREE_CAPS);
|
|
4481
4484
|
return list.some(function (c) { return c === cap || cap.indexOf(c + ".") === 0; });
|
|
@@ -4487,8 +4490,14 @@ window.__ModuleLoader__.load({
|
|
|
4487
4490
|
var text = row.free || row.paid;
|
|
4488
4491
|
if (!text) return;
|
|
4489
4492
|
var ok = wxHas(row.cap);
|
|
4493
|
+
// ★ 锁定的说法要看**当前档位**:
|
|
4494
|
+
// · 免费用户看到一个用不了的能力 → 「(会员)」是准确的(这正是升级理由)
|
|
4495
|
+
// · 付费用户看到一个用不了的能力 → 那是**后台把他的这项关了**,
|
|
4496
|
+
// 再写「(会员)」就是对着会员说"这是会员功能",纯属胡话。
|
|
4497
|
+
// 改成「(当前套餐不含)」,与后台配置保持一致(业主:话术与权限必须一致)。
|
|
4498
|
+
var lockNote = wxIsPaid ? "(当前套餐不含)" : "(会员)";
|
|
4490
4499
|
capRows.push(h("div", { className: "dru-wx-intro-row", key: "cap" + i },
|
|
4491
|
-
(ok ? "✅ " : "🔒 ") + text + (ok ? "" :
|
|
4500
|
+
(ok ? "✅ " : "🔒 ") + text + (ok ? "" : lockNote)));
|
|
4492
4501
|
});
|
|
4493
4502
|
} else {
|
|
4494
4503
|
WECHAT_CAP_LABELS.forEach(function (row, i) {
|
|
@@ -4496,10 +4505,24 @@ window.__ModuleLoader__.load({
|
|
|
4496
4505
|
if (text) capRows.push(h("div", { className: "dru-wx-intro-row", key: "cap" + i }, "· " + text));
|
|
4497
4506
|
});
|
|
4498
4507
|
}
|
|
4499
|
-
|
|
4508
|
+
// ★ 额度也必须是**通道实际在用的那一份**(`wx.limits`,来自服务端权益包):
|
|
4509
|
+
// 写死镜像的话,后台把免费额度从 20 改成 5,面板仍会说"20 条" ——
|
|
4510
|
+
// 用户按面板的承诺去发,第 6 条就被拦,只会认为产品坏了。
|
|
4511
|
+
// 拿不到 `wx.limits`(旧版 bridge / 状态没读到)才退回本地面板镜像。
|
|
4512
|
+
var wxLimitMsgs = (wx && wx.limits && typeof wx.limits.messages_per_month === "number")
|
|
4513
|
+
? Number(wx.limits.messages_per_month)
|
|
4514
|
+
: WECHAT_FREE_MSGS_PER_MONTH;
|
|
4515
|
+
// 不再按"是不是付费"决定显不显示:付费档也可能是有限额度(后台可配),
|
|
4516
|
+
// 一律「额度 > 0 就如实写出来,0 = 不限就不提」。
|
|
4517
|
+
// 用量同理:**没有这个字段就不说** —— 旧版 bridge 不上报用量,补一句
|
|
4518
|
+
// 「本月已用 0 条」等于替用户编了一个事实(他可能已经用掉 8 条)。
|
|
4519
|
+
var wxUsed = (wx && typeof wx.messages_used_this_month === "number")
|
|
4520
|
+
? Number(wx.messages_used_this_month)
|
|
4521
|
+
: null;
|
|
4522
|
+
var quotaRow = (wxLimitMsgs > 0)
|
|
4500
4523
|
? h("div", { className: "dru-wx-intro-row" },
|
|
4501
|
-
"·
|
|
4502
|
-
+ (
|
|
4524
|
+
"· 每月 " + wxLimitMsgs + " 条消息额度"
|
|
4525
|
+
+ (wxUsed === null ? "" : "(本月已用 " + wxUsed + " 条)"))
|
|
4503
4526
|
: null;
|
|
4504
4527
|
var intro = h("div", { className: "dru-wx-intro", role: "note", "aria-label": "微信机器人通道能做什么" },
|
|
4505
4528
|
h("div", { className: "dru-wx-intro-title" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-remote-web",
|
|
3
|
-
"version": "0.6.10-beta.
|
|
3
|
+
"version": "0.6.10-beta.8",
|
|
4
4
|
"description": "公网远程控制 DeepSeek Harness(dsh web):安装即得专属加密地址,人在外面也能用手机访问电脑上的 dsh——无需同一局域网/WiFi、无需公网 IP 与内网穿透,全程加密;手机端 100% 还原电脑体验(对话/工具/审批/设置)。技术用户可选自建服务,流量走自己的服务器。Remote control DeepSeek Harness (dsh web) from anywhere over the public internet — install, get an encrypted URL, use it from your phone on any network (dual-half cordis plugin: Settings panel + same-origin /dsh-remote routes). (2026-09 由 dsh-remote-ui 更名 / renamed from dsh-remote-ui; dsh-remote 的 dsh web 插件半,不是纯 UI/皮肤插件)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|