dsh-connect-trae 4.9.0 → 4.10.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/CHANGELOG.md +59 -0
- package/lib/client.js +49 -20
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.10.0 (2026-11-06)
|
|
4
|
+
|
|
5
|
+
### 变更
|
|
6
|
+
|
|
7
|
+
**模型行的「上下文预算」从一组单选圆点改成下拉框。** 界面行为与写入口径完全不变
|
|
8
|
+
(同一个 `contextBudgets` 字段、同一套 `contextBudgetOptions` 判定、同一个「保存」),
|
|
9
|
+
只换了控件的形态。
|
|
10
|
+
|
|
11
|
+
理由是两个实测问题,都来自「每行一个控件组」这个形态:
|
|
12
|
+
|
|
13
|
+
- **行高会随选项数变化。** 一个模型可能有 1 个、2 个或 3 个可选窗口(开发窗口 /
|
|
14
|
+
500K / Max,`maxContextWindow` 是否够宽决定后两个)。圆点组把 1-3 个
|
|
15
|
+
「圆点 + 文字」并排放到行的右边缘,模型名、图片勾选框、圆点组三者争同一行;
|
|
16
|
+
在 564px 的设置面板列里,圆点组会被挤到模型名下方另起一行,行就长高了。
|
|
17
|
+
实测下拉框在 1/2/3 个选项下宽高恒为 96×24,行高恒为 68px。
|
|
18
|
+
- **列表看起来参差不齐。** 圆点组是内容撑宽的,3 个选项的行比 1 个选项的行宽,
|
|
19
|
+
18 行的列表因此有肉眼可见的锯齿。
|
|
20
|
+
|
|
21
|
+
下拉框还把「当前窗口」变成了一个**值**而不是「一堆圆点里被选中的那个」,这与它
|
|
22
|
+
下方那行「最大上下文 1M / 400K / 200K」读的是同一件事。
|
|
23
|
+
|
|
24
|
+
没有 Max 窗口的模型保持原来的只读形态:下拉框只有一项、已选中、禁用——控件仍然
|
|
25
|
+
**显示**窗口,而不是消失。
|
|
26
|
+
|
|
27
|
+
## 4.9.1 (2026-11-06)
|
|
28
|
+
|
|
29
|
+
### 修复
|
|
30
|
+
|
|
31
|
+
**4.9.0 的两条样式规则漏了作用域,在卡片与整页上造成回归。** 补丁号发布。
|
|
32
|
+
|
|
33
|
+
4.9.0 给设置面板加了两个调整,写法是**无作用域**的全局选择器:
|
|
34
|
+
|
|
35
|
+
- `.dsm-trae-tab-hint` —— 把供应商行的说明视觉隐藏,省下 36px;
|
|
36
|
+
- `.dsm-trae-panels` —— 把分栏条改成 `position:sticky` 并加一层 layer-2 底色。
|
|
37
|
+
|
|
38
|
+
这两个元素是**三个界面共用**的:输入框卡片、侧边栏整页、设置面板画的是同一棵树。
|
|
39
|
+
写的时候只想着设置面板那一列(564px、外壳自带滚动),忘了另外两个界面也会吃到。
|
|
40
|
+
|
|
41
|
+
实测到的两个回归:
|
|
42
|
+
|
|
43
|
+
| 界面 | 回归 | 原因 |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| 卡片 / 整页 | 「企业版与国内版共用同一份 Trae CN 登录」那句话消失 | 卡片本身有 726px 宽、没有纵向空间压力,这句说明不该被裁掉 |
|
|
46
|
+
| 卡片 | 分栏条下方压出一条浅色带 | `position:sticky` 在没有滚动祖先时不生效,但底色留下了;底色取 layer-2,卡片本身是 layer-3 |
|
|
47
|
+
|
|
48
|
+
两条规则现在都限定在 `.dsm-trae-section` 之下——那是"只在设置面板里生效"的结构标记,
|
|
49
|
+
也是这些改动的唯一理由所在(外壳的滚动列与 564px 的宽度)。卡片与整页恢复原样。
|
|
50
|
+
|
|
51
|
+
实测三界面(修复后):
|
|
52
|
+
|
|
53
|
+
| 界面 | 说明行 | 分栏条 |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| 卡片 | 726×18px,可见 | `static`,无底色 |
|
|
56
|
+
| 整页 | 710×18px,可见 | `static`,无底色 |
|
|
57
|
+
| 设置面板 | 1×1px,视觉隐藏(读屏保留) | `sticky`,layer-2 底色 |
|
|
58
|
+
|
|
59
|
+
新增两条用例**双向**锁定:设置页下必须命中,且无作用域的基础规则必须**不带**
|
|
60
|
+
`position:sticky` / `background` / `clip`——只测前者的话,下次再漏作用域仍然会绿。
|
|
61
|
+
|
|
3
62
|
## 4.9.0 (2026-11-06)
|
|
4
63
|
|
|
5
64
|
### 变更
|
package/lib/client.js
CHANGED
|
@@ -999,16 +999,22 @@ window.__ModuleLoader__.load({
|
|
|
999
999
|
differs, so it sits inside the tab cell without crowding the label. */
|
|
1000
1000
|
.dsm-trae-tab-switch{flex:none;margin-left:auto;padding-left:10px;border-left:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24))}
|
|
1001
1001
|
.dsm-trae-tab-dot{display:inline-block;width:7px;height:7px;border-radius:50%;margin-right:7px;vertical-align:baseline}
|
|
1002
|
-
|
|
1002
|
+
.dsm-trae-tab-hint{margin:0;padding:0 2px;color:var(--dsw-alias-label-tertiary,#999);font-size:12px;line-height:18px}
|
|
1003
|
+
/* THE TWO SETTINGS-SURFACE TWEAKS, SCOPED (learned the hard way, post-release).
|
|
1003
1004
|
*
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1005
|
+
* 下面两条原本是**无作用域**的:一条把供应商说明行视觉隐藏,一条把分栏条改成
|
|
1006
|
+
* sticky 并加一层底色。它们写的时候只想到设置面板那一列(564px、外壳自带滚动),
|
|
1007
|
+
* 但那两处 DOM 是**三个界面共用的**——卡片、整页、设置页画的是同一棵树。
|
|
1007
1008
|
*
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
|
|
1009
|
+
* 结果在卡片上是两个回归(实测):说明行在卡片里也消失了(卡片有自己的宽度、
|
|
1010
|
+
* 有自己的节奏,那里根本没有纵向空间压力),分栏条拿到 position:sticky 却没有
|
|
1011
|
+
* 滚动祖先,且底色取了 layer-2 而卡片本身是 layer-3,于是在卡片上压出一条
|
|
1012
|
+
* 比周围更浅的色带。
|
|
1013
|
+
*
|
|
1014
|
+
* 所以两条都挪到 .dsm-trae-section 之下——那是"只在设置面板里生效"的结构标记,
|
|
1015
|
+
* 也是这些改动的唯一理由所在(外壳的滚动列与 564px 的宽度)。卡片与整页保持
|
|
1016
|
+
* 原样:它们没有面板外壳,也就没有这些约束。 */
|
|
1017
|
+
.dsm-trae-section .dsm-trae-tab-hint{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
|
|
1012
1018
|
/* SECTION TABS: the card's own top-level split (account / models / diagnostics).
|
|
1013
1019
|
*
|
|
1014
1020
|
* Deliberately NOT the boxed chips above. Those are the REGION scope — a
|
|
@@ -1036,7 +1042,12 @@ window.__ModuleLoader__.load({
|
|
|
1036
1042
|
*
|
|
1037
1043
|
* top:-1px 而不是 0:分栏条自己的 border-bottom 画在盒子外侧,写成 0 会在它上方
|
|
1038
1044
|
* 留一条 1px 的缝,滚动的行会从这条缝里露出来。 */
|
|
1039
|
-
.dsm-trae-panels{
|
|
1045
|
+
.dsm-trae-panels{display:flex;align-items:stretch;gap:2px;margin:4px 0 0;border-bottom:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24))}
|
|
1046
|
+
/* 分栏条只在设置面板里钉住(见上方 .dsm-trae-tab-hint 的长注释:这两条原本无
|
|
1047
|
+
* 作用域,在卡片上留下两个回归)。卡片与整页没有"外壳的滚动列",那里的分栏条
|
|
1048
|
+
* 跟着内容正常滚走即可;sticky 在没有滚动祖先时不会生效,却会把底色带进来——
|
|
1049
|
+
* 而底色取 layer-2,卡片本身是 layer-3,色差在卡片上就成了一条浅色带。 */
|
|
1050
|
+
.dsm-trae-section .dsm-trae-panels{position:sticky;top:-1px;z-index:2;background:var(--dsw-alias-bg-layer-2,#24262c)}
|
|
1040
1051
|
.dsm-trae-panel-tab{appearance:none;font:inherit;cursor:pointer;border:0;background:transparent;padding:7px 11px;margin-bottom:-1px;border-bottom:2px solid transparent;color:var(--dsw-alias-label-tertiary,#999);font-size:13px;font-weight:600;line-height:20px;white-space:nowrap;transition:color .15s,border-color .15s}
|
|
1041
1052
|
.dsm-trae-panel-tab:hover:not(.dsm-trae-panel-tab-active){color:var(--dsw-alias-label-primary,#e6e6e6)}
|
|
1042
1053
|
.dsm-trae-panel-tab:focus-visible{outline:2px solid var(--dsw-alias-brand-primary,#5686fe);outline-offset:1px}
|
|
@@ -1421,9 +1432,21 @@ window.__ModuleLoader__.load({
|
|
|
1421
1432
|
.dsm-trae-model-effort-select:disabled{opacity:.6;cursor:not-allowed}
|
|
1422
1433
|
.dsm-trae-model-image{display:inline-flex;align-items:center;gap:4px;color:var(--dsw-alias-label-secondary,#c6c9d0);font-size:11px;line-height:16px;cursor:pointer}
|
|
1423
1434
|
.dsm-trae-model-image input{margin:0;accent-color:var(--dsw-alias-brand-primary,#5686fe)}
|
|
1435
|
+
/* The context-budget control: one select per row, not a row of radios.
|
|
1436
|
+
*
|
|
1437
|
+
* The fieldset stays as the grouping element — it carries the accessible name
|
|
1438
|
+
* and the hint title, and a select has no group of its own. flex:none keeps
|
|
1439
|
+
* it from stealing width from the model name, which is the thing that has to
|
|
1440
|
+
* stay readable on a 564px column.
|
|
1441
|
+
*
|
|
1442
|
+
* The select width is FIXED rather than content-sized: with 2-3 options the
|
|
1443
|
+
* widest label dictates the width, and a per-row width made the list ragged
|
|
1444
|
+
* (a 3-option row's control was visibly wider than its neighbours). */
|
|
1424
1445
|
.dsm-trae-context-budget{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:none;margin:0;padding:0;border:0;color:var(--dsw-alias-label-secondary,#c6c9d0);font-size:11px;line-height:16px}
|
|
1425
1446
|
.dsm-trae-context-budget label{display:inline-flex;align-items:center;gap:4px;cursor:pointer}
|
|
1426
1447
|
.dsm-trae-context-budget input{margin:0;accent-color:var(--dsw-alias-brand-primary,#5686fe)}
|
|
1448
|
+
.dsm-trae-context-select{flex:none;width:96px;max-width:none;padding:2px 6px;font:inherit;font-size:11px;line-height:16px;color:var(--dsw-alias-label-primary,#e6e6e6);background:var(--dsw-alias-bg-layer-3,#2a2c33);border:1px solid var(--dsw-alias-border-l2,#3a3d45);border-radius:7px;cursor:pointer}
|
|
1449
|
+
.dsm-trae-context-select:disabled{cursor:default;opacity:.6}
|
|
1427
1450
|
.dsm-trae-model-capability-note{margin:0;color:var(--dsw-alias-label-tertiary,#999);font-size:12px;line-height:18px}
|
|
1428
1451
|
.dsm-trae-model-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--dsw-alias-border-l2,#36373b);padding-top:12px}
|
|
1429
1452
|
.dsm-trae-model-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px}
|
|
@@ -6473,19 +6496,25 @@ window.__ModuleLoader__.load({
|
|
|
6473
6496
|
className: "dsm-trae-context-budget",
|
|
6474
6497
|
"aria-label": t("row.contextBudget"),
|
|
6475
6498
|
title: t("row.contextBudgetHint"),
|
|
6476
|
-
children:
|
|
6499
|
+
children: (() => {
|
|
6500
|
+
const options = contextBudgetOptions(model);
|
|
6477
6501
|
const selectable = model.maxContextWindow !== void 0;
|
|
6478
|
-
const
|
|
6479
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6502
|
+
const current = activeContextBudgets[model.id] ?? model.contextWindow;
|
|
6503
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
6504
|
+
className: "dsm-trae-context-select",
|
|
6505
|
+
"aria-label": t("row.contextBudget"),
|
|
6506
|
+
title: t("row.contextBudgetHint"),
|
|
6507
|
+
value: current === void 0 ? "" : String(current),
|
|
6483
6508
|
disabled: !selectable || settingsScope?.getSnapshot().writable !== true || saving,
|
|
6484
|
-
onChange: () => {
|
|
6485
|
-
setContextBudget(model.id,
|
|
6486
|
-
}
|
|
6487
|
-
|
|
6488
|
-
|
|
6509
|
+
onChange: (event) => {
|
|
6510
|
+
setContextBudget(model.id, Number(event.currentTarget.value));
|
|
6511
|
+
},
|
|
6512
|
+
children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
6513
|
+
value: String(option),
|
|
6514
|
+
children: formatCapacity(option, t("row.modelUnknown"))
|
|
6515
|
+
}, option))
|
|
6516
|
+
});
|
|
6517
|
+
})()
|
|
6489
6518
|
})]
|
|
6490
6519
|
})]
|
|
6491
6520
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
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.
|
|
5
|
+
"version": "4.10.0",
|
|
6
6
|
"author": "dingminhua",
|
|
7
7
|
"copyright": "Copyright (c) 2026 LaoDing",
|
|
8
8
|
"license": "MIT",
|