@xynogen/pix-display 0.3.7 → 0.3.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/package.json +3 -4
- package/src/code-blocks.ts +4 -3
- package/src/index.ts +1 -1
- package/src/thinking.ts +2 -1
- package/src/working.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-display",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "Pi core extension — inline chips, thinking blocks, and framed code rendering",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"src",
|
|
12
|
-
"!src/**/*.test.*",
|
|
13
12
|
"README.md",
|
|
14
13
|
"LICENSE"
|
|
15
14
|
],
|
|
@@ -39,8 +38,8 @@
|
|
|
39
38
|
"access": "public"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"@xynogen/pix-pretty": "^1.
|
|
43
|
-
"@xynogen/pix-runtime": "^0.
|
|
41
|
+
"@xynogen/pix-pretty": "^2.1.0",
|
|
42
|
+
"@xynogen/pix-runtime": "^0.20.0"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
45
|
"@earendil-works/pi-coding-agent": "*",
|
package/src/code-blocks.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AssistantMessageComponent,
|
|
3
|
-
type ExtensionAPI,
|
|
4
3
|
type Theme,
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
truncateToWidth,
|
|
5
|
+
visibleWidth,
|
|
6
|
+
} from "@xynogen/pix-pretty/tui";
|
|
7
|
+
import type { ExtensionAPI } from "@xynogen/pix-runtime/host";
|
|
7
8
|
|
|
8
9
|
const OPENING_FENCE_RE = /^```([^`]*)$/;
|
|
9
10
|
const CLOSING_FENCE_RE = /^```\s*$/;
|
package/src/index.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* code-blocks.ts Framed, syntax-highlighted code fences in LLM output
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
14
13
|
import { registerChips } from "@xynogen/pix-pretty/chips";
|
|
14
|
+
import type { ExtensionAPI } from "@xynogen/pix-runtime/host";
|
|
15
15
|
import { once } from "@xynogen/pix-runtime/once";
|
|
16
16
|
|
|
17
17
|
import codeBlocksExtension from "./code-blocks.ts";
|
package/src/thinking.ts
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* To add a new tag variant, append to TAG_NAMES below.
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
import type { ExtensionAPI } from "@
|
|
40
|
+
import type { ExtensionAPI } from "@xynogen/pix-runtime/host";
|
|
41
41
|
|
|
42
42
|
// Reasoning tag names to render. Add new variants here.
|
|
43
43
|
const TAG_NAMES = ["think", "thinking"] as const;
|
|
@@ -249,6 +249,7 @@ export default function thinkingExtension(pi: ExtensionAPI) {
|
|
|
249
249
|
// dim+italic rendering via the `thinkingText` theme token.
|
|
250
250
|
if (changed) {
|
|
251
251
|
msg.content = content;
|
|
252
|
+
// SAFETY: msg is the event's own assistant message, mutated in place; Msg is a local subset of Pi's type.
|
|
252
253
|
return { message: msg as unknown as never };
|
|
253
254
|
}
|
|
254
255
|
});
|
package/src/working.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
1
|
import { formatDuration } from "@xynogen/pix-pretty/widget-format";
|
|
2
|
+
import type { ExtensionAPI, ExtensionContext } from "@xynogen/pix-runtime/host";
|
|
3
3
|
|
|
4
4
|
export default function workingExtension(pi: ExtensionAPI): void {
|
|
5
5
|
let timer: ReturnType<typeof setInterval> | undefined;
|