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:
parent
3d2fa72d1f
commit
8204ef1e51
16 changed files with 44 additions and 499 deletions
|
@ -190,7 +190,6 @@ pub struct TextThreadEditor {
|
|||
invoked_slash_command_creases: HashMap<InvokedSlashCommandId, CreaseId>,
|
||||
_subscriptions: Vec<Subscription>,
|
||||
last_error: Option<AssistError>,
|
||||
show_accept_terms: bool,
|
||||
pub(crate) slash_menu_handle:
|
||||
PopoverMenuHandle<Picker<slash_command_picker::SlashCommandDelegate>>,
|
||||
// dragged_file_worktrees is used to keep references to worktrees that were added
|
||||
|
@ -289,7 +288,6 @@ impl TextThreadEditor {
|
|||
invoked_slash_command_creases: HashMap::default(),
|
||||
_subscriptions,
|
||||
last_error: None,
|
||||
show_accept_terms: false,
|
||||
slash_menu_handle: Default::default(),
|
||||
dragged_file_worktrees: Vec::new(),
|
||||
language_model_selector: cx.new(|cx| {
|
||||
|
@ -367,20 +365,7 @@ impl TextThreadEditor {
|
|||
}
|
||||
|
||||
fn send_to_model(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
let provider = LanguageModelRegistry::read_global(cx)
|
||||
.default_model()
|
||||
.map(|default| default.provider);
|
||||
if provider
|
||||
.as_ref()
|
||||
.is_some_and(|provider| provider.must_accept_terms(cx))
|
||||
{
|
||||
self.show_accept_terms = true;
|
||||
cx.notify();
|
||||
return;
|
||||
}
|
||||
|
||||
self.last_error = None;
|
||||
|
||||
if let Some(user_message) = self.context.update(cx, |context, cx| context.assist(cx)) {
|
||||
let new_selection = {
|
||||
let cursor = user_message
|
||||
|
@ -1930,7 +1915,6 @@ impl TextThreadEditor {
|
|||
ConfigurationError::NoProvider
|
||||
| ConfigurationError::ModelNotFound
|
||||
| ConfigurationError::ProviderNotAuthenticated(_) => true,
|
||||
ConfigurationError::ProviderPendingTermsAcceptance(_) => self.show_accept_terms,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue