Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
collab: Update how mode is displayed in root endpoint (#15911)
Marshall Bowers6f6eeb65954b
diff --git a/Cargo.lock b/Cargo.lockindex 8a3ebe21c32..12d287ac5d7 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -2504,6 +2504,7 @@ dependencies = ["settings","sha2","sqlx",+ "strum","subtle","supermaven_api","telemetry_events",diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.tomlindex 19d04ac92e7..eb68fd96ad4 100644--- a/crates/collab/Cargo.toml+++ b/crates/collab/Cargo.toml@@ -58,6 +58,7 @@ serde_derive.workspace = trueserde_json.workspace = truesha2.workspace = truesqlx = { version = "0.7", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }+strum.workspace = truesubtle.workspace = truerustc-demangle.workspace = truetelemetry_events.workspace = truediff --git a/crates/collab/src/lib.rs b/crates/collab/src/lib.rsindex a795b0e6ba4..0463632e8f2 100644--- a/crates/collab/src/lib.rs+++ b/crates/collab/src/lib.rs@@ -235,7 +235,8 @@ impl Config {}/// The service mode that collab should run in.-#[derive(Debug, PartialEq, Eq, Clone, Copy)]+#[derive(Debug, PartialEq, Eq, Clone, Copy, strum::Display)]+#[strum(serialize_all = "snake_case")]pub enum ServiceMode {Api,Collab,diff --git a/crates/collab/src/main.rs b/crates/collab/src/main.rsindex f28d5606132..ec11bb6543b 100644--- a/crates/collab/src/main.rs+++ b/crates/collab/src/main.rs@@ -279,10 +279,7 @@ async fn setup_llm_database(config: &Config) -> Result<()> {}async fn handle_root(Extension(mode): Extension<ServiceMode>) -> String {- format!(- "collab {mode:?} v{VERSION} ({})",- REVISION.unwrap_or("unknown")- )+ format!("zed:{mode} v{VERSION} ({})", REVISION.unwrap_or("unknown"))}async fn handle_liveness_probe(