Skip to content

Add "Copy Extension Version" action to extension context menu#321307

Open
alichtman wants to merge 3 commits into
microsoft:mainfrom
alichtman:alichtman/add-copy-ext-version-action
Open

Add "Copy Extension Version" action to extension context menu#321307
alichtman wants to merge 3 commits into
microsoft:mainfrom
alichtman:alichtman/add-copy-ext-version-action

Conversation

@alichtman

@alichtman alichtman commented Jun 14, 2026

Copy link
Copy Markdown

Summary

Adds a "Copy Extension Version" command to the extension context menu, mirroring the
existing "Copy Extension ID" action.

Test Plan

Built and ran VS Code from source on macOS: https://github.com/microsoft/vscode/wiki/How-to-Contribute

Then:

  1. Open the Extensions view (Cmd/Ctrl+Shift+X).
  2. Right-click any installed extension.
  3. Confirm a new "Copy Extension Version" item appears in the copy group, alongside
    "Copy", "Copy Extension ID", and "Copy Link".
image
  1. Click "Copy Extension Version", then paste into an editor — the extension's version
    string is copied to the clipboard, e.g.:
0.5.31

Copilot AI review requested due to automatic review settings June 14, 2026 08:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new Extensions context-menu action to copy an extension’s version to the clipboard.

Changes:

  • Registers a new command workbench.extensions.action.copyExtensionVersion in the Extension context menu.
  • Looks up the extension (local first, then gallery) and writes its version to the clipboard.

Comment on lines +1721 to +1722
const extension = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, { id: extensionId }))[0]
|| (await this.extensionsWorkbenchService.getExtensions([{ id: extensionId }], CancellationToken.None))[0];
@alichtman alichtman force-pushed the alichtman/add-copy-ext-version-action branch from c7ab70d to 6bc045c Compare June 14, 2026 08:34
@alichtman

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="Meta"

@alichtman alichtman changed the title Add Copy Extension Version action to extension context menu Add "Copy Extension Version" action to extension context menu Jun 15, 2026
@alichtman alichtman marked this pull request as ready for review June 15, 2026 16:20
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