@xynogen/pix-edit 0.1.28 → 0.2.1
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 +6 -3
- package/src/edit.ts +1 -1
- package/src/extension.ts +4 -2
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-edit",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Pi tool — precise text replacement edit with diff rendering",
|
|
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.
|
|
42
|
+
"@xynogen/pix-runtime": "^0.8.0"
|
|
40
43
|
},
|
|
41
44
|
"peerDependencies": {
|
|
42
45
|
"@earendil-works/pi-coding-agent": "*",
|
package/src/edit.ts
CHANGED
|
@@ -202,7 +202,7 @@ export function registerEditTool(
|
|
|
202
202
|
)
|
|
203
203
|
)
|
|
204
204
|
return text;
|
|
205
|
-
const hdr = `${theme.fg("toolTitle", theme.bold("edit"))} ${theme.fg("
|
|
205
|
+
const hdr = `${theme.fg("toolTitle", theme.bold("edit"))} ${theme.fg("muted", sp(fp))}`;
|
|
206
206
|
|
|
207
207
|
if (operations.length === 0) {
|
|
208
208
|
text.setText(fillToolBackground(hdr));
|
package/src/extension.ts
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
createEditToolDefinition,
|
|
3
3
|
createEditTool as createEditToolFallback,
|
|
4
4
|
type EditToolInput,
|
|
5
|
+
type ExtensionAPI,
|
|
5
6
|
} from "@earendil-works/pi-coding-agent";
|
|
6
7
|
import { CursorStore, fffState } from "@xynogen/pix-pretty/fff";
|
|
7
8
|
import { attachResizeListener, trackInvalidator } from "@xynogen/pix-pretty/resize";
|
|
@@ -10,7 +11,8 @@ import { shortPath, viewportTextConstructor } from "@xynogen/pix-pretty/utils";
|
|
|
10
11
|
import { once } from "@xynogen/pix-runtime/once";
|
|
11
12
|
import { registerEditTool } from "./edit.js";
|
|
12
13
|
|
|
13
|
-
export default function pixEditExtension(pi:
|
|
14
|
+
export default function pixEditExtension(pi: ExtensionAPI): void {
|
|
15
|
+
const prettyPi = pi as unknown as PiPrettyApi;
|
|
14
16
|
once(pi, "pix-edit", () => {
|
|
15
17
|
const createEditTool = (createEditToolDefinition ??
|
|
16
18
|
createEditToolFallback) as unknown as ToolFactory<EditToolInput>;
|
|
@@ -29,7 +31,7 @@ export default function pixEditExtension(pi: PiPrettyApi): void {
|
|
|
29
31
|
attachResizeListener();
|
|
30
32
|
|
|
31
33
|
registerEditTool(
|
|
32
|
-
|
|
34
|
+
prettyPi,
|
|
33
35
|
createEditTool,
|
|
34
36
|
{
|
|
35
37
|
cwd,
|