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:
parent
ec52e9281a
commit
3751737621
9 changed files with 72 additions and 10 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue