update code example

This commit is contained in:
Adam Shedivy 2024-10-31 16:39:21 -05:00
parent 39fd5a4868
commit 55645ec5c6
2 changed files with 7 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View file

@ -242,9 +242,9 @@ import {
class MyCustomProvider implements IContextProvider {
get description(): ContextProviderDescription {
return {
title: "custom",
title: "Custom",
displayTitle: "Custom",
description: "Custom description",
description: "my custom context provider",
type: "normal",
};
}
@ -273,7 +273,7 @@ class MyCustomProvider implements IContextProvider {
const customProvider = new MyCustomProvider();
// get Continue extension using vscode API
const continueExt = vscode.extensions.getExtension("continue.continue");
const continueExt = vscode.extensions.getExtension("Continue.continue");
// get the API from the extension
const continueApi = continueExt?.exports;
@ -281,3 +281,7 @@ const continueApi = continueExt?.exports;
// register your custom provider
continueApi?.registerCustomContextProvider(customProvider);
```
This will register `MyCustomProvider` provider with Continue
![alt text](./assets/image.png)