@janvitos/pi-plan-build 0.1.3 → 0.1.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.
Files changed (3) hide show
  1. package/index.ts +1 -1
  2. package/package.json +1 -1
  3. package/utils.ts +2 -3
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, this.borderColor);
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)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janvitos/pi-plan-build",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Plan safely, approve explicitly, then implement here or in a clean session.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/utils.ts CHANGED
@@ -9,14 +9,13 @@ 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;
13
12
  bold(text: string): string;
14
13
  }
15
14
 
16
- export function formatModeStatus(mode: Mode, theme: ModeStatusTheme): string {
15
+ export function formatModeStatus(mode: Mode, theme: ModeStatusTheme, borderColor: (text: string) => string): string {
17
16
  const label = MODE_LABELS[mode];
18
17
  const modeText = `\x1b[${label.color}m${theme.bold(label.text)}${ANSI_RESET}`;
19
- return theme.fg("dim", "[") + modeText + theme.fg("dim", "]");
18
+ return borderColor("[") + modeText + borderColor("]");
20
19
  }
21
20
 
22
21
  export const PLAN_EXIT_APPROVE_CHOICE = "Switch to Build and implement here";