@henryqw/pi-footer 2.1.2 → 2.1.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 +5 -5
- package/extensions/footer.ts +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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.
|
|
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
|
|
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
|
+
- 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 end, so request latency and time to first token are excluded for every provider. A response that arrives without streamed content 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.
|
|
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; 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.
|
|
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
|
@@ -304,9 +304,10 @@ export default function footerExtension(pi: ExtensionAPI): void {
|
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
let tps: number | undefined;
|
|
307
|
+
// Start at the first streamed update: providers emit message_start at different points before the first token.
|
|
307
308
|
let assistantStartedAt: number | undefined;
|
|
308
|
-
pi.on("
|
|
309
|
-
if (event.message.role === "assistant") assistantStartedAt
|
|
309
|
+
pi.on("message_update", async (event) => {
|
|
310
|
+
if (event.message.role === "assistant") assistantStartedAt ??= performance.now();
|
|
310
311
|
});
|
|
311
312
|
pi.on("message_end", async (event) => {
|
|
312
313
|
if (event.message.role !== "assistant") return;
|