Add fast-follows to the AI onboarding flow (#34737)

Follow-up to https://github.com/zed-industries/zed/pull/33738.

Release Notes:

- N/A

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
Danilo Leal 2025-07-22 02:09:05 -03:00 committed by GitHub
parent 5a530ecd39
commit eaccd542fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 409 additions and 215 deletions

View file

@ -2300,7 +2300,20 @@ impl AgentPanel {
return None;
}
Some(div().size_full().child(self.onboarding.clone()))
let thread_view = matches!(&self.active_view, ActiveView::Thread { .. });
let text_thread_view = matches!(&self.active_view, ActiveView::TextThread { .. });
Some(
div()
.size_full()
.when(thread_view, |this| {
this.bg(cx.theme().colors().panel_background)
})
.when(text_thread_view, |this| {
this.bg(cx.theme().colors().editor_background)
})
.child(self.onboarding.clone()),
)
}
fn render_trial_end_upsell(
@ -3237,7 +3250,20 @@ impl Render for AgentPanel {
.into_any(),
)
})
.child(h_flex().child(message_editor.clone()))
.child(h_flex().relative().child(message_editor.clone()).when(
!LanguageModelRegistry::read_global(cx).has_authenticated_provider(cx),
|this| {
this.child(
div()
.size_full()
.absolute()
.inset_0()
.bg(cx.theme().colors().panel_background)
.opacity(0.8)
.block_mouse_except_scroll(),
)
},
))
.child(self.render_drag_target(cx)),
ActiveView::ExternalAgentThread { thread_view, .. } => parent
.relative()