@janvitos/pi-plan-build 0.1.16 → 0.1.17

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 CHANGED
@@ -8,7 +8,7 @@ A global [Pi coding agent](https://github.com/badlogic/pi-mono) extension that a
8
8
 
9
9
  - New sessions start in **Build** mode.
10
10
  - Bare `Tab` cycles **Build → Plan → Build**, while active autocomplete dropdowns retain Pi's normal Tab completion.
11
- - The composer uses OpenCode prompt-inspired blue/orange mode colors on the rounded top-left border and left rail, complemented by Pi's border color on the right rail and rounded bottom-right border; the frame leaves open gaps at the top right and bottom left. It also includes a mode/model/thinking metadata row; cycling the thinking level updates this row without adding a duplicate status above the composer. The model is shown as `model-id [provider]` (for example, `gpt-5.6-luna [openai]`), with the model ID inheriting the terminal foreground like unselected entries in `/model` and the provider using the footer's dim text color. The footer keeps the remaining path and usage stats without duplicating model metadata.
11
+ - The composer uses OpenCode prompt-inspired blue/orange mode colors on the rounded top-left border and left rail, complemented by Pi's border color on the right rail and rounded bottom-right border; dim rounded corners and dashed `┄` segments bridge the border colors at the top right and bottom left. It also includes a mode/model/thinking metadata row; cycling the thinking level updates this row without adding a duplicate status above the composer. The model is shown as `model-id [provider]` (for example, `gpt-5.6-luna [openai]`), with the model ID inheriting the terminal foreground like unselected entries in `/model` and the provider using the footer's dim text color. The footer keeps the remaining path and usage stats without duplicating model metadata.
12
12
  - `/plan`, `/build`, and the `--plan` startup flag.
13
13
  - Per-session plans at `~/.pi/agent/plans/<session-id>.md`.
14
14
  - In Plan mode, built-in `edit` and `write` are restricted to the exact plan file.
package/index.ts CHANGED
@@ -503,11 +503,21 @@ export default function planBuildModes(pi: ExtensionAPI): void {
503
503
  width - 1,
504
504
  "",
505
505
  );
506
- const topBorder = formatModeTopBorder(selectedMode, width);
507
- return renderModeComposer(lines, topBorder, leftRail, rightRail, metadata, railWidth, width, {
508
- truncate: (line, maxWidth) => truncateToWidth(line, maxWidth, ""),
509
- measure: visibleWidth,
510
- });
506
+ const topBorder = formatModeTopBorder(selectedMode, width, ctx.ui.theme.fg("dim", "╮"));
507
+ return renderModeComposer(
508
+ lines,
509
+ topBorder,
510
+ leftRail,
511
+ rightRail,
512
+ metadata,
513
+ ctx.ui.theme.fg("dim", "╰"),
514
+ railWidth,
515
+ width,
516
+ {
517
+ truncate: (line, maxWidth) => truncateToWidth(line, maxWidth, ""),
518
+ measure: visibleWidth,
519
+ },
520
+ );
511
521
  }
512
522
 
513
523
  override handleInput(data: string): void {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janvitos/pi-plan-build",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
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
@@ -42,9 +42,9 @@ export function formatModeRail(mode: Mode): string {
42
42
  return formatModeColor(mode, "│");
43
43
  }
44
44
 
45
- export function formatModeTopBorder(mode: Mode, width: number): string {
46
- if (width <= 1) return "";
47
- return formatModeColor(mode, `╭${"─".repeat(width - 2)}`);
45
+ export function formatModeTopBorder(mode: Mode, width: number, topRightCorner: string): string {
46
+ if (width <= 2) return "";
47
+ return `${formatModeColor(mode, `╭${"─".repeat(width - 3)}┄`)}${topRightCorner}`;
48
48
  }
49
49
 
50
50
  export function formatModeMetadata(
@@ -95,6 +95,7 @@ export function renderModeComposer(
95
95
  leftRailPrefix: string,
96
96
  rightRail: string,
97
97
  metadata: string,
98
+ bottomLeftCorner: string,
98
99
  reservedWidth: number,
99
100
  width: number,
100
101
  lineWidth: LineWidthTools,
@@ -111,11 +112,13 @@ export function renderModeComposer(
111
112
  const promptLines = lines
112
113
  .slice(1, bottomBorderIndex)
113
114
  .map((line) => addRightRail(leftRailPrefix + line.slice(reservedPrefix.length)));
114
- const bottomBorder = lineWidth.truncate(lines[bottomBorderIndex]!, width)
115
- .replace(/^((?:\x1b\[[0-?]*[ -/]*[@-~])*)./u, "$1 ")
115
+ const ansiSequence = "(?:\\x1b\\[[0-?]*[ -/]*[@-~])*";
116
+ const bottomBorder = bottomLeftCorner + lineWidth.truncate(lines[bottomBorderIndex]!, width)
117
+ .replace(new RegExp(`^(${ansiSequence}).${ansiSequence}.`, "u"), "$1┄")
116
118
  .replace(/.(?=(?:\x1b\[[0-?]*[ -/]*[@-~])*$)/u, "╯");
117
119
  return [
118
120
  topBorder,
121
+ addRightRail(leftRailPrefix),
119
122
  ...promptLines,
120
123
  addRightRail(leftRailPrefix),
121
124
  addRightRail(metadata),