@plannotator/pi-extension 0.19.8 → 0.19.10

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.
package/index.ts CHANGED
@@ -212,6 +212,7 @@ export default function plannotator(pi: ExtensionAPI): void {
212
212
  let checklistItems: ChecklistItem[] = [];
213
213
  let savedState: SavedPhaseState | null = null;
214
214
  let plannotatorConfig = {};
215
+ let justApprovedPlan = false;
215
216
 
216
217
  pi.on("session_start", (_event, ctx) => {
217
218
  currentPiSession.update(ctx);
@@ -349,7 +350,7 @@ export default function plannotator(pi: ExtensionAPI): void {
349
350
  await applyPhaseConfig(ctx, { restoreSavedState: false });
350
351
  persistState();
351
352
  ctx.ui.notify(
352
- "Plannotator: planning mode enabled. Write a markdown plan, then submit it for review.",
353
+ "Plannotator: planning mode enabled.",
353
354
  );
354
355
  const warning = getPlanReviewAvailabilityWarning({ hasUI: ctx.hasUI, hasPlanHtml: hasPlanBrowserHtml() });
355
356
  if (warning) {
@@ -853,6 +854,7 @@ export default function plannotator(pi: ExtensionAPI): void {
853
854
  await applyPhaseConfig(ctx, { restoreSavedState: true });
854
855
  pi.appendEntry("plannotator-execute", { lastSubmittedPath });
855
856
  persistState();
857
+ justApprovedPlan = true;
856
858
  return {
857
859
  content: [
858
860
  {
@@ -861,6 +863,7 @@ export default function plannotator(pi: ExtensionAPI): void {
861
863
  },
862
864
  ],
863
865
  details: { approved: true },
866
+ terminate: true,
864
867
  };
865
868
  }
866
869
 
@@ -881,6 +884,7 @@ export default function plannotator(pi: ExtensionAPI): void {
881
884
  await applyPhaseConfig(ctx, { restoreSavedState: true });
882
885
  pi.appendEntry("plannotator-execute", { lastSubmittedPath });
883
886
  persistState();
887
+ justApprovedPlan = true;
884
888
 
885
889
  const doneMsg =
886
890
  checklistItems.length > 0
@@ -900,6 +904,7 @@ export default function plannotator(pi: ExtensionAPI): void {
900
904
  },
901
905
  ],
902
906
  details: { approved: true, feedback: result.feedback },
907
+ terminate: true,
903
908
  };
904
909
  }
905
910
 
@@ -914,6 +919,7 @@ export default function plannotator(pi: ExtensionAPI): void {
914
919
  },
915
920
  ],
916
921
  details: { approved: true },
922
+ terminate: true,
917
923
  };
918
924
  }
919
925
 
@@ -1131,6 +1137,14 @@ Execute each step in order. After completing a step, include [DONE:n] in your re
1131
1137
 
1132
1138
  // Detect execution completion
1133
1139
  pi.on("agent_end", async (_event, ctx) => {
1140
+ if (phase === "executing" && justApprovedPlan) {
1141
+ justApprovedPlan = false;
1142
+ setTimeout(() => {
1143
+ pi.sendUserMessage("Continue with the approved plan.");
1144
+ }, 0);
1145
+ return;
1146
+ }
1147
+
1134
1148
  if (phase !== "executing" || checklistItems.length === 0) return;
1135
1149
 
1136
1150
  if (checklistItems.every((t) => t.completed)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plannotator/pi-extension",
3
- "version": "0.19.8",
3
+ "version": "0.19.10",
4
4
  "type": "module",
5
5
  "description": "Plannotator Pi extension - interactive plan review with annotations, annotate agent messages, and review code/PRs",
6
6
  "author": "backnotprop",