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:
parent
ec5d02d5c2
commit
ba16b4eb65
4 changed files with 155 additions and 144 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue