Skip to main content

Module Notifications

Module Notifications 

Source
Expand description

Document lifecycle notification helpers.

Sends LSP-style RPC notifications to the Cocoon extension-host sidecar so its ExtHostDocuments model stays in sync with Mountain’s OpenDocuments state. All four helpers follow the same pattern: serialize a payload, call IPCProvider::SendNotificationToSideCar, and log any emit error without propagating it (notifications are fire-and-forget).

HelperCocoon RPC methodTrigger
notify_model_added$acceptModelAddeddocument opened / created
notify_model_changed$acceptModelChangedincremental text edit applied
notify_model_saved$acceptModelSaveddocument written to disk
notify_model_removed$acceptModelRemoveddocument closed or renamed

Functions§

notify_model_added 🔒
Notifies Cocoon that a new document model has been added.
notify_model_changed 🔒
Notifies Cocoon that a document’s content has changed.
notify_model_removed 🔒
Notifies Cocoon that a document has been closed or renamed.
notify_model_saved 🔒
Notifies Cocoon that a document has been saved to disk.