Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

assistant panel: Disable send button on config error (#16455)

Thorsten Balle68b2d5ecc80
diff --git a/crates/assistant/src/assistant_panel.rs b/crates/assistant/src/assistant_panel.rs
index 8548788f0b5..fb06618ac10 100644
--- a/crates/assistant/src/assistant_panel.rs
+++ b/crates/assistant/src/assistant_panel.rs
@@ -3621,12 +3621,12 @@ impl ContextEditor {
let provider = LanguageModelRegistry::read_global(cx).active_provider();
+ let has_configuration_error = configuration_error(cx).is_some();
let needs_to_accept_terms = self.show_accept_terms
&& provider
.as_ref()
.map_or(false, |provider| provider.must_accept_terms(cx));
- let has_active_error = self.error_message.is_some();
- let disabled = needs_to_accept_terms || has_active_error;
+ let disabled = has_configuration_error || needs_to_accept_terms;
ButtonLike::new("send_button")
.disabled(disabled)