@henryqw/pi-footer 0.3.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.
package/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  Henry's opinionated Pi footer style: concise checkout identity plus essential usage and extension status details.
4
4
 
5
+ ## Why
6
+
7
+ - **Created for**: Showing concise checkout identity plus usage and extension status in the Pi footer.
8
+ - **Advantage**: Keeps repository, PR, usage, model, and extension state visible without separate status commands.
9
+
5
10
  ## Install
6
11
 
7
12
  ```bash
@@ -25,6 +30,7 @@ pi install npm:@henryqw/pi-footer
25
30
  pi-packages · clear-field-f8d2 · PR #123 · approved
26
31
  ↑ 12.4k · ↓ 2.1k · ↺ 84.3% · ⚡ 87.4 t/s · $ 0.127 · ◔ 36.8% gpt-5.6-luna • high
27
32
  Codex #1 · 50% · 7d 1d 1h 22m
33
+ ● 🐴 ponytail: ⚡ FULL
28
34
  ```
29
35
 
30
36
  First line shows repository, branch, and pull request status (`pi-pr`) after clickable checkout link. Linked-worktree branches drop generated `worktree/` prefix.
@@ -33,7 +39,7 @@ Second line shows cumulative input tokens, output tokens, latest cache-hit rate,
33
39
 
34
40
  `off` uses the same dim grey as the model name. Active levels use an ANSI-256 gradient: green `minimal`, yellow-green `low`, lime `medium`, yellow `high`, orange `xhigh`, and red `max`. `ultra` renders as a rainbow when the runtime supplies it. Pi 0.84.2 does not yet accept `ultra`, so that footer path remains unreachable until Pi adds it.
35
41
 
36
- Final line renders every non-empty status emitted through `ctx.ui.setStatus()`, sorted by status key (excluding `pi-pr`, which appears on the first line). Producer text, spacing, colors, links, and glyphs are preserved, including Ponytail mode and Codex quota.
42
+ Third line is reserved for non-empty statuses from `@henryqw` extensions, currently Codex quota. Fourth line renders statuses from all other extensions, including Ponytail and `pi-rewind`. If only external statuses exist, third line stays blank so external output remains on line four. Statuses are sorted by key; producer text, spacing, colors, links, and glyphs are preserved.
37
43
 
38
44
  ## Clickable checkout
39
45
 
@@ -12,6 +12,7 @@ const THINKING_COLORS = {
12
12
  xhigh: 208,
13
13
  max: 196,
14
14
  } as const;
15
+ const HENRY_STATUS_KEYS = new Set(["pi-multi-codex"]);
15
16
 
16
17
  function formatTokens(count: number): string {
17
18
  if (count < 1_000) return `${count}`;
@@ -119,8 +120,14 @@ export default function footerExtension(pi: ExtensionAPI): void {
119
120
  const statuses = [...extensionStatuses]
120
121
  .filter(([key]) => key !== "pi-pr")
121
122
  .sort(([a], [b]) => a.localeCompare(b))
122
- .map(([, text]) => sanitizeStatus(text))
123
- .filter(Boolean);
123
+ .map(([key, text]) => [key, sanitizeStatus(text)] as const)
124
+ .filter(([, text]) => Boolean(text));
125
+ const henryStatuses = statuses
126
+ .filter(([key]) => HENRY_STATUS_KEYS.has(key))
127
+ .map(([, text]) => text);
128
+ const externalStatuses = statuses
129
+ .filter(([key]) => !HENRY_STATUS_KEYS.has(key))
130
+ .map(([, text]) => text);
124
131
  const thinking = String(ctx.thinkingLevel ?? "off");
125
132
  const thinkingColor = THINKING_COLORS[thinking as keyof typeof THINKING_COLORS];
126
133
  const ellipsis = theme.fg("dim", "…");
@@ -144,7 +151,8 @@ export default function footerExtension(pi: ExtensionAPI): void {
144
151
  firstLine,
145
152
  align(usage, model, width, ellipsis),
146
153
  ];
147
- if (statuses.length) lines.push(statuses.join(" "));
154
+ if (henryStatuses.length || externalStatuses.length) lines.push(henryStatuses.join(" "));
155
+ if (externalStatuses.length) lines.push(externalStatuses.join(" "));
148
156
  return lines.map((line) => truncateToWidth(line, width, ellipsis));
149
157
  },
150
158
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-footer",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Show concise repository, branch, and usage details in the Pi footer.",
5
5
  "keywords": [
6
6
  "pi-package",