@llblab/pi-codex-usage 0.4.0 → 0.4.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 (3) hide show
  1. package/CHANGELOG.md +23 -8
  2. package/index.ts +4 -6
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,10 +1,25 @@
1
1
  # Changelog
2
2
 
3
- - `0.4.0` Expanded the dual statusline bar to ten glyphs with 20 steps per quota window, moved its status key near the start of the footer status order, and draws the bar on the themed selected background. Impact: 5-hour and weekly limits now move in 5% increments for 40 total discrete points while empty cells no longer blend into the terminal background.
4
- - `0.3.5` Refined the compact statusline bar with quadrant glyphs, darker bar coloring, and blink-on-segment-change behavior. Impact: Codex quota changes are easier to notice while routine refreshes stay visually stable.
5
- - `0.3.4` Added package banner metadata and README hero image. Impact: Pi/package listings can show the Codex Usage banner while npm packages include the image asset.
6
- - `Fork baseline` Imported `extensions/pi-codex-usage` from `narumiruna/pi-extensions` as a standalone `@llblab/pi-codex-usage` package. Impact: the extension can be installed and maintained independently.
7
- - `Minimal statusline` Removed command-driven report output and narrowed the extension to a zero-configuration statusline widget. Impact: runtime behavior is automatic while `openai-codex` is active.
8
- - `Primary quota focus` Ignored additional returned buckets such as Spark-specific limits. Impact: the statusline only represents primary Codex 5-hour and weekly quota windows.
9
- - `Dual quota bar` Replaced textual percentages with a fixed-width separated-sextant bar. Impact: both 5-hour and weekly remaining quota are encoded in five statusline characters.
10
- - `Optimistic refresh` Kept the last good bar during refresh and transient failures, with a short successful-redraw blink. Impact: the footer no longer shifts or collapses during polling.
3
+ ## 0.4.1: Stable Startup Bar
4
+
5
+ - Fixed the initial empty statusline bar to use ten non-trimmed blank glyph cells through the same formatting path as the populated quota bar. Impact: the footer background stays at ten cells during startup before the first quota values arrive.
6
+
7
+ ## 0.4.0
8
+
9
+ - Expanded the dual statusline bar to ten glyphs with 20 steps per quota window, moved its status key near the start of the footer status order, and draws the bar on the themed selected background. Impact: 5-hour and weekly limits now move in 5% increments for 40 total discrete points while empty cells no longer blend into the terminal background.
10
+
11
+ ## 0.3.5
12
+
13
+ - Refined the compact statusline bar with quadrant glyphs, darker bar coloring, and blink-on-segment-change behavior. Impact: Codex quota changes are easier to notice while routine refreshes stay visually stable.
14
+
15
+ ## 0.3.4
16
+
17
+ - Added package banner metadata and README hero image. Impact: Pi/package listings can show the Codex Usage banner while npm packages include the image asset.
18
+
19
+ ## Fork baseline
20
+
21
+ - Imported `extensions/pi-codex-usage` from `narumiruna/pi-extensions` as a standalone `@llblab/pi-codex-usage` package. Impact: the extension can be installed and maintained independently.
22
+ - Removed command-driven report output and narrowed the extension to a zero-configuration statusline widget. Impact: runtime behavior is automatic while `openai-codex` is active.
23
+ - Ignored additional returned buckets such as Spark-specific limits. Impact: the statusline only represents primary Codex 5-hour and weekly quota windows.
24
+ - Replaced textual percentages with a fixed-width separated-sextant bar. Impact: both 5-hour and weekly remaining quota are encoded in five statusline characters.
25
+ - Kept the last good bar during refresh and transient failures, with a short successful-redraw blink. Impact: the footer no longer shifts or collapses during polling.
package/index.ts CHANGED
@@ -14,8 +14,9 @@ const REDRAW_BLINK_MS = 150;
14
14
  const STATUS_KEY = "aa-codex-usage";
15
15
  const MAX_ERROR_BODY_CHARS = 600;
16
16
  const STATUS_LABEL_TEXT = "codex";
17
+ const DUAL_BAR_WIDTH = 10;
17
18
  const DUAL_BAR_CHARS = [
18
- " ",
19
+ "",
19
20
  "▘",
20
21
  "▝",
21
22
  "▀",
@@ -713,10 +714,7 @@ function formatStatuslineBarText(ctx: ExtensionContext, bar: string): string {
713
714
  }
714
715
 
715
716
  function formatEmptyStatuslineBar(ctx: ExtensionContext): string {
716
- return formatStatuslineBarText(
717
- ctx,
718
- "\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0",
719
- );
717
+ return formatStatuslineBarText(ctx, DUAL_BAR_CHARS[0].repeat(DUAL_BAR_WIDTH));
720
718
  }
721
719
 
722
720
  function formatStatuslineProblem(
@@ -771,7 +769,7 @@ function formatDualLimitBar(
771
769
  const primaryParts = filledTwentieths(primary);
772
770
  const secondaryParts = filledTwentieths(secondary);
773
771
  let value = "";
774
- for (let index = 0; index < 10; index++) {
772
+ for (let index = 0; index < DUAL_BAR_WIDTH; index++) {
775
773
  const leftPart = index * 2 + 1;
776
774
  const rightPart = leftPart + 1;
777
775
  let mask = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-codex-usage",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "description": "Minimal Pi extension that shows primary Codex ChatGPT subscription usage limits.",
6
6
  "keywords": [