pi-hashline-edit-pro 0.17.10 → 0.17.11

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/replace.ts +7 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-hashline-edit-pro",
3
- "version": "0.17.10",
3
+ "version": "0.17.11",
4
4
  "type": "module",
5
5
  "description": "Strict hashline read/replace tool for pi-coding-agent with hash-anchored edits (3-char, 18-bit, perfect hashing)",
6
6
  "main": "index.ts",
package/src/replace.ts CHANGED
@@ -313,8 +313,6 @@ const MODE_CFG = {
313
313
  } as const;
314
314
 
315
315
  export function buildToolDef(opts: { flat: boolean; autoRead?: boolean }): ToolDef {
316
- const autoRead = opts.autoRead ?? false;
317
-
318
316
  const cfg = MODE_CFG[opts.flat ? "flat" : "bulk"];
319
317
 
320
318
  const E_DESC = loadP("../prompts/replace.md");
@@ -337,7 +335,13 @@ export function buildToolDef(opts: { flat: boolean; autoRead?: boolean }): ToolD
337
335
  if (!isRec(args)) return args as any;
338
336
  const record = { ...args };
339
337
  normalizeFilePath(record);
340
- return normReq(record) as any;
338
+ if (has(record, "content_lines") && typeof record.content_lines === "string") {
339
+ try {
340
+ const parsed = JSON.parse(record.content_lines as string);
341
+ if (Array.isArray(parsed)) record.content_lines = parsed;
342
+ } catch {}
343
+ }
344
+ return record;
341
345
  }
342
346
  : (args: unknown) =>
343
347
  normReq(args) as ReqParams,