continue
continue copied to clipboard
Extension API for VS Code v1
Description
This is a PR for #1041. It is as simple as possible, basically exporting the VsCodeExtension instance to be usable by other extensions.
This could for example be used to directly communicate with the models (e.g. via model.streamChat etc.) or to communicate with the chat webview, for example:
continueInstance.webviewProtocol.request("userInput", {
input: "Please do X for me!",
});
I believe it is currently ok to export the VsCodeExtension instance, despite giving full access to internals of continue, in order to figure out what features are actually useful for other extension authors. Later on, the instance property should be deprecated in favor of a better designed external API.
Maybe the author of #803 could make use of this simple API, too, instead of adding the proposed functionality to continue itself.
For a better Typescript experience, the types of the API should also be exposed as an npm package.
Checklist
- [x] The base branch of this PR is
preview, rather thanmain