remove release channel flags in semantic_index (#2989)
Remove Release channel filters from semantic_index allowing the index to be released to stable. Release Notes: - Remove Release channel filters in enabled and semantic_index initialization
This commit is contained in:
@@ -31,12 +31,7 @@ use std::{
|
|||||||
sync::{Arc, Weak},
|
sync::{Arc, Weak},
|
||||||
time::{Duration, Instant, SystemTime},
|
time::{Duration, Instant, SystemTime},
|
||||||
};
|
};
|
||||||
use util::{
|
use util::{channel::RELEASE_CHANNEL_NAME, http::HttpClient, paths::EMBEDDINGS_DIR, ResultExt};
|
||||||
channel::{ReleaseChannel, RELEASE_CHANNEL, RELEASE_CHANNEL_NAME},
|
|
||||||
http::HttpClient,
|
|
||||||
paths::EMBEDDINGS_DIR,
|
|
||||||
ResultExt,
|
|
||||||
};
|
|
||||||
use workspace::WorkspaceCreated;
|
use workspace::WorkspaceCreated;
|
||||||
|
|
||||||
const SEMANTIC_INDEX_VERSION: usize = 11;
|
const SEMANTIC_INDEX_VERSION: usize = 11;
|
||||||
@@ -55,11 +50,6 @@ pub fn init(
|
|||||||
.join(Path::new(RELEASE_CHANNEL_NAME.as_str()))
|
.join(Path::new(RELEASE_CHANNEL_NAME.as_str()))
|
||||||
.join("embeddings_db");
|
.join("embeddings_db");
|
||||||
|
|
||||||
// This needs to be removed at some point before stable.
|
|
||||||
if *RELEASE_CHANNEL == ReleaseChannel::Stable {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
cx.subscribe_global::<WorkspaceCreated, _>({
|
cx.subscribe_global::<WorkspaceCreated, _>({
|
||||||
move |event, cx| {
|
move |event, cx| {
|
||||||
let Some(semantic_index) = SemanticIndex::global(cx) else {
|
let Some(semantic_index) = SemanticIndex::global(cx) else {
|
||||||
@@ -282,7 +272,6 @@ impl SemanticIndex {
|
|||||||
|
|
||||||
pub fn enabled(cx: &AppContext) -> bool {
|
pub fn enabled(cx: &AppContext) -> bool {
|
||||||
settings::get::<SemanticIndexSettings>(cx).enabled
|
settings::get::<SemanticIndexSettings>(cx).enabled
|
||||||
&& *RELEASE_CHANNEL != ReleaseChannel::Stable
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn status(&self, project: &ModelHandle<Project>) -> SemanticIndexStatus {
|
pub fn status(&self, project: &ModelHandle<Project>) -> SemanticIndexStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user