update project search to only show semantic button visible with semantic_index enabled

This commit is contained in:
KCaverly 2023-07-25 16:26:37 -04:00
parent e8210b827d
commit 75999204ad
2 changed files with 24 additions and 6 deletions

View file

@ -1,7 +1,7 @@
mod db;
mod embedding;
mod parsing;
mod semantic_index_settings;
pub mod semantic_index_settings;
#[cfg(test)]
mod semantic_index_tests;
@ -183,6 +183,10 @@ impl SemanticIndex {
}
}
pub fn enabled(cx: &AppContext) -> bool {
settings::get::<SemanticIndexSettings>(cx).enabled
}
async fn new(
fs: Arc<dyn Fs>,
database_url: PathBuf,