@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.
- package/package.json +1 -1
- package/src/chips.ts +5 -8
package/package.json
CHANGED
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
|
-
//
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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) => {
|