@xynogen/pix-skills 0.9.1 → 0.10.0
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 +4 -4
- package/skills/lint.md +1 -1
- package/skills/lsp.md +1 -1
- package/src/index.ts +25 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-skills",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Pi extension
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"description": "Pi extension \u2014 agent skill loader (skill tool + skills bundle)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@xynogen/pix-gate": "^0.4.0",
|
|
51
|
-
"@xynogen/pix-pretty": "^1.
|
|
52
|
-
"@xynogen/pix-runtime": "^0.
|
|
51
|
+
"@xynogen/pix-pretty": "^1.30.0",
|
|
52
|
+
"@xynogen/pix-runtime": "^0.13.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/skills/lint.md
CHANGED
|
@@ -9,7 +9,7 @@ Pix does not bundle linters. Use the project toolchain.
|
|
|
9
9
|
|
|
10
10
|
## Selection order
|
|
11
11
|
|
|
12
|
-
1. Run `
|
|
12
|
+
1. Run `lsp_diagnostics` for language-server diagnostics.
|
|
13
13
|
2. Prefer the project's `lint` or `check` script.
|
|
14
14
|
3. Use the tool named by a project config file.
|
|
15
15
|
4. Use the language default below only when the project has no choice.
|
package/skills/lsp.md
CHANGED
|
@@ -14,7 +14,7 @@ installation. Configure it in `<project>/.pi/lsp.json`.
|
|
|
14
14
|
2. Prefer an existing server in project dependencies or on `PATH`.
|
|
15
15
|
3. Ask before installing a missing server. Use a project-local install.
|
|
16
16
|
4. Add only the selected language to `.pi/lsp.json`.
|
|
17
|
-
5. Run `
|
|
17
|
+
5. Run `lsp_diagnostics` on one source file. Its manager reads `.pi/lsp.json` directly.
|
|
18
18
|
|
|
19
19
|
Do not add all languages. Do not install a server globally. Do not use a server
|
|
20
20
|
because it appears first in this table; project configuration and existing tools
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { Text } from "@earendil-works/pi-tui";
|
|
|
19
19
|
import {
|
|
20
20
|
dotJoin,
|
|
21
21
|
formatCollapsedToolRow,
|
|
22
|
+
formatToolCallTitle,
|
|
22
23
|
frameToolResult,
|
|
23
24
|
getErrorMessage,
|
|
24
25
|
hideCollapsedToolCall,
|
|
@@ -451,8 +452,7 @@ export function formatExpandedSkillResult(details: SkillResultDetails, text: str
|
|
|
451
452
|
return `${dotJoin(["DESCRIPTION", details.name])}\n${description}`;
|
|
452
453
|
}
|
|
453
454
|
case "instructions": {
|
|
454
|
-
|
|
455
|
-
return `${dotJoin(["INSTRUCTIONS", details.name, `${details.lines} lines`])}\n${preview}`;
|
|
455
|
+
return `${dotJoin(["INSTRUCTIONS", details.name, `${details.lines} lines`])}\n${text}`;
|
|
456
456
|
}
|
|
457
457
|
case "reference":
|
|
458
458
|
return `${dotJoin(["REFERENCE", details.name])}\n${dotJoin([details.resource, humanSize(details.bytes)])}\n${text}`;
|
|
@@ -690,7 +690,7 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
690
690
|
return component;
|
|
691
691
|
const label = formatSkillCallLabel(args as SkillCallArgs);
|
|
692
692
|
component.setText(
|
|
693
|
-
`${theme
|
|
693
|
+
`${formatToolCallTitle(theme, "read_skills", renderCtx)} ${theme.fg("dim", label)}`,
|
|
694
694
|
);
|
|
695
695
|
return component;
|
|
696
696
|
},
|
|
@@ -703,7 +703,28 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
703
703
|
const component =
|
|
704
704
|
renderCtx.lastComponent instanceof Text ? renderCtx.lastComponent : new Text("", 0, 0);
|
|
705
705
|
const details = result.details as SkillResultDetails | undefined;
|
|
706
|
-
if (
|
|
706
|
+
if (
|
|
707
|
+
!options.isPartial &&
|
|
708
|
+
renderCtx.isError &&
|
|
709
|
+
tickCollapse(
|
|
710
|
+
"read_skills",
|
|
711
|
+
renderCtx.state as CollapseState,
|
|
712
|
+
renderCtx.invalidate,
|
|
713
|
+
options.expanded,
|
|
714
|
+
)
|
|
715
|
+
) {
|
|
716
|
+
component.setText(
|
|
717
|
+
formatCollapsedToolRow(
|
|
718
|
+
theme,
|
|
719
|
+
"read_skills",
|
|
720
|
+
text?.split("\n")[0] ?? "failed",
|
|
721
|
+
"",
|
|
722
|
+
"error",
|
|
723
|
+
),
|
|
724
|
+
);
|
|
725
|
+
return component;
|
|
726
|
+
}
|
|
727
|
+
if (!options.isPartial && !renderCtx.isError && details) {
|
|
707
728
|
const state = renderCtx.state as CollapseState;
|
|
708
729
|
if (tickCollapse("read_skills", state, renderCtx.invalidate, renderCtx.expanded)) {
|
|
709
730
|
// Collapsed row mirrors the call label: `<action> <target> · <meta>` so
|