Enable assistant on stable

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-06-28 12:09:49 +02:00
parent 0d0c71e215
commit 2cb4616609
2 changed files with 7 additions and 19 deletions

View File

@ -39,7 +39,7 @@ use std::{
time::Duration,
};
use theme::AssistantStyle;
use util::{channel::ReleaseChannel, paths::CONVERSATIONS_DIR, post_inc, ResultExt, TryFutureExt};
use util::{paths::CONVERSATIONS_DIR, post_inc, ResultExt, TryFutureExt};
use workspace::{
dock::{DockPosition, Panel},
searchable::Direction,
@ -62,12 +62,6 @@ actions!(
);
pub fn init(cx: &mut AppContext) {
if *util::channel::RELEASE_CHANNEL == ReleaseChannel::Stable {
cx.update_default_global::<collections::CommandPaletteFilter, _, _>(move |filter, _cx| {
filter.filtered_namespaces.insert("assistant");
});
}
settings::register::<AssistantSettings>(cx);
cx.add_action(
|this: &mut AssistantPanel,

View File

@ -361,15 +361,15 @@ pub fn initialize_workspace(
let project_panel = ProjectPanel::load(workspace_handle.clone(), cx.clone());
let terminal_panel = TerminalPanel::load(workspace_handle.clone(), cx.clone());
let assistant_panel = if *util::channel::RELEASE_CHANNEL == ReleaseChannel::Stable {
None
} else {
Some(AssistantPanel::load(workspace_handle.clone(), cx.clone()).await?)
};
let (project_panel, terminal_panel) = futures::try_join!(project_panel, terminal_panel)?;
let assistant_panel = AssistantPanel::load(workspace_handle.clone(), cx.clone());
let (project_panel, terminal_panel, assistant_panel) =
futures::try_join!(project_panel, terminal_panel, assistant_panel)?;
workspace_handle.update(&mut cx, |workspace, cx| {
let project_panel_position = project_panel.position(cx);
workspace.add_panel(project_panel, cx);
workspace.add_panel(terminal_panel, cx);
workspace.add_panel(assistant_panel, cx);
if !was_deserialized
&& workspace
.project()
@ -383,13 +383,7 @@ pub fn initialize_workspace(
{
workspace.toggle_dock(project_panel_position, cx);
}
cx.focus_self();
workspace.add_panel(terminal_panel, cx);
if let Some(assistant_panel) = assistant_panel {
workspace.add_panel(assistant_panel, cx);
}
})?;
Ok(())
})