pi-lens 2.0.6 → 2.0.7
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 +9 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -617,10 +617,18 @@ export default function (pi: ExtensionAPI) {
|
|
|
617
617
|
|
|
618
618
|
ctx.ui.notify("🔧 Running booboo fix loop...", "info");
|
|
619
619
|
|
|
620
|
+
const MAX_ITERATIONS = 3;
|
|
621
|
+
|
|
620
622
|
// Load session state
|
|
621
623
|
let session: { iteration: number; counts: Record<string, number> } = { iteration: 0, counts: {} };
|
|
622
624
|
try { if (fs.existsSync(sessionFile)) session = JSON.parse(fs.readFileSync(sessionFile, "utf-8")); } catch (e) { dbg(`fix-session load failed: ${e}`); }
|
|
623
625
|
session.iteration++;
|
|
626
|
+
|
|
627
|
+
// Hard stop at max iterations
|
|
628
|
+
if (session.iteration > MAX_ITERATIONS) {
|
|
629
|
+
ctx.ui.notify(`⛔ Max iterations (${MAX_ITERATIONS}) reached. Run /lens-booboo for full remaining report, or delete .pi-lens/fix-session.json to reset.`, "warning");
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
624
632
|
const prevCounts = { ...session.counts };
|
|
625
633
|
|
|
626
634
|
// --- Step 1: Auto-fix with Biome ---
|
|
@@ -765,7 +773,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
765
773
|
|
|
766
774
|
// --- Build the fix plan message ---
|
|
767
775
|
const lines: string[] = [];
|
|
768
|
-
lines.push(`📋 BOOBOO FIX PLAN — Iteration ${session.iteration} (${totalFixable} fixable items remaining)`);
|
|
776
|
+
lines.push(`📋 BOOBOO FIX PLAN — Iteration ${session.iteration}/${MAX_ITERATIONS} (${totalFixable} fixable items remaining)`);
|
|
769
777
|
if (deltaLine) lines.push(deltaLine);
|
|
770
778
|
lines.push("");
|
|
771
779
|
|
package/package.json
CHANGED