Преглед на файлове

Skip empty files during indexing

Empty files have nothing useful to index or embed. Previously they would
be indexed with an empty body, causing confusing "1 need embedding" status
messages that could never be resolved.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tobi Lutke преди 4 месеца
родител
ревизия
5fa66fd228
променени са 2 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 1 1
      .beads/.local_version
  2. 7 0
      src/qmd.ts

+ 1 - 1
.beads/.local_version

@@ -1 +1 @@
-0.29.0
+0.43.0

+ 7 - 0
src/qmd.ts

@@ -1379,6 +1379,13 @@ async function indexFiles(pwd?: string, globPattern: string = DEFAULT_GLOB, coll
     seenPaths.add(path);
 
     const content = await Bun.file(filepath).text();
+
+    // Skip empty files - nothing useful to index
+    if (!content.trim()) {
+      processed++;
+      continue;
+    }
+
     const hash = await hashContent(content);
     const title = extractTitle(content, relativeFile);