Expand description
§WorkspaceFolderCommand
Tauri commands for opening, listing, and closing workspace folders at
runtime. These are the second half of Plan BATCH-02: the first half
(autoload at startup) seeds ApplicationState.Workspace.WorkspaceFolders
from CLI / env. These commands let Sky drive the same state change
after boot, for a welcome-screen “Open Folder” button or a recent-files
picker.
§Flow
Sky clicks "Open Folder" ──invoke──> MountainWorkspaceOpenFolder
│
▼
ApplicationState.Workspace.SetWorkspaceFolders(...)
│
├── UpdateWorkspaceFoldersRequest
▼ (to Cocoon via gRPC)
extensions see new `vscode.workspace.workspaceFolders`
and receive `onDidChangeWorkspaceFolders`.The command deliberately validates the path before touching state: a non-existent directory (user fat-fingered a drag, for instance) returns an error and the existing folder set is untouched.
Structs§
- Workspace
Folder Payload - JSON-serialisable record returned to Sky for every folder in the set.
Functions§
- Mountain
Workspace Close AllFolders - Close every workspace folder - equivalent to VS Code’s
workbench.action.closeFolder. Extensions that subscribe toonDidChangeWorkspaceFoldersreceive an event whoseremovedarray contains every previously-open folder. - Mountain
Workspace List Folders - Return the current workspace folder set without mutating anything.
- Mountain
Workspace Open Folder - Open one or more workspace folders, replacing any currently-open set.