@duckmind/dm-darwin-x64 0.34.4 → 0.34.5

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.
@@ -516,11 +516,12 @@ function renderCreditProgressBar(credits: DuckmindCreditsSnapshot, theme: ThemeL
516
516
  const remaining = credits.remaining ?? 0;
517
517
  const limit = credits.limit && credits.limit > 0 ? credits.limit : (remaining > 0 ? remaining : 0);
518
518
  const percent = limit > 0 ? Math.max(0, Math.min(100, (remaining / limit) * 100)) : 0;
519
- const filledCells = Math.round((percent / 100) * CREDIT_BAR_WIDTH);
520
- const filled = "█".repeat(filledCells);
521
- const empty = "".repeat(Math.max(0, CREDIT_BAR_WIDTH - filledCells));
519
+ const rawFilledCells = Math.floor((percent / 100) * CREDIT_BAR_WIDTH);
520
+ const filledCells = percent >= 100 ? CREDIT_BAR_WIDTH : (percent > 0 ? Math.max(1, rawFilledCells) : 0);
521
+ const filled = "".repeat(filledCells);
522
+ const empty = "□".repeat(Math.max(0, CREDIT_BAR_WIDTH - filledCells));
522
523
  const color = percent <= 15 ? "error" : percent <= 35 ? "warning" : "success";
523
- return `${safeFg(theme, "muted", "[")}${safeFg(theme, color, filled, "accent")}${safeFg(theme, "borderMuted", empty)}${safeFg(theme, "muted", "]")}`;
524
+ return `${safeFg(theme, color, filled, "accent")}${safeFg(theme, "borderMuted", empty)}`;
524
525
  }
525
526
 
526
527
  function isDuckmindProvider(ctx: any): boolean {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckmind/dm-darwin-x64",
3
- "version": "0.34.4",
3
+ "version": "0.34.5",
4
4
  "description": "DuckMind (dm) binary payload for darwin x64",
5
5
  "license": "MIT",
6
6
  "os": [