Expand description
Cocoon โ Mountain register_scm_provider notification.
Replaces the previous behaviour where this wire-method fell through
the language-providers OR-block in MountainVinegRPCService.rs and
got registered as a ProviderType::SourceControl language provider
(wrong - the SCM viewlet binds to ApplicationState::SourceControl,
not the language-feature provider registry, so the panel stayed
empty even though vscode.scm.createSourceControl(...) succeeded
inside Cocoon).
Cocoon emits this from ScmNamespace.ts:14 with payload shape:
{ handle: u32, id, label, root_uri, extension_id }Three side effects happen here:
ProviderRegistration::RegisterProviderrecords the handle so future language-feature dispatches that look up by SCM handle (rare but possible) resolve.SourceControlManagementProvider::CreateSourceControlmutatesApplicationState::Feature::Markers::SourceControlManagementProvidersand emitsSkyEvent::SCMProviderAdded- this is the canonical state-tracking path the SCM view uses.- A direct
sky://scm/registerTauri emit covers any renderer path that listens for the simpler legacy event shape (gitlens, future custom SCM views).
All three are best-effort and independent: the trait call may fail
when root_uri is missing (extensions occasionally register an SCM
before opening a folder); the registry write is infallible; the
Sky emit is fire-and-forget.