@bacnh85/pi-sub 0.1.17 → 0.1.20

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.
@@ -785,6 +785,11 @@ export default function (pi: ExtensionAPI) {
785
785
 
786
786
  pi.on("session_shutdown", async (_event, ctx) => {
787
787
  stopTimer(state);
788
+ // ponytail: session is being torn down (new/fork/switch/reload). Pi invalidates
789
+ // this ctx next; no-op any in-flight fetch .then that captured it, and drop the
790
+ // stale promise so the next session fetches fresh instead of returning it.
791
+ state.inFlight = undefined;
792
+ state.refreshGeneration++;
788
793
  ctx.ui.setStatus(STATUS_KEY, undefined);
789
794
  });
790
795
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bacnh85/pi-sub",
3
- "version": "0.1.17",
3
+ "version": "0.1.20",
4
4
  "description": "Pi extension showing subscription usage for supported model providers.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,6 +38,6 @@
38
38
  "node": ">=20.3.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "@earendil-works/pi-coding-agent": ">=0.80.8 <0.82.0"
41
+ "@earendil-works/pi-coding-agent": ">=0.80.8 <0.83.0"
42
42
  }
43
43
  }