@rayadesu/dsh-client-ui-billing 0.3.4 → 0.3.6

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/lib/client.js CHANGED
@@ -4297,8 +4297,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4297
4297
  ]
4298
4298
  };
4299
4299
  //#endregion
4300
- //#region \0dsh-css:D:\code\DeepSeek-Harness-chat-billing\packages\ui-billing\src\client\BalanceBadge.module.css.mjs
4301
- const css$1 = "._5xaa-W_root{position:relative}._5xaa-W_trigger{background:var(--dsw-alias-fill-l2);min-height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;border:0;border-radius:8px;align-items:center;gap:4px;padding:4px 8px;display:inline-flex}._5xaa-W_trigger:hover,._5xaa-W_trigger:focus-visible{color:var(--dsw-alias-label-primary)}._5xaa-W_trigger svg{transition:transform .12s}._5xaa-W_chevronOpen{transform:rotate(180deg)}._5xaa-W_triggerLines{text-align:left;flex-direction:column;align-items:flex-start;gap:0;display:flex}._5xaa-W_linePrimary{font-variant-numeric:tabular-nums;font-size:12px;line-height:16px}._5xaa-W_lineSecondary{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px;line-height:15px}._5xaa-W_unavailable{color:var(--dsw-alias-label-tertiary)}._5xaa-W_inlineIcon{color:var(--dsw-alias-label-tertiary);flex:none}._5xaa-W_spinning{color:var(--dsw-alias-label-tertiary);flex:none;animation:.8s linear infinite _5xaa-W_spin}@keyframes _5xaa-W_spin{to{transform:rotate(360deg)}}._5xaa-W_panel{z-index:100;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-specific-menu);width:336px;max-width:min(360px,100vw - 32px);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;flex-direction:column;gap:2px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);right:0}._5xaa-W_amountRow{border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;display:flex}._5xaa-W_amountLabel{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:13px;line-height:18px}._5xaa-W_amountRow>._5xaa-W_amountLabel{font-size:15px;line-height:22px}._5xaa-W_spendRow{border-top:1px solid var(--dsw-alias-border-l2);border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;display:flex}._5xaa-W_costRow{align-items:center;padding:2px 8px 6px;display:flex}._5xaa-W_costBreakdown{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px;line-height:16px}._5xaa-W_amountActions{align-items:center;gap:2px;display:inline-flex}._5xaa-W_infoButton,._5xaa-W_refreshButton{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}._5xaa-W_infoButton:hover,._5xaa-W_infoButton:focus-visible,._5xaa-W_refreshButton:hover,._5xaa-W_refreshButton:focus-visible{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-fill-l2)}._5xaa-W_modelRow{border-radius:8px;justify-content:space-between;align-items:baseline;gap:8px;padding:6px 8px;display:flex}._5xaa-W_modelName{color:var(--dsw-alias-label-secondary);flex:none;font-size:12px;line-height:18px}._5xaa-W_tasks{text-align:right;min-width:0;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-size:12px;line-height:18px}._5xaa-W_ranking{border-top:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:0;padding-top:2px;display:flex}._5xaa-W_rankingTitle{color:var(--dsw-alias-label-secondary);padding:6px 8px 2px;font-size:12px;line-height:18px}._5xaa-W_rankingRow{border-radius:8px;align-items:baseline;gap:0;min-width:0;padding:3px 8px;display:flex}._5xaa-W_rankingRow:hover{background:var(--dsw-alias-fill-l2)}._5xaa-W_rankingIndex{width:16px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;text-align:right;flex:none;font-size:11px;line-height:16px}._5xaa-W_rankingDot{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:pre;flex:none;font-size:11px;line-height:16px}._5xaa-W_rankingName{min-width:0;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:11px;line-height:16px;overflow:hidden}._5xaa-W_rankingAmount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;margin-left:8px;font-size:11px;line-height:16px}._5xaa-W_rankingMore{color:var(--dsw-alias-label-tertiary);padding:2px 8px 4px;font-size:11px;line-height:16px}";
4300
+ //#region \0dsh-css:C:\Users\admin\Desktop\me\code\DeepSeek-Harness-chat-billing\packages\ui-billing\src\client\BalanceBadge.module.css.mjs
4301
+ const css$1 = "._4_Wqcq_root{position:relative}._4_Wqcq_trigger{background:var(--dsw-alias-fill-l2);min-height:32px;color:var(--dsw-alias-label-secondary);cursor:pointer;border:0;border-radius:8px;align-items:center;gap:4px;padding:4px 8px;display:inline-flex}._4_Wqcq_trigger:hover,._4_Wqcq_trigger:focus-visible{color:var(--dsw-alias-label-primary)}._4_Wqcq_trigger svg{transition:transform .12s}._4_Wqcq_chevronOpen{transform:rotate(180deg)}._4_Wqcq_triggerLines{text-align:left;flex-direction:column;align-items:flex-start;gap:0;display:flex}._4_Wqcq_linePrimary{font-variant-numeric:tabular-nums;font-size:12px;line-height:16px}._4_Wqcq_lineSecondary{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px;line-height:15px}._4_Wqcq_unavailable{color:var(--dsw-alias-label-tertiary)}._4_Wqcq_inlineIcon{color:var(--dsw-alias-label-tertiary);flex:none}._4_Wqcq_spinning{color:var(--dsw-alias-label-tertiary);flex:none;animation:.8s linear infinite _4_Wqcq_spin}@keyframes _4_Wqcq_spin{to{transform:rotate(360deg)}}._4_Wqcq_panel{z-index:100;box-sizing:border-box;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-specific-menu);width:336px;max-width:min(360px,100vw - 32px);box-shadow:var(--dsw-shadow-lv3);border-radius:12px;flex-direction:column;gap:2px;padding:6px;display:flex;position:absolute;top:calc(100% + 6px);right:0}._4_Wqcq_amountRow{border-radius:8px;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;display:flex}._4_Wqcq_amountLabel{color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;font-size:13px;line-height:18px}._4_Wqcq_amountRow>._4_Wqcq_amountLabel{font-size:15px;line-height:22px}._4_Wqcq_spendRow{border-top:1px solid var(--dsw-alias-border-l2);border-radius:0;justify-content:space-between;align-items:center;gap:8px;padding:6px 8px;display:flex}._4_Wqcq_costRow{align-items:center;padding:2px 8px 6px;display:flex}._4_Wqcq_costBreakdown{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:11px;line-height:16px}._4_Wqcq_amountActions{align-items:center;gap:2px;display:inline-flex}._4_Wqcq_infoButton,._4_Wqcq_refreshButton{width:24px;height:24px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;padding:0;display:inline-flex}._4_Wqcq_infoButton:hover,._4_Wqcq_infoButton:focus-visible,._4_Wqcq_refreshButton:hover,._4_Wqcq_refreshButton:focus-visible{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-fill-l2)}._4_Wqcq_modelRow{border-radius:8px;justify-content:space-between;align-items:baseline;gap:8px;padding:6px 8px;display:flex}._4_Wqcq_modelName{color:var(--dsw-alias-label-secondary);flex:none;font-size:12px;line-height:18px}._4_Wqcq_tasks{text-align:right;min-width:0;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;font-size:12px;line-height:18px}._4_Wqcq_ranking{border-top:1px solid var(--dsw-alias-border-l2);flex-direction:column;gap:0;padding-top:2px;display:flex}._4_Wqcq_rankingTitle{color:var(--dsw-alias-label-secondary);padding:6px 8px 2px;font-size:12px;line-height:18px}._4_Wqcq_rankingRow{border-radius:8px;align-items:baseline;gap:0;min-width:0;padding:3px 8px;display:flex}._4_Wqcq_rankingRow:hover{background:var(--dsw-alias-fill-l2)}._4_Wqcq_rankingIndex{width:16px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;text-align:right;flex:none;font-size:11px;line-height:16px}._4_Wqcq_rankingDot{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;white-space:pre;flex:none;font-size:11px;line-height:16px}._4_Wqcq_rankingName{min-width:0;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:11px;line-height:16px;overflow:hidden}._4_Wqcq_rankingAmount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;margin-left:8px;font-size:11px;line-height:16px}._4_Wqcq_rankingMore{color:var(--dsw-alias-label-tertiary);padding:2px 8px 4px;font-size:11px;line-height:16px}";
4302
4302
  const tagId$1 = "@rayadesu/dsh-client-ui-billing/BalanceBadge.module.css";
4303
4303
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
4304
4304
  const tag = document.createElement("style");
@@ -4308,36 +4308,36 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4308
4308
  document.head.appendChild(tag);
4309
4309
  }
4310
4310
  var BalanceBadge_module_css_default = {
4311
- "amountActions": "_5xaa-W_amountActions",
4312
- "amountLabel": "_5xaa-W_amountLabel",
4313
- "amountRow": "_5xaa-W_amountRow",
4314
- "chevronOpen": "_5xaa-W_chevronOpen",
4315
- "costBreakdown": "_5xaa-W_costBreakdown",
4316
- "costRow": "_5xaa-W_costRow",
4317
- "infoButton": "_5xaa-W_infoButton",
4318
- "inlineIcon": "_5xaa-W_inlineIcon",
4319
- "linePrimary": "_5xaa-W_linePrimary",
4320
- "lineSecondary": "_5xaa-W_lineSecondary",
4321
- "modelName": "_5xaa-W_modelName",
4322
- "modelRow": "_5xaa-W_modelRow",
4323
- "panel": "_5xaa-W_panel",
4324
- "ranking": "_5xaa-W_ranking",
4325
- "rankingAmount": "_5xaa-W_rankingAmount",
4326
- "rankingDot": "_5xaa-W_rankingDot",
4327
- "rankingIndex": "_5xaa-W_rankingIndex",
4328
- "rankingMore": "_5xaa-W_rankingMore",
4329
- "rankingName": "_5xaa-W_rankingName",
4330
- "rankingRow": "_5xaa-W_rankingRow",
4331
- "rankingTitle": "_5xaa-W_rankingTitle",
4332
- "refreshButton": "_5xaa-W_refreshButton",
4333
- "root": "_5xaa-W_root",
4334
- "spendRow": "_5xaa-W_spendRow",
4335
- "spin": "_5xaa-W_spin",
4336
- "spinning": "_5xaa-W_spinning",
4337
- "tasks": "_5xaa-W_tasks",
4338
- "trigger": "_5xaa-W_trigger",
4339
- "triggerLines": "_5xaa-W_triggerLines",
4340
- "unavailable": "_5xaa-W_unavailable"
4311
+ "amountActions": "_4_Wqcq_amountActions",
4312
+ "amountLabel": "_4_Wqcq_amountLabel",
4313
+ "amountRow": "_4_Wqcq_amountRow",
4314
+ "chevronOpen": "_4_Wqcq_chevronOpen",
4315
+ "costBreakdown": "_4_Wqcq_costBreakdown",
4316
+ "costRow": "_4_Wqcq_costRow",
4317
+ "infoButton": "_4_Wqcq_infoButton",
4318
+ "inlineIcon": "_4_Wqcq_inlineIcon",
4319
+ "linePrimary": "_4_Wqcq_linePrimary",
4320
+ "lineSecondary": "_4_Wqcq_lineSecondary",
4321
+ "modelName": "_4_Wqcq_modelName",
4322
+ "modelRow": "_4_Wqcq_modelRow",
4323
+ "panel": "_4_Wqcq_panel",
4324
+ "ranking": "_4_Wqcq_ranking",
4325
+ "rankingAmount": "_4_Wqcq_rankingAmount",
4326
+ "rankingDot": "_4_Wqcq_rankingDot",
4327
+ "rankingIndex": "_4_Wqcq_rankingIndex",
4328
+ "rankingMore": "_4_Wqcq_rankingMore",
4329
+ "rankingName": "_4_Wqcq_rankingName",
4330
+ "rankingRow": "_4_Wqcq_rankingRow",
4331
+ "rankingTitle": "_4_Wqcq_rankingTitle",
4332
+ "refreshButton": "_4_Wqcq_refreshButton",
4333
+ "root": "_4_Wqcq_root",
4334
+ "spendRow": "_4_Wqcq_spendRow",
4335
+ "spin": "_4_Wqcq_spin",
4336
+ "spinning": "_4_Wqcq_spinning",
4337
+ "tasks": "_4_Wqcq_tasks",
4338
+ "trigger": "_4_Wqcq_trigger",
4339
+ "triggerLines": "_4_Wqcq_triggerLines",
4340
+ "unavailable": "_4_Wqcq_unavailable"
4341
4341
  };
4342
4342
  //#endregion
4343
4343
  //#region lib/types/client/BalanceBadge.js
@@ -4620,8 +4620,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4620
4620
  });
4621
4621
  }
4622
4622
  //#endregion
4623
- //#region \0dsh-css:D:\code\DeepSeek-Harness-chat-billing\packages\ui-billing\src\client\TurnCostAction.module.css.mjs
4624
- const css = ".DjYoVq_cost{min-width:0;color:var(--dsw-alias-label-tertiary);font-size:var(--dsh-content-font-size-secondary,13px);font-variant-numeric:tabular-nums;line-height:calc(24px + var(--dsh-content-font-delta,0px));text-overflow:ellipsis;white-space:nowrap;flex:none;order:-1;align-items:center;margin-left:6px;display:inline-flex;overflow:hidden}.DjYoVq_leading{width:calc(16px + var(--dsh-content-font-delta,0px));height:calc(16px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);flex:none;justify-content:center;align-items:center;margin-right:6px;display:inline-flex}.DjYoVq_leading svg{width:16px;height:16px}.DjYoVq_costLabel{color:var(--dsw-alias-label-secondary);flex:none}.DjYoVq_separator{background:var(--dsw-alias-label-caption);border-radius:1px;flex:none;width:2px;height:2px;margin:0 8px}.DjYoVq_costValue{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}";
4623
+ //#region \0dsh-css:C:\Users\admin\Desktop\me\code\DeepSeek-Harness-chat-billing\packages\ui-billing\src\client\TurnCostAction.module.css.mjs
4624
+ const css = ".l2XZIa_cost{font-size:var(--dsh-content-font-size-secondary,13px);line-height:calc(24px + var(--dsh-content-font-delta,0px));color:var(--dsw-alias-label-tertiary);white-space:nowrap;order:1;margin-left:8px}";
4625
4625
  const tagId = "@rayadesu/dsh-client-ui-billing/TurnCostAction.module.css";
4626
4626
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
4627
4627
  const tag = document.createElement("style");
@@ -4630,42 +4630,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4630
4630
  tag.textContent = css;
4631
4631
  document.head.appendChild(tag);
4632
4632
  }
4633
- var TurnCostAction_module_css_default = {
4634
- "cost": "DjYoVq_cost",
4635
- "costLabel": "DjYoVq_costLabel",
4636
- "costValue": "DjYoVq_costValue",
4637
- "leading": "DjYoVq_leading",
4638
- "separator": "DjYoVq_separator"
4639
- };
4633
+ var TurnCostAction_module_css_default = { "cost": "l2XZIa_cost" };
4640
4634
  //#endregion
4641
4635
  //#region lib/types/client/TurnCostAction.js
4642
4636
  /** Per-turn billed-cost label in the closing assistant message's actions row. */
4643
- /**
4644
- * In-house money-bag glyph in the hollow-outline style (16px viewBox, stroke
4645
- * currentColor, fill none), referencing the 💰 emoji: a bag outline with a
4646
- * tie knot at the neck and a centered yuan mark on the body. The drawing
4647
- * fills the 16px box like the other glyphs.
4648
- * @param props - optional size and class (the leading slot scales it to 14px).
4649
- * @returns the money-bag icon.
4650
- */
4651
- function WalletIcon({ size = 16, className }) {
4652
- return (0, react_jsx_runtime.jsx)("svg", {
4653
- width: size,
4654
- height: size,
4655
- className,
4656
- viewBox: "0 0 16 16",
4657
- fill: "none",
4658
- xmlns: "http://www.w3.org/2000/svg",
4659
- children: (0, react_jsx_runtime.jsx)("path", {
4660
- d: "M4.8 2.7 L5.2 5.2 C2.4 6.6 1.6 9.0 2.7 11.2 C3.4 12.8 5.5 13.6 8 13.6 C10.5 13.6 12.6 12.8 13.3 11.2 C14.4 9.0 13.6 6.6 10.8 5.2 L11.2 2.7 M6.6 1.4 L9.4 2.4 M9.4 1.4 L6.6 2.4 M5.6 5.5 L8 8.2 L10.4 5.5 M8 8.2 V12.4 M5.8 9.2 H10.2 M5.8 10.9 H10.2",
4661
- stroke: "currentColor",
4662
- strokeWidth: 1.4,
4663
- strokeLinecap: "round",
4664
- strokeLinejoin: "round",
4665
- fill: "none"
4666
- })
4667
- });
4668
- }
4669
4637
  /** CNY amount, up to four decimals with trailing zeros trimmed. */
4670
4638
  function formatSpend(amount) {
4671
4639
  return `¥${amount.toFixed(4).replace(/\.?0+$/, "")}`;
@@ -4682,17 +4650,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4682
4650
  return spend;
4683
4651
  }
4684
4652
  /**
4685
- * Render one Turn's billed cost inside the closing message's actions row,
4686
- * before the built-in copy control (flex `order: -1`). The "本轮花费" word
4687
- * uses the usage-card title tone and the amount the summary tone; unlike the
4688
- * clock, the label stays visible without hover (the hover rule only targets
4689
- * the time labels). It appears only after the Remote settles and hides again
4690
- * when the Turn priced to zero (no DeepSeek usage); a failed fetch stays
4691
- * hidden so a Remote outage never clutters the row.
4653
+ * Render one Turn's billed cost as a plain, non-interactive `¥金额` at the
4654
+ * end of the closing message's actions row. The DOM stays inside the
4655
+ * assistant-actions slot (between copy and branch); flex `order: 1` sorts the
4656
+ * span after every order-0 sibling, so it visually lands after the clock at
4657
+ * the line end. The typography replicates the clock's `.timeEnd` tier and the
4658
+ * row's 8px gap spaces it from the clock, so the amount reads as one trailing
4659
+ * meta line with the time; no icon, label or hover behavior of its own (the
4660
+ * row's hover reveal shows it with the clock). It appears only after the
4661
+ * Remote settles and hides again when the Turn priced to zero (no DeepSeek
4662
+ * usage); a failed fetch stays hidden so a Remote outage never clutters the
4663
+ * row.
4692
4664
  * @param props - the closing message id, the session runtime share, and the injected cost reader.
4693
- * @returns the cost label, or null while loading, on failure, or for zero cost.
4665
+ * @returns the cost text, or null while loading, on failure, or for zero cost.
4694
4666
  */
4695
- function TurnCostAction({ messageId, sessionId, getTurnSpend, t }) {
4667
+ function TurnCostAction({ messageId, sessionId, getTurnSpend }) {
4696
4668
  const [cost, setCost] = (0, react.useState)(null);
4697
4669
  (0, react.useEffect)(() => {
4698
4670
  let current = true;
@@ -4710,27 +4682,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4710
4682
  sessionId
4711
4683
  ]);
4712
4684
  if (cost === null || cost.total <= 0) return null;
4713
- return (0, react_jsx_runtime.jsxs)("span", {
4685
+ return (0, react_jsx_runtime.jsx)("span", {
4714
4686
  className: TurnCostAction_module_css_default.cost,
4715
4687
  "data-turn-cost": true,
4716
- children: [
4717
- (0, react_jsx_runtime.jsx)("span", {
4718
- className: TurnCostAction_module_css_default.leading,
4719
- children: (0, react_jsx_runtime.jsx)(WalletIcon, {})
4720
- }),
4721
- (0, react_jsx_runtime.jsx)("span", {
4722
- className: TurnCostAction_module_css_default.costLabel,
4723
- children: t("turnCost.label")
4724
- }),
4725
- (0, react_jsx_runtime.jsx)("span", {
4726
- className: TurnCostAction_module_css_default.separator,
4727
- "aria-hidden": true
4728
- }),
4729
- (0, react_jsx_runtime.jsx)("span", {
4730
- className: TurnCostAction_module_css_default.costValue,
4731
- children: formatSpend(cost.total)
4732
- })
4733
- ]
4688
+ children: formatSpend(cost.total)
4734
4689
  });
4735
4690
  }
4736
4691
  //#endregion
@@ -4756,7 +4711,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4756
4711
  "info.hint": "仅能预估 DeepSeek 相关模型。本会话花费按每条消息的发生时刻(北京时间)所在峰谷时段单价计费:缓存命中输入、未命中输入(含缓存写入)、输出(含推理)分别计价。费率按 8 月 17 日实行的标准,高峰时段为北京时间周一至周五 9:00–12:00、14:00–18:00,周末全天按低谷价计费。",
4757
4712
  "badge.aria": "DeepSeek 额度:{amount}",
4758
4713
  "panel.aria": "DeepSeek 额度详情",
4759
- "turnCost.label": "本轮花费",
4760
4714
  "label.sessionRanking": "今日会话花费",
4761
4715
  "label.sessionRanking.more": "…还有 {count} 个会话"
4762
4716
  };
@@ -4778,7 +4732,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4778
4732
  "info.hint": "Only DeepSeek models are estimated. This session's spend is priced per message at the rate of its Beijing-time peak/off-peak hour: cache-hit input, cache-miss input (including cache writes), and output (including reasoning) are billed separately. Rates follow the August 17 pricing; peak hours are Beijing time Monday–Friday 09:00–12:00 and 14:00–18:00, and weekends are billed at off-peak prices all day.",
4779
4733
  "badge.aria": "DeepSeek balance {amount}",
4780
4734
  "panel.aria": "DeepSeek balance details",
4781
- "turnCost.label": "This turn",
4782
4735
  "label.sessionRanking": "Today session spend",
4783
4736
  "label.sessionRanking.more": "…{count} more sessions"
4784
4737
  };
@@ -16,15 +16,19 @@ export interface TurnCostActionInjected {
16
16
  */
17
17
  export type TurnCostActionProps = PropsRuntime<'conversation.chat.assistant-actions'> & InjectFace<TurnCostActionInjected> & PropsLocale<typeof NS>;
18
18
  /**
19
- * Render one Turn's billed cost inside the closing message's actions row,
20
- * before the built-in copy control (flex `order: -1`). The "本轮花费" word
21
- * uses the usage-card title tone and the amount the summary tone; unlike the
22
- * clock, the label stays visible without hover (the hover rule only targets
23
- * the time labels). It appears only after the Remote settles and hides again
24
- * when the Turn priced to zero (no DeepSeek usage); a failed fetch stays
25
- * hidden so a Remote outage never clutters the row.
19
+ * Render one Turn's billed cost as a plain, non-interactive `¥金额` at the
20
+ * end of the closing message's actions row. The DOM stays inside the
21
+ * assistant-actions slot (between copy and branch); flex `order: 1` sorts the
22
+ * span after every order-0 sibling, so it visually lands after the clock at
23
+ * the line end. The typography replicates the clock's `.timeEnd` tier and the
24
+ * row's 8px gap spaces it from the clock, so the amount reads as one trailing
25
+ * meta line with the time; no icon, label or hover behavior of its own (the
26
+ * row's hover reveal shows it with the clock). It appears only after the
27
+ * Remote settles and hides again when the Turn priced to zero (no DeepSeek
28
+ * usage); a failed fetch stays hidden so a Remote outage never clutters the
29
+ * row.
26
30
  * @param props - the closing message id, the session runtime share, and the injected cost reader.
27
- * @returns the cost label, or null while loading, on failure, or for zero cost.
31
+ * @returns the cost text, or null while loading, on failure, or for zero cost.
28
32
  */
29
- export declare function TurnCostAction({ messageId, sessionId, getTurnSpend, t }: TurnCostActionProps): import("react").JSX.Element | null;
33
+ export declare function TurnCostAction({ messageId, sessionId, getTurnSpend }: TurnCostActionProps): import("react").JSX.Element | null;
30
34
  //# sourceMappingURL=TurnCostAction.d.ts.map
@@ -19,7 +19,6 @@ export declare const zh: {
19
19
  readonly 'info.hint': "仅能预估 DeepSeek 相关模型。本会话花费按每条消息的发生时刻(北京时间)所在峰谷时段单价计费:缓存命中输入、未命中输入(含缓存写入)、输出(含推理)分别计价。费率按 8 月 17 日实行的标准,高峰时段为北京时间周一至周五 9:00–12:00、14:00–18:00,周末全天按低谷价计费。";
20
20
  readonly 'badge.aria': "DeepSeek 额度:{amount}";
21
21
  readonly 'panel.aria': "DeepSeek 额度详情";
22
- readonly 'turnCost.label': "本轮花费";
23
22
  readonly 'label.sessionRanking': "今日会话花费";
24
23
  readonly 'label.sessionRanking.more': "…还有 {count} 个会话";
25
24
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rayadesu/dsh-client-ui-billing",
3
3
  "description": "Session-header DeepSeek account-balance and conversation-spend badge over the billing Remote",
4
- "version": "0.3.4",
4
+ "version": "0.3.6",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/types/index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "access": "public"
48
48
  },
49
49
  "peerDependencies": {
50
- "@rayadesu/dsh-llm-billing": "^0.3.4",
50
+ "@rayadesu/dsh-llm-billing": "^0.3.6",
51
51
  "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
52
52
  "@deepseek-ai/dsh-client-ui-conversation": "^0.1.1-rc.2",
53
53
  "@deepseek-ai/dsh-typert-protocol": "^0.1.1-rc.2",
@@ -58,7 +58,7 @@
58
58
  "@deepseek-ai/dsh-session": "^0.1.1-rc.2"
59
59
  },
60
60
  "devDependencies": {
61
- "@rayadesu/dsh-llm-billing": "^0.3.4",
61
+ "@rayadesu/dsh-llm-billing": "^0.3.6",
62
62
  "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
63
63
  "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
64
64
  "@deepseek-ai/dsh-client-test-runtime": "^0.1.1-rc.2",