Skip to content

chat: persist installed plugin identity#317585

Merged
connor4312 merged 1 commit into
mainfrom
connor4312/plugin-install-persistence
May 20, 2026
Merged

chat: persist installed plugin identity#317585
connor4312 merged 1 commit into
mainfrom
connor4312/plugin-install-persistence

Conversation

@connor4312
Copy link
Copy Markdown
Member

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.

  • 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)

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)
Copilot AI review requested due to automatic review settings May 20, 2026 18:03
@connor4312 connor4312 enabled auto-merge (squash) May 20, 2026 18:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 name alongside pluginUri and marketplace in installed.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. Prefer waitForState(second.installedPlugins, p => p.length === 1) or a shared waitFor helper 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

@connor4312 connor4312 merged commit aead057 into main May 20, 2026
29 checks passed
@connor4312 connor4312 deleted the connor4312/plugin-install-persistence branch May 20, 2026 19:18
@vs-code-engineering vs-code-engineering Bot added this to the 1.122.0 milestone May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants