sessions: register native IPluginGitService for desktop#312346
Merged
sessions: register native IPluginGitService for desktop#312346
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Registers the desktop-native git-backed implementation of the agent plugin git service in the Sessions desktop entrypoint, aligning it with the desktop Workbench so marketplace plugin install/update flows can perform git operations instead of hitting the browser stub.
Changes:
- Register
NativePluginGitCommandServiceas the desktopIPluginGitServiceimplementation insessions.desktop.main.ts. - Register the shared-process remote proxy for
ILocalGitServiceon thelocalGitchannel so git runs locally via the shared process.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/sessions.desktop.main.ts | Adds desktop DI registrations for native plugin git operations (and shared-process localGit proxy) to prevent falling back to the browser stub. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 0
The sessions desktop app was falling through to BrowserPluginGitCommandService (a stub that throws on every call) because the native override was never registered. This broke marketplace plugin install/update which require git operations (clone, pull, fetch). Register NativePluginGitCommandService and its ILocalGitService dependency in sessions.desktop.main.ts, mirroring the existing pattern in workbench.desktop.main.ts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8ad83e1 to
b79ca1e
Compare
connor4312
approved these changes
Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Verified in OSS the fix works.
Problem
The sessions desktop app was falling through to
BrowserPluginGitCommandService— a stub that throws"Agent plugins are not available in this environment"on every method call. This broke marketplace plugin operations (install, update) which require git operations (clone, pull, fetch).The workbench desktop app overrides this stub with
NativePluginGitCommandServiceviaworkbench/contrib/chat/electron-browser/chat.contribution.ts, but the sessions desktop app never imported that override.Fix
Register
NativePluginGitCommandServiceand itsILocalGitServiceshared-process dependency insessions.desktop.main.ts, mirroring the existing pattern inworkbench.desktop.main.ts.We intentionally don't import the full
chat/electron-browser/chat.contribution.tsbecause it bundles unrelated desktop-workbench features (voice chat, CLI handler, lifecycle handler,OpenAgentsWindowAction, etc.) that may conflict with sessions-specific implementations.What works after this fix