Expand description
Window-domain handlers for CocoonService. Sixteen entry points cover
show/hide messages, status-bar items, webview panels, and the prompt
family (quick-pick / input-box / progress).
Modules§
- Create
Status BarItem - Register a status-bar entry through the
StatusBarProvidertrait so the entry lives inApplicationState::Feature::Markers::ActiveStatusBarItems. Without this registration the workbench has no memory of the entry and the firstSetStatusBarText::Fncall rebroadcasts a fresh entry (state leak). Falls back to a direct Sky emit on trait failure. - Create
Webview Panel - Register a webview panel through the
WebviewProvidertrait so the panel is tracked inApplicationState::WebviewState. Without trait registrationDisposeWebviewPanellater fails with “unknown handle” and webviews leak DOM. Falls back to a millisecond pseudo-handle and a direct Sky emit on trait failure. - Dispose
Webview Panel - Dispose a webview panel. The Sky listener at
SkyBridge.ts:2344destructures{ panelId }; the older sibling emitter atRPC/CocoonService/mod.rs:1235already usespanelId- keep this site aligned so adisposefrom either path lands in the same DOMcel:webview:disposeCustomEvent. - OnDid
Receive Message - Forward a webview→extension message to Sky on
sky://webview/post-message. The protobufoneofis normalised to a JSON value (string or bytes). - Open
External - Forward an
OpenExternalrequest to Sky onsky://native/openExternalso the webview can launch the URI in the system browser/handler. - Post
Webview Message - Push a message from the extension into the webview via
sky://webview/post-message. Canonical kebab-case channel;sky://webview/postMessagehas been retired. - Report
Progress - Update a progress notification with a new message + increment.
- SetStatus
BarText - Update the text of a status-bar entry. Re-issues
SetStatusBarEntryso the stored DTO’sTextfield is refreshed inActiveStatusBarItems(HashMap insert acts as create-or-update). - SetWebview
Html - Update a webview panel’s HTML through the trait so the content is
captured in
WebviewStateDTOand re-servable on reveal/restore. - Show
Error Message - Display an error-severity message via the
UserInterfaceProvider. - Show
Information Message - Display an info-severity message via the
UserInterfaceProvider. - Show
Input Box - Display an input-box UI. Returns
cancelled:truewith empty value when the user dismisses without confirming. - Show
Progress - Begin a progress notification. Mints a millisecond handle, emits
sky://progress/startso the workbench can render the bar. - Show
Quick Pick - Display a quick-pick UI through the
UserInterfaceProvider. The returned label strings are mapped back to indices via linear search so the proto response can carry stableselected_indices. - Show
Text Document - Open a document in the workbench. Maps to
sky://editor/openDocument(same channel asWorkspace::OpenDocument::Fn; this is the window-namespace alias). - Show
Warning Message - Display a warning-severity message via the
UserInterfaceProvider.