Skip to content

chat: don't recommend agent plugins when none are in the marketplace cache#315349

Merged
meganrogge merged 4 commits into
mainfrom
merogge/agent-plugin-recs-empty
May 11, 2026
Merged

chat: don't recommend agent plugins when none are in the marketplace cache#315349
meganrogge merged 4 commits into
mainfrom
merogge/agent-plugin-recs-empty

Conversation

@meganrogge
Copy link
Copy Markdown
Collaborator

@meganrogge meganrogge commented May 8, 2026

The 'this workspace recommends N agent plugins' notification fired whenever the workspace listed any enabledPlugins, even if none of those keys matched a plugin in lastFetchedPlugins. Clicking Show Plugins then opened @agentPlugins @recommended with an empty list.

Filter the recommended count to keys that are actually present in the cached marketplace results so the notification only appears when the resulting view will have entries.

…cache

The 'this workspace recommends N agent plugins' notification fired whenever the workspace listed any enabledPlugins, even if none of those keys matched a plugin in lastFetchedPlugins. Clicking 'Show Plugins' then opened '@agentplugins @recommended' with an empty list. Filter the recommended count to keys that are actually present in the cached marketplace results so the notification only appears when the resulting view will have entries.

Fixes #315347
Copilot AI review requested due to automatic review settings May 8, 2026 19:27
@meganrogge meganrogge added this to the 1.120.0 milestone May 8, 2026
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 adjusts the chat “workspace recommends agent plugins” notification so it only appears when the subsequent @agentPlugins @recommended view is expected to contain entries, addressing the spurious notification reported in #315347.

Changes:

  • Build a set of “known” marketplace plugin keys from cached marketplace results.
  • Count only recommended plugin keys that are both uninstalled and present in the cached marketplace set before showing the notification.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/claudePluginRecommendations.ts Filters the recommendation notification count using cached marketplace plugin keys to avoid leading users to an empty recommended list.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

@meganrogge meganrogge requested a review from connor4312 May 8, 2026 19:34
Per Copilot review on PR #315349: lastFetchedPlugins is empty until fetchMarketplacePlugins() runs, so fresh sessions with valid recommendations would never notify. Trigger a fetch when the cache is empty before deciding whether to show the notification.

Also fix unrelated TS error in chatInputNotificationService.ts where active.message (string | IMarkdownString) was passed to status(string).
connor4312
connor4312 previously approved these changes May 8, 2026
@meganrogge
Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts in this pull request

…recs-empty

# Conflicts:
#	src/vs/workbench/contrib/chat/browser/widget/input/chatInputNotificationService.ts

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 11, 2026

@copilot resolve the merge conflicts in this pull request

Resolved and pushed in ecd9acb.

@meganrogge meganrogge merged commit 7969885 into main May 11, 2026
25 checks passed
@meganrogge meganrogge deleted the merogge/agent-plugin-recs-empty branch May 11, 2026 16:04
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.

4 participants