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:
Marshall Bowers 2024-08-07 12:09:43 -04:00 committed by GitHub
parent 22162e884b
commit 6f6eeb6595
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View file

@ -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,

View file

@ -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(