diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 7de7f1d9e..2949b7055 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1,7 +1,8 @@ { + "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "config.json", - "$ref": "#/definitions/SerializedContinueConfig", - "definitions": { + "$ref": "#/$defs/SerializedContinueConfig", + "$defs": { "BaseCompletionOptions": { "title": "BaseCompletionOptions", "type": "object", @@ -154,7 +155,7 @@ "clientCertificate": { "title": "Client Certificate", "description": "Client certificate to use when making the HTTP request", - "$ref": "#/definitions/ClientCertificateOptions" + "$ref": "#/$defs/ClientCertificateOptions" } } }, @@ -388,7 +389,7 @@ }, "allOf": [ { - "$ref": "#/definitions/BaseCompletionOptions" + "$ref": "#/$defs/BaseCompletionOptions" } ] }, @@ -410,7 +411,7 @@ }, "allOf": [ { - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" } ] }, @@ -2229,7 +2230,7 @@ }, "allOf": [ { - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" } ] } @@ -2451,7 +2452,7 @@ ], "type": "array", "items": { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/$defs/ModelDescription" } }, "systemMessage": { @@ -2473,7 +2474,7 @@ }, "allOf": [ { - "$ref": "#/definitions/BaseCompletionOptions" + "$ref": "#/$defs/BaseCompletionOptions" } ] }, @@ -2482,7 +2483,7 @@ "description": "Default request options for all fetch requests from models and context providers. These will be overriden by any model-specific request options.", "allOf": [ { - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" } ] }, @@ -2493,7 +2494,7 @@ "default": [], "type": "array", "items": { - "$ref": "#/definitions/SlashCommand" + "$ref": "#/$defs/SlashCommand" } }, "customCommands": { @@ -2509,7 +2510,7 @@ ], "type": "array", "items": { - "$ref": "#/definitions/CustomCommand" + "$ref": "#/$defs/CustomCommand" } }, "contextProviders": { @@ -2519,7 +2520,7 @@ "default": [], "type": "array", "items": { - "$ref": "#/definitions/ContextProviderWithParams" + "$ref": "#/$defs/ContextProviderWithParams" } }, "userToken": { @@ -2584,7 +2585,7 @@ "requestOptions": { "title": "Request Options", "description": "Request options to be used in any fetch requests made by the embeddings provider", - "$ref": "#/definitions/RequestOptions" + "$ref": "#/$defs/RequestOptions" }, "maxChunkSize": { "title": "Maximum Chunk Size", @@ -2603,7 +2604,7 @@ "region": { "title": "Region", "description": "The region where the model is hosted", - "$ref": "#/definitions/ModelDescription/properties/region" + "$ref": "#/$defs/ModelDescription/properties/region" }, "profile": { "title": "Profile", @@ -2872,12 +2873,12 @@ }, "oneOf": [ { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/$defs/ModelDescription" }, { "type": "array", "items": { - "$ref": "#/definitions/ModelDescription" + "$ref": "#/$defs/ModelDescription" } } ] @@ -3032,7 +3033,7 @@ "items": { "allOf": [ { - "$ref": "#/definitions/ContextProviderWithParams" + "$ref": "#/$defs/ContextProviderWithParams" }, { "properties": { diff --git a/extensions/vscode/scripts/utils.js b/extensions/vscode/scripts/utils.js index 7d62fefa4..550d0246c 100644 --- a/extensions/vscode/scripts/utils.js +++ b/extensions/vscode/scripts/utils.js @@ -13,7 +13,7 @@ const continueDir = path.join(__dirname, "..", "..", ".."); function copyConfigSchema() { // Modify and copy for .continuerc.json const schema = JSON.parse(fs.readFileSync("config_schema.json", "utf8")); - schema.definitions.SerializedContinueConfig.properties.mergeBehavior = { + schema.$defs.SerializedContinueConfig.properties.mergeBehavior = { type: "string", enum: ["merge", "overwrite"], default: "merge", diff --git a/extensions/vscode/vsc-extension-quickstart.md b/extensions/vscode/vsc-extension-quickstart.md index 04a57fc6a..a77988101 100644 --- a/extensions/vscode/vsc-extension-quickstart.md +++ b/extensions/vscode/vsc-extension-quickstart.md @@ -1,42 +1,13 @@ -# Welcome to your VS Code Extension - -## What's in the folder - -* This folder contains all of the files necessary for your extension. -* `package.json` - this is the manifest file in which you declare your extension and command. - * The sample plugin registers a command and defines its title and command name. With this information VS Code can show the command in the command palette. It doesn’t yet need to load the plugin. -* `src/extension.ts` - this is the main file where you will provide the implementation of your command. - * The file exports one function, `activate`, which is called the very first time your extension is activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`. - * We pass the function containing the implementation of the command as the second parameter to `registerCommand`. +# Welcome to the Continue Visual Studio Code Extension ## Get up and running straight away -* Press `F5` to open a new window with your extension loaded. -* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`. -* Set breakpoints in your code inside `src/extension.ts` to debug your extension. -* Find output from your extension in the debug console. +- Open the root of the continue repository in visual studio code +- Press `F5` to open a new window with your extension loaded. +- The continue in the launched vs code instance uses `extensions/.continue-debug` as configuration folder +- Find output from your extension in the debug console. ## Make changes -* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. -* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. - -## Explore the API - -* You can open the full set of our API when you open the file `node_modules/@types/vscode/index.d.ts`. - -## Run tests - -* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`. -* Press `F5` to run the tests in a new window with your extension loaded. -* See the output of the test result in the debug console. -* Make changes to `src/test/suite/extension.test.ts` or create new test files inside the `test/suite` folder. - * The provided test runner will only consider files matching the name pattern `**.test.ts`. - * You can create folders inside the `test` folder to structure your tests any way you want. - -## Go further - -* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create extensions that seamlessly integrate with VS Code's native interface and patterns. - * Reduce the extension size and improve the startup time by [bundling your extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension). - * [Publish your extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code extension marketplace. - * Automate builds by setting up [Continuous Integration](https://code.visualstudio.com/api/working-with-extensions/continuous-integration). +- You can relaunch the extension from the debug toolbar after changing code. +- You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.