pi-readseek 0.8.12 → 0.8.14

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/dist/index.ts +3 -9
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -3292,24 +3292,18 @@ async function executeRead(opts) {
3292
3292
  const message = `Invalid page: expected a positive integer, received ${page.value}.`;
3293
3293
  return buildToolErrorResult("read", "invalid-page", message, { path: rawParams.path });
3294
3294
  }
3295
+ const rawSymbol = typeof rawParams.symbol === "string" && rawParams.symbol.trim().length > 0 ? rawParams.symbol.trim() : undefined;
3295
3296
  const rawBundle = typeof rawParams.bundle === "string" ? rawParams.bundle.trim() : undefined;
3296
- const requestedMapViaBundle = rawBundle === "map" || rawBundle === "local" && rawParams.symbol === undefined && (rawParams.map ?? true);
3297
+ const requestedMapViaBundle = rawBundle === "map" || rawBundle === "local" && rawSymbol === undefined && (rawParams.map ?? true);
3297
3298
  const p = {
3298
3299
  ...rawParams,
3299
3300
  offset: offset.value,
3300
3301
  limit: limit.value,
3301
3302
  page: page.value,
3303
+ symbol: rawSymbol,
3302
3304
  map: rawParams.map === true || requestedMapViaBundle,
3303
3305
  bundle: requestedMapViaBundle ? undefined : rawBundle
3304
3306
  };
3305
- if (rawParams.symbol !== undefined) {
3306
- const trimmedSymbol = typeof rawParams.symbol === "string" ? rawParams.symbol.trim() : "";
3307
- if (trimmedSymbol.length === 0) {
3308
- const message = "Invalid symbol: expected a non-empty string.";
3309
- return buildToolErrorResult("read", "invalid-params-combo", message, { path: rawParams.path });
3310
- }
3311
- p.symbol = trimmedSymbol;
3312
- }
3313
3307
  const rawPath = p.path.replace(/^@/, "");
3314
3308
  const absolutePath = resolveToCwd(rawPath, cwd);
3315
3309
  const succeed = (result) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-readseek",
3
- "version": "0.8.12",
3
+ "version": "0.8.14",
4
4
  "description": "Pi extension for readseek-backed hash-anchored read/edit/grep, structural code maps, structural search, and file exploration",
5
5
  "type": "module",
6
6
  "exports": {
@@ -40,7 +40,7 @@
40
40
  "node": ">=20.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@jarkkojs/readseek": "^0.8.12",
43
+ "@jarkkojs/readseek": "^0.8.14",
44
44
  "diff": "^9.0.0",
45
45
  "xxhash-wasm": "^1.1.0"
46
46
  },