@xynogen/pix-skills 0.6.2 → 0.6.3
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/README.md +2 -1
- package/package.json +1 -1
- package/skills/plan.md +8 -3
- package/src/index.test.ts +41 -1
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -183,7 +183,8 @@ lookups never run commands. Calls and results identify the operation as `list`,
|
|
|
183
183
|
at most the first 100 characters, while the full content still reaches the agent.
|
|
184
184
|
Copied-resource results show
|
|
185
185
|
the destination and byte size. Tool results follow Pix's configured auto-collapse
|
|
186
|
-
delay, including `read_skills
|
|
186
|
+
delay, including `read_skills`; expanding an elapsed result restores its normal
|
|
187
|
+
preview without clearing or restarting the collapse timer.
|
|
187
188
|
|
|
188
189
|
## Usage
|
|
189
190
|
|
package/package.json
CHANGED
package/skills/plan.md
CHANGED
|
@@ -64,6 +64,11 @@ Expected: PASS
|
|
|
64
64
|
|
|
65
65
|
### Save and Handoff
|
|
66
66
|
|
|
67
|
-
- Save plan to `.pi/plans/YYYY-MM-DD-<feature-name>.md`
|
|
68
|
-
|
|
69
|
-
-
|
|
67
|
+
- Save the plan locally to `.pi/plans/YYYY-MM-DD-<feature-name>.md` so an
|
|
68
|
+
execution agent can follow it via `/task`.
|
|
69
|
+
- Plans are local execution artifacts and MUST NOT be added to Git, committed,
|
|
70
|
+
pushed, or included in repository history under normal circumstances.
|
|
71
|
+
- If `.pi/` is ignored, leave it ignored. Never use `git add -f` for a plan.
|
|
72
|
+
- Only commit a plan when the user explicitly asks to version or publish that
|
|
73
|
+
specific plan; the directive itself is not permission.
|
|
74
|
+
- Announce: "Plan complete and saved locally. Ready to execute via `/task`."
|
package/src/index.test.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { mkdir, mkdtemp, rm, symlink, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import registerSkills, {
|
|
7
7
|
copySkillResource,
|
|
8
8
|
extractDescription,
|
|
9
9
|
extractName,
|
|
@@ -120,6 +120,46 @@ describe("formatCollapsedSkillResult", () => {
|
|
|
120
120
|
});
|
|
121
121
|
});
|
|
122
122
|
|
|
123
|
+
describe("skill renderer", () => {
|
|
124
|
+
it("restores the normal result when an elapsed card is expanded", () => {
|
|
125
|
+
let registered: Record<string, unknown> = {};
|
|
126
|
+
registerSkills({
|
|
127
|
+
registerTool(tool: unknown) {
|
|
128
|
+
registered = tool as Record<string, unknown>;
|
|
129
|
+
},
|
|
130
|
+
on() {},
|
|
131
|
+
} as never);
|
|
132
|
+
const renderResult = registered.renderResult as (...args: unknown[]) => {
|
|
133
|
+
render: (width: number) => string[];
|
|
134
|
+
};
|
|
135
|
+
const rendered = renderResult(
|
|
136
|
+
{
|
|
137
|
+
content: [{ type: "text", text: "portable guidance" }],
|
|
138
|
+
details: {
|
|
139
|
+
mode: "reference",
|
|
140
|
+
name: "docx",
|
|
141
|
+
resource: "references/guide.md",
|
|
142
|
+
bytes: 17,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{},
|
|
146
|
+
tagTheme,
|
|
147
|
+
{
|
|
148
|
+
expanded: true,
|
|
149
|
+
isError: false,
|
|
150
|
+
state: { collapsed: true },
|
|
151
|
+
invalidate: () => {},
|
|
152
|
+
},
|
|
153
|
+
)
|
|
154
|
+
.render(120)
|
|
155
|
+
.join("\n");
|
|
156
|
+
|
|
157
|
+
expect(rendered).toContain("REFERENCE · docx");
|
|
158
|
+
expect(rendered).toContain("portable guidance");
|
|
159
|
+
expect(rendered).not.toContain("✓ skill");
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
|
|
123
163
|
describe("formatExpandedSkillResult", () => {
|
|
124
164
|
it("gives description, instructions, reference, and copy distinct output", () => {
|
|
125
165
|
expect(
|
package/src/index.ts
CHANGED
|
@@ -537,7 +537,7 @@ function registerSkillLoader(pi: ExtensionAPI): void {
|
|
|
537
537
|
const details = result.details as SkillResultDetails | undefined;
|
|
538
538
|
if (!renderCtx.isError && details) {
|
|
539
539
|
const state = renderCtx.state as CollapseState;
|
|
540
|
-
if (tickCollapse("read_skills", state, renderCtx.invalidate)) {
|
|
540
|
+
if (tickCollapse("read_skills", state, renderCtx.invalidate, renderCtx.expanded)) {
|
|
541
541
|
component.setText(
|
|
542
542
|
formatCollapsedToolRow(theme, "skill", formatCollapsedSkillResult(details)),
|
|
543
543
|
);
|