smart-coding-mcp 1.3.1 → 1.3.2

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.
@@ -440,6 +440,28 @@ export class CodebaseIndexer {
440
440
  // Send progress: discovery complete
441
441
  this.sendProgress(5, 100, `Discovered ${files.length} files`);
442
442
 
443
+ // Step 1.5: Prune deleted or excluded files from cache
444
+ if (!force) {
445
+ const currentFilesSet = new Set(files);
446
+ const cachedFiles = Array.from(this.cache.fileHashes.keys());
447
+ let prunedCount = 0;
448
+
449
+ for (const cachedFile of cachedFiles) {
450
+ if (!currentFilesSet.has(cachedFile)) {
451
+ this.cache.removeFileFromStore(cachedFile);
452
+ this.cache.deleteFileHash(cachedFile);
453
+ prunedCount++;
454
+ }
455
+ }
456
+
457
+ if (prunedCount > 0) {
458
+ if (this.config.verbose) {
459
+ console.error(`[Indexer] Pruned ${prunedCount} deleted/excluded files from index`);
460
+ }
461
+ // If we pruned files, we should save these changes even if no other files changed
462
+ }
463
+ }
464
+
443
465
  // Step 2: Pre-filter unchanged files (early hash check)
444
466
  const filesToProcess = await this.preFilterFiles(files);
445
467
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-coding-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "An extensible MCP server that enhances coding productivity with AI-powered features including semantic code search, intelligent indexing, and more, using local LLMs",
5
5
  "type": "module",
6
6
  "main": "index.js",