pi-readseek 0.8.11 → 0.8.13
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/dist/index.ts +3 -9
- package/package.json +3 -3
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" &&
|
|
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.
|
|
3
|
+
"version": "0.8.13",
|
|
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.
|
|
43
|
+
"@jarkkojs/readseek": "^0.8.13",
|
|
44
44
|
"diff": "^9.0.0",
|
|
45
45
|
"xxhash-wasm": "^1.1.0"
|
|
46
46
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@sinclair/typebox": "*"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@earendil-works/pi-ai": "^0.
|
|
53
|
+
"@earendil-works/pi-ai": "^0.82.1",
|
|
54
54
|
"@earendil-works/pi-coding-agent": "^0.82.1",
|
|
55
55
|
"@earendil-works/pi-tui": "^0.82.1",
|
|
56
56
|
"@sinclair/typebox": "^0.34.48",
|