pi-hashline-edit-pro 4.2.2 → 4.2.3

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": "pi-hashline-edit-pro",
3
- "version": "4.2.2",
3
+ "version": "4.2.3",
4
4
  "type": "module",
5
5
  "description": "Hash-anchored read/replace/insert/grep tools for pi-coding-agent. Every line gets a unique 4-char tokenizer-friendly anchor that stays stable across edits; stale or ambiguous anchors are rejected, never fuzzy-matched. Undo persists across restarts.",
6
6
  "main": "index.ts",
@@ -219,7 +219,7 @@ function fingerprintIndex(state: SessionState, path: string): Map<string, string
219
219
  return index;
220
220
  }
221
221
 
222
- const MINT_PROBE_LIMIT = 8192;
222
+ export const MINT_PROBE_LIMIT = 8192;
223
223
 
224
224
  export function mintAnchor(state: SessionState): string {
225
225
  for (let probe = 0; probe < MINT_PROBE_LIMIT; probe++) {
package/src/grep.ts CHANGED
@@ -2,7 +2,7 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
2
  import { formatSize, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, type TruncationResult } from "@earendil-works/pi-coding-agent";
3
3
  import { Type } from "typebox";
4
4
  import { stat } from "fs/promises";
5
- import { dirname, join, relative } from "path";
5
+ import { dirname, isAbsolute, join, relative, win32 } from "path";
6
6
  import { spawn, spawnSync } from "child_process";
7
7
  import { createInterface } from "readline";
8
8
  import { tryReadNormFile } from "./file-reader";
@@ -372,7 +372,7 @@ async function collectRgMatches(
372
372
  if (typeof filePath === "string" && typeof lineNumber === "number") {
373
373
  let abs: string;
374
374
  try {
375
- abs = filePath.startsWith("/") || /^[A-Za-z]:\\/.test(filePath) ? filePath : join(searchPath, filePath);
375
+ abs = isAbsolute(filePath) || win32.isAbsolute(filePath) ? filePath : join(searchPath, filePath);
376
376
  } catch {
377
377
  abs = filePath;
378
378
  }