Vectrum
Sign In

Composer footer offers provider settings when no agent is on

Like T3 Code, with every provider turned off the footer's pickers give way
to "Open provider settings", and the composer says to enable one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JjohannSocommitted 1 parent 5bcf5e9commit6429366

Showing 3 changed files with 18 additions and 2 deletions.

+2−0src/ui/chat.rsView File
@@ -64,6 +64,8 @@ pub enum ChatEvent {
6464 SetWorkspace(WorkspaceMode),
6565 /// Start a new thread in this project that implements this plan.
6666 ImplementInNewThread(String),
67+ /// No agent is on: open Settings → Providers.
68+ OpenProviderSettings,
6769 }
6870
6971 /// Proactive panels open the diff after a turn that changed at least this
+15−2src/ui/chat/footer.rsView File
@@ -66,8 +66,21 @@ impl ChatView {
6666 }
6767
6868 /// The left side of the footer.
69- pub(super) fn render_controls(&self, right_width: f32, cx: &mut Context<Self>) -> impl IntoElement {
69+ pub(super) fn render_controls(&self, right_width: f32, cx: &mut Context<Self>) -> AnyElement {
7070 let p = metal::palette(cx);
71+ // Without an agent to talk to, the footer only offers to set one up.
72+ if Catalog::global(cx).enabled().next().is_none() {
73+ return h_flex()
74+ .flex_1()
75+ .child(
76+ composer::control("open-provider-settings")
77+ .ml(px(-10.))
78+ .icon(Icon::new(IconName::CircleAlert))
79+ .label("Open provider settings")
80+ .on_click(cx.listener(|_, _, _, cx| cx.emit(super::ChatEvent::OpenProviderSettings))),
81+ )
82+ .into_any_element();
83+ }
7184 let session = self.session.read(cx);
7285 let provider = session.provider;
7386 let catalog = Catalog::global(cx);
@@ -227,7 +240,7 @@ impl ChatView {
227240 cx,
228241 ));
229242 }
230- row
243+ row.into_any_element()
231244 }
232245
233246 /// How wide the footer's right side is, for fitting the left side.
+1−0src/ui/workspace.rsView File
@@ -870,6 +870,7 @@ impl Workspace {
870870 let cwd = session.read(cx).cwd.clone();
871871 self.switch_branch(cwd, branch.clone(), *create, window, cx);
872872 }
873+ ChatEvent::OpenProviderSettings => self.open_settings(window, cx),
873874 ChatEvent::ImplementInNewThread(plan) => {
874875 let settings = self.new_thread_settings(cx);
875876 if let Some(chat) = self.new_thread_with(project_ix, settings, window, cx) {