@henryqw/pi-footer 2.2.1 → 2.2.3
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 +6 -6
- package/example.png +0 -0
- package/extensions/footer.ts +4 -16
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ pi install npm:@henryqw/pi-footer
|
|
|
14
14
|
|
|
15
15
|
| Package | Relationship | Purpose |
|
|
16
16
|
| --- | --- | --- |
|
|
17
|
-
| [`@henryqw/pi-codegraph`](https://pi.henry.wang/extensions/pi-codegraph) | Improves | Shows CodeGraph
|
|
17
|
+
| [`@henryqw/pi-codegraph`](https://pi.henry.wang/extensions/pi-codegraph) | Improves | Shows quiet CodeGraph setup progress and direct tool activity when loaded. |
|
|
18
18
|
| [`@henryqw/pi-multi-codex`](https://pi.henry.wang/extensions/pi-multi-codex) | Improves | Adds active Codex subscription quota and reset status. |
|
|
19
19
|
| [`@henryqw/pi-open-in`](https://pi.henry.wang/extensions/pi-open-in) | Improves | Adds `/open` and `/set-open-in` commands for editor configuration. |
|
|
20
20
|
| [`@henryqw/pi-pr`](https://pi.henry.wang/extensions/pi-pr) | Improves | Adds current-branch pull-request status. |
|
|
@@ -26,12 +26,12 @@ After installing, start a Pi TUI session to see checkout, usage, model, thinking
|
|
|
26
26
|
```text
|
|
27
27
|
pi-harness · clear-field-f8d2 [+2 ~3 ?1 ↑2] · PR #123 · approved Codex #1 · 50% · 7d 1d 1h 22m
|
|
28
28
|
↑ 12.4k · ↓ 2.1k · ↺ 84.3% · ⚡ 87.4 t/s · $ 0.127 · ◔ 36.8% gpt-5.6-luna • high
|
|
29
|
-
|
|
29
|
+
⠋ codegraph · indexing 8s · ● 🐴 ponytail: ⚡ FULL ◷ 12m 34s
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
- The first line shows the repository, branch, Git state, and `pi-pr` pull request status beside the checkout identity. The `pi-multi-codex` quota status, when non-empty, occupies the right side. Linked-worktree branches drop the generated `worktree/` prefix.
|
|
33
33
|
- The second line shows cumulative input tokens, output tokens, latest cache-hit rate, and tokens per second for the most recent assistant response. The rate is timed from the response's first streamed content to its last, so request latency, time to first token, and provider work after the stream ends (such as Claude bridge shutting down Claude Code) are excluded. A response that arrives without streamed content, or all at once, shows `—`. It also shows estimated cost and context usage. Totals include reported tool usage and finished `pi-subagent` background workflows. The active model and thinking level are right-aligned. Under a virtual model, the physical model and thinking level of the latest successful response follow an arrow, for example `auto • high → gpt-5.6-luna • medium`, matching Pi's built-in footer.
|
|
34
|
-
- The third line
|
|
34
|
+
- The third line preserves CodeGraph's dim setup spinner and elapsed time first, followed by other extension statuses such as `⠋ deps · installing 12s`. Preparation statuses disappear when work completes; there is no idle CodeGraph index badge. Persistent CodeGraph failures retain their theme-colored `!` icon and meaningful text. During direct `codegraph_explore` calls, `● CG` temporarily replaces the CodeGraph status. A middle dot separates statuses; cumulative agent-work time stays on the right, beneath the active model.
|
|
35
35
|
|
|
36
36
|
Git badges appear only when action is needed:
|
|
37
37
|
|
|
@@ -56,7 +56,7 @@ Unavailable values render as `—` without a misleading percent sign.
|
|
|
56
56
|
|
|
57
57
|
`ultra` renders as a rainbow when the active Pi runtime supplies that thinking level. Unsupported levels never appear.
|
|
58
58
|
|
|
59
|
-
Only the non-empty `pi-multi-codex` quota status occupies the right side of the first line. The `pi-pr` pull-request status stays beside checkout identity, and CodeGraph appears separately on the third line.
|
|
59
|
+
Only the non-empty `pi-multi-codex` quota status occupies the right side of the first line. The `pi-pr` pull-request status stays beside checkout identity, and active CodeGraph setup or tool activity appears separately on the third line.
|
|
60
60
|
|
|
61
61
|
Statuses from other extensions, including Ponytail and `pi-rewind`, share the left side of the third line. They are sorted by key; colors, links, glyphs, and interior spacing are preserved. Leading and trailing whitespace is trimmed, line breaks become spaces, and long statuses may be clipped to fit the footer. Only direct `codegraph_explore` tool calls trigger the `● CG` badge; CodeGraph queries made from inside scripted tools are not shown.
|
|
62
62
|
|
|
@@ -64,7 +64,7 @@ Statuses from other extensions, including Ponytail and `pi-rewind`, share the le
|
|
|
64
64
|
|
|
65
65
|
When the configured executable is `code` and Pi reports hyperlink support, the accent-colored checkout name links to the current path. The link opens a new window for `code -n` or `code --new-window`. A missing config silently uses `code`. Other executables and terminals with hyperlinks disabled render plain text.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Pi handles the custom URI in its fullscreen TUI, which is the default since Pi 1.0. Then use normal primary click. On older supported Pi versions (before 1.0), enable it:
|
|
68
68
|
|
|
69
69
|
```json
|
|
70
70
|
{
|
|
@@ -72,6 +72,6 @@ Use Pi fullscreen TUI so Pi handles the custom URI:
|
|
|
72
72
|
}
|
|
73
73
|
```
|
|
74
74
|
|
|
75
|
-
Set this through `/settings`, or launch with `--tui-mode fullscreen`.
|
|
75
|
+
Set this through `/settings`, or launch with `--tui-mode fullscreen`. Regular TUI (`"tuiMode": "regular"` or `--tui-mode regular`) delegates OSC 8 activation to the terminal, so the link works only where the terminal opens custom URI schemes.
|
|
76
76
|
|
|
77
77
|
Ghostty uses `Cmd+click` but may not open custom URI schemes.
|
package/example.png
ADDED
|
Binary file
|
package/extensions/footer.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import { basename, dirname, join } from "node:path";
|
|
3
|
-
import type { ExtensionAPI, ExtensionContext
|
|
3
|
+
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
import { getCapabilities, hyperlink, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
|
|
5
5
|
import { configuredOpenUri } from "@henryqw/pi-open-in/open-uri";
|
|
6
6
|
|
|
@@ -180,19 +180,6 @@ function latestResponse(ctx: ExtensionContext): { model: string; thinkingLevel?:
|
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
function codegraphBadge(status: string, inUse: boolean, theme: Theme): string {
|
|
184
|
-
if (inUse) return `${theme.fg("accent", "●")} CG`;
|
|
185
|
-
switch (status) {
|
|
186
|
-
case "pi-codegraph: indexed": return `${theme.fg("success", "✓")} CG`;
|
|
187
|
-
case "pi-codegraph: missing": return `${theme.fg("dim", "○")} CG`;
|
|
188
|
-
case "pi-codegraph: checking index…":
|
|
189
|
-
case "pi-codegraph: indexing…": return `${theme.fg("warning", "◐")} CG`;
|
|
190
|
-
case "pi-codegraph: prerequisites missing":
|
|
191
|
-
case "pi-codegraph: setup failed": return `${theme.fg("error", "!")} CG`;
|
|
192
|
-
default: return `${theme.fg("warning", "?")} CG`;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
183
|
export default function footerExtension(pi: ExtensionAPI): void {
|
|
197
184
|
let activeMilliseconds = 0;
|
|
198
185
|
let activeStartedAt: number | undefined;
|
|
@@ -390,8 +377,9 @@ export default function footerExtension(pi: ExtensionAPI): void {
|
|
|
390
377
|
const openUri = configuredOpenUri(ctx.cwd);
|
|
391
378
|
const extensionStatuses = data.getExtensionStatuses();
|
|
392
379
|
const prStatus = sanitizeStatus(extensionStatuses.get("pi-pr") ?? "");
|
|
393
|
-
const
|
|
394
|
-
|
|
380
|
+
const codegraph = activeCodegraphCalls.size > 0
|
|
381
|
+
? `${theme.fg("accent", "●")} CG`
|
|
382
|
+
: sanitizeStatus(extensionStatuses.get("pi-codegraph") ?? "");
|
|
395
383
|
const henryStatuses: string[] = [];
|
|
396
384
|
const externalStatuses: string[] = [];
|
|
397
385
|
for (const [key, value] of [...extensionStatuses].sort(([a], [b]) => a.localeCompare(b))) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-footer",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Show concise repository, branch, and usage details in the Pi footer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"LICENSE",
|
|
18
18
|
"extensions",
|
|
19
|
-
"README.md"
|
|
19
|
+
"README.md",
|
|
20
|
+
"example.png"
|
|
20
21
|
],
|
|
21
22
|
"scripts": {
|
|
22
23
|
"test": "node --test test/*.test.ts",
|
|
@@ -24,8 +25,8 @@
|
|
|
24
25
|
"pack:check": "npm pack --dry-run"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
|
-
"@earendil-works/pi-coding-agent": ">=0.86.0 <0.100.0",
|
|
28
|
-
"@earendil-works/pi-tui": ">=0.86.0 <0.100.0"
|
|
28
|
+
"@earendil-works/pi-coding-agent": ">=0.86.0 <0.100.0 || ^1.0.0",
|
|
29
|
+
"@earendil-works/pi-tui": ">=0.86.0 <0.100.0 || ^1.0.0"
|
|
29
30
|
},
|
|
30
31
|
"repository": {
|
|
31
32
|
"type": "git",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"@henryqw/pi-open-in": "^3.0.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
52
|
-
"@earendil-works/pi-tui": "0.
|
|
52
|
+
"@earendil-works/pi-coding-agent": "1.0.0",
|
|
53
|
+
"@earendil-works/pi-tui": "1.0.0"
|
|
53
54
|
}
|
|
54
55
|
}
|