Enables the native Git Status sidebar for an extension.
Minga owns the sidebar and its cached repository snapshot. Extensions own commit prompts and Git operations. The SDK declares the API for compilation; the editor provides the runtime.
Summary
Types
The displayed repository and last commit message, or why no target is available.
Functions
Shows Git Status and returns the exact displayed repository and last commit message.
Registers the unique native surface. Call this from the extension's init/1.
Opens, focuses, or closes Git Status. Does nothing when the surface is unavailable.
Types
Functions
@spec prepare_commit(MingaEditor.Extension.EditorAPI.state()) :: {MingaEditor.Extension.EditorAPI.state(), commit_target()}
Shows Git Status and returns the exact displayed repository and last commit message.
Returns :not_git outside a repository, or :repo_unavailable with a
notice in the returned state when Git Status cannot provide a commit target.
@spec register() :: :ok | {:error, term()}
Registers the unique native surface. Call this from the extension's init/1.
@spec toggle(MingaEditor.Extension.EditorAPI.state()) :: MingaEditor.Extension.EditorAPI.state()
Opens, focuses, or closes Git Status. Does nothing when the surface is unavailable.