Skip to main content

Module Reload

Expand description

nativeHost:reload - reload the webview without restarting the process. VS Code calls this from ILifecycleMainService.reload() for “Reload Window” (Developer menu / Cmd+Shift+P → Reload Window).

Before triggering the renderer reload we ask Cocoon to serialize every webview panel that has a registered serializer via vscode.window.registerWebviewPanelSerializer. The returned (viewType, state) pairs land in the global memento under __webview_panel_state__, where Sky’s webview bridge picks them up after the reload completes and asks Cocoon to deserialize each entry.

Errors / timeouts on the serialize path are intentionally swallowed: reload must remain instant for the operator; a missing panel state is a survivable degradation, a frozen reload button is not.

Constants§

PANEL_STATE_KEY 🔒

Functions§

Fn