pi-status-footer 1.1.0 → 1.1.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/stats-footer.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-status-footer",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Compact two-line status footer for pi: model, thinking level, tokens, cost, TPS, cache hit rate, context usage, live git diff, and working/turn timers.",
5
5
  "keywords": [
6
6
  "pi-package",
package/stats-footer.ts CHANGED
@@ -129,6 +129,16 @@ export function collectSessionStats(entries: readonly SessionEntry[]): {
129
129
  }
130
130
  if (entry.type === "branch_summary" || entry.type === "compaction") {
131
131
  addUsage(usage, entry.usage);
132
+ continue;
133
+ }
134
+ // Model work outside the conversation — today only cache warming
135
+ // (`kind: "cache_warm"`) — is recorded *only* as a usage entry: no
136
+ // assistant message, no tool result. Pi counts these in session
137
+ // totals (docs/session-format.md), so skipping them would under-report
138
+ // cost, tokens and the cache-hit rate against `/session`. Unknown
139
+ // kinds are counted like any other usage, per the same doc.
140
+ if (entry.type === "usage") {
141
+ addUsage(usage, entry.usage);
132
142
  }
133
143
  }
134
144