assistant2: Show accept terms UI in thread empty state (#23630)

<img
src="https://github.com/user-attachments/assets/cea93cfb-8a40-48c4-9d90-f1751c79603b"
width=400>



Release Notes:

- N/A

---------

Co-authored-by: Danilo <danilo@zed.dev>
This commit is contained in:
Agus Zubiaga 2025-01-24 19:34:46 -03:00 committed by GitHub
parent ec5d02d5c2
commit ba16b4eb65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 155 additions and 144 deletions

View file

@ -245,12 +245,23 @@ pub trait LanguageModelProvider: 'static {
fn must_accept_terms(&self, _cx: &AppContext) -> bool {
false
}
fn render_accept_terms(&self, _cx: &mut WindowContext) -> Option<AnyElement> {
fn render_accept_terms(
&self,
_view: LanguageModelProviderTosView,
_cx: &mut WindowContext,
) -> Option<AnyElement> {
None
}
fn reset_credentials(&self, cx: &mut AppContext) -> Task<Result<()>>;
}
#[derive(PartialEq, Eq)]
pub enum LanguageModelProviderTosView {
ThreadEmptyState,
PromptEditorPopup,
Configuration,
}
pub trait LanguageModelProviderState: 'static {
type ObservableEntity;