@xynogen/pix-skills 0.7.13 → 0.7.14

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 +1 -1
  2. package/src/index.ts +17 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-skills",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "Pi extension — agent skill loader (skill tool + skills bundle)",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
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 {
22
+ dotJoin,
22
23
  formatCollapsedToolRow,
23
24
  hideCollapsedToolCall,
24
25
  humanSize,
@@ -292,7 +293,7 @@ export type ThemeLike = {
292
293
  };
293
294
 
294
295
  export function formatSkillList(names: string[]): string {
295
- return `Available skills (${names.length}): ${names.join(" · ")}`;
296
+ return `Available skills (${names.length}): ${dotJoin(names)}`;
296
297
  }
297
298
 
298
299
  function formatInstalls(installs: number): string {
@@ -308,7 +309,7 @@ export function formatRemoteSkillSearch(query: string, results: RemoteSkillSearc
308
309
  `skills.sh matches for "${query}" (${results.length}, installs descending):`,
309
310
  ...ranked.map(
310
311
  (result, index) =>
311
- `${index + 1}. ${result.name} · ${result.source} · ${formatInstalls(result.installs)} installs`,
312
+ `${index + 1}. ${dotJoin([result.name, result.source, `${formatInstalls(result.installs)} installs`])}`,
312
313
  ),
313
314
  ].join("\n");
314
315
  }
@@ -332,15 +333,15 @@ export type SkillResultDetails =
332
333
  | { mode: "copy"; name: string; resource: string; output: string; bytes: number };
333
334
 
334
335
  export function formatSkillCallLabel(args: SkillCallArgs): string {
335
- if (args.search) return `search · ${args.search}`;
336
- if (args.source && args.name) return `remote · ${args.source}@${args.name}`;
336
+ if (args.search) return dotJoin(["search", args.search]);
337
+ if (args.source && args.name) return dotJoin(["remote", `${args.source}@${args.name}`]);
337
338
  if (!args.name) return "list";
338
339
  if (args.resource && args.output) {
339
- return `copy · ${args.name}/${args.resource} → ${args.output}`;
340
+ return dotJoin(["copy", `${args.name}/${args.resource} → ${args.output}`]);
340
341
  }
341
- if (args.resource) return `reference · ${args.name}/${args.resource}`;
342
- if (args.full) return `instructions · ${args.name}`;
343
- return `description · ${args.name}`;
342
+ if (args.resource) return dotJoin(["reference", `${args.name}/${args.resource}`]);
343
+ if (args.full) return dotJoin(["instructions", args.name]);
344
+ return dotJoin(["description", args.name]);
344
345
  }
345
346
 
346
347
  export function formatCollapsedSkillResult(details: SkillResultDetails): string {
@@ -350,13 +351,13 @@ export function formatCollapsedSkillResult(details: SkillResultDetails): string
350
351
  case "search":
351
352
  return `${details.count} matches for “${details.query}”`;
352
353
  case "description":
353
- return `${details.name} · description`;
354
+ return dotJoin([details.name, "description"]);
354
355
  case "instructions":
355
- return `${details.name} · ${details.lines} instruction lines`;
356
+ return dotJoin([details.name, `${details.lines} instruction lines`]);
356
357
  case "reference":
357
- return `${details.name} · reference · ${humanSize(details.bytes)}`;
358
+ return dotJoin([details.name, "reference", humanSize(details.bytes)]);
358
359
  case "copy":
359
- return `copied · ${details.output} · ${humanSize(details.bytes)}`;
360
+ return dotJoin(["copied", details.output, humanSize(details.bytes)]);
360
361
  }
361
362
  }
362
363
 
@@ -389,16 +390,16 @@ export function formatExpandedSkillResult(details: SkillResultDetails, text: str
389
390
  case "description": {
390
391
  const prefix = `${details.name}:`;
391
392
  const description = text.startsWith(prefix) ? text.slice(prefix.length).trimStart() : text;
392
- return `DESCRIPTION · ${details.name}\n${description}`;
393
+ return `${dotJoin(["DESCRIPTION", details.name])}\n${description}`;
393
394
  }
394
395
  case "instructions": {
395
396
  const preview = text.length > 100 ? `${text.slice(0, 100)}...` : text;
396
- return `INSTRUCTIONS · ${details.name} · ${details.lines} lines\n${preview}`;
397
+ return `${dotJoin(["INSTRUCTIONS", details.name, `${details.lines} lines`])}\n${preview}`;
397
398
  }
398
399
  case "reference":
399
- return `REFERENCE · ${details.name}\n${details.resource} · ${humanSize(details.bytes)}\n${text}`;
400
+ return `${dotJoin(["REFERENCE", details.name])}\n${dotJoin([details.resource, humanSize(details.bytes)])}\n${text}`;
400
401
  case "copy":
401
- return `COPIED · ${details.name}\n${details.resource} → ${details.output} · ${humanSize(details.bytes)}`;
402
+ return `${dotJoin(["COPIED", details.name])}\n${dotJoin([`${details.resource} → ${details.output}`, humanSize(details.bytes)])}`;
402
403
  }
403
404
  }
404
405