Expand description
UserInterfaceProvider: drives quick-pick, input-box, and notification UI.
§UserInterfaceProvider (Environment)
Implements the UserInterfaceProvider trait for MountainEnvironment,
orchestrating all modal UI interactions (dialogs, messages, quick picks)
by communicating with the Sky frontend.
§Request-response pattern
Every blocking UI operation follows the same flow:
- Generate a UUID request ID.
- Insert a
tokio::sync::oneshot::SenderinApplicationState.UI.PendingUserInterfaceRequest. - Emit a Tauri event to Sky with the ID and payload.
- Await the oneshot (timeout: 300 s);
DispatchLogic::ResolveUIRequestresolves it when the user responds.
The shared helper SendUserInterfaceRequest (pub-crate) is also used by
effect creators (applyEdit, showTextDocument, Task.Execute) that need
the same request-ID / oneshot pattern instead of fire-and-forget emits.
§Operations
ShowMessage- modal message box (Info/Warning/Error)ShowOpenDialog- native file/folder picker (viatauri-plugin-dialog; supports multi-select, folder-only, and file-type filters)ShowSaveDialog- native save-file pickerShowQuickPick- Skysky://quickpick/show(camelCase wire shape)ShowInputBox- Skysky://input-box/show(camelCase wire shape)
§VS Code reference
vs/platform/dialogs/common/dialogs.tsvs/platform/prompt/common/prompt.ts
Structs§
Functions§
- Send
User 🔒Interface Request - A generic helper function to send a request to the Sky UI and wait for a response.