@henryqw/pi-footer 2.2.2 → 2.2.4
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 +4 -4
- package/example.png +0 -0
- package/extensions/footer.ts +4 -16
- package/package.json +3 -2
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 index and direct tool activity when loaded. |
|
|
17
|
+
| [`@henryqw/pi-codegraph`](https://pi.henry.wang/extensions/pi-codegraph) | Improves | Shows CodeGraph index status, quiet 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
|
-
✓ CG · ● 🐴 ponytail: ⚡ FULL
|
|
29
|
+
✓ CG · ● 🐴 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 shows
|
|
34
|
+
- The third line shows CodeGraph's icon and `CG` first: `✓ CG` when indexed, `○ CG` when a Git repository has no index, or a dim spinner and elapsed time such as `⠋ CG · indexing 8s` during setup. Non-Git directories show no index badge. Other extension statuses follow, such as `⠋ deps · installing 12s`; dependency preparation statuses disappear when work completes. Persistent CodeGraph failures retain their theme-colored `!` icon and meaningful text. During direct `codegraph_explore` calls, `● CG` temporarily replaces the CodeGraph status, which returns when the call finishes. 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 CodeGraph index status, setup progress, 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
|
|
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.4",
|
|
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",
|