@henryqw/pi-prompt-creator 1.1.0 → 1.1.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.
@@ -278,7 +278,6 @@ export default function promptCreatorExtension(pi: ExtensionAPI, options: Prompt
278
278
  let configWarned = false;
279
279
  let inputCount = 0;
280
280
  let branchGeneration = 0;
281
- let closed = false;
282
281
  let candidate: PromptCandidate | undefined;
283
282
  let candidateNameHint: string | undefined;
284
283
  let reviewBoundary: ReviewBoundary | undefined;
@@ -294,7 +293,7 @@ export default function promptCreatorExtension(pi: ExtensionAPI, options: Prompt
294
293
  if (ctx.mode === "tui") ctx.ui.setWidget(WIDGET_KEY, [FAILURE_WIDGET]);
295
294
  };
296
295
  const isCurrent = (run: ActiveRun) =>
297
- !closed && activeRun === run && branchGeneration === run.branchGeneration && !run.controller.signal.aborted;
296
+ activeRun === run && branchGeneration === run.branchGeneration && !run.controller.signal.aborted;
298
297
  const resetBranch = (ctx: ExtensionContext) => {
299
298
  branchGeneration += 1;
300
299
  inputCount = 0;
@@ -410,7 +409,6 @@ export default function promptCreatorExtension(pi: ExtensionAPI, options: Prompt
410
409
  };
411
410
 
412
411
  pi.on("session_start", (_event, ctx) => {
413
- closed = false;
414
412
  activeRun?.controller.abort(new Error("Prompt Creator session changed."));
415
413
  activeRun = undefined;
416
414
  resetBranch(ctx);
@@ -454,14 +452,7 @@ export default function promptCreatorExtension(pi: ExtensionAPI, options: Prompt
454
452
 
455
453
  pi.on("session_tree", (_event, ctx) => resetBranch(ctx));
456
454
  pi.on("session_shutdown", (_event, ctx) => {
457
- closed = true;
458
- branchGeneration += 1;
459
- candidate = undefined;
460
- candidateNameHint = undefined;
461
- reviewBoundary = undefined;
462
- failure = false;
463
- inputCount = 0;
464
- clearWidget(ctx);
455
+ resetBranch(ctx);
465
456
  activeRun?.controller.abort(new Error("Prompt Creator shut down."));
466
457
  activeRun = undefined;
467
458
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-prompt-creator",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Turn current Pi conversation signals into user-approved prompt templates.",
5
5
  "keywords": [
6
6
  "pi-package",