Files
vscode/extensions/git
Megan RoggeandCopilot 016fd78c8b sessions: fix unified workspace repository handling (#335325)
* 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>
2026-09-09 20:17:09 +00:00
..
…
…

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.

  1. Copy src/api/git.d.ts to your extension's sources;

  2. Include git.d.ts in your extension's compilation.

  3. 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.git extension is activated before your extension, add extensionDependencies (docs) into the package.json of your extension:

    "extensionDependencies": [
    	"vscode.git"
    ]