#15973·theia

Command of a vscode extension not working if command uses enablement

Author: WolfThomasCreated Jul 9, 2025Updated Sep 30, 2026

Bug Description:

Installing a vscode extension with commands that have enablement do not work. The specific commands are not visible because the 'enablement' is not being properly evaluated.

Steps to Reproduce:

  1. create a vscode extension with yo tool
  2. add second command with "enablement"; in this case 'editorHasSelection' 2.2
    { "command": "vscode-test-extension.helloWorld2", "title": "Hello World (editorHasSelection)", "enablement": "editorHasSelection" }
  3. build extension and pack to vsix and install in theia
  4. open texteditor, type some text and select the text
  5. open command palette and type "hello world" to get both commands
  6. first command is visible but second command with "enablement" is not visible in theia ide

Below some screenshots:

working with Visual Studio Code Version 1.101.1

Image

not working Eclipse Theia IDE Version 1.63.200 VS Code API Version: 1.101.1

Image

Additional Information

  • Operating System: Windows 10, 10.0.19045 N/A Build 19045
  • Theia Version: Version 1.63.200, VS Code API Version: 1.101.1

Sample extension vsix file

vscode-test-extension-0.0.2.vsix.zip