diff --git a/crates/ai_onboarding/src/ai_onboarding.rs b/crates/ai_onboarding/src/ai_onboarding.rs index 23aa4cc4e8bf2254385b828c952868a5e7bf457a..c49558e50472f3b497ba74ac388f3874aceec77b 100644 --- a/crates/ai_onboarding/src/ai_onboarding.rs +++ b/crates/ai_onboarding/src/ai_onboarding.rs @@ -455,7 +455,7 @@ impl Render for AgentLayoutOnboarding { fn render(&mut self, _window: &mut ui::Window, _cx: &mut Context) -> impl IntoElement { let description = "With the new Threads Sidebar, you can manage multiple agents across several projects, all in one window."; - let dismiss_button = div().absolute().top_1().right_1().child( + let dismiss_button = div().absolute().top_0().right_0().child( IconButton::new("dismiss", IconName::Close) .icon_size(IconSize::Small) .on_click({ @@ -520,6 +520,14 @@ impl Render for AgentLayoutOnboarding { .gap_1() .flex_wrap() .justify_end() + .child( + Button::new("learn", "Learn More") + .label_size(LabelSize::Small) + .style(ButtonStyle::OutlinedGhost) + .on_click(move |_, _, cx| { + cx.open_url(&zed_urls::parallel_agents_blog(cx)) + }), + ) .child(primary_button), ) .child(dismiss_button); diff --git a/crates/auto_update_ui/src/auto_update_ui.rs b/crates/auto_update_ui/src/auto_update_ui.rs index 26f106c5d7e282cdef733f543e8c9f4d842ced02..6773dea5a09ad3bbe1a43761b6df43a56e195d8d 100644 --- a/crates/auto_update_ui/src/auto_update_ui.rs +++ b/crates/auto_update_ui/src/auto_update_ui.rs @@ -16,7 +16,7 @@ use smol::io::AsyncReadExt; use ui::{AnnouncementToast, ListBulletItem, ParallelAgentsIllustration, prelude::*}; use util::{ResultExt as _, maybe}; use workspace::{ - ToggleWorkspaceSidebar, Workspace, + FocusWorkspaceSidebar, Workspace, notifications::{ ErrorMessagePrompt, Notification, NotificationId, SuppressEvent, show_app_notification, simple_message_notification::MessageNotification, @@ -192,9 +192,6 @@ fn announcement_for_version(version: &Version, cx: &App) -> Option::global(cx); - let already_agent_layout = - matches!(AgentSettings::get_layout(cx), WindowLayout::Agent(_)); - Some(AnnouncementContent { heading: "Introducing Parallel Agents".into(), description: "Run multiple agent threads simultaneously across projects." @@ -207,10 +204,14 @@ fn announcement_for_version(version: &Version, cx: &App) -> Option String { ) } +/// Returns the URL to Zed's Parallel Agents blog post. +pub fn parallel_agents_blog(cx: &App) -> String { + format!("{server_url}/blog", server_url = server_url(cx)) +} + pub fn shared_agent_thread_url(session_id: &str) -> String { format!("zed://agent/shared/{}", session_id) } diff --git a/crates/workspace/src/welcome.rs b/crates/workspace/src/welcome.rs index c7f5d1c726c96c352a6f1ddb6ee8611b861d81f1..5bfed0ceed93a4b1216b5117486d6ef5f1d5571b 100644 --- a/crates/workspace/src/welcome.rs +++ b/crates/workspace/src/welcome.rs @@ -445,7 +445,9 @@ impl Render for WelcomePage { }) .collect::>(); - let second_section = if self.fallback_to_recent_projects && !recent_projects.is_empty() { + let showing_recent_projects = + self.fallback_to_recent_projects && !recent_projects.is_empty(); + let second_section = if showing_recent_projects { self.render_recent_project_section(recent_projects) .into_any_element() } else { @@ -496,7 +498,7 @@ impl Render for WelcomePage { ) .child(first_section.render(Default::default(), &self.focus_handle)) .child(second_section) - .when(ai_enabled, |this| { + .when(ai_enabled && !showing_recent_projects, |this| { let agent_tab_index = next_tab_index; next_tab_index += 1; this.child(self.render_agent_card(agent_tab_index, cx))