move semantic search project intialization to a subscribe event for workspace created
Co-authored-by: Piotr <piotr@zed.dev>
This commit is contained in:
parent
e8e7b294d8
commit
a1519e4c38
2 changed files with 17 additions and 11 deletions
|
@ -844,16 +844,6 @@ impl ProjectSearchView {
|
|||
.detach();
|
||||
let filters_enabled = false;
|
||||
|
||||
// Initialize Semantic Index if Needed
|
||||
if SemanticIndex::enabled(cx) {
|
||||
let model = model.read(cx);
|
||||
project = model.project.clone();
|
||||
SemanticIndex::global(cx).map(|semantic| {
|
||||
dbg!("Initializing project");
|
||||
semantic.update(cx, |this, cx| this.initialize_project(project.clone(), cx));
|
||||
});
|
||||
}
|
||||
|
||||
// Check if Worktrees have all been previously indexed
|
||||
let mut this = ProjectSearchView {
|
||||
search_id: model.read(cx).search_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue