@xynogen/pix-display 0.1.2 → 0.1.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.
package/README.md CHANGED
@@ -6,7 +6,7 @@ Pi core extension — paste chip rendering and thinking block display.
6
6
 
7
7
  Two features, always on when installed:
8
8
 
9
- **Paste chips.** Replaces Pi's paste markers (`[paste #1 2232 chars]`) with styled icon chips (`text 2.2k chars` for text, `image #1` for images). Collapses pasted image paths into markers in the buffer while showing human-readable labels on screen. The display rewrite is purely visual — the buffer keeps the real path for the model.
9
+ **Paste chips.** Replaces Pi's paste markers (`[paste #1 2232 chars]`) with styled icon chips: `image #1` for image pastes (blue), `text +N lines` / `text Nk chars` for text pastes (green). Collapses pasted image paths into markers in the buffer while showing human-readable labels on screen. The display rewrite is purely visual — the buffer keeps the real path for the model. Expansion wraps each paste in `<paste>…</paste>` so adjacent pastes don't merge into one wall in the model-facing text.
10
10
 
11
11
  **Thinking blocks.** Converts leaked reasoning tags (`<think>`/`<thinking>`) from some providers into native Pi `thinking` content blocks, which render dim + italic via the `thinkingText` theme token. No ANSI injection, no markdown blockquote shim. Applies during streaming (`message_update`) and finalization (`message_end`).
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-display",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Pi core extension — paste chip rendering and thinking block display",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -21,6 +21,7 @@ import { CustomEditor } from "@earendil-works/pi-coding-agent";
21
21
  import type { EditorTheme, TUI } from "@earendil-works/pi-tui";
22
22
  import { truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
23
23
  import { BOLD, FG_BLUE, FG_DIM, FG_GREEN, RST } from "@xynogen/pix-pretty/ansi";
24
+ import { icon } from "@xynogen/pix-pretty/icon-catalog";
24
25
 
25
26
  // Upstream stopped re-exporting `EditorFactory` from the package entry point,
26
27
  // so we reconstruct its signature locally from the still-exported primitives.
@@ -166,15 +167,20 @@ export function restyleMarkers(line: string, imageIds: Set<number>): string {
166
167
  (_full, idStr, _g2, _g3, linesStr, charsStr) => {
167
168
  const id = Number.parseInt(idStr, 10);
168
169
  if (imageIds.has(id)) {
169
- return chip(FG_BLUE, "󰋩", "image", `#${id}`);
170
+ return chip(FG_BLUE, icon("paste.image"), "image", `#${id}`);
170
171
  }
171
172
  if (linesStr) {
172
- return chip(FG_GREEN, "󰉿", "text", `${linesStr} lines`);
173
+ return chip(FG_GREEN, icon("paste.text"), "text", `${linesStr} lines`);
173
174
  }
174
175
  if (charsStr) {
175
- return chip(FG_GREEN, "󰉿", "text", `${compactNumber(charsStr)} chars`);
176
+ return chip(
177
+ FG_GREEN,
178
+ icon("paste.text"),
179
+ "text",
180
+ `${compactNumber(charsStr)} chars`,
181
+ );
176
182
  }
177
- return chip(FG_GREEN, "󰉿", "text", `#${id}`);
183
+ return chip(FG_GREEN, icon("paste.text"), "text", `#${id}`);
178
184
  },
179
185
  );
180
186
  }