@henryqw/pi-footer 2.1.3 → 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 +1 -1
- package/extensions/footer.ts +3 -2
- package/package.json +1 -1
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. 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.
|
|
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
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:
|
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;
|