PowerShell / PowerShell/vscode-powershell
Add a public API to enable add-on extensions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Summary of the new feature
As a writer of a PowerShellEditorServices extension I want to enable users to install a vscode extension containing my module.
I need that extension to be able to:
- Use the integrated console to install the module from the gallery, or provide an additional
PSModulePath - Import the PSES extension module on vscode extension activation
I want that extension to be able to:
- Register new requests and notifications that PSES would redirect to my module
The current install process is as follows:
- Install the module manually from the gallery
- Add an
Import-Modulestatement to your profile - Manually add keybinds to
keybinds.json(using syntax you can only determine from reading vscode-powershell's source or a posted example)
That's a lot to ask of folks just to try out a module.
Proposed technical implementation details (optional)
The getExtension function allows vscode extensions to acquire a public API from another extension. This API would need to be surfaced by vscode-powershell internally, and optionally (though ideally) a typescript type definition would also be published to npm.
The bare minimum needed in this API would be an exported function that just imports a module from a path. Something like:
tryImportPowerShellModule(path: string) => bool
Edit: Actually a simple import function would be pretty inconsistent since it would be lost every time the console was restarted/version changed. Maybe something like:
registerPSESExtensionModule(path: string) => void;
Where vscode-powershell internally tracks registered modules and reimports them at startup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue identifies VS Code's getExtension API as the integration entry point and suggests a public TypeScript API, with optional npm type definitions. Start by tracing how vscode-powershell could surface that API and retain registered modules across console restarts; done means extensions can register or import their module and optionally register redirected requests and notifications.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- api, developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100