remoting: Allow Add/Remove remote folder (#14532)

Release Notes:

- remoting (alpha only): Allow add/remove folders to projects

---------

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Conrad Irwin 2024-07-16 12:01:59 -06:00 committed by GitHub
parent be1387fee6
commit 62ab6e1a11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 612 additions and 239 deletions

View file

@ -19,6 +19,7 @@ use gpui::{
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WhiteSpace, WindowContext,
};
use num_format::{Locale, ToFormattedString};
use project::DirectoryLister;
use release_channel::ReleaseChannel;
use settings::Settings;
use theme::ThemeSettings;
@ -54,13 +55,17 @@ pub fn init(cx: &mut AppContext) {
workspace.add_item_to_active_pane(Box::new(extensions_page), None, cx)
}
})
.register_action(move |_, _: &InstallDevExtension, cx| {
.register_action(move |workspace, _: &InstallDevExtension, cx| {
let store = ExtensionStore::global(cx);
let prompt = cx.prompt_for_paths(gpui::PathPromptOptions {
files: false,
directories: true,
multiple: false,
});
let prompt = workspace.prompt_for_open_path(
gpui::PathPromptOptions {
files: false,
directories: true,
multiple: false,
},
DirectoryLister::Local(workspace.app_state().fs.clone()),
cx,
);
let workspace_handle = cx.view().downgrade();
cx.deref_mut()