Étend le manifeste et la validation SDK : un plugin déclare des commandes slash (contributes.slashCommands) adossées à une callback (command id enregistré via ctx.commands.registerCommand). Métadonnées UI exposées : name, shortDescription, requiresConfirmation, when. Exemple hello-plugin mis à jour avec une commande /hello. Ces commandes transitent ensuite par le registry/contrat unifié (#162). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
53 lines
1.1 KiB
JSON
53 lines
1.1 KiB
JSON
{
|
|
"ideaPluginManifestVersion": 1,
|
|
"id": "com.example.hello-plugin",
|
|
"displayName": "Hello Plugin",
|
|
"publisher": "IdeA Examples",
|
|
"version": "0.1.0",
|
|
"description": "SDK example plugin for validating command, menu and layout loading.",
|
|
"main": "dist/index.js",
|
|
"engines": {
|
|
"idea": ">=0.1.0"
|
|
},
|
|
"trustLevel": "full",
|
|
"capabilities": [
|
|
"ui",
|
|
"tooling"
|
|
],
|
|
"contributes": {
|
|
"menus": [
|
|
{
|
|
"id": "hello-plugin.menu",
|
|
"label": "Hello Plugin",
|
|
"topLevel": true,
|
|
"order": 100
|
|
}
|
|
],
|
|
"menuItems": [
|
|
{
|
|
"id": "hello-plugin.command.item",
|
|
"targetMenuId": "hello-plugin.menu",
|
|
"label": "hello-plugin",
|
|
"command": "hello-plugin",
|
|
"order": 10
|
|
}
|
|
],
|
|
"slashCommands": [
|
|
{
|
|
"name": "/hello",
|
|
"shortDescription": "Run the hello-plugin callback",
|
|
"command": "hello-plugin",
|
|
"requiresConfirmation": false
|
|
}
|
|
],
|
|
"layouts": [
|
|
{
|
|
"type": "hello-plugin.hello-world",
|
|
"label": "hello-world",
|
|
"component": "hello-world",
|
|
"order": 10
|
|
}
|
|
]
|
|
}
|
|
}
|