gentle-pi 0.2.2 → 0.2.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.
@@ -86,7 +86,7 @@ class LayoutBuilder {
86
86
  center(width: number) {
87
87
  const row = this.lines[this.lines.length - 1];
88
88
  const pad = Math.max(0, Math.floor((width - row.length) / 2));
89
- const prefix = Array.from({ length: pad }, () => ({
89
+ const prefix: LayoutCell[] = Array.from({ length: pad }, () => ({
90
90
  char: " ",
91
91
  type: "none" as const,
92
92
  }));
@@ -106,29 +106,10 @@ export default function (pi: ExtensionAPI) {
106
106
 
107
107
  process.stdout.write("\x1b[2J\x1b[3J\x1b[H");
108
108
 
109
- let closeIntro: (() => void) | null = null;
110
- const closeIntroSafely = () => {
111
- if (!closeIntro) return;
112
- const fn = closeIntro;
113
- closeIntro = null;
114
- try {
115
- fn();
116
- } catch {}
109
+ const finishIntro = () => {
110
+ ctx.ui.setHeader(undefined);
117
111
  };
118
112
 
119
- void ctx.ui
120
- .custom((_tui, _theme, _keybindings, done) => {
121
- closeIntro = () => done(undefined);
122
- return {
123
- render: () => [""],
124
- invalidate: () => {},
125
- handleInput: () => {},
126
- };
127
- })
128
- .catch(() => {
129
- closeIntro = null;
130
- });
131
-
132
113
  const roseBase = padLines(normalizeAscii(ROSE_LARGE_RAW));
133
114
  const logoBase = padLines(TEXT_LOGO);
134
115
 
@@ -201,7 +182,7 @@ export default function (pi: ExtensionAPI) {
201
182
  clearInterval(state.timer);
202
183
  state.timer = null;
203
184
  }
204
- closeIntroSafely();
185
+ finishIntro();
205
186
  return;
206
187
  }
207
188
  try {
@@ -391,7 +372,7 @@ export default function (pi: ExtensionAPI) {
391
372
  if (cell.type === "rose") {
392
373
  const pulse = 0.9 + Math.sin((x + y + frame) * 0.08) * 0.1;
393
374
  const k = Math.max(0.01, roseOpacity * pulse);
394
- const f = Math.pow(flashPhase, 0.4);
375
+ const f = flashPhase ** 0.4;
395
376
 
396
377
  const rBase = Math.floor(255 * k);
397
378
  const gBase = Math.floor(118 * k);
@@ -454,7 +435,7 @@ export default function (pi: ExtensionAPI) {
454
435
  clearInterval(state.timer);
455
436
  state.timer = null;
456
437
  }
457
- closeIntroSafely();
438
+ finishIntro();
458
439
  },
459
440
  };
460
441
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gentle-pi",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Turn Pi into el Gentleman: a senior-architect development harness with SDD/OpenSpec, subagents, strict TDD evidence, review guardrails, and skill discovery.",
5
5
  "license": "MIT",
6
6
  "type": "module",