Skip to content

Commit

Permalink
collab: Update how mode is displayed in root endpoint (#15911)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
maxdeviant authored Aug 7, 2024
1 parent 22162e8 commit 6f6eeb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/collab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ serde_derive.workspace = true
serde_json.workspace = true
sha2.workspace = true
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] }
strum.workspace = true
subtle.workspace = true
rustc-demangle.workspace = true
telemetry_events.workspace = true
Expand Down
3 changes: 2 additions & 1 deletion crates/collab/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 1 addition & 4 deletions crates/collab/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6f6eeb6

Please sign in to comment.