Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 52ee7ef

Browse files
committed
Fix onboarding skipping embedding generation due to micro-ingestion
Root cause: Onboarding only ran full ingestion if indexed_count == 0, but partial embeddings from previous runs caused it to skip to micro-ingestion, leaving embeddings incomplete. Result: First search had to generate missing embeddings (3-5s lag) Fix: Check embedding_count vs indexed_count to detect incomplete embeddings and force full ingestion when needed. Now 25-30s embedding time moves back to onboarding where it belongs.
1 parent 517532d commit 52ee7ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/fuzzyshell/tui/onboarding.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ def setup_delegate():
116116
advance_to_step(2)
117117
advance_to_step(3)
118118
indexed_count = fuzzyshell.get_indexed_count()
119-
if indexed_count == 0:
119+
embedding_count = fuzzyshell.command_dal.get_embedding_count()
120+
121+
# Run ingestion if no embeddings OR embeddings don't match command count
122+
if indexed_count == 0 or embedding_count != indexed_count:
120123
added_count = fuzzyshell.ingest_history(use_tui=False, no_random=True)
121124
if added_count and added_count > 0:
122125
# Wait for database to be fully ready for searches

0 commit comments

Comments
 (0)