dsh-connect-trae 4.6.10 → 4.6.11

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,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.6.11 (2026-10-30)
4
+
5
+ > **英文界面下的「最近刷新」不再显示成中文式的时间。** issue #71 里顺带提到的那点:
6
+ > `formatClock` 把 locale 硬编码成 `'zh-CN'`,所以英文界面印的是 `23:59` 而不是
7
+ > `11:59 PM`。
8
+
9
+ ### 变更
10
+
11
+ - **`formatClock` 不再硬编码 locale**(issue #71 的第 1 节「顺带一提」)。
12
+ - **问题**:`formatClock` 写死 `'zh-CN'`,于是英文界面按中文习惯排 24 小时制,
13
+ 显示 `23:59` 而不是 `11:59 PM`。同一文件里的 `formatDateTime` 用的是
14
+ `undefined`(跟随读者语言)——两个函数对「按谁的格式」各说各话。
15
+ - **改法**:`toLocaleTimeString('zh-CN', …)` → `toLocaleTimeString(undefined, …)`,
16
+ 与 `formatDateTime` 对齐。
17
+ - **影响面**:`formatClock` 现在只剩一个调用点——`composer.lastRefresh`
18
+ (「最近刷新」)。到期时刻早已改用 `formatDateTime`(4.6.7),所以本次**不影响**
19
+ 到期提示的渲染。
20
+ - **姊妹插件暂未同步**:`dsh-connect-workbuddy` 与 `@dmh2002/dsh-connect-qoder`
21
+ 各自的 `formatClock` 里也有同样的硬编码(`ComposerCredits.tsx`),但它们不在
22
+ issue #71 的范围内,故本次**只改 trae**。三家的差异见下。
23
+
24
+ ### 测试
25
+
26
+ - 新增 **2** 例(1234 总例,较 4.6.10 净增 2):
27
+ - **源码级**:`formatClock` 不得再出现硬编码的 locale。这一条不依赖测试环境的
28
+ locale——行为级断言在 zh-CN 环境下会因两种写法结果相同而失效,源码级不会。
29
+ - **行为级**:渲染出的「最近刷新」戳必须等于**读者 locale** 对该时刻的写法。
30
+ `composer.lastRefresh` 是「最近一次刷新的时刻」(即当前时间),所以期望值取
31
+ 渲染前后两个瞬间,容许跨过一分钟边界。
32
+ - **变异验证**:把 locale 改回 `'zh-CN'`,两条用例**同时**转红(源码级点名
33
+ 「still pins a locale」,行为级报出实际渲染值 `19:31` 与期望的 `07:31 PM`)。
34
+ - 全仓 **1234** 例通过(96 文件),双 tsconfig 类型检查通过。
35
+
3
36
  ## 4.6.10 (2026-10-30)
4
37
 
5
38
  > **到期提示加了一档「3 天内」。** 一个两天后过期的套餐,之前显示的是「7 天内过期」
package/lib/client.js CHANGED
@@ -6465,9 +6465,15 @@ window.__ModuleLoader__.load({
6465
6465
  * (`row.expiryEarliest`) through `formatDateTime`, so one key had two
6466
6466
  * granularities in one plugin. Expiry goes through `formatDateTime`; only
6467
6467
  * same-day instants may use this.
6468
+ *
6469
+ * The locale is `undefined` — the READER's, not a fixed one — so an English UI
6470
+ * shows `11:59 PM` rather than the Chinese convention's `23:59`. It used to
6471
+ * hardcode `'zh-CN'`, which meant the English interface printed a Chinese-style
6472
+ * time (issue #71's aside). `formatDateTime` already worked this way; this
6473
+ * brings the two into agreement.
6468
6474
  */
6469
6475
  function formatClock(value) {
6470
- return new Date(value).toLocaleTimeString("zh-CN", {
6476
+ return new Date(value).toLocaleTimeString(void 0, {
6471
6477
  hour: "2-digit",
6472
6478
  minute: "2-digit"
6473
6479
  });
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": "4.6.10",
5
+ "version": "4.6.11",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",