cc-api-statusline 1.1.1 → 1.1.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.
@@ -4,7 +4,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "cc-api-statusline",
7
- version: "1.1.1",
7
+ version: "1.1.2",
8
8
  description: "Claude Code statusline tool that polls API usage from third-party proxy backends",
9
9
  type: "module",
10
10
  bin: {
@@ -2005,7 +2005,7 @@ var ANSI_COLORS = {
2005
2005
  grey: "\x1B[90m"
2006
2006
  };
2007
2007
  var THEME_COLORS = {
2008
- cool: "#56B6C2",
2008
+ cool: "#569AD4",
2009
2009
  comfortable: "#5EBE8A",
2010
2010
  warm: "#C9A84C",
2011
2011
  hot: "#D68B45",
@@ -2482,6 +2482,10 @@ function getProgressIcon(percent, nerdFontAvailable = true) {
2482
2482
 
2483
2483
  // src/renderer/format.ts
2484
2484
  function formatCurrency(n) {
2485
+ if (n > 0 && n < 10) {
2486
+ const rounded = Math.round(n * 10) / 10;
2487
+ return `$${rounded.toFixed(1)}`;
2488
+ }
2485
2489
  return `$${Math.floor(n)}`;
2486
2490
  }
2487
2491
  function formatCurrencyQuota(used, limit) {
@@ -2558,7 +2562,8 @@ function renderQuotaComponent(componentId, quota, options, componentConfig, glob
2558
2562
  const labelColor = resolvePartColor("label", usagePercent, componentConfig, globalConfig);
2559
2563
  const countdownColor = resolvePartColor("countdown", usagePercent, componentConfig, globalConfig);
2560
2564
  const progress = renderProgress(progressStyle, usagePercent, barSize, barStyle, barColor, null, renderContext);
2561
- const value = showPercentage ? ansiColor(`${Math.round(usagePercent)}%`, valueColor, renderContext) : "";
2565
+ const percentText = usagePercent > 0 && usagePercent < 10 ? `${(Math.round(usagePercent * 10) / 10).toFixed(1)}%` : `${Math.round(usagePercent)}%`;
2566
+ const value = showPercentage ? ansiColor(percentText, valueColor, renderContext) : "";
2562
2567
  const countdown = renderSecondaryDisplay(quota.resetsAt, quota, componentConfig.countdown, countdownColor, clockFormat, renderContext);
2563
2568
  return assembleComponent(layout, label, labelColor, progress, value, countdown, renderContext);
2564
2569
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-api-statusline",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Claude Code statusline tool that polls API usage from third-party proxy backends",
5
5
  "type": "module",
6
6
  "bin": {