Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove unused cyclic dependency from copilot crate Move notification handling earlier so that there are less copilot messages in the log
Mikayla Maki39512655aa2f
diff --git a/Cargo.lock b/Cargo.lockindex b3e5c38a46c..4c1e7de4350 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1358,7 +1358,6 @@ dependencies = ["smol","theme","util",- "workspace",][[package]]diff --git a/crates/copilot/Cargo.toml b/crates/copilot/Cargo.tomlindex bfafdbc0ca9..f4d75cc582d 100644--- a/crates/copilot/Cargo.toml+++ b/crates/copilot/Cargo.toml@@ -47,4 +47,3 @@ lsp = { path = "../lsp", features = ["test-support"] }rpc = { path = "../rpc", features = ["test-support"] }settings = { path = "../settings", features = ["test-support"] }util = { path = "../util", features = ["test-support"] }-workspace = { path = "../workspace", features = ["test-support"] }diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rsindex 182db084a1d..b2da730c3fd 100644--- a/crates/copilot/src/copilot.rs+++ b/crates/copilot/src/copilot.rs@@ -378,13 +378,6 @@ impl Copilot {cx.clone(),)?;- let server = server.initialize(Default::default()).await?;- let status = server- .request::<request::CheckStatus>(request::CheckStatusParams {- local_checks_only: false,- })- .await?;-server.on_notification::<LogMessage, _>(|params, _cx| {match params.level {@@ -405,6 +398,14 @@ impl Copilot {).detach();+ let server = server.initialize(Default::default()).await?;++ let status = server+ .request::<request::CheckStatus>(request::CheckStatusParams {+ local_checks_only: false,+ })+ .await?;+server.request::<request::SetEditorInfo>(request::SetEditorInfoParams {editor_info: request::EditorInfo {diff --git a/crates/copilot/src/request.rs b/crates/copilot/src/request.rsindex 43b5109d027..0f9a478b910 100644--- a/crates/copilot/src/request.rs+++ b/crates/copilot/src/request.rs@@ -143,8 +143,8 @@ pub enum LogMessage {}#[derive(Debug, Serialize, Deserialize)]#[serde(rename_all = "camelCase")]pub struct LogMessageParams {- pub message: String,pub level: u8,+ pub message: String,pub metadata_str: String,pub extra: Vec<String>,}