@sushant-kum/ccstatus 0.4.4 → 0.4.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.
@@ -14,7 +14,7 @@ import {
14
14
  saveConfigFile,
15
15
  snapshotPath,
16
16
  writeLinkedLines
17
- } from "./chunk-QEGRKLAH.js";
17
+ } from "./chunk-YDUSNB5C.js";
18
18
 
19
19
  // src/app.tsx
20
20
  import { Box as Box12, Text as Text12, useApp, useInput as useInput10 } from "ink";
@@ -677,7 +677,7 @@ var LOGO_ART = [
677
677
  ];
678
678
 
679
679
  // src/version.ts
680
- var VERSION = "0.4.4";
680
+ var VERSION = "0.4.5";
681
681
 
682
682
  // src/screens/menu.tsx
683
683
  import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
@@ -430,22 +430,18 @@ register({
430
430
  type: "rate-limit-5h",
431
431
  label: "Session limit",
432
432
  format: ({ snapshot }) => {
433
- if (snapshot.fivePct === null) {
434
- return "Session: \u2014";
435
- }
433
+ const p = snapshot.fivePct ?? 0;
436
434
  const reset = until(snapshot.fiveReset, snapshot.now);
437
- return `Session: ${bar(snapshot.fivePct)} ${pct(snapshot.fivePct)}${reset !== null ? ` ${fmtDur(reset)}` : ""}`;
435
+ return `Session: ${bar(p)} ${pct(p)}${reset !== null ? ` ${fmtDur(reset)}` : ""}`;
438
436
  }
439
437
  });
440
438
  register({
441
439
  type: "rate-limit-week",
442
440
  label: "Weekly limit",
443
441
  format: ({ snapshot }) => {
444
- if (snapshot.weekPct === null) {
445
- return "Weekly: \u2014";
446
- }
442
+ const p = snapshot.weekPct ?? 0;
447
443
  const reset = until(snapshot.weekReset, snapshot.now);
448
- return `Weekly: ${pct(snapshot.weekPct)}${reset !== null ? ` ${fmtDur(reset)}` : ""}`;
444
+ return `Weekly: ${pct(p)}${reset !== null ? ` ${fmtDur(reset)}` : ""}`;
449
445
  }
450
446
  });
451
447
  register({
@@ -459,12 +455,14 @@ register({
459
455
  register({
460
456
  type: "session-usage",
461
457
  label: "Session %",
462
- format: ({ snapshot }) => snapshot.fivePct === null ? null : `Session: ${pct(snapshot.fivePct)}`
458
+ format: ({ snapshot }) => `Session: ${pct(snapshot.fivePct ?? 0)}`
459
+ // unknown shows 0% (DEC-0033)
463
460
  });
464
461
  register({
465
462
  type: "weekly-usage",
466
463
  label: "Weekly %",
467
- format: ({ snapshot }) => snapshot.weekPct === null ? null : `Weekly: ${pct(snapshot.weekPct)}`
464
+ format: ({ snapshot }) => `Weekly: ${pct(snapshot.weekPct ?? 0)}`
465
+ // unknown shows 0% (DEC-0033)
468
466
  });
469
467
  register({
470
468
  type: "reset-timer",
package/dist/index.js CHANGED
@@ -4,10 +4,10 @@
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  var sub = process.argv[2];
6
6
  if (sub === "statusline") {
7
- const { runStatusline } = await import("./statusline-cmd-OVE66FV3.js");
7
+ const { runStatusline } = await import("./statusline-cmd-XD2FWV3G.js");
8
8
  await runStatusline();
9
9
  } else {
10
10
  const { render } = await import("ink");
11
- const { App } = await import("./app-6JK5LUBR.js");
11
+ const { App } = await import("./app-EVASPE7J.js");
12
12
  render(/* @__PURE__ */ jsx(App, {}));
13
13
  }
@@ -6,7 +6,7 @@ import {
6
6
  render,
7
7
  snapshotPath,
8
8
  toAnsi
9
- } from "./chunk-QEGRKLAH.js";
9
+ } from "./chunk-YDUSNB5C.js";
10
10
 
11
11
  // src/statusline-cmd.ts
12
12
  function renderStatuslineAnsi(config, snapshot) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sushant-kum/ccstatus",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Interactive configurator (npx @sushant-kum/ccstatus) for the ccstatus Claude Code status bar — band, status line, pane, and threshold toasts from one config.",
5
5
  "license": "MIT",
6
6
  "author": "Sushant Kumar",