Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Define semantic search action regardless of whether the feature is enabled
Max Brunsfeld4b3bb2c6611e
diff --git a/crates/vector_store/src/vector_store.rs b/crates/vector_store/src/vector_store.rsindex d3f89d568a6..87e70230ee5 100644--- a/crates/vector_store/src/vector_store.rs+++ b/crates/vector_store/src/vector_store.rs@@ -44,14 +44,7 @@ pub fn init(language_registry: Arc<LanguageRegistry>,cx: &mut AppContext,) {- if *RELEASE_CHANNEL == ReleaseChannel::Stable {- return;- }-settings::register::<VectorStoreSettings>(cx);- if !settings::get::<VectorStoreSettings>(cx).enable {- return;- }let db_file_path = EMBEDDINGS_DIR.join(Path::new(RELEASE_CHANNEL_NAME.as_str()))@@ -60,8 +53,6 @@ pub fn init(SemanticSearch::init(cx);cx.add_action(|workspace: &mut Workspace, _: &Toggle, cx: &mut ViewContext<Workspace>| {- eprintln!("semantic_search::Toggle action");-if cx.has_global::<ModelHandle<VectorStore>>() {let vector_store = cx.global::<ModelHandle<VectorStore>>().clone();workspace.toggle_modal(cx, |workspace, cx| {@@ -78,6 +69,12 @@ pub fn init(},);+ if *RELEASE_CHANNEL == ReleaseChannel::Stable+ || !settings::get::<VectorStoreSettings>(cx).enable+ {+ return;+ }+cx.spawn(move |mut cx| async move {let vector_store = VectorStore::new(fs,