mirror of
https://github.com/lllin000/PaperForge.git
synced 2026-07-22 06:50:53 +00:00
fix: isVectorReady checks total_chunks instead of fulltext-only chunk_count
This commit is contained in:
parent
537e8e36ed
commit
460412d423
2 changed files with 4 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
|
@ -227,7 +227,9 @@ export function isVectorReady(vaultPath: string): boolean {
|
|||
if (!s.deps_installed) return false;
|
||||
if (!s.db_exists) return false;
|
||||
if (s.healthy === false) return false;
|
||||
if (s.chunk_count === 0) return false;
|
||||
// Use total_chunks (body + object + fulltext) — chunk_count alone is vec_fulltext_meta which may be empty
|
||||
const total = (s.chunk_count ?? 0) + ((s.body_chunk_count as number) ?? 0) + ((s.object_chunk_count as number) ?? 0);
|
||||
if (total === 0) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue