@plannotator/pi-extension 0.17.2 → 0.17.4

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
@@ -979,8 +979,15 @@ Execute each step in order. After completing a step, include [DONE:n] in your re
979
979
  }
980
980
 
981
981
  if (phase === "idle") {
982
- await restoreSavedState(ctx);
983
- savedState = null;
982
+ if (savedState) {
983
+ await restoreSavedState(ctx);
984
+ savedState = null;
985
+ } else {
986
+ // Strip planning-only tools on fresh sessions where savedState is null.
987
+ // Without this, plannotator_submit_plan stays in the active tool set
988
+ // even though plan mode hasn't been activated. See #387.
989
+ pi.setActiveTools(stripPlanningOnlyTools(pi.getActiveTools()));
990
+ }
984
991
  } else if (phase === "planning" || phase === "executing") {
985
992
  await applyPhaseConfig(ctx, { restoreSavedState: true });
986
993
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plannotator/pi-extension",
3
- "version": "0.17.2",
3
+ "version": "0.17.4",
4
4
  "type": "module",
5
5
  "description": "Plannotator extension for Pi coding agent - interactive plan review with visual annotation",
6
6
  "author": "backnotprop",