pi-goal-x 0.18.2 → 0.18.3
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.
|
@@ -314,10 +314,13 @@ export async function runGoalQuestionnaire(ctx: ExtensionContext, rawQuestions:
|
|
|
314
314
|
* Wraps a pipe-prefixed line and prepends "│ " to continuation lines
|
|
315
315
|
* so wrapped content stays within the ASCII box.
|
|
316
316
|
*/
|
|
317
|
+
const PIPE_PREFIX = "│ ";
|
|
318
|
+
const PIPE_WIDTH = visibleWidth(PIPE_PREFIX);
|
|
317
319
|
const addWrappedPipe = (styledLine: string) => {
|
|
318
|
-
const
|
|
320
|
+
const wrapWidth = Math.max(1, safeWidth - PIPE_WIDTH);
|
|
321
|
+
const wrapped = wrapTextWithAnsi(styledLine, wrapWidth);
|
|
319
322
|
for (let i = 0; i < wrapped.length; i++) {
|
|
320
|
-
lines.push(i === 0 ? wrapped[i] :
|
|
323
|
+
lines.push(i === 0 ? wrapped[i] : PIPE_PREFIX + wrapped[i]);
|
|
321
324
|
}
|
|
322
325
|
};
|
|
323
326
|
|
|
@@ -488,6 +491,12 @@ export async function runGoalQuestionnaire(ctx: ExtensionContext, rawQuestions:
|
|
|
488
491
|
add(theme.fg("dim", isMulti ? " Tab/←→ navigate • ↑↓ select • Enter confirm • Esc cancel" + auditorHint : " ↑↓ navigate • Enter select • Esc cancel" + auditorHint));
|
|
489
492
|
}
|
|
490
493
|
add(theme.fg("accent", "─".repeat(safeWidth)));
|
|
494
|
+
// Safety net: ensure no returned line exceeds the terminal width
|
|
495
|
+
for (let i = 0; i < lines.length; i++) {
|
|
496
|
+
if (lines[i] && visibleWidth(lines[i]) > safeWidth) {
|
|
497
|
+
lines[i] = truncateToWidth(lines[i], safeWidth);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
491
500
|
cachedLines = lines;
|
|
492
501
|
return lines;
|
|
493
502
|
}
|
|
@@ -77,7 +77,8 @@ export async function showEscapeDialog(
|
|
|
77
77
|
|
|
78
78
|
// ── Header ────────────────────────────────────────────────
|
|
79
79
|
lines.push(accent(`┌${horizLine}┐`));
|
|
80
|
-
|
|
80
|
+
const headerContent = p + theme.bold("Audit interrupted by Escape") + dim(" (continue = default)");
|
|
81
|
+
lines.push(line(truncateToWidth(headerContent, innerWidth, "…")));
|
|
81
82
|
const truncatedObjective = truncateToWidth(goalObjective, innerWidth - 14, "…");
|
|
82
83
|
lines.push(line(p + dim("Goal: ") + dim(truncatedObjective)));
|
|
83
84
|
lines.push(accent(`├${horizLine}┤`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-goal-x",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.3",
|
|
4
4
|
"description": "Goal mode extension for pi: persistent long-running objectives, /goal-set drafting, Sisyphus prompt style, autoContinue, and an above-editor status overlay. Fork of @capyup/pi-goal.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pi-goal-x contributors",
|