pi-hashline-edit-pro 0.3.4 → 0.3.6
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/README.md +6 -2
- package/package.json +1 -1
- package/src/edit.ts +1 -1
- package/src/hashline/resolve.ts +1 -1
package/README.md
CHANGED
|
@@ -17,11 +17,15 @@ This fork makes two changes that compound:
|
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
+
From npm:
|
|
21
|
+
|
|
20
22
|
```bash
|
|
21
|
-
# From npm
|
|
22
23
|
pi install npm:pi-hashline-edit-pro
|
|
24
|
+
```
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
From a local checkout:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
25
29
|
pi install /path/to/pi-hashline-edit-pro
|
|
26
30
|
```
|
|
27
31
|
|
package/package.json
CHANGED
package/src/edit.ts
CHANGED
|
@@ -322,7 +322,7 @@ async function executeEditPipeline(
|
|
|
322
322
|
: [];
|
|
323
323
|
|
|
324
324
|
if (toolEdits.length === 0) {
|
|
325
|
-
throw new Error("
|
|
325
|
+
throw new Error("[E_BAD_SHAPE] Edit request requires a non-empty \"edits\" array.");
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
throwIfAborted(signal);
|
package/src/hashline/resolve.ts
CHANGED
|
@@ -157,7 +157,7 @@ function assertEditItem(edit: Record<string, unknown>, index: number): void {
|
|
|
157
157
|
`[E_BAD_OP] Edit ${index} uses unknown op "${edit.op}". Expected "replace", "append", or "prepend".`,
|
|
158
158
|
);
|
|
159
159
|
}
|
|
160
|
-
if ("pos" in edit && typeof edit.pos !== "string") {
|
|
160
|
+
if ("pos" in edit && typeof edit.pos !== "string" && edit.op !== "replace") {
|
|
161
161
|
throw new Error(
|
|
162
162
|
`[E_BAD_SHAPE] Edit ${index} field "pos" must be a string when provided.`,
|
|
163
163
|
);
|