dsh-connect-trae 4.9.1 → 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 CHANGED
@@ -1,5 +1,29 @@
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
+
3
27
  ## 4.9.1 (2026-11-06)
4
28
 
5
29
  ### 修复
package/lib/client.js CHANGED
@@ -1432,9 +1432,21 @@ window.__ModuleLoader__.load({
1432
1432
  .dsm-trae-model-effort-select:disabled{opacity:.6;cursor:not-allowed}
1433
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}
1434
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). */
1435
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}
1436
1446
  .dsm-trae-context-budget label{display:inline-flex;align-items:center;gap:4px;cursor:pointer}
1437
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}
1438
1450
  .dsm-trae-model-capability-note{margin:0;color:var(--dsw-alias-label-tertiary,#999);font-size:12px;line-height:18px}
1439
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}
1440
1452
  .dsm-trae-model-actions-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px}
@@ -6484,19 +6496,25 @@ window.__ModuleLoader__.load({
6484
6496
  className: "dsm-trae-context-budget",
6485
6497
  "aria-label": t("row.contextBudget"),
6486
6498
  title: t("row.contextBudgetHint"),
6487
- children: contextBudgetOptions(model).map((option) => {
6499
+ children: (() => {
6500
+ const options = contextBudgetOptions(model);
6488
6501
  const selectable = model.maxContextWindow !== void 0;
6489
- const checked = (activeContextBudgets[model.id] ?? model.contextWindow) === option;
6490
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
6491
- type: "radio",
6492
- name: `context-${model.id}`,
6493
- checked,
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),
6494
6508
  disabled: !selectable || settingsScope?.getSnapshot().writable !== true || saving,
6495
- onChange: () => {
6496
- setContextBudget(model.id, option);
6497
- }
6498
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: formatCapacity(option, t("row.modelUnknown")) })] }, option);
6499
- })
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
+ })()
6500
6518
  })]
6501
6519
  })]
6502
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.9.1",
5
+ "version": "4.10.0",
6
6
  "author": "dingminhua",
7
7
  "copyright": "Copyright (c) 2026 LaoDing",
8
8
  "license": "MIT",