continue
continue copied to clipboard
First draft for an API to add models from other VSCode extensions.
Proof of concept draft for feature request https://github.com/continuedev/continue/issues/803
Exports functions "addExtensionModel" and "removeExtensionModel" through the VSCode extension API.
addExtensionModel accepts a CustomLLM object, as well as callbacks to the third-party extension to be notified when the model is added and removed.
Added field extensionModels to ContinueConfig, which holds the CustomLLM model specifications for models added by extensions. This field is not serialized to config.json. Config loading routines are adadpted to construct CustomLLMClass instances from all models declared in extensionModels and add them to models.
Also reworked vscode/src/loadConfig.ts:ConfigHandler to keep track of extension models on the VSCode extension side and improve configuration update event handling generally.
There seems to have been a bug/leak in earlier code where models removed by the user where removed in the webview / continue server configuration but not in the configuration object held by the VSCode extension: debugPanels handler for deleteModel would not remove the model from the config object and not trigger a config reload. This should be resolved by the changes.
Not sure if this would be the best way to handle this - it feels a bit hacky and there might be a better way to keep track of the extension models. The whole interaction of extension code with continue server(?)/webview code appears quite complex and I have missed a better way. Please consider this a proof of concept draft - any feedback welcome.
Deploy Preview for continuedev canceled.
| Name | Link |
|---|---|
| Latest commit | 5091a06af33503707b8d2db7c5106809084afb15 |
| Latest deploy log | https://app.netlify.com/sites/continuedev/deploys/65c2026ca6bea50008f1d434 |
@lupreCSC just wanted to make sure I also referenced other discussion in this PR: https://github.com/continuedev/continue/issues/803#issuecomment-1963329296
Questions there would be good to understand before moving forward.