dsh-tide-theme 0.5.1 → 0.5.2

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/lib/client.js +11 -20
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -220,7 +220,7 @@ dsh plugin --profile desktop add git+https://github.com/zdt3476/dsh-tide-theme.g
220
220
  dsh plugin --profile desktop add link:"$PWD"
221
221
 
222
222
  # GitHub Release 预构建包
223
- dsh plugin --profile desktop add https://github.com/zdt3476/dsh-tide-theme/releases/download/v0.5.1/dsh-tide-theme-0.5.1.tgz
223
+ dsh plugin --profile desktop add https://github.com/zdt3476/dsh-tide-theme/releases/download/v0.5.2/dsh-tide-theme-0.5.2.tgz
224
224
  ```
225
225
 
226
226
  安装后在 **设置 → 插件** 中启用,并按下 `Cmd/Ctrl + R` 重载客户端。
package/lib/client.js CHANGED
@@ -2412,15 +2412,8 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key^='works
2412
2412
  gap: 2px;
2413
2413
  }
2414
2414
 
2415
- /* 模型与思考等级之间的分隔点:两侧留出呼吸间隙,避免贴住按钮描边 */
2416
- [data-dsh-tide-separator] {
2417
- flex: none;
2418
- padding: 0 4px;
2419
- color: var(--dsw-alias-label-tertiary);
2420
- font-size: 12px;
2421
- line-height: 16px;
2422
- user-select: none;
2423
- }
2415
+ /* 模型与思考等级两颗 pill 直接相邻,靠 [data-dsh-tide-seat] 的 gap 分隔,不再插『·』。
2416
+ * 两颗 pill 之间的间距由容器 gap 提供,保持与原生 seat 一致的节奏。 */
2424
2417
  [data-dsh-tide-control='effort'] { flex: none; }
2425
2418
  /* 「供应商 / 模型」常见组合(如 WorkBuddy / Deepseek-V4.1-Flash)自然宽约 244px,
2426
2419
  * 240px 的上限会差 4px 触发省略号,让唯一的截断控件显得与同行其他控件不协调。
@@ -3933,7 +3926,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
3933
3926
  startedAt.delete(sessionId);
3934
3927
  const elapsed = now() - start;
3935
3928
  if (elapsed < 100) return;
3936
- const text = `· ${options.locale("duration.took")} ${formatTurnDuration(elapsed, options.locale)}`;
3929
+ const text = `${options.locale("duration.took")} ${formatTurnDuration(elapsed, options.locale)}`;
3937
3930
  const pending = [...RETRY_DELAYS];
3938
3931
  const attempt = () => {
3939
3932
  if (paint(text) !== null) return;
@@ -5018,7 +5011,9 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5018
5011
  const name = displayName(groups, selection);
5019
5012
  const group = selection === null ? void 0 : groups.find((candidate) => candidate.id === selection.provider);
5020
5013
  const providerLabel = group === void 0 ? selection?.provider ?? "" : providerName(group.id, group.name);
5021
- const modelLabel = name === "" ? t("model.placeholder") : `${providerLabel} / ${name}`;
5014
+ const duplicatedName = name !== "" && groups.filter((candidate) => candidate.models.some((model) => model.name === name)).length > 1;
5015
+ const fullLabel = name === "" ? t("model.placeholder") : `${providerLabel} / ${name}`;
5016
+ const modelLabel = name === "" ? t("model.placeholder") : duplicatedName ? fullLabel : name;
5022
5017
  const effort = effortLabel(groups, selection, t("effort.providerDefault"), state.retainedEffort);
5023
5018
  const busy = state.status === "selecting" || state.status === "loading";
5024
5019
  const close = () => {
@@ -5088,7 +5083,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5088
5083
  "data-dsh-tide-pill": "",
5089
5084
  "data-dsh-tide-control": kind,
5090
5085
  "data-dsh-tide-emphasis": kind,
5091
- title: kind === "model" ? modelLabel : void 0,
5086
+ title: kind === "model" ? fullLabel : void 0,
5092
5087
  style: color === void 0 ? void 0 : { "--dsh-tide-provider-color": color },
5093
5088
  "aria-label": kind === "effort" ? `${t("effort.title")}:${effort ?? t("effort.unavailableShort")}` : void 0,
5094
5089
  "aria-haspopup": "dialog",
@@ -5113,10 +5108,6 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5113
5108
  const orderedProviders = groups.filter((candidate) => candidate.models.length > 0);
5114
5109
  const providerIndex = group === void 0 ? -1 : orderedProviders.findIndex((candidate) => candidate.id === group.id);
5115
5110
  const children = [pill("model", h("span", { "data-dsh-tide-pill-label": "" }, modelLabel), providerIndex < 0 || group === void 0 ? void 0 : providerColor(group.id, providerIndex))];
5116
- children.push(h("span", {
5117
- "data-dsh-tide-separator": "",
5118
- "aria-hidden": "true"
5119
- }, "·"));
5120
5111
  children.push(pill("effort", h("span", { "data-dsh-tide-pill-label": "" }, effort ?? t("effort.unavailableShort"))));
5121
5112
  let popupNode = null;
5122
5113
  if (open === "model") {
@@ -5434,7 +5425,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5434
5425
  label: `${compactUsed} / ${compactWindow} (${capacity.usedPercent}%)`,
5435
5426
  level: capacity.level,
5436
5427
  bucket: capacity.bucket,
5437
- tooltip: `上下文容量: 已用 ${capacity.usedTokens.toLocaleString()} / 上限 ${capacity.contextWindow.toLocaleString()} (剩余 ${capacity.remainingTokens.toLocaleString()} tokens)${lastInput || lastCache || lastOut ? `\n最新单轮: 输入 ${formatCompactTokens(lastInput)} · 缓存读 ${formatCompactTokens(lastCache)} · 输出 ${formatCompactTokens(lastOut)}` : ""}`,
5428
+ tooltip: `上下文容量: 已用 ${capacity.usedTokens.toLocaleString()} / 上限 ${capacity.contextWindow.toLocaleString()} (剩余 ${capacity.remainingTokens.toLocaleString()} tokens)${lastInput || lastCache || lastOut ? `\n最新单轮: 输入 ${formatCompactTokens(lastInput)} / 缓存读 ${formatCompactTokens(lastCache)} / 输出 ${formatCompactTokens(lastOut)}` : ""}`,
5438
5429
  breakdown: capacity.breakdown
5439
5430
  };
5440
5431
  }
@@ -5680,7 +5671,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5680
5671
  }, value);
5681
5672
  if (model.activity) items.push(block("activity", "is-activity", "会话规模", iconUser, [
5682
5673
  number(model.activity.turns),
5683
- unit(" 轮 · "),
5674
+ unit(" 轮 / "),
5684
5675
  number(model.activity.steps),
5685
5676
  unit(" 步")
5686
5677
  ]));
@@ -5756,7 +5747,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5756
5747
  }, model.cache ? `${model.cache.percent}%` : "暂无数据"), h("div", { className: "dsh-tide-hud-mini-track" }, h("div", {
5757
5748
  className: "dsh-tide-hud-mini-fill is-cache",
5758
5749
  style: { width: `${model.cache?.percent ?? 0}%` }
5759
- })), h("span", { className: "dsh-tide-stats-card-hint" }, `读取: ${model.tokensDetail ? formatCompactTokens(model.tokensDetail.cacheReadTokens) : "暂无数据"}`)), h("div", { className: "dsh-tide-stats-card" }, h("span", { className: "dsh-tide-stats-card-k" }, "平均首字延迟 (TTFT)"), h("strong", { className: "dsh-tide-stats-card-v" }, model.tps?.avgTtft ?? "暂无数据"), h("span", { className: "dsh-tide-stats-card-hint" }, "含网络/推理思考耗时")), h("div", { className: "dsh-tide-stats-card" }, h("span", { className: "dsh-tide-stats-card-k" }, latestDuration ? "单轮最新总耗时" : "模型累计总耗时"), h("strong", { className: "dsh-tide-stats-card-v" }, latestDuration ?? (model.duration ? model.duration.label : "暂无数据")), h("span", { className: "dsh-tide-stats-card-hint" }, latestDuration ? "包含排队与流式等待" : stats?.turns ? `平均每轮 ${formatSimpleDuration((model.timingDetail?.llmMs ?? 0) / Math.max(1, stats.turns))}` : "模型总耗时"))), model.tokensDetail ? h("div", { className: "dsh-tide-stats-detail-list" }, h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "未缓存输入 Tokens"), h("strong", {}, model.tokensDetail.uncachedInputTokens.toLocaleString())), h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "缓存读取 Tokens (Cache Read)"), h("strong", {}, model.tokensDetail.cacheReadTokens.toLocaleString())), model.tokensDetail.cacheWriteTokens > 0 ? h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "缓存写入 Tokens (Cache Write)"), h("strong", {}, model.tokensDetail.cacheWriteTokens.toLocaleString())) : null, h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "模型输出 Tokens (含思考内容)"), h("strong", {}, model.tokensDetail.outputTokens.toLocaleString())), h("div", { className: "dsh-tide-stats-detail-row is-total" }, h("span", {}, "累计消耗总 Tokens"), h("strong", {}, model.tokensDetail.totalTokens.toLocaleString()))) : null, h("div", { className: "dsh-tide-stats-footer" }, model.activity ? h("div", {}, `会话累计活动: ${model.activity.turns} 轮 · ${model.activity.steps} 步`) : null, model.timingDetail ? h("div", {}, `模型总耗时 ${formatSimpleDuration(model.timingDetail.llmMs)}${model.timingDetail.toolMs > 0 ? ` · 工具耗时 ${formatSimpleDuration(model.timingDetail.toolMs)}` : ""}`) : null)) : null;
5750
+ })), h("span", { className: "dsh-tide-stats-card-hint" }, `读取: ${model.tokensDetail ? formatCompactTokens(model.tokensDetail.cacheReadTokens) : "暂无数据"}`)), h("div", { className: "dsh-tide-stats-card" }, h("span", { className: "dsh-tide-stats-card-k" }, "平均首字延迟 (TTFT)"), h("strong", { className: "dsh-tide-stats-card-v" }, model.tps?.avgTtft ?? "暂无数据"), h("span", { className: "dsh-tide-stats-card-hint" }, "含网络/推理思考耗时")), h("div", { className: "dsh-tide-stats-card" }, h("span", { className: "dsh-tide-stats-card-k" }, latestDuration ? "单轮最新总耗时" : "模型累计总耗时"), h("strong", { className: "dsh-tide-stats-card-v" }, latestDuration ?? (model.duration ? model.duration.label : "暂无数据")), h("span", { className: "dsh-tide-stats-card-hint" }, latestDuration ? "包含排队与流式等待" : stats?.turns ? `平均每轮 ${formatSimpleDuration((model.timingDetail?.llmMs ?? 0) / Math.max(1, stats.turns))}` : "模型总耗时"))), model.tokensDetail ? h("div", { className: "dsh-tide-stats-detail-list" }, h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "未缓存输入 Tokens"), h("strong", {}, model.tokensDetail.uncachedInputTokens.toLocaleString())), h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "缓存读取 Tokens (Cache Read)"), h("strong", {}, model.tokensDetail.cacheReadTokens.toLocaleString())), model.tokensDetail.cacheWriteTokens > 0 ? h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "缓存写入 Tokens (Cache Write)"), h("strong", {}, model.tokensDetail.cacheWriteTokens.toLocaleString())) : null, h("div", { className: "dsh-tide-stats-detail-row" }, h("span", {}, "模型输出 Tokens (含思考内容)"), h("strong", {}, model.tokensDetail.outputTokens.toLocaleString())), h("div", { className: "dsh-tide-stats-detail-row is-total" }, h("span", {}, "累计消耗总 Tokens"), h("strong", {}, model.tokensDetail.totalTokens.toLocaleString()))) : null, h("div", { className: "dsh-tide-stats-footer" }, model.activity ? h("div", {}, `会话累计活动: ${model.activity.turns} 轮 / ${model.activity.steps} 步`) : null, model.timingDetail ? h("div", {}, `模型总耗时 ${formatSimpleDuration(model.timingDetail.llmMs)}${model.timingDetail.toolMs > 0 ? ` / 工具耗时 ${formatSimpleDuration(model.timingDetail.toolMs)}` : ""}`) : null)) : null;
5760
5751
  const popoverContent = popoverNode && typeof document !== "undefined" ? (0, react_dom.createPortal)(popoverNode, document.body) : popoverNode;
5761
5752
  return h("div", {
5762
5753
  className: "dsh-tide-dock-center-container",
@@ -5979,7 +5970,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5979
5970
  * ModuleLoader 壳提供,这正是 tsdown client 构建保持 require 的原因。
5980
5971
  */
5981
5972
  const PLUGIN_ID = "dsh-tide-theme";
5982
- const BUILD = "0.5.1+2026-11-03T01:24:23.441Z";
5973
+ const BUILD = "0.5.1+2026-11-03T02:13:02.151Z";
5983
5974
  const name = PLUGIN_ID;
5984
5975
  const inject = [
5985
5976
  "slots",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-tide-theme",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"