@hank-warren/pi-stats 0.3.2 → 0.3.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/index.ts +3 -2
  3. package/package.json +3 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,24 @@
1
+ # @hank-warren/pi-stats
2
+
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - cf12677: ship CHANGELOG.md in the published tarball
8
+ - 596888b: keep extension sidecar usage when the current session is not yet on disk
9
+
10
+ ## 0.3.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 187e12c: Roll usage-free placeholder models into `Tools/summaries` and let the activity heatmap use the full terminal width.
15
+
16
+ Pi records placeholder assistant turns whose model is the literal `<synthetic>` (a missing model normalizes to `unknown`). With no tokens and no cost they produced their own empty model row; they are now attributed to the existing unattributed bucket, while a placeholder that did record spend keeps its own row.
17
+
18
+ The heatmap previously shrank to the recorded history, leaving most of a wide terminal blank. It now claims the available width up to a full year, drawing weeks before the first recorded session as empty cells that fill in over time.
19
+
20
+ ## 0.3.1
21
+
22
+ ### Patch Changes
23
+
24
+ - 67abcf5: expand the readme with try-it install, a configuration table, and troubleshooting
package/index.ts CHANGED
@@ -4,7 +4,8 @@ import { buildSnapshot, makeIndex, usageFromEntries } from "./stats.ts";
4
4
  import type { SessionRecord, StatsIndex, StatsRange } from "./types.ts";
5
5
  import { StatsWidget } from "./widget.ts";
6
6
 
7
- function includeInMemorySession(index: StatsIndex, ctx: ExtensionCommandContext): StatsIndex {
7
+ /** Exported for tests: the rebuild must keep sidecar usage, which no session record carries. */
8
+ export function includeInMemorySession(index: StatsIndex, ctx: ExtensionCommandContext): StatsIndex {
8
9
  const sessionId = ctx.sessionManager.getSessionId();
9
10
  if (index.sessions.some((session) => session.sessionId === sessionId)) return index;
10
11
  const entries = ctx.sessionManager.getEntries();
@@ -25,7 +26,7 @@ function includeInMemorySession(index: StatsIndex, ctx: ExtensionCommandContext)
25
26
  source: "main",
26
27
  usage,
27
28
  };
28
- return makeIndex([...index.sessions, session], index.diagnostics);
29
+ return makeIndex([...index.sessions, session], index.diagnostics, index.usage.filter((record) => record.kind === "sidecar"));
29
30
  }
30
31
 
31
32
  export default function statsExtension(pi: ExtensionAPI): void {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hank-warren/pi-stats",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "A compact /stats dashboard for all-time Pi token usage, including persisted subagents.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -37,7 +37,8 @@
37
37
  "types.ts",
38
38
  "widget.ts",
39
39
  "README.md",
40
- "LICENSE"
40
+ "LICENSE",
41
+ "CHANGELOG.md"
41
42
  ],
42
43
  "peerDependencies": {
43
44
  "@earendil-works/pi-coding-agent": "*",