collab: Update how mode is displayed in root endpoint (#15911)
This PR adjusts how we display the "mode" collab is running in on the root endpoint. It's minor, but it does make things a bit cleaner. Release Notes: - N/A
This commit is contained in:
parent
22162e884b
commit
6f6eeb6595
4 changed files with 5 additions and 5 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2504,6 +2504,7 @@ dependencies = [
|
||||||
"settings",
|
"settings",
|
||||||
"sha2",
|
"sha2",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
|
"strum",
|
||||||
"subtle",
|
"subtle",
|
||||||
"supermaven_api",
|
"supermaven_api",
|
||||||
"telemetry_events",
|
"telemetry_events",
|
||||||
|
|
|
@ -58,6 +58,7 @@ serde_derive.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
sha2.workspace = true
|
sha2.workspace = true
|
||||||
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }
|
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }
|
||||||
|
strum.workspace = true
|
||||||
subtle.workspace = true
|
subtle.workspace = true
|
||||||
rustc-demangle.workspace = true
|
rustc-demangle.workspace = true
|
||||||
telemetry_events.workspace = true
|
telemetry_events.workspace = true
|
||||||
|
|
|
@ -235,7 +235,8 @@ impl Config {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The service mode that collab should run in.
|
/// 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 {
|
pub enum ServiceMode {
|
||||||
Api,
|
Api,
|
||||||
Collab,
|
Collab,
|
||||||
|
|
|
@ -279,10 +279,7 @@ async fn setup_llm_database(config: &Config) -> Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_root(Extension(mode): Extension<ServiceMode>) -> String {
|
async fn handle_root(Extension(mode): Extension<ServiceMode>) -> String {
|
||||||
format!(
|
format!("zed:{mode} v{VERSION} ({})", REVISION.unwrap_or("unknown"))
|
||||||
"collab {mode:?} v{VERSION} ({})",
|
|
||||||
REVISION.unwrap_or("unknown")
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn handle_liveness_probe(
|
async fn handle_liveness_probe(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue