agent: Only consider zed provider authenticated if TOS is accepted (#33693)

Also now auto-expands the zed provider section when TOS is not accepted

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-06-30 22:51:32 -06:00 committed by GitHub
parent d497f52e17
commit 2ee5bedfa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 3 deletions

View file

@ -394,7 +394,8 @@ impl LanguageModelProvider for CloudLanguageModelProvider {
}
fn is_authenticated(&self, cx: &App) -> bool {
!self.state.read(cx).is_signed_out()
let state = self.state.read(cx);
!state.is_signed_out() && state.has_accepted_terms_of_service(cx)
}
fn authenticate(&self, _cx: &mut App) -> Task<Result<(), AuthenticateError>> {