dsh-subusage 0.11.0 → 0.11.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.
package/lib/volcengine.js CHANGED
@@ -157,7 +157,7 @@ export function parseVolcAgentPlan(body) {
157
157
  const quota = amount(row.Quota), used = amount(row.Used);
158
158
  if (quota === undefined || used === undefined) throw new Error("Volcengine AFP window is invalid");
159
159
  if (quota <= 0) continue;
160
- windows.push({ kind, percent: Math.min(100, used / quota * 100), resetsAt: fromEpoch(row.ResetTime, "milliseconds"), groupLabel, detail: { used, limit: quota, unit: "AFP" } });
160
+ windows.push({ kind, percent: Math.min(100, used / quota * 100), resetsAt: fromEpoch(row.ResetTime, "milliseconds"), groupLabel, detail: { used, limit: quota, unit: "AFP", scope: kind === "month" ? "all" : kind === "day" ? "daily-capabilities" : "text" } });
161
161
  }
162
162
  const plan = typeof result.PlanType === "string" && result.PlanType.trim() ? result.PlanType.trim() : undefined;
163
163
  return { subscribed: windows.length > 0 || reported, windows, plan };
@@ -188,7 +188,7 @@ export function parseVolcSeatAfp(body) {
188
188
  const quota = amount(window.Quota), used = amount(window.Used);
189
189
  if (quota === undefined || used === undefined) throw new Error("Volcengine seat AFP window is invalid");
190
190
  if (quota <= 0) continue;
191
- windows.push({ kind, percent: Math.min(100, used / quota * 100), resetsAt: fromEpoch(window.ResetTime, "milliseconds"), groupLabel, detail: { used, limit: quota, unit: "AFP" } });
191
+ windows.push({ kind, percent: Math.min(100, used / quota * 100), resetsAt: fromEpoch(window.ResetTime, "milliseconds"), groupLabel, detail: { used, limit: quota, unit: "AFP", scope: kind === "month" ? "all" : kind === "day" ? "daily-capabilities" : "text" } });
192
192
  }
193
193
  const plan = typeof row.PlanType === "string" && row.PlanType.trim() ? row.PlanType.trim() : undefined;
194
194
  const seatId = typeof row.SeatID === "string" && row.SeatID.trim() ? row.SeatID.trim() : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-subusage",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "displayName": "订阅用量显示",
5
5
  "description": "显示 DeepSeek 官方余额、火山方舟(arkcli 官方 CLI 路由:Agent / Coding Plan 个人版与企业版席位,设置页合并为一组)、Z.ai(中国与国际)、Kimi、MiMo、OpenCode Go、Command Code、SuperGrok、Codex(ChatGPT 订阅,默认关闭)、MiniMax(中国)、Synthetic、NanoGPT、SiliconFlow、OpenRouter、Novita、Hyperbolic、DeepInfra、Chutes、Ollama Cloud、Vercel AI Gateway、ZenMux、LiteLLM 的订阅余量与余额;共享刷新与凭据管理,默认关闭 17 家。",
6
6
  "keywords": [