@xynogen/pix-edit 0.1.15 → 0.1.16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-edit",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Pi tool — precise text replacement edit with diff rendering",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/edit.test.ts CHANGED
@@ -19,11 +19,11 @@ class MockTextComponent {
19
19
  }
20
20
 
21
21
  describe("registerEditTool", () => {
22
- it("registers a tool named 'edit'", () => {
23
- const tools: string[] = [];
22
+ it("registers a self-rendered edit tool", () => {
23
+ const tools: Array<{ name: string; renderShell?: string }> = [];
24
24
  const mockPi: PiPrettyApi = {
25
25
  registerTool(t: unknown) {
26
- tools.push((t as { name: string }).name);
26
+ tools.push(t as { name: string; renderShell?: string });
27
27
  },
28
28
  registerCommand() {},
29
29
  on() {},
@@ -49,7 +49,9 @@ describe("registerEditTool", () => {
49
49
  },
50
50
  (_id: string, _inv: () => void) => {},
51
51
  );
52
- expect(tools).toEqual(["edit"]);
52
+ expect(tools).toHaveLength(1);
53
+ expect(tools[0]?.name).toBe("edit");
54
+ expect(tools[0]?.renderShell).toBe("self");
53
55
  });
54
56
 
55
57
  it("restores the bounded diff when an elapsed card is expanded", () => {
package/src/edit.ts CHANGED
@@ -114,6 +114,7 @@ export function registerEditTool(
114
114
  pi.registerTool({
115
115
  ...origEdit,
116
116
  name: "edit",
117
+ renderShell: "self",
117
118
 
118
119
  async execute(
119
120
  tid: string,