Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ep: Initialize AppDatabase (#51922)

Oleksiy Syvokonc907d5d912ab
diff --git a/Cargo.lock b/Cargo.lock
index 9c5e544c8ac..3fe8bb4baf0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5305,6 +5305,7 @@ dependencies = [
"client",
"cloud_llm_client",
"collections",
+ "db",
"debug_adapter_extension",
"dirs 4.0.0",
"edit_prediction",
diff --git a/crates/edit_prediction_cli/Cargo.toml b/crates/edit_prediction_cli/Cargo.toml
index 3cb79b44528..1c8985d1480 100644
--- a/crates/edit_prediction_cli/Cargo.toml
+++ b/crates/edit_prediction_cli/Cargo.toml
@@ -21,6 +21,7 @@ clap = "4"
client.workspace = true
cloud_llm_client.workspace= true
collections.workspace = true
+db.workspace = true
debug_adapter_extension.workspace = true
dirs.workspace = true
extension.workspace = true
diff --git a/crates/edit_prediction_cli/src/headless.rs b/crates/edit_prediction_cli/src/headless.rs
index eb2895b06f2..3a204a7052f 100644
--- a/crates/edit_prediction_cli/src/headless.rs
+++ b/crates/edit_prediction_cli/src/headless.rs
@@ -1,4 +1,5 @@
use client::{Client, ProxySettings, UserStore};
+use db::AppDatabase;
use extension::ExtensionHostProxy;
use fs::RealFs;
use gpui::http_client::read_proxy_from_env;
@@ -61,6 +62,9 @@ pub fn init(cx: &mut App) -> EpAppState {
let client = Client::production(cx);
cx.set_http_client(client.http_client());
+ let app_db = AppDatabase::new();
+ cx.set_global(app_db);
+
let git_binary_path = None;
let fs = Arc::new(RealFs::new(
git_binary_path,