@pi-kaush/pi-content-layout 0.1.17 → 0.1.18

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
@@ -7,7 +7,8 @@
7
7
  Pi's leading `Spacer(1)`, so the frame butted against the entry above
8
8
  (most visibly a collapsed tool-call group) whenever `pi-intercom` loads
9
9
  before this package.
10
- - Align native `ThemedText` system notices with the transcript inset. Cache-miss notices gain a `✗` marker and omit `~` before the estimated cost, preserving Pi's cause labels, token counts, warning color, and detection logic.
10
+ - Show Pi's bare `Warning: …` and `Error: …` rows, and native cache-miss notices, as a glyph on the message edge (the tool-rail column) with a hanging indent: `!` for warnings, `✗` for errors. The label is dropped, the estimated cost loses its `~`, and Pi's text and theme color (bronze warnings, red errors) are preserved. Cache-miss notices now use `!` and sit on the edge instead of indented with `✗`.
11
+ - Fix a stacking glyph: Pi's `Text` returns the same cached line array on every render, and the notice rewrite edited that array in place, so each repaint prepended another `!` or `✗` and shoved the row out of its inset. The rewrite now edits a copy, with a regression test that renders repeatedly.
11
12
 
12
13
  - Restyle the `intercom_message` box even when `pi-intercom` wins Pi's first-registration-wins renderer lookup: a chat-container hook replaces the box Pi built with this package's frame, so the surface no longer depends on `packages` order. The renderer registration stays as the cheaper path when this package loads first.
13
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-kaush/pi-content-layout",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Inset Pi's conversation surface and style active and submitted prompts as matching blocks.",
5
5
  "license": "MIT",
6
6
  "author": "Kaushik Gopal",
package/src/index.ts CHANGED
@@ -293,7 +293,8 @@ function noticePresentation(
293
293
  }
294
294
 
295
295
  function renderNotice(notice: NoticePresentation, width: number): string[] {
296
- const lines = notice.body.render(width);
296
+ // Text caches and returns its own array; copy before editing a line.
297
+ const lines = [...notice.body.render(width)];
297
298
  const first = lines.findIndex((line) => stripTerminalSequences(line).trim());
298
299
  if (first < 0) return lines;
299
300
  const line = lines[first]!;