pi-zentui 0.18.0 → 0.18.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.
@@ -186,6 +186,7 @@ export default function (pi: ExtensionAPI) {
186
186
  let sessionTimerRequirements = "";
187
187
  let lastDurationLabel = "";
188
188
  let lastProjectCwd: string | undefined;
189
+ let requestedProjectCwd: string | undefined;
189
190
  let agentStartedAt: number | undefined;
190
191
  let agentDurationMs: number | undefined;
191
192
  let minimalistProjectRoot: string | undefined;
@@ -291,7 +292,13 @@ export default function (pi: ExtensionAPI) {
291
292
  ? readPackageVersionResult(cwd)
292
293
  : Promise.resolve({ kind: "ok" as const, result: null }),
293
294
  ]);
294
- if (!run.isCurrent() || !sessionLifecycle.isCurrent(generation)) return;
295
+ if (
296
+ !run.isCurrent() ||
297
+ !sessionLifecycle.isCurrent(generation) ||
298
+ requestedProjectCwd !== cwd
299
+ ) {
300
+ return;
301
+ }
295
302
  minimalistProjectRoot = git.kind === "ok" ? findRepositoryRoot(cwd) : undefined;
296
303
  lastProjectCwd = applyProjectRefreshToState(state, {
297
304
  cwd,
@@ -310,6 +317,7 @@ export default function (pi: ExtensionAPI) {
310
317
  const generation = sessionLifecycle.currentGeneration();
311
318
  if (!sessionLifecycle.isCurrent(generation)) return;
312
319
  const cwd = ctx.cwd;
320
+ requestedProjectCwd = cwd;
313
321
  projectRefreshScheduler.schedule({ cwd, generation }, options);
314
322
  };
315
323
 
@@ -1051,6 +1059,7 @@ export default function (pi: ExtensionAPI) {
1051
1059
  invalidateUsageTotalsCache();
1052
1060
  resetAgentTimer();
1053
1061
  lastProjectCwd = undefined;
1062
+ requestedProjectCwd = undefined;
1054
1063
  minimalistProjectRoot = undefined;
1055
1064
  installUi(ctx);
1056
1065
  scheduleEditorReconciliation(ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-zentui",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "A Starship-inspired statusline and Opencode-style TUI for Pi.",
5
5
  "type": "module",
6
6
  "license": "MIT",