pi-hashline-edit-pro 0.16.9 → 0.16.10

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/index.ts +4 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -7,6 +7,7 @@ import { regReplaceFlat } from "./src/replace-flat";
7
7
  import { regReplaceUndo } from "./src/replace-undo";
8
8
  import { regRead, fmtReadPreview } from "./src/read";
9
9
  import { toLF, stripBOM } from "./src/replace-diff";
10
+ import { resolveTarget } from "./src/fs-write";
10
11
  import { visLines } from "./src/utils";
11
12
  import { AUTO_READ_MAX } from "./src/constants";
12
13
  import {
@@ -88,13 +89,14 @@ export default function (pi: ExtensionAPI): void {
88
89
 
89
90
  try {
90
91
  const absolutePath = isAbsolute(filePath) ? filePath : join(ctx.cwd, filePath);
91
- const content = await readFile(absolutePath, "utf-8");
92
+ const resolvedPath = await resolveTarget(absolutePath);
93
+ const content = await readFile(resolvedPath, "utf-8");
92
94
  const { text: rawContent } = stripBOM(content);
93
95
  const normalized = toLF(rawContent);
94
96
 
95
97
  if (visLines(normalized).length === 0) return;
96
98
 
97
- const preview = await fmtReadPreview(normalized, { limit: AUTO_READ_MAX }, undefined, absolutePath);
99
+ const preview = await fmtReadPreview(normalized, { limit: AUTO_READ_MAX }, undefined, resolvedPath);
98
100
 
99
101
  return {
100
102
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-hashline-edit-pro",
3
- "version": "0.16.9",
3
+ "version": "0.16.10",
4
4
  "description": "Strict hashline read/replace tool for pi-coding-agent with hash-anchored edits (3-char, 18-bit, perfect hashing)",
5
5
  "main": "index.ts",
6
6
  "repository": {