Skip to main content

Module RegisterScmProvider

Module RegisterScmProvider 

Source
Expand description

Cocoon → register_scm_provider notification.

Three side effects, all best-effort and independent:

  1. VineHost::RegisterScmInRegistry records the handle in the embedder’s ProviderRegistration table so future handle-keyed dispatches resolve.
  2. VineHost::CreateSourceControl mutates the embedder’s SCM marker state and emits SkyEvent::SCMProviderAdded - the canonical path the SCM view uses.
  3. Host.EmitToRenderer("sky://scm/register", ...) covers renderer code that listens for the legacy simpler event shape.

Handle disambiguation: Cocoon’s ScmNamespace.ts allocates a process-local sequential handle and includes it on the wire. Subsequent register_scm_resource_group, update_scm_group, and unregister_scm_provider notifications reference the SAME sequential handle. Falling back to a DJB hash of ScmId is only allowed when Cocoon omits the field (legacy callers).

Functions§

BuildUrlFromComponents 🔒
Rebuilds a full URL string from a VS Code UriComponents JSON object ({ scheme, authority, path, query, fragment }). Returns None when the scheme field is absent or empty.
RegisterScmProvider