mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-04 02:05:31 +00:00
update semantic search to show no results if search query is blank (#2942)
Update semantic search to show no search results if search query is blank
This commit is contained in:
commit
560d6b1644
1 changed files with 4 additions and 0 deletions
|
@ -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?
|
||||
|
|
Loading…
Reference in a new issue