dsh-connect-trae 3.10.0 → 3.10.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.10.1 (2026-10-19)
4
+
5
+ > 「一键签到所有账号」下线。Trae 限制**每台设备每天只能签到一次**:本机任一账号签过之后,这个按钮
6
+ > 对整批账号在当天剩余时间里只能是灰的——一个永远点不动的控件,还得在下方专门写一句话解释它为什么灰。
7
+ > 单账号签到仍在名册表里,那才是能真正执行的入口。
8
+
9
+ ### 变更
10
+
11
+ - **移除账号池动作行里的「一键签到所有账号」按钮**,动作行现在只剩「一键测试所有账号」。连带移除
12
+ 批量签到的请求逻辑(`runCheckin`)、`busy` 的 `checkin` 态、签到进行中的状态行,以及只服务于这个
13
+ 按钮的 8 个文案键(中英各一份:`poolCheckinAll` / `poolCheckingIn` / `poolLogCheckinStart` /
14
+ `poolLogCheckinClaimed` / `poolLogCheckinAlready` / `poolLogCheckinFailed` / `poolLogCheckinDone` /
15
+ `poolActionNoteCheckinDevice`),并删掉卡片里已不可达的 `checkin-unsupported` 409 分支。
16
+ - **单账号签到不受影响**:名册表(「Trae 账号」表格)的签到列仍按账号逐个签到,签到列的状态文字与
17
+ 本机设备限制提示照旧。
18
+ - Host 侧 `?action=checkin` 路由与 `checkinSupported` 字段保留不删:浏览器里可能还有旧的 client
19
+ bundle 在调它,删掉会让它们直接 503。新卡片不再调用该 action。
20
+
21
+ ### 测试
22
+
23
+ - `card-pool` 的批量签到用例改为断言按钮缺席:不再渲染 `poolCheckinAll`、不再出现「本机今日的签到
24
+ 已用掉」提示行;同时保留「成员为空」「面板无免费模型」两条原因断言,确保这次删除没有顺带删掉测试
25
+ 按钮的说明。全仓 **888** 例通过,0 skipped。
26
+
3
27
  ## 3.10.0 (2026-10-18)
4
28
 
5
29
  > 本版把「账号在本机到底存了几份、删一个账号到底删掉了什么」讲清楚并做对:本机每个 Trae 登录都会
package/lib/client.js CHANGED
@@ -1269,7 +1269,6 @@ window.__ModuleLoader__.load({
1269
1269
  if (status === 409) switch (body?.reason) {
1270
1270
  case "no-members": return t("row.poolErrNoMembers");
1271
1271
  case "no-live-members": return t("row.poolErrNoLiveMembers");
1272
- case "checkin-unsupported": return t("row.poolErrCheckinUnsupported");
1273
1272
  case "target-model-stale": return t("row.poolErrTargetStale");
1274
1273
  case "no-free-model": return t("row.poolErrNoFreeModel");
1275
1274
  default: return t("row.poolErrConflict");
@@ -1497,43 +1496,6 @@ window.__ModuleLoader__.load({
1497
1496
  if (mountRef.current) setBusy(void 0);
1498
1497
  }
1499
1498
  };
1500
- const runCheckin = async () => {
1501
- if (busy !== void 0) return;
1502
- const members = [...selected];
1503
- if (members.length === 0) {
1504
- pushLog("warn", t("row.poolLogNoMembers"));
1505
- return;
1506
- }
1507
- setBusy("checkin");
1508
- setNow(Date.now());
1509
- pushLog("info", t("row.poolLogCheckinStart", { count: members.length }));
1510
- try {
1511
- const response = await fetch(withTraePoolAction(panel, "checkin"), { method: "POST" });
1512
- const body = await response.json();
1513
- if (!response.ok) throw new Error(renderRouteError(t, response.status, body));
1514
- for (const row of body?.rows ?? []) switch (row.status) {
1515
- case "claimed":
1516
- pushLog("ok", t("row.poolLogCheckinClaimed", { accountName: row.accountName }));
1517
- break;
1518
- case "already":
1519
- case "device-already":
1520
- pushLog("info", t("row.poolLogCheckinAlready", { accountName: row.accountName }));
1521
- break;
1522
- case "failed":
1523
- case "disabled": pushLog("error", t("row.poolLogCheckinFailed", {
1524
- accountName: row.accountName,
1525
- message: row.message ?? ""
1526
- }));
1527
- }
1528
- pushLog(members.length > 0 && body?.rows ? "ok" : "info", t("row.poolLogCheckinDone"));
1529
- onRefresh?.();
1530
- setNow(Date.now());
1531
- } catch (error) {
1532
- pushLog("error", t("row.poolLogBatchFailed", { message: error instanceof Error ? error.message : String(error) }));
1533
- } finally {
1534
- if (mountRef.current) setBusy(void 0);
1535
- }
1536
- };
1537
1499
  const runTest = async () => {
1538
1500
  if (busy !== void 0) return;
1539
1501
  const members = [...selected];
@@ -1763,7 +1725,6 @@ window.__ModuleLoader__.load({
1763
1725
  */
1764
1726
  const actionNotes = [];
1765
1727
  if (selected.size === 0) actionNotes.push(t("row.poolActionNoteNoMembers"));
1766
- if (deviceClaimed) actionNotes.push(t("row.poolActionNoteCheckinDevice"));
1767
1728
  if (pool.targetModelSource === "none") actionNotes.push(t("row.poolActionNoteTestNone"));
1768
1729
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
1769
1730
  className: "dsm-trae-pool",
@@ -1798,16 +1759,6 @@ window.__ModuleLoader__.load({
1798
1759
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1799
1760
  className: "dsm-trae-pool-actions",
1800
1761
  children: [
1801
- pool.checkinSupported === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1802
- type: "button",
1803
- className: "dsm-btn dsm-btn-outline dsm-trae-pool-action-checkin",
1804
- disabled: busy !== void 0 || !writable || selected.size === 0 || deviceClaimed,
1805
- title: deviceClaimed ? t("row.checkinDeviceSpent") : void 0,
1806
- onClick: () => {
1807
- runCheckin();
1808
- },
1809
- children: busy === "checkin" ? t("row.poolCheckingIn") : t("row.poolCheckinAll")
1810
- }) : null,
1811
1762
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1812
1763
  type: "button",
1813
1764
  className: "dsm-btn dsm-btn-outline dsm-trae-pool-action-test",
@@ -1818,7 +1769,7 @@ window.__ModuleLoader__.load({
1818
1769
  },
1819
1770
  children: busy === "test" ? t("row.poolTesting") : t("row.poolTestAll")
1820
1771
  }),
1821
- busy === "checkin" || busy === "test" || testing !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1772
+ busy === "test" || testing !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1822
1773
  className: "dsm-trae-pool-busy",
1823
1774
  role: "status",
1824
1775
  children: t("row.poolBusyHint")
@@ -5615,7 +5566,6 @@ window.__ModuleLoader__.load({
5615
5566
  "row.poolCurrentBadge": "serving",
5616
5567
  "row.poolMember": "in pool",
5617
5568
  "row.poolNotMember": "not in pool",
5618
- "row.poolCheckinAll": "Check in all accounts",
5619
5569
  "row.poolBusyHint": "Working through accounts one at a time…",
5620
5570
  "row.poolTestAll": "Test all accounts",
5621
5571
  "row.poolTesting": "Testing…",
@@ -5658,7 +5608,6 @@ window.__ModuleLoader__.load({
5658
5608
  "row.poolTargetStaleClear": "Back to automatic",
5659
5609
  "row.poolTargetNone": "No free model available for this panel",
5660
5610
  "row.poolTargetNoneHint": "The pool can only pick a free model; none resolves right now, so tests are disabled.",
5661
- "row.poolActionNoteCheckinDevice": "This machine already used today's check-in (Trae allows one per device per day) — check-in is unavailable until tomorrow.",
5662
5611
  "row.poolActionNoteTestNone": "No free model resolves in this panel — pick a target model before testing.",
5663
5612
  "row.poolActionNoteNoMembers": "Tick the accounts you want in the pool and save first.",
5664
5613
  "row.poolTargetAutoOption": "Automatic (free model)",
@@ -5683,12 +5632,7 @@ window.__ModuleLoader__.load({
5683
5632
  "row.poolLogTitle": "Activity",
5684
5633
  "row.poolLogClear": "Clear",
5685
5634
  "row.poolLogEmpty": "No pool activity yet.",
5686
- "row.poolLogCheckinStart": "Check-in started for {count} account(s).",
5687
5635
  "row.poolLogTestStart": "Test started for {count} account(s) against {model}.",
5688
- "row.poolLogCheckinClaimed": "{accountName} checked in.",
5689
- "row.poolLogCheckinAlready": "{accountName} already checked in today.",
5690
- "row.poolLogCheckinFailed": "{accountName} check-in failed: {message}",
5691
- "row.poolLogCheckinDone": "Check-in finished.",
5692
5636
  "row.poolLogTestRow": "{accountName}: {outcome}.",
5693
5637
  "row.poolLogTestRowMalformed": "{accountName}: malformed result.",
5694
5638
  "row.poolLogTestDone": "Test finished.",
@@ -5741,7 +5685,6 @@ window.__ModuleLoader__.load({
5741
5685
  "row.poolErrNoFreeModel": "no free model is available for this panel",
5742
5686
  "row.poolErrConflict": "the pool refused the request",
5743
5687
  "row.poolErrGeneric": "pool request failed (HTTP {status})",
5744
- "row.poolCheckingIn": "Checking in…",
5745
5688
  "row.poolSettingsHint": "The switch and the target model are preferences — save them. Test, check in and delete act at once.",
5746
5689
  "row.poolLogSaved": "Pool settings saved.",
5747
5690
  "row.poolLogSaveFailed": "Could not save the pool settings.",
@@ -5944,7 +5887,6 @@ window.__ModuleLoader__.load({
5944
5887
  "row.poolCurrentBadge": "派单中",
5945
5888
  "row.poolMember": "已在池中",
5946
5889
  "row.poolNotMember": "未入池",
5947
- "row.poolCheckinAll": "一键签到所有账号",
5948
5890
  "row.poolBusyHint": "逐个处理账号中…",
5949
5891
  "row.poolTestAll": "一键测试所有账号",
5950
5892
  "row.poolTesting": "测速中…",
@@ -5987,7 +5929,6 @@ window.__ModuleLoader__.load({
5987
5929
  "row.poolTargetStaleClear": "改回自动",
5988
5930
  "row.poolTargetNone": "本面板暂无可用免费模型",
5989
5931
  "row.poolTargetNoneHint": "账号池只会挑免费模型;当前无法解析出可用模型,测速暂被禁用。",
5990
- "row.poolActionNoteCheckinDevice": "本机今日的签到已用掉(Trae 按每台设备每天一次限制),明天才能再签。",
5991
5932
  "row.poolActionNoteTestNone": "本面板没有解析出免费模型——先指定一个目标模型再测速。",
5992
5933
  "row.poolActionNoteNoMembers": "先勾选要入池的账号并保存。",
5993
5934
  "row.poolTargetAutoOption": "自动(免费模型)",
@@ -6012,12 +5953,7 @@ window.__ModuleLoader__.load({
6012
5953
  "row.poolLogTitle": "活动记录",
6013
5954
  "row.poolLogClear": "清空",
6014
5955
  "row.poolLogEmpty": "暂无账号池活动。",
6015
- "row.poolLogCheckinStart": "开始为 {count} 个账号签到。",
6016
5956
  "row.poolLogTestStart": "开始为 {count} 个账号测速({model})。",
6017
- "row.poolLogCheckinClaimed": "{accountName} 已签到。",
6018
- "row.poolLogCheckinAlready": "{accountName} 今日已签到。",
6019
- "row.poolLogCheckinFailed": "{accountName} 签到失败:{message}",
6020
- "row.poolLogCheckinDone": "签到完成。",
6021
5957
  "row.poolLogTestRow": "{accountName}:{outcome}。",
6022
5958
  "row.poolLogTestRowMalformed": "{accountName}:结果异常。",
6023
5959
  "row.poolLogTestDone": "测速完成。",
@@ -6070,7 +6006,6 @@ window.__ModuleLoader__.load({
6070
6006
  "row.poolErrNoFreeModel": "本面板没有可用的免费模型",
6071
6007
  "row.poolErrConflict": "账号池拒绝了该请求",
6072
6008
  "row.poolErrGeneric": "账号池请求失败(HTTP {status})",
6073
- "row.poolCheckingIn": "签到中…",
6074
6009
  "row.poolSettingsHint": "开关与目标模型是偏好,改完要保存;行内的测速、签到与删除立即生效。",
6075
6010
  "row.poolLogSaved": "账号池设置已保存。",
6076
6011
  "row.poolLogSaveFailed": "无法保存账号池设置。",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "dsh-connect-trae",
3
3
  "displayName": "DSH Connect Trae",
4
4
  "description": "把本机登录的 Trae 模型接入 DeepSeek Harness:国内版与国际版双供应商并行,提供用量/积分概览与每日签到领取。",
5
- "version": "3.10.0",
5
+ "version": "3.10.1",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",