Skip to content

Commit a6c5fbd

Browse files
committed
Release v0.1.19
1 parent 624862b commit a6c5fbd

5 files changed

Lines changed: 24 additions & 24 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A global [Pi coding agent](https://github.com/badlogic/pi-mono) extension that a
88

99
- New sessions start in **Build** mode.
1010
- 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; dim rounded corners with color-matched horizontal `` and vertical `` segments bridge the borders 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 with color-matched heavy horizontal `` and vertical `` segments bridge the borders 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.
1212
- `/plan`, `/build`, and the `--plan` startup flag.
1313
- Per-session plans at `~/.pi/agent/plans/<session-id>.md`.
1414
- In Plan mode, built-in `edit` and `write` are restricted to the exact plan file.

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ export default function planBuildModes(pi: ExtensionAPI): void {
495495

496496
const leftRail = `${formatModeRail(selectedMode)} `;
497497
const rightRail = this.borderColor("│");
498-
const topRightVerticalTransition = this.borderColor("");
499-
const bottomLeftVerticalTransition = formatModeRail(selectedMode, "");
498+
const topRightVerticalTransition = this.borderColor("");
499+
const bottomLeftVerticalTransition = formatModeRail(selectedMode, "");
500500
const metadata = truncateToWidth(
501501
formatModeMetadata(selectedMode, pi.getThinkingLevel(), ctx.ui.theme, this.borderColor, {
502502
modelName: ctx.model?.id ?? "no-model",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@janvitos/pi-plan-build",
3-
"version": "0.1.18",
3+
"version": "0.1.19",
44
"description": "Plan safely, approve explicitly, then implement here or in a clean session.",
55
"type": "module",
66
"license": "MIT",

utils.test.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ test("mode composer uses colored rails and mode/thinking metadata", () => {
7474
const buildRail = formatModeRail("build");
7575
assert.equal(planRail, "\x1b[38;2;245;167;66m│\x1b[0m");
7676
assert.equal(buildRail, "\x1b[38;2;92;156;245m│\x1b[0m");
77-
assert.equal(formatModeRail("build", ""), "\x1b[38;2;92;156;245m\x1b[0m");
77+
assert.equal(formatModeRail("build", ""), "\x1b[38;2;92;156;245m\x1b[0m");
7878
assert.equal(
7979
formatModeTopBorder("plan", 4, "\x1b[2m╮\x1b[22m"),
80-
"\x1b[38;2;245;167;66m╭─\x1b[0m\x1b[2m╮\x1b[22m",
80+
"\x1b[38;2;245;167;66m╭─\x1b[0m\x1b[2m╮\x1b[22m",
8181
);
8282
assert.equal(formatModeTopBorder("build", 2, "\x1b[2m╮\x1b[22m"), "");
8383
assert.equal(
@@ -88,9 +88,9 @@ test("mode composer uses colored rails and mode/thinking metadata", () => {
8888
formatModeMetadata("build", "medium", theme, thinkingColor, {
8989
modelName: "gpt-5.6-sol",
9090
modelProvider: "openai",
91-
rail: formatModeRail("build", ""),
91+
rail: formatModeRail("build", ""),
9292
}),
93-
"\x1b[38;2;92;156;245m\x1b[0m \x1b[38;2;92;156;245mbuild\x1b[0m\x1b[38;2;128;128;128m • \x1b[39mgpt-5.6-sol\x1b[38;2;128;128;128m [openai]\x1b[39m\x1b[38;2;128;128;128m • \x1b[39m\x1b[38;2;0;255;0mmedium\x1b[39m",
93+
"\x1b[38;2;92;156;245m\x1b[0m \x1b[38;2;92;156;245mbuild\x1b[0m\x1b[38;2;128;128;128m • \x1b[39mgpt-5.6-sol\x1b[38;2;128;128;128m [openai]\x1b[39m\x1b[38;2;128;128;128m • \x1b[39m\x1b[38;2;0;255;0mmedium\x1b[39m",
9494
);
9595
});
9696

@@ -119,14 +119,14 @@ test("mode composer joins border colors with dashed transitions and dim corners"
119119
measure: (line: string) => line.replace(ansiPattern, "").length,
120120
};
121121
const lines = ["top border", " first", " second", "────────────────", " autocomplete"];
122-
assert.deepEqual(renderModeComposer(lines, "╭─────────────╮", "│ ", "│", "", " plan · high", "╰", 2, 16, lineWidth), [
123-
"╭─────────────╮",
124-
"│ ",
122+
assert.deepEqual(renderModeComposer(lines, "╭─────────────╮", "│ ", "│", "", " plan · high", "╰", 2, 16, lineWidth), [
123+
"╭─────────────╮",
124+
"│ ",
125125
"│ first │",
126126
"│ second │",
127127
"│ │",
128-
" plan · high │",
129-
"╰─────────────╯",
128+
" plan · high │",
129+
"╰─────────────╯",
130130
"",
131131
" autocomplete",
132132
]);
@@ -135,36 +135,36 @@ test("mode composer joins border colors with dashed transitions and dim corners"
135135
const realisticLines = ["top", " prompt", styledGlyph.repeat(16)];
136136
const realisticResult = renderModeComposer(
137137
realisticLines,
138-
"╭─────────────╮",
138+
"╭─────────────╮",
139139
"│ ",
140140
"│",
141-
"",
142-
" metadata",
141+
"",
142+
" metadata",
143143
"╰",
144144
2,
145145
16,
146146
lineWidth,
147147
);
148148
assert.equal(realisticResult.every((line) => lineWidth.measure(line) <= 16), true);
149-
assert.equal(realisticResult[5]?.replace(ansiPattern, ""), "╰─────────────╯");
149+
assert.equal(realisticResult[5]?.replace(ansiPattern, ""), "╰─────────────╯");
150150
assert.equal(realisticResult[5]?.replace(ansiPattern, "").includes("[39m"), false);
151151

152152
assert.deepEqual(
153153
renderModeComposer(
154154
["top", " prompt", "\x1b[38;2;128;128;128m────\x1b[0m"],
155-
"╭─╮",
155+
"╭─╮",
156156
"│ ",
157157
"│",
158-
"",
159-
" metadata",
158+
"",
159+
" metadata",
160160
"╰",
161161
2,
162162
4,
163163
lineWidth,
164164
),
165-
["╭─╮", "│ ", "│ p│", "│ │", " m│", "╰\x1b[38;2;128;128;128m─╯\x1b[0m", ""],
165+
["╭─╮", "│ ", "│ p│", "│ │", " m│", "╰\x1b[38;2;128;128;128m─╯\x1b[0m", ""],
166166
);
167-
assert.deepEqual(renderModeComposer(lines, "top", "│ ", "│", "", "metadata", "╰", 0, 16, lineWidth), lines);
167+
assert.deepEqual(renderModeComposer(lines, "top", "│ ", "│", "", "metadata", "╰", 0, 16, lineWidth), lines);
168168
});
169169

170170
test("plan review preserves the complete plan without truncation", () => {

utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function formatModeRail(mode: Mode, glyph = "│"): string {
4545

4646
export function formatModeTopBorder(mode: Mode, width: number, topRightCorner: string): string {
4747
if (width <= 2) return "";
48-
return `${formatModeColor(mode, `╭${"─".repeat(width - 3)}`)}${topRightCorner}`;
48+
return `${formatModeColor(mode, `╭${"─".repeat(width - 3)}`)}${topRightCorner}`;
4949
}
5050

5151
export function formatModeMetadata(
@@ -116,7 +116,7 @@ export function renderModeComposer(
116116
.map((line) => addRightRail(leftRailPrefix + line.slice(reservedPrefix.length)));
117117
const ansiSequence = "(?:\\x1b\\[[0-?]*[ -/]*[@-~])*";
118118
const bottomBorder = bottomLeftCorner + lineWidth.truncate(lines[bottomBorderIndex]!, width)
119-
.replace(new RegExp(`^(${ansiSequence}).${ansiSequence}.`, "u"), "$1")
119+
.replace(new RegExp(`^(${ansiSequence}).${ansiSequence}.`, "u"), "$1")
120120
.replace(/.(?=(?:\x1b\[[0-?]*[ -/]*[@-~])*$)/u, "╯");
121121
return [
122122
topBorder,

0 commit comments

Comments
 (0)