Return an error from project index tool when embedding query fails (#11264)
Previously, a failure to embed the search query (due to a rate limit error) would appear the same as if there were no results. * Avoid repeatedly embedding the search query for each worktree * Unify tasks for searching all worktree Release Notes: - N/A
This commit is contained in:
parent
4b767697af
commit
5831d80f51
4 changed files with 137 additions and 132 deletions
|
@ -92,10 +92,11 @@ fn main() {
|
|||
.update(|cx| {
|
||||
let project_index = project_index.read(cx);
|
||||
let query = "converting an anchor to a point";
|
||||
project_index.search(query, 4, cx)
|
||||
project_index.search(query.into(), 4, cx)
|
||||
})
|
||||
.unwrap()
|
||||
.await;
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
for search_result in results {
|
||||
let path = search_result.path.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue