@monotykamary/pi-better-grok 0.3.7 → 0.3.8

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 +4 -2
  2. package/package.json +5 -5
package/index.ts CHANGED
@@ -792,8 +792,9 @@ export default function betterGrok(pi: ExtensionAPI): void {
792
792
  if (restored) await pi.setModel(restored);
793
793
  };
794
794
 
795
- pi.on("session_start", (_event, ctx) => {
796
- void ensureGrok47(ctx);
795
+ pi.on("session_start", async (_event, ctx) => {
796
+ // Pi must own this work: detached refreshes can outlive a disposed context.
797
+ await ensureGrok47(ctx);
797
798
  invalidateContextUsage();
798
799
  invalidateSessionName();
799
800
  multiproviderRefreshCtx = ctx;
@@ -865,6 +866,7 @@ export default function betterGrok(pi: ExtensionAPI): void {
865
866
  });
866
867
 
867
868
  pi.on("session_shutdown", () => {
869
+ multiproviderRefreshCtx = undefined;
868
870
  invalidateContextUsage();
869
871
  invalidateSessionName();
870
872
  usageController.shutdown();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monotykamary/pi-better-grok",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Improve Grok/xAI in pi with fast mode, subscription usage stats, banked reset redemption, multiprovider pools, footer polish, and settings — mirroring pi-better-openai.",
5
5
  "keywords": [
6
6
  "footer",
@@ -47,8 +47,8 @@
47
47
  "test:pi": "node scripts/test-pi-compat.mjs"
48
48
  },
49
49
  "devDependencies": {
50
- "@earendil-works/pi-coding-agent": "0.99.0",
51
- "@earendil-works/pi-tui": "0.99.0",
50
+ "@earendil-works/pi-coding-agent": "1.0.0",
51
+ "@earendil-works/pi-tui": "1.0.0",
52
52
  "@types/node": "~22.19.0",
53
53
  "oxfmt": "^0.47.0",
54
54
  "oxlint": "^1.62.0",
@@ -60,8 +60,8 @@
60
60
  "@earendil-works/pi-tui": "*"
61
61
  },
62
62
  "overrides": {
63
- "@earendil-works/pi-agent-core": "0.99.0",
64
- "@earendil-works/pi-ai": "0.99.0",
63
+ "@earendil-works/pi-agent-core": "1.0.0",
64
+ "@earendil-works/pi-ai": "1.0.0",
65
65
  "brace-expansion": "5.0.9",
66
66
  "nanoid": "3.3.18",
67
67
  "postcss": "8.5.25",