Start separating authentication from connection to collab (#35471)
This pull request should be idempotent, but lays the groundwork for avoiding to connect to collab in order to interact with AI features provided by Zed. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <git@maxdeviant.com> Co-authored-by: Richard Feldman <oss@rtfeldman.com>
This commit is contained in:
parent
b01d1872cc
commit
f888f3fc0b
46 changed files with 653 additions and 855 deletions
|
@ -13,7 +13,7 @@ pub(crate) use tool_metrics::*;
|
|||
|
||||
use ::fs::RealFs;
|
||||
use clap::Parser;
|
||||
use client::{Client, CloudUserStore, ProxySettings, UserStore};
|
||||
use client::{Client, ProxySettings, UserStore};
|
||||
use collections::{HashMap, HashSet};
|
||||
use extension::ExtensionHostProxy;
|
||||
use futures::future;
|
||||
|
@ -329,7 +329,6 @@ pub struct AgentAppState {
|
|||
pub languages: Arc<LanguageRegistry>,
|
||||
pub client: Arc<Client>,
|
||||
pub user_store: Entity<UserStore>,
|
||||
pub cloud_user_store: Entity<CloudUserStore>,
|
||||
pub fs: Arc<dyn fs::Fs>,
|
||||
pub node_runtime: NodeRuntime,
|
||||
|
||||
|
@ -384,8 +383,6 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
|||
let languages = Arc::new(languages);
|
||||
|
||||
let user_store = cx.new(|cx| UserStore::new(client.clone(), cx));
|
||||
let cloud_user_store =
|
||||
cx.new(|cx| CloudUserStore::new(client.cloud_client(), user_store.clone(), cx));
|
||||
|
||||
extension::init(cx);
|
||||
|
||||
|
@ -425,12 +422,7 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
|||
languages.clone(),
|
||||
);
|
||||
language_model::init(client.clone(), cx);
|
||||
language_models::init(
|
||||
user_store.clone(),
|
||||
cloud_user_store.clone(),
|
||||
client.clone(),
|
||||
cx,
|
||||
);
|
||||
language_models::init(user_store.clone(), client.clone(), cx);
|
||||
languages::init(languages.clone(), node_runtime.clone(), cx);
|
||||
prompt_store::init(cx);
|
||||
terminal_view::init(cx);
|
||||
|
@ -455,7 +447,6 @@ pub fn init(cx: &mut App) -> Arc<AgentAppState> {
|
|||
languages,
|
||||
client,
|
||||
user_store,
|
||||
cloud_user_store,
|
||||
fs,
|
||||
node_runtime,
|
||||
prompt_builder,
|
||||
|
|
|
@ -221,7 +221,6 @@ impl ExampleInstance {
|
|||
let prompt_store = None;
|
||||
let thread_store = ThreadStore::load(
|
||||
project.clone(),
|
||||
app_state.cloud_user_store.clone(),
|
||||
tools,
|
||||
prompt_store,
|
||||
app_state.prompt_builder.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue