@janvitos/pi-plan-build 0.1.4 → 0.1.5
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/README.md +2 -2
- package/index.ts +2 -2
- package/package.json +1 -1
- package/utils.ts +3 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ A global [Pi coding agent](https://github.com/badlogic/pi-mono) extension that a
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- New sessions start in **Build** mode.
|
|
10
|
-
- Bare `Tab` cycles **Build → Plan → Build
|
|
10
|
+
- Bare `Tab` cycles **Build → Plan → Build**, while active autocomplete dropdowns retain Pi's normal Tab completion.
|
|
11
11
|
- Bracketed **build** (blue) and **plan** (yellow) indicators rendered as bold prompt prefixes inside Pi's text input box.
|
|
12
12
|
- `/plan`, `/build`, and the `--plan` startup flag.
|
|
13
13
|
- Per-session plans at `~/.pi/agent/plans/<session-id>.md`.
|
|
@@ -57,7 +57,7 @@ Do not install more than one npm, Git, or local copy at the same time; duplicate
|
|
|
57
57
|
|
|
58
58
|
| Action | Result |
|
|
59
59
|
| --- | --- |
|
|
60
|
-
| `Tab` | Cycle Build and Plan |
|
|
60
|
+
| `Tab` | Cycle Build and Plan, or accept an active autocomplete selection |
|
|
61
61
|
| `/plan` | Select Plan mode |
|
|
62
62
|
| `/build` | Select Build mode |
|
|
63
63
|
| `pi --plan` | Start a new session in Plan mode |
|
package/index.ts
CHANGED
|
@@ -397,7 +397,7 @@ export default function planBuildModes(pi: ExtensionAPI): void {
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
override render(width: number): string[] {
|
|
400
|
-
const badge = formatModeStatus(selectedMode, ctx.ui.theme
|
|
400
|
+
const badge = formatModeStatus(selectedMode, ctx.ui.theme);
|
|
401
401
|
const prompt = `${badge} `;
|
|
402
402
|
const promptWidth = visibleWidth(prompt);
|
|
403
403
|
const paddingWidth = Math.min(promptWidth, Math.max(0, Math.floor((width - 1) / 2)));
|
|
@@ -412,7 +412,7 @@ export default function planBuildModes(pi: ExtensionAPI): void {
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
override handleInput(data: string): void {
|
|
415
|
-
if (matchesKey(data, Key.tab)) {
|
|
415
|
+
if (matchesKey(data, Key.tab) && !this.isShowingAutocomplete()) {
|
|
416
416
|
this.onCycle?.();
|
|
417
417
|
return;
|
|
418
418
|
}
|
package/package.json
CHANGED
package/utils.ts
CHANGED
|
@@ -9,13 +9,14 @@ const MODE_LABELS: Record<Mode, { color: string; text: string }> = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export interface ModeStatusTheme {
|
|
12
|
+
fg(color: "dim", text: string): string;
|
|
12
13
|
bold(text: string): string;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export function formatModeStatus(mode: Mode, theme: ModeStatusTheme
|
|
16
|
+
export function formatModeStatus(mode: Mode, theme: ModeStatusTheme): string {
|
|
16
17
|
const label = MODE_LABELS[mode];
|
|
17
18
|
const modeText = `\x1b[${label.color}m${theme.bold(label.text)}${ANSI_RESET}`;
|
|
18
|
-
return
|
|
19
|
+
return theme.fg("dim", "[") + modeText + theme.fg("dim", "]");
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export const PLAN_EXIT_APPROVE_CHOICE = "Switch to Build and implement here";
|