@henryqw/pi-footer 0.5.3 → 0.5.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.
- package/README.md +26 -18
- package/extensions/footer.ts +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# `@henryqw/pi-footer`
|
|
2
2
|
|
|
3
|
-
Henry's opinionated Pi footer style
|
|
3
|
+
Henry's opinionated Pi footer style shows checkout identity, usage, and extension status.
|
|
4
4
|
|
|
5
5
|
## Why
|
|
6
6
|
|
|
7
|
-
- **Created for**:
|
|
8
|
-
- **Advantage**:
|
|
7
|
+
- **Created for**: Show concise checkout identity, usage, and extension status in the Pi footer.
|
|
8
|
+
- **Advantage**: Keep repository, PR, usage, model, and extension state visible without separate status commands.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
@@ -17,35 +17,41 @@ pi install npm:@henryqw/pi-footer
|
|
|
17
17
|
|
|
18
18
|
| Package | Why |
|
|
19
19
|
| --- | --- |
|
|
20
|
-
| `@henryqw/pi-multi-codex` | Adds active Codex subscription quota and reset status. |
|
|
21
|
-
| `@henryqw/pi-open-in` | Adds `/open` and `/set-open-in` commands for editor configuration. |
|
|
20
|
+
| `@henryqw/pi-multi-codex` | Improves. Adds active Codex subscription quota and reset status. |
|
|
21
|
+
| `@henryqw/pi-open-in` | Improves. Adds `/open` and `/set-open-in` commands for editor configuration. |
|
|
22
|
+
| `@henryqw/pi-pr` | Improves. Adds current-branch pull-request status. |
|
|
22
23
|
|
|
23
24
|
## Use
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
| --- | --- | --- |
|
|
27
|
-
| Footer | UI | Show checkout, usage, model, thinking, and extension statuses. |
|
|
26
|
+
The footer shows checkout, usage, model, thinking, and extension statuses.
|
|
28
27
|
|
|
29
28
|
```text
|
|
30
|
-
pi-packages · clear-field-f8d2 · PR #123 · approved
|
|
29
|
+
pi-packages · clear-field-f8d2 · PR #123 · approved Codex #1 · 50% · 7d 1d 1h 22m
|
|
31
30
|
↑ 12.4k · ↓ 2.1k · ↺ 84.3% · ⚡ 87.4 t/s · $ 0.127 · ◔ 36.8% gpt-5.6-luna • high
|
|
32
|
-
|
|
33
|
-
● 🐴 ponytail: ⚡ FULL
|
|
31
|
+
● 🐴 ponytail: ⚡ FULL ◷ 12m 34s
|
|
34
32
|
```
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
- The first line shows the repository, branch, and `pi-pr` pull request status after the clickable checkout link. Linked-worktree branches drop the generated `worktree/` prefix.
|
|
35
|
+
- The second line shows cumulative input tokens, output tokens, latest cache-hit rate, and tokens per second for the most recent assistant response. It also shows estimated cost and context usage. The active model and thinking level are right-aligned.
|
|
36
|
+
- The third line shows other extension statuses on the left and cumulative agent-work time on the right, beneath the active model.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
Unavailable values render as `—` without a misleading percent sign.
|
|
39
39
|
|
|
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`.
|
|
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`.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
`ultra` renders as a rainbow when the runtime supplies it. Pi 0.84.4 does not yet accept `ultra`, so that footer path remains unreachable until Pi adds it.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Non-empty statuses from `@henryqw` extensions, currently Codex quota, occupy the right side of the first line.
|
|
45
|
+
|
|
46
|
+
Agent-work time counts each run from `agent_start` through the final idle `agent_settled`. It includes automatic retries and auto-compaction inside that run. It excludes blocking user-prompt waits and idle waits between runs.
|
|
47
|
+
|
|
48
|
+
Standalone `/compact` is excluded because it runs outside the agent-run lifecycle and emits no `agent_start`. The cumulative total is persisted in the session through a `pi-footer:agent-work` custom entry after each finalized run. It is restored on session resume.
|
|
49
|
+
|
|
50
|
+
Statuses from all other extensions, including Ponytail and `pi-rewind`, share the left side. They are sorted by key with producer text, spacing, colors, links, and glyphs preserved.
|
|
45
51
|
|
|
46
52
|
## Clickable checkout
|
|
47
53
|
|
|
48
|
-
When `pi-open-in.json` command is exactly `code` and Pi reports hyperlink support, the accent-colored checkout name is an OSC 8 `vscode://` link to the current path. Other configured commands and terminals with hyperlinks disabled render plain text.
|
|
54
|
+
When the `pi-open-in.json` command is exactly `code` and Pi reports hyperlink support, the accent-colored checkout name is an OSC 8 `vscode://` link to the current path. Other configured commands and terminals with hyperlinks disabled render plain text.
|
|
49
55
|
|
|
50
56
|
Use Pi fullscreen TUI so Pi handles the custom URI:
|
|
51
57
|
|
|
@@ -55,4 +61,6 @@ Use Pi fullscreen TUI so Pi handles the custom URI:
|
|
|
55
61
|
}
|
|
56
62
|
```
|
|
57
63
|
|
|
58
|
-
Set this through `/settings`, or launch with `--tui-mode fullscreen`. Then use normal primary click. Regular TUI delegates OSC 8 activation to the terminal
|
|
64
|
+
Set this through `/settings`, or launch with `--tui-mode fullscreen`. Then use normal primary click. Regular TUI delegates OSC 8 activation to the terminal.
|
|
65
|
+
|
|
66
|
+
Ghostty uses `Cmd+click` but may not open custom URI schemes.
|
package/extensions/footer.ts
CHANGED
|
@@ -246,13 +246,13 @@ export default function footerExtension(pi: ExtensionAPI): void {
|
|
|
246
246
|
const checkoutLink = openUri && getCapabilities().hyperlinks
|
|
247
247
|
? hyperlink(theme.fg("accent", checkout), openUri)
|
|
248
248
|
: theme.fg("dim", checkout);
|
|
249
|
-
const
|
|
249
|
+
const identityLine = prStatus ? `${identity}${checkoutLink} · ${prStatus}` : `${identity}${checkoutLink}`;
|
|
250
|
+
const firstLine = henryStatuses.length ? align(identityLine, henryStatuses.join(" "), width, ellipsis) : identityLine;
|
|
250
251
|
const lines = [
|
|
251
252
|
firstLine,
|
|
252
253
|
align(usage, model, width, ellipsis),
|
|
253
|
-
alignRightReserved(
|
|
254
|
+
alignRightReserved(externalStatuses.join(" "), runtime, width, ellipsis),
|
|
254
255
|
];
|
|
255
|
-
if (externalStatuses.length) lines.push(externalStatuses.join(" "));
|
|
256
256
|
return lines.map((line) => truncateToWidth(line, width, ellipsis));
|
|
257
257
|
},
|
|
258
258
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-footer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "Show concise repository, branch, and usage details in the Pi footer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"files": [
|
|
17
|
+
"LICENSE",
|
|
17
18
|
"extensions",
|
|
18
|
-
"README.md"
|
|
19
|
-
"LICENSE"
|
|
19
|
+
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "node --test test/*.test.ts",
|