Skip to content

Package Source Mapping VS Settings now has command to invoke GitHub Copilot#7482

Draft
donnie-msft wants to merge 16 commits into
devfrom
dev-donnie-msft-usxPackageSourceMapper
Draft

Package Source Mapping VS Settings now has command to invoke GitHub Copilot#7482
donnie-msft wants to merge 16 commits into
devfrom
dev-donnie-msft-usxPackageSourceMapper

Conversation

@donnie-msft

@donnie-msft donnie-msft commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Bug

Fixes: https://github.com/NuGet/Client.Engineering/issues/3717

Description

Introduce a Button (Command) to the Package Source Mapping VS Settings which attempts to prompt GitHub Copilot with "Review this repository's package source mappings.", invoking the NuGet MCP tool to review supply chain security.

The new button appears below the package source mapping array, highlighted here by a red rectangle:

image
  • In this iteration, the button is always shown. If Package Source Mappings exist in a machine-level NuGet.Config, the MCP Tool will suggest and help to move those into repo-level NuGet.Config. It can also help simplify any existing mappings.

  • A PackageSourceMappingService is added, closely mimicking the FixVulnerablitiesService.

  • Refactored FixVulnerablitiesService:

    • Extract HandleSessionError on CopilotToolInvocationService as a shared static method for error messaging + telemetry, used by both PSM and FixVulnerabilities services
    • Replace FixVulnerabilitiesWithCopilotErrorType with CopilotToolSessionError (moved to NuGet.PackageManagement.VisualStudio/Telemetry/) — single enum for both session errors and telemetry
  • Add a NavigatedTelemetryEvent event with matching test coverage

  • Add PackageSourceMapperCommand for the VS Options button wiring

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@donnie-msft donnie-msft requested a review from a team as a code owner June 16, 2026 22:14
Comment thread src/NuGet.Clients/NuGet.Tools/CopilotToolSessionResult.cs
@donnie-msft donnie-msft changed the title Package Source Mapping VS Settings now has command to "Onboard with GitHub Copilot" Package Source Mapping VS Settings now has command to invoke GitHub Copilot Jun 18, 2026
@donnie-msft donnie-msft marked this pull request as draft June 18, 2026 20:26
@donnie-msft

Copy link
Copy Markdown
Contributor Author

Moving to draft while we discuss the overall design.

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