Embed Anthropic configuration view
This commit is contained in:
parent
6c7a5c50bf
commit
21082c0aba
28 changed files with 299 additions and 187 deletions
|
@ -28,6 +28,7 @@ futures.workspace = true
|
|||
gpui.workspace = true
|
||||
itertools.workspace = true
|
||||
language.workspace = true
|
||||
language_model.workspace = true
|
||||
markdown.workspace = true
|
||||
parking_lot = { workspace = true, optional = true }
|
||||
project.workspace = true
|
||||
|
|
|
@ -3,6 +3,7 @@ use agent_client_protocol::{self as acp};
|
|||
use anyhow::Result;
|
||||
use collections::IndexMap;
|
||||
use gpui::{Entity, SharedString, Task};
|
||||
use language_model::LanguageModelProviderId;
|
||||
use project::Project;
|
||||
use std::{any::Any, error::Error, fmt, path::Path, rc::Rc, sync::Arc};
|
||||
use ui::{App, IconName};
|
||||
|
@ -82,15 +83,14 @@ pub trait AgentSessionResume {
|
|||
#[derive(Debug)]
|
||||
pub struct AuthRequired {
|
||||
pub description: Option<String>,
|
||||
/// A Task that resolves when authentication is updated
|
||||
pub update_task: Option<Task<()>>,
|
||||
pub provider_id: Option<LanguageModelProviderId>,
|
||||
}
|
||||
|
||||
impl AuthRequired {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
description: None,
|
||||
update_task: None,
|
||||
provider_id: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,8 +99,8 @@ impl AuthRequired {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn with_update(mut self, update: Task<()>) -> Self {
|
||||
self.update_task = Some(update);
|
||||
pub fn with_language_model_provider(mut self, provider_id: LanguageModelProviderId) -> Self {
|
||||
self.provider_id = Some(provider_id);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue