@xynogen/pix-skills 0.9.1 → 0.9.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. 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.9.1",
4
- "description": "Pi extension — agent skill loader (skill tool + skills bundle)",
3
+ "version": "0.9.2",
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.29.0",
52
- "@xynogen/pix-runtime": "^0.12.2"
51
+ "@xynogen/pix-pretty": "^1.30.0",
52
+ "@xynogen/pix-runtime": "^0.13.0"
53
53
  }
54
54
  }
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
- const preview = text.length > 100 ? `${text.slice(0, 100)}...` : text;
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.fg("toolTitle", theme.bold("read_skills"))} ${theme.fg("dim", label)}`,
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 (!renderCtx.isError && details) {
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