dsh-commandcode-usage 1.1.0 → 1.1.1

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 (2) hide show
  1. package/client.js +3 -3
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -315,9 +315,9 @@ window.__ModuleLoader__.load({
315
315
  if (credits.monthlyCredits !== undefined) {
316
316
  var secCred = el("div", "up-section");
317
317
  secCred.appendChild(el("div", "up-section-title", "月额度"));
318
- var usedMonthly = win.weekly ? win.weekly.used : (usage.totalCredits || 0);
318
+ var usedMonthly = (usage.totalMonthlyCredits !== undefined ? usage.totalMonthlyCredits : 0);
319
319
  var capMonthly = usedMonthly + credits.monthlyCredits;
320
- secCred.appendChild(progressRow("剩余额度", "💳", credits.monthlyCredits, capMonthly, fmtDeadline(sub.currentPeriodEnd)));
320
+ secCred.appendChild(progressRow("当月已用", "💳", usedMonthly, capMonthly, fmtDeadline(sub.currentPeriodEnd)));
321
321
  // 明细
322
322
  var det = el("div", "up-progress-bottom");
323
323
  det.style.cssText = "justify-content:flex-start;gap:14px;margin-top:6px;padding-top:7px;border-top:1px dashed var(--up-border);min-height:0";
@@ -330,7 +330,7 @@ window.__ModuleLoader__.load({
330
330
  it.appendChild(vv);
331
331
  return it;
332
332
  };
333
- if (usage.totalMonthlyCredits !== undefined) det.appendChild(detItem("当月已用", fmtMoney(usage.totalMonthlyCredits)));
333
+ det.appendChild(detItem("剩余额度", fmtMoney(credits.monthlyCredits)));
334
334
  det.appendChild(detItem("已购买", fmtMoney(credits.purchasedCredits)));
335
335
  if (credits.freeCredits !== undefined) det.appendChild(detItem("免费", fmtMoney(credits.freeCredits)));
336
336
  secCred.appendChild(det);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-commandcode-usage",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "CommandCode 用量与余额面板 — 在 codex-ui 侧边栏底部显示 CommandCode API 用量、信用额度、5小时/每周窗口。 · CommandCode usage & balance panel for DeepSeek Harness: shows API usage, credit balance, 5-hour/weekly windows from the sidebar footer.",
5
5
  "main": "./index.js",
6
6
  "exports": {