chat: persist installed plugin identity#317585
Merged
Merged
Conversation
Persists enough installed plugin identity for marketplace plugins to survive reloads while keeping installed.json easy for external tools to read. - Stores plugin name alongside plugin URI and marketplace in installed.json, avoiding full source descriptor persistence. - Hydrates installed plugin metadata by re-reading marketplace data and matching current entries by stored name. - Falls back to install URI matching for older entries without names and keeps package/git install URI handling consistent. - Adds focused coverage for GitHub-sourced marketplace plugins like azure from awesome-copilot. (Commit message generated by Copilot)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the chat plugin installation persistence model so marketplace-installed plugins can be rehydrated correctly after a reload/restart, without persisting full plugin descriptors in installed.json.
Changes:
- Persist installed plugin
namealongsidepluginUriandmarketplaceininstalled.json. - Update hydration logic to re-read marketplace metadata (including GitHub-shorthand marketplaces via cached fetch) and resolve installed plugins by stored name (with URI fallback for older entries).
- Adjust repository/install URI handling and add/extend tests for restart hydration and GitHub-sourced marketplace plugins.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/plugins/pluginMarketplaceService.ts | Store plugin name in installed entries and hydrate metadata after restart using marketplace data. |
| src/vs/workbench/contrib/chat/common/plugins/fileBackedInstalledPluginsStore.ts | Extend installed.json schema to include optional name and migrate legacy data accordingly. |
| src/vs/workbench/contrib/chat/browser/agentPluginRepositoryService.ts | Centralize install URI logic and harden relative-path install URI normalization/validation. |
| src/vs/workbench/contrib/chat/browser/pluginInstallService.ts | Delegate install URI resolution to the repository service. |
| src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts | Add restart hydration coverage for GitHub-sourced marketplace plugins and name persistence. |
| src/vs/workbench/contrib/chat/test/common/plugins/fileBackedInstalledPluginsStore.test.ts | Update migration expectations to include persisted plugin name. |
| src/vs/workbench/contrib/chat/test/browser/plugins/pluginInstallService.test.ts | Update repository stub to align with new install URI delegation behavior. |
Copilot's findings
Comments suppressed due to low confidence (1)
src/vs/workbench/contrib/chat/test/common/plugins/pluginMarketplaceService.test.ts:578
- This second-session hydration also relies on a fixed retry loop +
timeout(10), which can be flaky. PreferwaitForState(second.installedPlugins, p => p.length === 1)or a sharedwaitForhelper to await the observable update deterministically.
const second = makeService();
for (let i = 0; i < 50; i++) {
if (second.installedPlugins.get().length === 1) {
break;
}
await timeout(10);
}
- Files reviewed: 7/7 changed files
- Comments generated: 3
dmitrivMS
approved these changes
May 20, 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.
chat: persist installed plugin identity
Persists enough installed plugin identity for marketplace plugins to survive reloads while keeping installed.json easy for external tools to read.
(Commit message generated by Copilot)