@henryqw/pi-footer 2.1.1 → 2.1.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 +5 -5
- package/extensions/footer.ts +8 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,10 +14,10 @@ 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
18
|
| [`@henryqw/pi-multi-codex`](https://pi.henry.wang/extensions/pi-multi-codex) | Improves | Adds active Codex subscription quota and reset status. |
|
|
18
19
|
| [`@henryqw/pi-open-in`](https://pi.henry.wang/extensions/pi-open-in) | Improves | Adds `/open` and `/set-open-in` commands for editor configuration. |
|
|
19
20
|
| [`@henryqw/pi-pr`](https://pi.henry.wang/extensions/pi-pr) | Improves | Adds current-branch pull-request status. |
|
|
20
|
-
| [`@henryqw/pi-codegraph`](https://pi.henry.wang/extensions/pi-codegraph) | Improves | Shows CodeGraph index and direct tool activity when loaded. |
|
|
21
21
|
|
|
22
22
|
## Use
|
|
23
23
|
|
|
@@ -29,9 +29,9 @@ pi-harness · clear-field-f8d2 [+2 ~3 ?1 ↑2] · PR #123 · approved Codex #
|
|
|
29
29
|
✓ CG · ● 🐴 ponytail: ⚡ FULL ◷ 12m 34s
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
- The first line shows the repository, branch, Git state, and `pi-pr` pull request status. Linked-worktree branches drop the generated `worktree/` prefix.
|
|
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. 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.
|
|
34
|
-
- The third line shows a compact CodeGraph badge first when loaded: `✓ CG` indexed, `● CG` in use, `◐ CG` checking or indexing, `○ CG` missing, `! CG` setup problem, or `? CG` unknown state. Its icon uses the active theme's state color; `CG` remains plain so the badge is readable without color. When pi-codegraph is not loaded, no badge appears. A middle dot separates
|
|
34
|
+
- The third line shows a compact CodeGraph badge first when loaded: `✓ CG` indexed, `● CG` in use, `◐ CG` checking or indexing, `○ CG` missing, `! CG` setup problem, or `? CG` unknown state. Its icon uses the active theme's state color; `CG` remains plain so the badge is readable without color. When pi-codegraph is not loaded, no badge appears. A middle dot separates the CodeGraph badge from other extension 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,9 +56,9 @@ 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
|
-
|
|
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.
|
|
60
60
|
|
|
61
|
-
Statuses from other extensions, including Ponytail and `pi-rewind`, share the left side. They are sorted by key
|
|
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. Scripted `mcpScript` calls are not visible as individual tool calls, so they do not trigger the `● CG` badge.
|
|
62
62
|
|
|
63
63
|
## Limits and recovery
|
|
64
64
|
|
package/extensions/footer.ts
CHANGED
|
@@ -379,17 +379,14 @@ export default function footerExtension(pi: ExtensionAPI): void {
|
|
|
379
379
|
const prStatus = sanitizeStatus(extensionStatuses.get("pi-pr") ?? "");
|
|
380
380
|
const codegraphStatus = extensionStatuses.get("pi-codegraph");
|
|
381
381
|
const codegraph = codegraphStatus === undefined ? "" : codegraphBadge(codegraphStatus, activeCodegraphCalls.size > 0, theme);
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
const externalStatuses = statuses
|
|
391
|
-
.filter(([key]) => key !== HENRY_STATUS_KEY)
|
|
392
|
-
.map(([, text]) => text);
|
|
382
|
+
const henryStatuses: string[] = [];
|
|
383
|
+
const externalStatuses: string[] = [];
|
|
384
|
+
for (const [key, value] of [...extensionStatuses].sort(([a], [b]) => a.localeCompare(b))) {
|
|
385
|
+
if (key === "pi-pr" || key === "pi-codegraph") continue;
|
|
386
|
+
const text = sanitizeStatus(value);
|
|
387
|
+
if (!text) continue;
|
|
388
|
+
(key === HENRY_STATUS_KEY ? henryStatuses : externalStatuses).push(text);
|
|
389
|
+
}
|
|
393
390
|
const thinking = String(ctx.thinkingLevel ?? "off");
|
|
394
391
|
const thinkingColor = THINKING_COLORS[thinking as keyof typeof THINKING_COLORS];
|
|
395
392
|
const ellipsis = theme.fg("dim", "…");
|