Skip to main content

Module SourceControlManagement

Module SourceControlManagement 

Source
Expand description

§SourceControlManagement (Tauri command surface)

Bridges SCM-viewlet UI requests from Sky to the SourceControlManagementProvider registry. Seven wire-bound commands, each in its own file (file name = Tauri command identifier per the Naming-Convention exception):

  • GetAllSourceControlManagementState - full snapshot of every provider, group, and resource.
  • GetSCMResourceChanges - per-provider resource list.
  • ExecuteSCMCommand - commit / push / pull dispatch (stub).
  • GetSCMBranches - branch picker data (stub).
  • CheckoutSCMBranch - switch working tree (stub).
  • GetSCMCommitHistory - Timeline-panel commit log (stub).
  • StageSCMResource - git add / unstage (stub).

Errors propagate as Result<Value, String> for direct frontend display.

VS Code reference: vs/workbench/contrib/scm/common/scm.ts, vs/workbench/contrib/scm/browser/scmView.ts, vs/workbench/services/scm/common/scmService.ts.

TODO: route every stub through the trait so we get progress reporting, cancellation, and proper error surfacing. Stash / merge / rebase, multi-provider concurrency, diff viewing, resource decoration, and SCM-input-box interactions are deferred.

Modules§

CheckoutSCMBranch
Tauri command - switch the working tree to a different branch.
ExecuteSCMCommand
Tauri command - dispatch SCM operations (commit / push / pull).
GetAllSourceControlManagementState
Tauri command - full snapshot of every registered SCM provider, its resource groups, and the resources within those groups. Drives the SCM viewlet’s first paint.
GetSCMBranches
Tauri command - list branches for an SCM provider. Drives the branch picker UI.
GetSCMCommitHistory
Tauri command - paginated commit log for the SCM viewlet’s Timeline panel.
GetSCMResourceChanges
Tauri command - list resources for a given SCM provider. The resources map is keyed by (group_id, …); we flatten across groups and filter by ProviderHandle == ProviderIdentifier.
StageSCMResource
Tauri command - stage / unstage a single resource. The standard git add / git restore --staged flow.