@henryqw/pi-footer 2.2.0 → 2.2.2
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 +3 -3
- package/extensions/footer.ts +8 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ pi-harness · clear-field-f8d2 [+2 ~3 ?1 ↑2] · PR #123 · approved Codex #
|
|
|
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
|
-
- 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
|
|
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
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:
|
|
@@ -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/extensions/footer.ts
CHANGED
|
@@ -310,16 +310,20 @@ export default function footerExtension(pi: ExtensionAPI): void {
|
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
let tps: number | undefined;
|
|
313
|
-
//
|
|
313
|
+
// Measure first to last streamed update: providers emit message_start before the first token,
|
|
314
|
+
// and some (Claude bridge) emit message_end only after post-stream teardown.
|
|
314
315
|
let assistantStartedAt: number | undefined;
|
|
316
|
+
let assistantLastUpdateAt: number | undefined;
|
|
315
317
|
pi.on("message_update", async (event) => {
|
|
316
|
-
if (event.message.role
|
|
318
|
+
if (event.message.role !== "assistant") return;
|
|
319
|
+
assistantLastUpdateAt = performance.now();
|
|
320
|
+
assistantStartedAt ??= assistantLastUpdateAt;
|
|
317
321
|
});
|
|
318
322
|
pi.on("message_end", async (event) => {
|
|
319
323
|
if (event.message.role !== "assistant") return;
|
|
320
324
|
const output = event.message.usage?.output ?? 0;
|
|
321
|
-
const seconds = assistantStartedAt === undefined ? 0 : (
|
|
322
|
-
assistantStartedAt = undefined;
|
|
325
|
+
const seconds = assistantStartedAt === undefined ? 0 : (assistantLastUpdateAt! - assistantStartedAt) / 1000;
|
|
326
|
+
assistantStartedAt = assistantLastUpdateAt = undefined;
|
|
323
327
|
tps = seconds > 0 ? output / seconds : undefined;
|
|
324
328
|
});
|
|
325
329
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henryqw/pi-footer",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Show concise repository, branch, and usage details in the Pi footer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"pack:check": "npm pack --dry-run"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@earendil-works/pi-coding-agent": ">=0.86.0 <0.100.0",
|
|
28
|
-
"@earendil-works/pi-tui": ">=0.86.0 <0.100.0"
|
|
27
|
+
"@earendil-works/pi-coding-agent": ">=0.86.0 <0.100.0 || ^1.0.0",
|
|
28
|
+
"@earendil-works/pi-tui": ">=0.86.0 <0.100.0 || ^1.0.0"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@henryqw/pi-open-in": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
52
|
-
"@earendil-works/pi-tui": "0.
|
|
51
|
+
"@earendil-works/pi-coding-agent": "1.0.0",
|
|
52
|
+
"@earendil-works/pi-tui": "1.0.0"
|
|
53
53
|
}
|
|
54
54
|
}
|