grepmax 0.12.7 → 0.12.8

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.
@@ -80,12 +80,19 @@ class ProjectBatchProcessor {
80
80
  this.ftsInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {
81
81
  if (this.closed || this.processing)
82
82
  return;
83
+ this.processing = true;
83
84
  try {
84
85
  yield this.vectorDb.runMaintenance();
85
86
  }
86
87
  catch (err) {
87
88
  console.error(`[${this.wtag}] Maintenance failed:`, err);
88
89
  }
90
+ finally {
91
+ this.processing = false;
92
+ // Process any events that queued during maintenance
93
+ if (this.pending.size > 0)
94
+ this.scheduleBatch();
95
+ }
89
96
  }), FTS_REBUILD_INTERVAL_MS);
90
97
  this.ftsInterval.unref();
91
98
  }
@@ -93,12 +100,10 @@ class ProjectBatchProcessor {
93
100
  var _a;
94
101
  if (this.closed)
95
102
  return;
96
- if (event !== "unlink") {
97
- const ext = path.extname(absPath).toLowerCase();
98
- const bn = path.basename(absPath).toLowerCase();
99
- if (!config_1.INDEXABLE_EXTENSIONS.has(ext) && !config_1.INDEXABLE_EXTENSIONS.has(bn))
100
- return;
101
- }
103
+ const ext = path.extname(absPath).toLowerCase();
104
+ const bn = path.basename(absPath).toLowerCase();
105
+ if (!config_1.INDEXABLE_EXTENSIONS.has(ext) && !config_1.INDEXABLE_EXTENSIONS.has(bn))
106
+ return;
102
107
  this.pending.set(absPath, event);
103
108
  (_a = this.onActivity) === null || _a === void 0 ? void 0 : _a.call(this);
104
109
  this.scheduleBatch();
@@ -62,6 +62,8 @@ exports.WATCHER_IGNORE_GLOBS = [
62
62
  ".next",
63
63
  "lancedb",
64
64
  ".*", // dotfiles
65
+ "**/*.tmp.*", // editor atomic save artifacts
66
+ "**/*.sb-*", // Xcode swap files
65
67
  ];
66
68
  function startWatcher(opts) {
67
69
  return __awaiter(this, void 0, void 0, function* () {
@@ -405,7 +405,17 @@ class VectorDB {
405
405
  for (let i = 0; i < unique.length; i += batchSize) {
406
406
  const slice = unique.slice(i, i + batchSize);
407
407
  const values = slice.map((p) => `'${(0, filter_builder_1.escapeSqlString)(p)}'`).join(",");
408
- yield table.delete(`path IN (${values})`);
408
+ const where = `path IN (${values})`;
409
+ // Skip no-op deletes to avoid creating empty LanceDB versions
410
+ const existing = yield table
411
+ .query()
412
+ .select(["id"])
413
+ .where(where)
414
+ .limit(1)
415
+ .toArray();
416
+ if (existing.length > 0) {
417
+ yield table.delete(where);
418
+ }
409
419
  }
410
420
  });
411
421
  }
@@ -439,7 +449,16 @@ class VectorDB {
439
449
  const values = slice
440
450
  .map((p) => `'${(0, filter_builder_1.escapeSqlString)(p)}'`)
441
451
  .join(",");
442
- yield table.delete(`path IN (${values})${idExclusion}`);
452
+ const where = `path IN (${values})${idExclusion}`;
453
+ const existing = yield table
454
+ .query()
455
+ .select(["id"])
456
+ .where(where)
457
+ .limit(1)
458
+ .toArray();
459
+ if (existing.length > 0) {
460
+ yield table.delete(where);
461
+ }
443
462
  }
444
463
  });
445
464
  }
@@ -148,6 +148,7 @@ async def summarize(request: SummarizeRequest) -> SummarizeResponse:
148
148
  summaries.append(summary)
149
149
  except Exception as e:
150
150
  summaries.append(f"(summary failed: {e})")
151
+ mx.metal.clear_cache()
151
152
 
152
153
  return SummarizeResponse(summaries=summaries)
153
154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.12.7",
3
+ "version": "0.12.8",
4
4
  "author": "Robert Owens <robowens@me.com>",
5
5
  "homepage": "https://github.com/reowens/grepmax",
6
6
  "bugs": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grepmax",
3
- "version": "0.12.7",
3
+ "version": "0.12.8",
4
4
  "description": "Semantic code search for Claude Code. Automatically indexes your project and provides intelligent search capabilities.",
5
5
  "author": {
6
6
  "name": "Robert Owens",
@@ -108,8 +108,8 @@ async function main() {
108
108
  startPythonServer(serverDir, "server.py", "mlx-embed-server");
109
109
  }
110
110
 
111
- // Start LLM summarizer server (port 8101)
112
- if (serverDir && !(await isServerRunning(8101))) {
111
+ // Start LLM summarizer server (port 8101) — opt-in only
112
+ if (process.env.GMAX_SUMMARIZER === "1" && serverDir && !(await isServerRunning(8101))) {
113
113
  startPythonServer(serverDir, "summarizer.py", "mlx-summarizer");
114
114
  }
115
115
  }