@ravshansbox/pi-quota 0.10.0 → 0.10.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/index.ts +2 -0
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -312,6 +312,7 @@ export default function (pi: ExtensionAPI) {
312
312
  }
313
313
 
314
314
  function updateState(parsed: QuotaState) {
315
+ if (!ctxRef) return;
315
316
  if (parsed.provider === 'anthropic') scheduleAnthropicPing(parsed);
316
317
  const existing = states.find((s) => s.provider === parsed.provider);
317
318
  if (!existing) {
@@ -666,5 +667,6 @@ export default function (pi: ExtensionAPI) {
666
667
 
667
668
  pi.on('session_shutdown', () => {
668
669
  stopTimers();
670
+ ctxRef = null;
669
671
  });
670
672
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ravshansbox/pi-quota",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Anthropic and OpenAI Codex quota status extension for pi",
5
5
  "license": "MIT",
6
6
  "type": "module",