Enable assistant on stable
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
0d0c71e215
commit
2cb4616609
2 changed files with 7 additions and 19 deletions
|
@ -39,7 +39,7 @@ use std::{
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
use theme::AssistantStyle;
|
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::{
|
use workspace::{
|
||||||
dock::{DockPosition, Panel},
|
dock::{DockPosition, Panel},
|
||||||
searchable::Direction,
|
searchable::Direction,
|
||||||
|
@ -62,12 +62,6 @@ actions!(
|
||||||
);
|
);
|
||||||
|
|
||||||
pub fn init(cx: &mut AppContext) {
|
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);
|
settings::register::<AssistantSettings>(cx);
|
||||||
cx.add_action(
|
cx.add_action(
|
||||||
|this: &mut AssistantPanel,
|
|this: &mut AssistantPanel,
|
||||||
|
|
|
@ -361,15 +361,15 @@ pub fn initialize_workspace(
|
||||||
|
|
||||||
let project_panel = ProjectPanel::load(workspace_handle.clone(), cx.clone());
|
let project_panel = ProjectPanel::load(workspace_handle.clone(), cx.clone());
|
||||||
let terminal_panel = TerminalPanel::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 {
|
let assistant_panel = AssistantPanel::load(workspace_handle.clone(), cx.clone());
|
||||||
None
|
let (project_panel, terminal_panel, assistant_panel) =
|
||||||
} else {
|
futures::try_join!(project_panel, terminal_panel, assistant_panel)?;
|
||||||
Some(AssistantPanel::load(workspace_handle.clone(), cx.clone()).await?)
|
|
||||||
};
|
|
||||||
let (project_panel, terminal_panel) = futures::try_join!(project_panel, terminal_panel)?;
|
|
||||||
workspace_handle.update(&mut cx, |workspace, cx| {
|
workspace_handle.update(&mut cx, |workspace, cx| {
|
||||||
let project_panel_position = project_panel.position(cx);
|
let project_panel_position = project_panel.position(cx);
|
||||||
workspace.add_panel(project_panel, cx);
|
workspace.add_panel(project_panel, cx);
|
||||||
|
workspace.add_panel(terminal_panel, cx);
|
||||||
|
workspace.add_panel(assistant_panel, cx);
|
||||||
|
|
||||||
if !was_deserialized
|
if !was_deserialized
|
||||||
&& workspace
|
&& workspace
|
||||||
.project()
|
.project()
|
||||||
|
@ -383,13 +383,7 @@ pub fn initialize_workspace(
|
||||||
{
|
{
|
||||||
workspace.toggle_dock(project_panel_position, cx);
|
workspace.toggle_dock(project_panel_position, cx);
|
||||||
}
|
}
|
||||||
|
|
||||||
cx.focus_self();
|
cx.focus_self();
|
||||||
|
|
||||||
workspace.add_panel(terminal_panel, cx);
|
|
||||||
if let Some(assistant_panel) = assistant_panel {
|
|
||||||
workspace.add_panel(assistant_panel, cx);
|
|
||||||
}
|
|
||||||
})?;
|
})?;
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue