Add zed://extension/{id} links (#34492)

Release Notes:

- Add zed://extension/{id} links to open the extensions UI with a
specific extension
This commit is contained in:
Conrad Irwin 2025-07-15 13:42:25 -06:00 committed by GitHub
parent ec52e9281a
commit 3751737621
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 72 additions and 10 deletions

View file

@ -746,6 +746,23 @@ fn handle_open_request(request: OpenRequest, app_state: Arc<AppState>, cx: &mut
return;
}
if let Some(extension) = request.extension_id {
cx.spawn(async move |cx| {
let workspace = workspace::get_any_active_workspace(app_state, cx.clone()).await?;
workspace.update(cx, |_, window, cx| {
window.dispatch_action(
Box::new(zed_actions::Extensions {
category_filter: None,
id: Some(extension),
}),
cx,
);
})
})
.detach_and_log_err(cx);
return;
}
if let Some(connection_options) = request.ssh_connection {
cx.spawn(async move |mut cx| {
let paths: Vec<PathBuf> = request.open_paths.into_iter().map(PathBuf::from).collect();