mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
update semantic search to go to no results if search query is blank
This commit is contained in:
parent
98999b1e9a
commit
cf5d1d91a4
@ -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 New Issue
Block a user