Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
copilot: Handle sign out when copilot language server is not running (#26776)
Smit Barmasec62210b17871
diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rsindex fed19c77913..8896aa5ea2d 100644--- a/crates/copilot/src/copilot.rs+++ b/crates/copilot/src/copilot.rs@@ -654,6 +654,10 @@ impl Copilot {anyhow::Ok(())})}+ CopilotServer::Disabled => cx.background_spawn(async {+ clear_copilot_config_dir().await;+ anyhow::Ok(())+ }),_ => Task::ready(Err(anyhow!("copilot hasn't started yet"))),}}@@ -1047,6 +1051,10 @@ async fn clear_copilot_dir() {remove_matching(paths::copilot_dir(), |_| true).await}+async fn clear_copilot_config_dir() {+ remove_matching(copilot_chat::copilot_chat_config_dir(), |_| true).await+}+async fn get_copilot_lsp(http: Arc<dyn HttpClient>) -> anyhow::Result<PathBuf> {const SERVER_PATH: &str = "dist/language-server.js";