Load assistant panel

This commit is contained in:
Antonio Scandurra
2023-12-06 14:23:05 +01:00
parent 9eb98122ec
commit 5f172a52a4
2 changed files with 26 additions and 34 deletions
+7 -16
View File
@@ -62,22 +62,13 @@ impl Render for StatusBar {
)
.child(
// Right Dock
h_stack()
.gap_1()
.child(
// Terminal
div()
.border()
.border_color(gpui::red())
.child(IconButton::new("status-assistant", Icon::Ai)),
)
.child(
// Terminal
div()
.border()
.border_color(gpui::red())
.child(IconButton::new("status-chat", Icon::MessageBubbles)),
),
h_stack().gap_1().child(
// Terminal
div()
.border()
.border_color(gpui::red())
.child(IconButton::new("status-chat", Icon::MessageBubbles)),
),
)
.child(self.render_right_tools(cx)),
)
+19 -18
View File
@@ -7,6 +7,7 @@ mod only_instance;
mod open_listener;
pub use assets::*;
use assistant::AssistantPanel;
use breadcrumbs::Breadcrumbs;
use collections::VecDeque;
use editor::{Editor, MultiBuffer};
@@ -177,7 +178,7 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
cx.spawn(|workspace_handle, mut cx| async move {
let project_panel = ProjectPanel::load(workspace_handle.clone(), cx.clone());
let terminal_panel = TerminalPanel::load(workspace_handle.clone(), cx.clone());
// let assistant_panel = AssistantPanel::load(workspace_handle.clone(), cx.clone());
let assistant_panel = AssistantPanel::load(workspace_handle.clone(), cx.clone());
let channels_panel =
collab_ui::collab_panel::CollabPanel::load(workspace_handle.clone(), cx.clone());
// let chat_panel =
@@ -189,14 +190,14 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
let (
project_panel,
terminal_panel,
// assistant_panel,
assistant_panel,
channels_panel,
// chat_panel,
// notification_panel,
) = futures::try_join!(
project_panel,
terminal_panel,
// assistant_panel,
assistant_panel,
channels_panel,
// chat_panel,
// notification_panel,
@@ -206,25 +207,25 @@ pub fn initialize_workspace(app_state: Arc<AppState>, cx: &mut AppContext) {
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);
workspace.add_panel(assistant_panel, cx);
workspace.add_panel(channels_panel, cx);
// workspace.add_panel(chat_panel, cx);
// workspace.add_panel(notification_panel, cx);
// if !was_deserialized
// && workspace
// .project()
// .read(cx)
// .visible_worktrees(cx)
// .any(|tree| {
// tree.read(cx)
// .root_entry()
// .map_or(false, |entry| entry.is_dir())
// })
// {
// workspace.toggle_dock(project_panel_position, cx);
// }
// cx.focus_self();
// if !was_deserialized
// && workspace
// .project()
// .read(cx)
// .visible_worktrees(cx)
// .any(|tree| {
// tree.read(cx)
// .root_entry()
// .map_or(false, |entry| entry.is_dir())
// })
// {
// workspace.toggle_dock(project_panel_position, cx);
// }
cx.focus_self();
})
})
.detach();