mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-30 18:46:00 +01:00
* sessions: fix unified workspace repository handling Track local Git repository presence independently from GitHub metadata so repository icons work for every Git host. Reject local harnesses for virtual GitHub workspaces. Follow-up to #335301. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: preserve repository actions for cloud drafts Keep local repository acquisition actions visible when selecting Cloud changes the draft workspace to a virtual GitHub URI.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: refresh deferred repository state Promote Agent Host folder drafts when Git metadata arrives and retry local repository resolution until GitHub identity is available.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: use repository root for cached clones Return the concrete repository path when the unified workspace picker reuses a cached clone, instead of returning an enclosing workspace file.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: use folder icons for local workspaces Present all unified-picker local workspace entries consistently as folders, including locally cloned Git repositories.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: separate local and cloud repository actions Consolidate local repository acquisition behind the Git remote-source picker while restoring direct GitHub repository selection for Cloud sessions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: restore direct repository clone picker Keep GitHub repositories in the first clone picker while allowing local sessions to paste URLs for other Git remotes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * sessions: distinguish cloud repository icons Use repository icons for non-local GitHub workspaces, the GitHub logo for repository cloning, and folder icons for local workspaces. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Git integration for Visual Studio Code
Notice: This extension is bundled with Visual Studio Code. It can be disabled but not uninstalled.
Features
See Git support in VS Code to learn about the features of this extension.
API
The Git extension exposes an API, reachable by any other extension.
-
Copy
src/api/git.d.tsto your extension's sources; -
Include
git.d.tsin your extension's compilation. -
Get a hold of the API with the following snippet:
const gitExtension = vscode.extensions.getExtension<GitExtension>('vscode.git').exports; const git = gitExtension.getAPI(1);Note: To ensure that the
vscode.gitextension is activated before your extension, addextensionDependencies(docs) into thepackage.jsonof your extension:"extensionDependencies": [ "vscode.git" ]