Use schema for the configuration JSON schema itself
This commit is contained in:
parent
2711b3b282
commit
e86849a7f6
3 changed files with 26 additions and 54 deletions
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -386,7 +387,7 @@
|
|||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/BaseCompletionOptions"
|
||||
"$ref": "#/$defs/BaseCompletionOptions"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -408,7 +409,7 @@
|
|||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/RequestOptions"
|
||||
"$ref": "#/$defs/RequestOptions"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -2188,7 +2189,7 @@
|
|||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/RequestOptions"
|
||||
"$ref": "#/$defs/RequestOptions"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -2410,7 +2411,7 @@
|
|||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ModelDescription"
|
||||
"$ref": "#/$defs/ModelDescription"
|
||||
}
|
||||
},
|
||||
"systemMessage": {
|
||||
|
|
@ -2432,7 +2433,7 @@
|
|||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/BaseCompletionOptions"
|
||||
"$ref": "#/$defs/BaseCompletionOptions"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -2441,7 +2442,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"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -2452,7 +2453,7 @@
|
|||
"default": [],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/SlashCommand"
|
||||
"$ref": "#/$defs/SlashCommand"
|
||||
}
|
||||
},
|
||||
"customCommands": {
|
||||
|
|
@ -2468,7 +2469,7 @@
|
|||
],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/CustomCommand"
|
||||
"$ref": "#/$defs/CustomCommand"
|
||||
}
|
||||
},
|
||||
"contextProviders": {
|
||||
|
|
@ -2478,7 +2479,7 @@
|
|||
"default": [],
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ContextProviderWithParams"
|
||||
"$ref": "#/$defs/ContextProviderWithParams"
|
||||
}
|
||||
},
|
||||
"userToken": {
|
||||
|
|
@ -2542,7 +2543,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",
|
||||
|
|
@ -2561,7 +2562,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",
|
||||
|
|
@ -2830,12 +2831,12 @@
|
|||
},
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ModelDescription"
|
||||
"$ref": "#/$defs/ModelDescription"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/ModelDescription"
|
||||
"$ref": "#/$defs/ModelDescription"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -2985,7 +2986,7 @@
|
|||
"items": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/ContextProviderWithParams"
|
||||
"$ref": "#/$defs/ContextProviderWithParams"
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue