@xynogen/pix-pretty 2.0.1 → 2.0.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/chips.ts +5 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-pretty",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Enhanced tool output rendering with syntax highlighting, file icons, tree views, diff rendering, and FFF search",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/chips.ts CHANGED
@@ -283,14 +283,11 @@ export function installChips(editor: CustomEditor): void {
283
283
 
284
284
  /** Activate chips: sent-message transformer + editor patch. pix-display calls this. */
285
285
  export function registerChips(pi: ExtensionAPI): void {
286
- // ponytail: local Pi 0.82 types predate the runtime Markdown transformer hook.
287
- const markdownPi = pi as ExtensionAPI & {
288
- registerMarkdownTransformer?: (
289
- transformer: (markdown: string, context: { messageType: string }) => string,
290
- ) => void;
291
- };
292
- markdownPi.registerMarkdownTransformer?.((markdown, { messageType }) =>
293
- messageType === "user" ? renderHistoryChips(markdown) : markdown,
286
+ // `messageTypes` skips Pi's assistant stream; `?.` and the `user` check cover older Pi runtimes (peer `*`).
287
+ pi.registerMarkdownTransformer?.(
288
+ (markdown, { messageType }) =>
289
+ messageType === "user" ? renderHistoryChips(markdown) : markdown,
290
+ { messageTypes: ["user"] },
294
291
  );
295
292
 
296
293
  pi.on("session_start", (_event, ctx) => {