界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
开发与工程 · SKILL.md

install-vscode-extension

install-vscode-extension

【开发与工程】How to install a VS Code extension from an extension ID. Useful when the user wants to add new capabilities to their VS Code environment by installing extensions.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: install-vscode-extension description: 'How to install a VS Code extension from an extension ID. Useful when the user wants to add new capabilities to their VS Code environment by installing extensions.'

Installing VS Code extensions

  1. VS Code extensions are identified by their unique extension ID, which typically follows the format publisher.extensionName. For example, the Python extension by Microsoft has the ID ms-python.python.
  2. To install a VS Code extension, you need to use the VS Code command workbench.extensions.installExtension and pass in the extension ID. The args are of the format:
[extensionId, { enable: true, installPreReleaseVersion: boolean }]

NOTE: install the pre-release version of the extension if the user explicitly mentions it or if the current environment is VS Code Insiders. Otherwise, install the stable version.

  1. Run that command via the copilot_runVscodeCommand tool. Make sure to pass the skipCheck argument as true to avoid checking if the command exists, as we know it does.
我的收藏