@xynogen/pix-skills 0.6.1 → 0.6.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 +3 -2
- package/src/index.ts +15 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-skills",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Pi extension — agent skill loader (skill tool + skills bundle)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@xynogen/pix-data": "^0.3.2",
|
|
50
|
-
"@xynogen/pix-gate": "^0.1.13"
|
|
50
|
+
"@xynogen/pix-gate": "^0.1.13",
|
|
51
|
+
"@xynogen/pix-pretty": "^1.7.20"
|
|
51
52
|
}
|
|
52
53
|
}
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { fileURLToPath } from "node:url";
|
|
|
19
19
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
20
20
|
import { Text } from "@earendil-works/pi-tui";
|
|
21
21
|
import { type CollapseState, tickCollapse } from "@xynogen/pix-data/collapse";
|
|
22
|
+
import { formatCollapsedToolRow, hideCollapsedToolCall } from "@xynogen/pix-pretty/utils";
|
|
22
23
|
import { Type } from "typebox";
|
|
23
24
|
import {
|
|
24
25
|
directiveBlockReason,
|
|
@@ -510,13 +511,20 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
510
511
|
}
|
|
511
512
|
},
|
|
512
513
|
|
|
513
|
-
renderCall(args, theme) {
|
|
514
|
+
renderCall(args, theme, renderCtx) {
|
|
515
|
+
const component =
|
|
516
|
+
renderCtx.lastComponent instanceof Text ? renderCtx.lastComponent : new Text("", 0, 0);
|
|
517
|
+
if (
|
|
518
|
+
hideCollapsedToolCall(renderCtx.state as CollapseState, renderCtx.expanded, (value) =>
|
|
519
|
+
component.setText(value),
|
|
520
|
+
)
|
|
521
|
+
)
|
|
522
|
+
return component;
|
|
514
523
|
const label = formatSkillCallLabel(args as SkillCallArgs);
|
|
515
|
-
|
|
524
|
+
component.setText(
|
|
516
525
|
`${theme.fg("toolTitle", theme.bold("read_skills"))} ${theme.fg("muted", label)}`,
|
|
517
|
-
0,
|
|
518
|
-
0,
|
|
519
526
|
);
|
|
527
|
+
return component;
|
|
520
528
|
},
|
|
521
529
|
|
|
522
530
|
renderResult(result, _options, theme, renderCtx) {
|
|
@@ -530,7 +538,9 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
530
538
|
if (!renderCtx.isError && details) {
|
|
531
539
|
const state = renderCtx.state as CollapseState;
|
|
532
540
|
if (tickCollapse("read_skills", state, renderCtx.invalidate)) {
|
|
533
|
-
component.setText(
|
|
541
|
+
component.setText(
|
|
542
|
+
formatCollapsedToolRow(theme, "skill", formatCollapsedSkillResult(details)),
|
|
543
|
+
);
|
|
534
544
|
return component;
|
|
535
545
|
}
|
|
536
546
|
component.setText(
|