Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Revert "extension_api: Add `digest` to `GithubReleaseAsset`" (#44880)
Finn Evers3bf57dc7790b
diff --git a/crates/extension_api/wit/since_v0.8.0/github.wit b/crates/extension_api/wit/since_v0.8.0/github.witindex 6d7e5d952ae..21cd5d48056 100644--- a/crates/extension_api/wit/since_v0.8.0/github.wit+++ b/crates/extension_api/wit/since_v0.8.0/github.wit@@ -13,8 +13,6 @@ interface github {name: string,/// The download URL for the asset.download-url: string,- /// The SHA-256 of the release asset if provided by the GitHub API.- digest: option<string>,}/// The options used to filter down GitHub releases.diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rsindex b32ab979836..a2776f9f3b5 100644--- a/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs+++ b/crates/extension_host/src/wasm_host/wit/since_v0_8_0.rs@@ -783,7 +783,6 @@ impl From<::http_client::github::GithubReleaseAsset> for github::GithubReleaseAsSelf {name: value.name,download_url: value.browser_download_url,- digest: value.digest,}}}diff --git a/crates/project/src/agent_server_store.rs b/crates/project/src/agent_server_store.rsindex 62937476b8e..a2cc57beae9 100644--- a/crates/project/src/agent_server_store.rs+++ b/crates/project/src/agent_server_store.rs@@ -1495,7 +1495,7 @@ impl ExternalAgentServer for LocalCodex {let digest = asset.digest.as_deref()- .map(|d| d.strip_prefix("sha256:").unwrap_or(d));+ .and_then(|d| d.strip_prefix("sha256:").or(Some(d)));match ::http_client::github_download::download_server_binary(&*http,&asset.browser_download_url,@@ -1727,10 +1727,10 @@ impl ExternalAgentServer for LocalExtensionArchiveAgent {release.assets.iter().find(|a| a.name == filename){// Strip "sha256:" prefix if present- asset.digest.as_ref().map(|d| {+ asset.digest.as_ref().and_then(|d| {d.strip_prefix("sha256:").map(|s| s.to_string())- .unwrap_or_else(|| d.clone())+ .or_else(|| Some(d.clone()))})} else {None