A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
window: let the folder picker open at a caller-chosen directory
RoversXa8b0b4d999fd
diff --git a/wezterm-gui/src/settings_window.rs b/wezterm-gui/src/settings_window.rsindex be00cb58..39ec9c6f 100644--- a/wezterm-gui/src/settings_window.rs+++ b/wezterm-gui/src/settings_window.rs@@ -2648,6 +2648,7 @@ impl SettingsWindow {FolderPickerOptions {title: crate::i18n::tr("settings-download-picker-title"),prompt: crate::i18n::tr("common-choose"),+ ..Default::default()},Box::new(move |path| {// Cancelling the picker must leave the setting alone, so onlydiff --git a/window/src/lib.rs b/window/src/lib.rsindex e38e1490..82f8a77a 100644--- a/window/src/lib.rs+++ b/window/src/lib.rs@@ -261,6 +261,14 @@ pub enum ContextMenuIcon {pub struct FolderPickerOptions {pub title: String,pub prompt: String,+ /// Where the picker opens, when the caller has a folder in mind.+ ///+ /// A re-authorization flow needs this: the user is being asked to confirm+ /// the one folder the system refused, and making them navigate back to it+ /// turns a single click into a scavenger hunt -- through a sidebar that,+ /// being unreadable, cannot show them the way. Best-effort; a platform that+ /// cannot honour it still opens a usable picker.+ pub directory: Option<PathBuf>,}impl Default for FolderPickerOptions {@@ -268,6 +276,7 @@ impl Default for FolderPickerOptions {Self {title: "Open Project".to_string(),prompt: "Open".to_string(),+ directory: None,}}}diff --git a/window/src/os/macos/window.rs b/window/src/os/macos/window.rsindex ea24d596..c26f9e01 100644--- a/window/src/os/macos/window.rs+++ b/window/src/os/macos/window.rs@@ -1180,6 +1180,16 @@ impl WindowOps for Window {let prompt = nsstring(&options.prompt);let () = msg_send![*panel, setTitle: *title];let () = msg_send![*panel, setPrompt: *prompt];+ // Bound to a local so the NSString outlives the NSURL that borrows+ // it; `setDirectoryURL` is only a hint, so a path AppKit dislikes+ // simply leaves the panel wherever it would have opened.+ if let Some(directory) = options.directory.as_ref().and_then(|dir| dir.to_str()) {+ let directory = nsstring(directory);+ let url: id = msg_send![class!(NSURL), fileURLWithPath: *directory isDirectory: YES];+ if url != nil {+ let () = msg_send![*panel, setDirectoryURL: url];+ }+ }const NS_MODAL_RESPONSE_OK: NSInteger = 1;let callback = Arc::new(Mutex::new(Some(callback)));