onboarding: Remove accept AI ToS from within Zed (#36612)

Users now accept ToS from Zed's website when they sign in to Zed the
first time. So it's no longer possible that a signed in account could
not have accepted the ToS.


Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
This commit is contained in:
Anthony Eid 2025-08-22 11:45:47 -04:00 committed by GitHub
parent 3d2fa72d1f
commit 8204ef1e51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 44 additions and 499 deletions

View file

@ -14,7 +14,7 @@ use client::Client;
use cloud_llm_client::{CompletionMode, CompletionRequestStatus};
use futures::FutureExt;
use futures::{StreamExt, future::BoxFuture, stream::BoxStream};
use gpui::{AnyElement, AnyView, App, AsyncApp, SharedString, Task, Window};
use gpui::{AnyView, App, AsyncApp, SharedString, Task, Window};
use http_client::{StatusCode, http};
use icons::IconName;
use parking_lot::Mutex;
@ -640,16 +640,6 @@ pub trait LanguageModelProvider: 'static {
window: &mut Window,
cx: &mut App,
) -> AnyView;
fn must_accept_terms(&self, _cx: &App) -> bool {
false
}
fn render_accept_terms(
&self,
_view: LanguageModelProviderTosView,
_cx: &mut App,
) -> Option<AnyElement> {
None
}
fn reset_credentials(&self, cx: &mut App) -> Task<Result<()>>;
}

View file

@ -24,9 +24,6 @@ pub enum ConfigurationError {
ModelNotFound,
#[error("{} LLM provider is not configured.", .0.name().0)]
ProviderNotAuthenticated(Arc<dyn LanguageModelProvider>),
#[error("Using the {} LLM provider requires accepting the Terms of Service.",
.0.name().0)]
ProviderPendingTermsAcceptance(Arc<dyn LanguageModelProvider>),
}
impl std::fmt::Debug for ConfigurationError {
@ -37,9 +34,6 @@ impl std::fmt::Debug for ConfigurationError {
Self::ProviderNotAuthenticated(provider) => {
write!(f, "ProviderNotAuthenticated({})", provider.id())
}
Self::ProviderPendingTermsAcceptance(provider) => {
write!(f, "ProviderPendingTermsAcceptance({})", provider.id())
}
}
}
}
@ -198,12 +192,6 @@ impl LanguageModelRegistry {
return Some(ConfigurationError::ProviderNotAuthenticated(model.provider));
}
if model.provider.must_accept_terms(cx) {
return Some(ConfigurationError::ProviderPendingTermsAcceptance(
model.provider,
));
}
None
}