pi-lean-ctx 3.5.17 → 3.5.19

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.
@@ -497,7 +497,13 @@ export default async function (pi: ExtensionAPI) {
497
497
  if (params.limit && params.limit > 0) searchArgs.push("-m", String(params.limit));
498
498
  searchArgs.push(params.pattern, absolutePath);
499
499
 
500
- const output = await execLeanCtx(pi, ["-c", ...searchArgs]);
500
+ const bin = resolveBinary();
501
+ const result = await pi.exec(bin, ["-c", ...searchArgs], { env: { ...process.env, LEAN_CTX_COMPRESS: "1" } });
502
+ if (result.code >= 2) {
503
+ const msg = (result.stderr || result.stdout || `lean-ctx grep failed: ${params.pattern}`).trim();
504
+ throw new Error(msg);
505
+ }
506
+ const output = result.code === 1 ? "(no matches)" : result.stdout;
501
507
  const decorated = withFooter(output, { always: true });
502
508
  return {
503
509
  content: [{ type: "text", text: decorated.text }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-lean-ctx",
3
- "version": "3.5.17",
3
+ "version": "3.5.19",
4
4
  "description": "Pi Coding Agent extension (CLI-first) \u2014 routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.",
5
5
  "keywords": [
6
6
  "pi-package",