pi-readseek 0.8.17 → 0.8.18

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 +13 -24
  2. package/package.json +2 -2
package/dist/index.ts CHANGED
@@ -1390,6 +1390,15 @@ function resolveReadSeekToolDisplayMode(tool) {
1390
1390
  }
1391
1391
 
1392
1392
  // src/readseek-client.ts
1393
+ function appendGitSelection(args, options) {
1394
+ const selection = [
1395
+ options.cached && "cached",
1396
+ options.others && "others",
1397
+ options.ignored && "ignored"
1398
+ ].filter((value) => Boolean(value));
1399
+ if (selection.length > 0)
1400
+ args.push("--git", selection.join(","));
1401
+ }
1393
1402
  function normalizeLanguage(language) {
1394
1403
  return language === "java" ? "Java" : language;
1395
1404
  }
@@ -1826,12 +1835,7 @@ async function readSeekSearch(target, pattern, options = {}) {
1826
1835
  const args = ["search", target, pattern];
1827
1836
  if (options.language)
1828
1837
  args.push("--language", options.language);
1829
- if (options.cached)
1830
- args.push("--cached");
1831
- if (options.others)
1832
- args.push("--others");
1833
- if (options.ignored)
1834
- args.push("--ignored");
1838
+ appendGitSelection(args, options);
1835
1839
  return parseSearchOutput(await runReadSeek(args, { signal: options.signal })).results;
1836
1840
  }
1837
1841
  async function readSeekMapContent(filePath, content, options = {}) {
@@ -1877,12 +1881,7 @@ async function readSeekRefs(target, name, options = {}) {
1877
1881
  args.push("--column", String(options.column));
1878
1882
  if (options.language)
1879
1883
  args.push("--language", options.language);
1880
- if (options.cached)
1881
- args.push("--cached");
1882
- if (options.others)
1883
- args.push("--others");
1884
- if (options.ignored)
1885
- args.push("--ignored");
1884
+ appendGitSelection(args, options);
1886
1885
  return parseRefsOutput(await runReadSeek(args, { signal: options.signal })).references;
1887
1886
  }
1888
1887
  function parseDiagnosticKind(value) {
@@ -2143,12 +2142,7 @@ async function readSeekRename(filePath, options) {
2143
2142
  args.push("--workspace", options.workspace);
2144
2143
  if (options.language)
2145
2144
  args.push("--language", options.language);
2146
- if (options.cached)
2147
- args.push("--cached");
2148
- if (options.others)
2149
- args.push("--others");
2150
- if (options.ignored)
2151
- args.push("--ignored");
2145
+ appendGitSelection(args, options);
2152
2146
  return parseRenameOutput(await runReadSeek(args, { signal: options.signal }));
2153
2147
  }
2154
2148
  function parseIdentifyOutput(value) {
@@ -2218,12 +2212,7 @@ async function readSeekDef(target, options) {
2218
2212
  const args = ["def", target, "--format", "plain", options.name];
2219
2213
  if (options.language)
2220
2214
  args.push("--language", options.language);
2221
- if (options.cached)
2222
- args.push("--cached");
2223
- if (options.others)
2224
- args.push("--others");
2225
- if (options.ignored)
2226
- args.push("--ignored");
2215
+ appendGitSelection(args, options);
2227
2216
  return parseDefCompact(await runReadSeek(args, { signal: options.signal }));
2228
2217
  }
2229
2218
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-readseek",
3
- "version": "0.8.17",
3
+ "version": "0.8.18",
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.17",
43
+ "@jarkkojs/readseek": "^0.8.18",
44
44
  "diff": "^9.0.0",
45
45
  "xxhash-wasm": "^1.1.0"
46
46
  },