@quandev104/pi-style 0.2.7 → 0.2.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.9] - 2026-09-04
4
+
5
+ ### Bug Fixes
6
+
7
+ - *(compat)* Support Pi 0.85.0 runtime identities
8
+ - *(startup)* Show the current project path in the heading; simpler logo
9
+
3
10
  ## [0.2.7] - 2026-08-25
4
11
 
5
12
  ### Bug Fixes
package/README.md CHANGED
@@ -147,7 +147,7 @@ Ordinary mutations are session-only; persistence requires an explicit `global` o
147
147
  ## Compatibility
148
148
 
149
149
  - Public Pi APIs (widgets, editor, header, footer bridge) are preferred and enabled by default.
150
- - Tier C core patches (message prefixes, special blocks, tool selectors) are identity-certified per surface against recorded fingerprints (Pi `0.83.0`–`0.84.3` observed; Pi `0.84.3` loads the CLI from a minified bundled runtime, so every surface also records the bundled identities), isolated, reversible, and flag/config gated; any surface whose runtime identity is not recorded falls back natively on its own.
150
+ - Tier C core patches (message prefixes, special blocks, tool selectors) are identity-certified per surface against recorded fingerprints (Pi `0.83.0`–`0.85.0` observed; Pi ≥`0.84.3` loads the CLI from a minified bundled runtime, so every surface also records the bundled identities), isolated, reversible, and flag/config gated; any surface whose runtime identity is not recorded falls back natively on its own.
151
151
  - No render-time I/O: filesystem, Git, settings, and session data flow through cached providers into immutable snapshots.
152
152
  - Terminal-global background synchronization is unsupported/off for technical v1; explicit cell backgrounds and Pi theme APIs remain supported.
153
153
  - Terminal multiplexers gate kitty graphics: in herdr, previews (and Pi's own tool-result images) require `experimental.kitty_graphics = true` in `~/.config/herdr/config.toml` plus a server restart; tmux disables images upstream.
@@ -441,6 +441,43 @@ function resetAnsi(value) {
441
441
  function fitAnsiWidth(value, width, ellipsis = "\u2026") {
442
442
  return visibleWidth(value) <= width ? value : truncateAnsi(value, width, ellipsis);
443
443
  }
444
+ function fitAnsiWidthTail(value, width, ellipsis = "\u2026") {
445
+ if (width <= 0) return "";
446
+ if (visibleWidth(value) <= width) return resetAnsi(value);
447
+ const ellipsisWidth = visibleWidth(ellipsis);
448
+ if (width <= ellipsisWidth) return resetAnsi(ellipsis);
449
+ const units = [];
450
+ let pending = "";
451
+ for (let i = 0; i < value.length; i++) {
452
+ const code = value.charCodeAt(i);
453
+ if (code === 27) {
454
+ const start = i;
455
+ i++;
456
+ while (i + 1 < value.length && !isFinal(value[i + 1] ?? "")) i++;
457
+ i++;
458
+ pending += value.slice(start, i + 1);
459
+ continue;
460
+ }
461
+ let char = value[i] ?? "";
462
+ if (code >= 55296 && code <= 56319 && i + 1 < value.length) char += value[++i];
463
+ units.push({ ansi: pending, char, charWidth: visibleWidth(char) || 1 });
464
+ pending = "";
465
+ }
466
+ let kept = 0;
467
+ let used = ellipsisWidth;
468
+ while (kept < units.length) {
469
+ const unit = units[units.length - 1 - kept];
470
+ if (!unit || used + unit.charWidth > width) break;
471
+ used += unit.charWidth;
472
+ kept++;
473
+ }
474
+ let output = ellipsis;
475
+ for (let index = units.length - kept; index < units.length; index++) {
476
+ const unit = units[index];
477
+ if (unit) output += unit.ansi + unit.char;
478
+ }
479
+ return resetAnsi(output);
480
+ }
444
481
  function truncateAnsi(value, width, ellipsis = "\u2026") {
445
482
  if (width <= 0) return "";
446
483
  if (visibleWidth(value) <= width) return resetAnsi(value);
@@ -9448,15 +9485,14 @@ function installEditor(options) {
9448
9485
 
9449
9486
  // extension-src/pi-style/features/startup/logo.ts
9450
9487
  var PI_LOGO_LINES = [
9451
- "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557",
9452
- "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551",
9453
- "\u2588\u2588\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2588\u2588\u2551",
9454
- "\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2551",
9455
- "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u256C\u2550\u2550\u2550\u2588\u2588\u2588\u2588\u2557",
9456
- "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2551 ",
9457
- "\u2588\u2588\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2588\u2588\u2551",
9458
- "\u2588\u2588\u2588\u2588\u2551 \u2588\u2588\u2588\u2588\u2551",
9459
- "\u255A\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u255D"
9488
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588",
9489
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588",
9490
+ "\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588",
9491
+ "\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588",
9492
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588",
9493
+ "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588",
9494
+ "\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588",
9495
+ "\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588"
9460
9496
  ];
9461
9497
  var LOGO_PALETTE_STEPS = 24;
9462
9498
  var LOGO_MAX_DARKEN = 0.18;
@@ -9536,11 +9572,15 @@ function styledLogoLines(resolved) {
9536
9572
  logoGradientCacheKey = cacheKey2;
9537
9573
  return logoGradientCacheLines;
9538
9574
  }
9575
+ function logoDetailWidth(width) {
9576
+ const logoWidth = Math.max(...PI_LOGO_LINES.map((line) => visibleWidth(line)));
9577
+ return Math.max(0, width - logoWidth - visibleWidth(LOGO_GAP));
9578
+ }
9539
9579
  function compactLogoHeader(resolved, details, width) {
9540
9580
  const logoLines = styledLogoLines(resolved);
9541
- const logoWidth = Math.max(...PI_LOGO_LINES.map((line) => visibleWidth(line)));
9542
9581
  const safeWidth = Math.max(1, width);
9543
- const detailWidth = safeWidth - logoWidth - visibleWidth(LOGO_GAP);
9582
+ const logoWidth = Math.max(...PI_LOGO_LINES.map((line) => visibleWidth(line)));
9583
+ const detailWidth = logoDetailWidth(safeWidth);
9544
9584
  if (detailWidth >= LOGO_SIDE_DETAIL_MIN_WIDTH) {
9545
9585
  const detailStartRow = Math.max(0, Math.floor((PI_LOGO_LINES.length - details.length) / 2));
9546
9586
  return PI_LOGO_LINES.map((plainLine, index) => {
@@ -9554,7 +9594,7 @@ function compactLogoHeader(resolved, details, width) {
9554
9594
  if (safeWidth >= logoWidth) {
9555
9595
  return [...logoLines, ...details.map((detail) => fitAnsiWidth(detail, safeWidth))];
9556
9596
  }
9557
- return [details[0], details[2]].map((detail) => fitAnsiWidth(detail, safeWidth));
9597
+ return [details[0] ?? "", details[details.length - 1] ?? ""].map((detail) => fitAnsiWidth(detail, safeWidth));
9558
9598
  }
9559
9599
 
9560
9600
  // extension-src/pi-style/features/startup/index.ts
@@ -9752,6 +9792,10 @@ function renderToolsPanel(resolved, tools, minTotalWidth) {
9752
9792
  var STARTUP_INDENT = " ";
9753
9793
  var STARTUP_PADDING_TOP = 2;
9754
9794
  var STARTUP_PADDING_BOTTOM = 2;
9795
+ function startupProjectTitle(snapshot) {
9796
+ if (snapshot.cwd) return shortenPath(snapshot.cwd);
9797
+ return snapshot.project ?? "pi-style";
9798
+ }
9755
9799
  function styledLines(theme, config, snapshot, overlay, width) {
9756
9800
  if (width <= 0 || config.startup.mode === "off") return [];
9757
9801
  const resolved = resolveTheme(theme, config);
@@ -9760,13 +9804,19 @@ function styledLines(theme, config, snapshot, overlay, width) {
9760
9804
  const bodyWidth = Math.max(1, width - indentWidth);
9761
9805
  const indent = (content) => `${STARTUP_INDENT}${content}`;
9762
9806
  lines.push(...Array.from({ length: STARTUP_PADDING_TOP }, () => ""));
9763
- const logoTitle = resolved.mode === "ascii" ? "pi-style" : `${resolved.glyph("pi")} pi-style`;
9807
+ const asciiMode = resolved.mode === "ascii";
9808
+ const glyph = resolved.glyph("pi");
9809
+ const projectTitle = startupProjectTitle(snapshot);
9810
+ const titleBudget = Math.max(0, logoDetailWidth(bodyWidth) - (asciiMode ? 0 : visibleWidth(glyph) + 1));
9811
+ const fittedTitle = fitAnsiWidthTail(projectTitle, titleBudget, asciiMode ? "..." : "\u2026");
9812
+ const logoTitle = asciiMode ? fittedTitle : `${glyph} ${fittedTitle}`;
9764
9813
  lines.push(
9765
9814
  ...compactLogoHeader(
9766
9815
  resolved,
9767
9816
  [
9768
9817
  resolved.apply("accent", logoTitle),
9769
- resolved.apply("muted", "/ commands \xB7 ! bash"),
9818
+ resolved.apply("muted", "/ commands"),
9819
+ resolved.apply("muted", "! bash"),
9770
9820
  resolved.apply("success", "\u25CF ready")
9771
9821
  ],
9772
9822
  bodyWidth
@@ -11887,8 +11937,13 @@ function decorateMessageRender(original, instance, args, snapshot = {
11887
11937
  function isSpacerChild(child) {
11888
11938
  return typeof child?.setLines === "function";
11889
11939
  }
11890
- function isBlankTextChild(child) {
11940
+ function unwrapMouseRegion(child) {
11891
11941
  const candidate = child;
11942
+ if (typeof candidate?.handleMouse !== "function" || candidate.child === void 0) return child;
11943
+ return candidate.child;
11944
+ }
11945
+ function isBlankTextChild(child) {
11946
+ const candidate = unwrapMouseRegion(child);
11892
11947
  if (typeof candidate?.setCustomBgFn !== "function" || typeof candidate.render !== "function") return false;
11893
11948
  if (typeof candidate.text === "string") return contentText(candidate.text).trim() === "";
11894
11949
  return contentText(candidate.render(0).join("\n")).trim() === "";
@@ -12139,13 +12194,15 @@ function installDelegatingPatch(options) {
12139
12194
  }
12140
12195
 
12141
12196
  // extension-src/pi-style/pi/compatibility-probe.ts
12142
- var SUPPORTED_VERSION_RANGE = ">=0.83.0 <0.85.0";
12197
+ var SUPPORTED_VERSION_RANGE = ">=0.83.0 <0.86.0";
12143
12198
  var SUPPORTED_PI_VERSIONS = Object.freeze([
12144
12199
  "0.83.0",
12145
12200
  "0.84.0",
12146
12201
  "0.84.1",
12147
12202
  "0.84.2",
12148
- "0.84.3"
12203
+ "0.84.3",
12204
+ "0.84.4",
12205
+ "0.85.0"
12149
12206
  ]);
12150
12207
  var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12151
12208
  "native-assistant-message:render": Object.freeze([
@@ -12153,13 +12210,13 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12153
12210
  name: "render",
12154
12211
  arity: 1,
12155
12212
  fingerprint: "2a39243f",
12156
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12213
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4", "0.85.0"])
12157
12214
  }),
12158
12215
  Object.freeze({
12159
12216
  name: "render",
12160
12217
  arity: 1,
12161
12218
  fingerprint: "a9be09a3",
12162
- versions: Object.freeze(["0.84.3"])
12219
+ versions: Object.freeze(["0.84.3", "0.84.4", "0.85.0"])
12163
12220
  })
12164
12221
  ]),
12165
12222
  "native-assistant-message:updateContent": Object.freeze([
@@ -12176,7 +12233,7 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12176
12233
  name: "updateContent",
12177
12234
  arity: 1,
12178
12235
  fingerprint: "d2114491",
12179
- versions: Object.freeze(["0.84.0", "0.84.1", "0.84.2"])
12236
+ versions: Object.freeze(["0.84.0", "0.84.1", "0.84.2", "0.84.4"])
12180
12237
  }),
12181
12238
  // 0.84.3: the CLI loads a minified bundled runtime and extensions receive
12182
12239
  // the in-bundle class objects, so this method's toString() is the minified
@@ -12186,7 +12243,22 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12186
12243
  name: "updateContent",
12187
12244
  arity: 1,
12188
12245
  fingerprint: "356b7e83",
12189
- versions: Object.freeze(["0.84.3"])
12246
+ versions: Object.freeze(["0.84.3", "0.84.4"])
12247
+ }),
12248
+ // 0.85.0 modular: adds per-run thinking visibility overrides and a
12249
+ // MouseRegion click toggle per thinking run (arity stays 1).
12250
+ Object.freeze({
12251
+ name: "updateContent",
12252
+ arity: 1,
12253
+ fingerprint: "80e338d2",
12254
+ versions: Object.freeze(["0.85.0"])
12255
+ }),
12256
+ // 0.85.0 bundled: same drift, minified.
12257
+ Object.freeze({
12258
+ name: "updateContent",
12259
+ arity: 1,
12260
+ fingerprint: "c3d72f2b",
12261
+ versions: Object.freeze(["0.85.0"])
12190
12262
  })
12191
12263
  ]),
12192
12264
  "native-compaction-message:updateDisplay": Object.freeze([
@@ -12194,13 +12266,13 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12194
12266
  name: "updateDisplay",
12195
12267
  arity: 0,
12196
12268
  fingerprint: "f8c44e78",
12197
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12269
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4", "0.85.0"])
12198
12270
  }),
12199
12271
  Object.freeze({
12200
12272
  name: "updateDisplay",
12201
12273
  arity: 0,
12202
12274
  fingerprint: "5118a51d",
12203
- versions: Object.freeze(["0.84.3"])
12275
+ versions: Object.freeze(["0.84.3", "0.84.4", "0.85.0"])
12204
12276
  })
12205
12277
  ]),
12206
12278
  "native-branch-message:updateDisplay": Object.freeze([
@@ -12208,13 +12280,13 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12208
12280
  name: "updateDisplay",
12209
12281
  arity: 0,
12210
12282
  fingerprint: "415d57b7",
12211
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12283
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4", "0.85.0"])
12212
12284
  }),
12213
12285
  Object.freeze({
12214
12286
  name: "updateDisplay",
12215
12287
  arity: 0,
12216
12288
  fingerprint: "2185274e",
12217
- versions: Object.freeze(["0.84.3"])
12289
+ versions: Object.freeze(["0.84.3", "0.84.4", "0.85.0"])
12218
12290
  })
12219
12291
  ]),
12220
12292
  "native-skill-message:updateDisplay": Object.freeze([
@@ -12222,13 +12294,13 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12222
12294
  name: "updateDisplay",
12223
12295
  arity: 0,
12224
12296
  fingerprint: "48099ea6",
12225
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12297
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4", "0.85.0"])
12226
12298
  }),
12227
12299
  Object.freeze({
12228
12300
  name: "updateDisplay",
12229
12301
  arity: 0,
12230
12302
  fingerprint: "4051fd65",
12231
- versions: Object.freeze(["0.84.3"])
12303
+ versions: Object.freeze(["0.84.3", "0.84.4", "0.85.0"])
12232
12304
  })
12233
12305
  ]),
12234
12306
  "native-custom-message:rebuild": Object.freeze([
@@ -12236,13 +12308,13 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12236
12308
  name: "rebuild",
12237
12309
  arity: 0,
12238
12310
  fingerprint: "76ae2e3a",
12239
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12311
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4", "0.85.0"])
12240
12312
  }),
12241
12313
  Object.freeze({
12242
12314
  name: "rebuild",
12243
12315
  arity: 0,
12244
12316
  fingerprint: "b89987cc",
12245
- versions: Object.freeze(["0.84.3"])
12317
+ versions: Object.freeze(["0.84.3", "0.84.4", "0.85.0"])
12246
12318
  })
12247
12319
  ]),
12248
12320
  "tool-call-renderer:getCallRenderer": Object.freeze([
@@ -12250,13 +12322,28 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12250
12322
  name: "getCallRenderer",
12251
12323
  arity: 0,
12252
12324
  fingerprint: "951ea0e0",
12253
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12325
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4"])
12254
12326
  }),
12255
12327
  Object.freeze({
12256
12328
  name: "getCallRenderer",
12257
12329
  arity: 0,
12258
12330
  fingerprint: "e50613b7",
12259
- versions: Object.freeze(["0.84.3"])
12331
+ versions: Object.freeze(["0.84.3", "0.84.4"])
12332
+ }),
12333
+ // 0.85.0 modular: drops the `builtInToolDefinition` fallback branches
12334
+ // and returns `this.toolDefinition?.renderCall` directly.
12335
+ Object.freeze({
12336
+ name: "getCallRenderer",
12337
+ arity: 0,
12338
+ fingerprint: "e0a9ed86",
12339
+ versions: Object.freeze(["0.85.0"])
12340
+ }),
12341
+ // 0.85.0 bundled: same drift, minified.
12342
+ Object.freeze({
12343
+ name: "getCallRenderer",
12344
+ arity: 0,
12345
+ fingerprint: "73116365",
12346
+ versions: Object.freeze(["0.85.0"])
12260
12347
  })
12261
12348
  ]),
12262
12349
  "tool-result-renderer:getResultRenderer": Object.freeze([
@@ -12264,13 +12351,28 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12264
12351
  name: "getResultRenderer",
12265
12352
  arity: 0,
12266
12353
  fingerprint: "8a25cd71",
12267
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12354
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4"])
12268
12355
  }),
12269
12356
  Object.freeze({
12270
12357
  name: "getResultRenderer",
12271
12358
  arity: 0,
12272
12359
  fingerprint: "28c4dc22",
12273
- versions: Object.freeze(["0.84.3"])
12360
+ versions: Object.freeze(["0.84.3", "0.84.4"])
12361
+ }),
12362
+ // 0.85.0 modular: drops the `builtInToolDefinition` fallback branches
12363
+ // and returns `this.toolDefinition?.renderResult` directly.
12364
+ Object.freeze({
12365
+ name: "getResultRenderer",
12366
+ arity: 0,
12367
+ fingerprint: "1567dcf4",
12368
+ versions: Object.freeze(["0.85.0"])
12369
+ }),
12370
+ // 0.85.0 bundled: same drift, minified.
12371
+ Object.freeze({
12372
+ name: "getResultRenderer",
12373
+ arity: 0,
12374
+ fingerprint: "d613a2a3",
12375
+ versions: Object.freeze(["0.85.0"])
12274
12376
  })
12275
12377
  ]),
12276
12378
  "native-bash-execution:render": Object.freeze([
@@ -12282,13 +12384,13 @@ var KNOWN_NATIVE_IDENTITIES = Object.freeze({
12282
12384
  name: "BashExecutionComponent",
12283
12385
  arity: 2,
12284
12386
  fingerprint: "a5b5abca",
12285
- versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2"])
12387
+ versions: Object.freeze(["0.83.0", "0.84.0", "0.84.1", "0.84.2", "0.84.4", "0.85.0"])
12286
12388
  }),
12287
12389
  Object.freeze({
12288
12390
  name: "BashExecutionComponent",
12289
12391
  arity: 2,
12290
12392
  fingerprint: "98d22d96",
12291
- versions: Object.freeze(["0.84.3"])
12393
+ versions: Object.freeze(["0.84.3", "0.84.4", "0.85.0"])
12292
12394
  })
12293
12395
  ])
12294
12396
  });