vscode-ext-commands
VS Code 확장 명령 기여 패턴 및 명명 규칙. 두 가지 명령 유형을 정의합니다: 일반 명령(명령 팔레트에서 접근 가능하며 category와 title 필수)과 사이드바 명령(밑줄 접두사와 #sideBar 접미사, icon 필요). 사이드바 명령은 enablement 및 when 조건을 통한 가시성 규칙을 지원하며, group 및 order 속성으로 위치를 제어합니다. 모든 명령은 title을 정의해야 하며, 일반 명령의 아이콘은 선택 사항입니다...
npx skills add https://github.com/github/awesome-copilot --skill vscode-ext-commandsVS Code extension command contribution
This skill helps you to contribute commands in VS Code extensions
When to use this skill
Use this skill when you need to:
- Add or update commands to your VS Code extension
Instructions
VS Code commands must always define a title, independent of its category, visibility or location. We use a few patterns for each "kind" of command, with some characteristics, described below:
-
Regular commands: By default, all commands should be accessible in the Command Palette, must define a
category, and don't need anicon, unless the command will be used in the Side Bar. -
Side Bar commands: Its name follows a special pattern, starting with underscore (
_) and suffixed with#sideBar, like_extensionId.someCommand#sideBarfor instance. Must define anicon, and may or may not have some rule forenablement. Side Bar exclusive commands should not be visible in the Command Palette. Contributing it to theview/titleorview/item/context, we must inform order/position that it will be displayed, and we can use terms "relative to other command/button" in order to you identify the correctgroupto be used. Also, it's a good practice to define the condition (when) for the new command is visible.