@xynogen/pix-find 0.1.26 → 0.2.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.
Files changed (2) hide show
  1. package/package.json +6 -3
  2. package/src/extension.ts +4 -2
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@xynogen/pix-find",
3
- "version": "0.1.26",
3
+ "version": "0.2.0",
4
4
  "description": "Pi tool — glob file search",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
+ "exports": {
8
+ ".": "./src/index.ts",
9
+ "./extension": "./src/extension.ts"
10
+ },
7
11
  "scripts": {
8
12
  "test": "bun test"
9
13
  },
@@ -34,9 +38,8 @@
34
38
  "access": "public"
35
39
  },
36
40
  "dependencies": {
37
- "@xynogen/pix-data": "^0.4.3",
38
41
  "@xynogen/pix-pretty": "^1.11.2",
39
- "@xynogen/pix-runtime": "^0.6.0"
42
+ "@xynogen/pix-runtime": "^0.8.0"
40
43
  },
41
44
  "peerDependencies": {
42
45
  "@earendil-works/pi-coding-agent": "*"
package/src/extension.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  createFindToolDefinition,
3
3
  createFindTool as createFindToolFallback,
4
+ type ExtensionAPI,
4
5
  type FindToolInput,
5
6
  } from "@earendil-works/pi-coding-agent";
6
7
  import { CursorStore, fffState } from "@xynogen/pix-pretty/fff";
@@ -9,7 +10,8 @@ import { shortPath, viewportTextConstructor } from "@xynogen/pix-pretty/utils";
9
10
  import { once } from "@xynogen/pix-runtime/once";
10
11
  import { registerFindTool } from "./find.js";
11
12
 
12
- export default function pixFindExtension(pi: PiPrettyApi): void {
13
+ export default function pixFindExtension(pi: ExtensionAPI): void {
14
+ const prettyPi = pi as unknown as PiPrettyApi;
13
15
  once(pi, "pix-find", () => {
14
16
  const createFindTool = (createFindToolDefinition ??
15
17
  createFindToolFallback) as unknown as ToolFactory<FindToolInput>;
@@ -25,7 +27,7 @@ export default function pixFindExtension(pi: PiPrettyApi): void {
25
27
  const cwd = process.cwd();
26
28
  const home = process.env.HOME ?? "";
27
29
 
28
- registerFindTool(pi, createFindTool, {
30
+ registerFindTool(prettyPi, createFindTool, {
29
31
  cwd,
30
32
  sp: (p: string) => shortPath(cwd, home, p),
31
33
  TextComponent: viewportTextConstructor(TextComponent),