diff --git a/crates/semantic_index/src/semantic_index.rs b/crates/semantic_index/src/semantic_index.rs index 2ef409eb92..0e18c42049 100644 --- a/crates/semantic_index/src/semantic_index.rs +++ b/crates/semantic_index/src/semantic_index.rs @@ -703,6 +703,10 @@ impl SemanticIndex { let database = VectorDatabase::new(fs.clone(), db_path.clone(), cx.background()).await?; + if phrase.len() == 0 { + return Ok(Vec::new()); + } + let phrase_embedding = embedding_provider .embed_batch(vec![phrase]) .await?