From 3cd0f066380aaa0a610d18398ca4a33e81ee06f4 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Tue, 25 Mar 2025 12:00:16 -0700 Subject: [PATCH] reference <> yaml-reference --- .../customize/deep-dives/autocomplete.mdx | 2 +- .../customize/deep-dives/configuration.md | 4 +- .../customize/deep-dives/development-data.md | 2 +- docs/docs/customize/model-roles/intro.mdx | 2 +- docs/docs/customize/slash-commands.mdx | 2 +- .../tutorials/build-your-own-slash-command.md | 2 +- .../hub/assistants/create-an-assistant.md | 3 +- docs/docs/hub/blocks/block-types.md | 14 +- docs/docs/hub/blocks/create-a-block.md | 4 +- docs/docs/hub/blocks/intro.md | 2 +- docs/docs/json-reference.md | 108 ++- docs/docs/reference.md | 725 ++++++++++-------- docs/docs/yaml-migration.md | 8 +- docs/docs/yaml-reference.md | 500 ------------ docs/docusaurus.config.js | 6 +- docs/sidebars.js | 5 - 16 files changed, 474 insertions(+), 915 deletions(-) delete mode 100644 docs/docs/yaml-reference.md diff --git a/docs/docs/customize/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx index c350b4d2c..fb1a4970b 100644 --- a/docs/docs/customize/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -98,7 +98,7 @@ The following settings can be configured for autocompletion in the IDE extension ### `config.json` Configuration -The `config.json` configuration format (deprecated) offers further configuration options through `tabAutocompleteOptions`. See the [JSON Reference](../../reference.md#tabautocompleteoptions) for more details. +The `config.json` configuration format (deprecated) offers further configuration options through `tabAutocompleteOptions`. See the [JSON Reference](../../json-reference.md#tabautocompleteoptions) for more details. ## FAQs diff --git a/docs/docs/customize/deep-dives/configuration.md b/docs/docs/customize/deep-dives/configuration.md index dd48ddbe7..269fa64e5 100644 --- a/docs/docs/customize/deep-dives/configuration.md +++ b/docs/docs/customize/deep-dives/configuration.md @@ -18,7 +18,7 @@ To open your configuration file, you can click the "gear" icon in the bottom rig When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist. -See the full reference for `config.yaml` [here](../../yaml-reference.md). +See the full reference for `config.yaml` [here](../../reference.md). ## Deprecated configuration methods @@ -26,7 +26,7 @@ See the full reference for `config.yaml` [here](../../yaml-reference.md). View the `config.json` migration guide [here](../../yaml-migration.md) ::: -- [`config.json`](../../reference.md) - The original configuration format which is stored in a file at the same location as `config.yaml` +- [`config.json`](../../json-reference.md) - The original configuration format which is stored in a file at the same location as `config.yaml` - [`.continuerc.json`](#continuercjson) - Workspace-level configuration - [`config.ts`](#configts) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (_merged_) the `config.json` schema: - `~/.continue/config.ts` (MacOS / Linux) diff --git a/docs/docs/customize/deep-dives/development-data.md b/docs/docs/customize/deep-dives/development-data.md index da9f5136c..dd1e0c546 100644 --- a/docs/docs/customize/deep-dives/development-data.md +++ b/docs/docs/customize/deep-dives/development-data.md @@ -16,6 +16,6 @@ You can also configure custom destinations for your data, including remote HTTP For hub assistants, data destinations are configured in `data` blocks. Visit the hub to [explore example data blocks](https://hub.continue.dev/explore/data) or [create your own](https://hub.continue.dev/new?type=block&blockType=data). -See more details about adding `data` blocks to your configuration files in the [YAML specification](../../yaml-reference.md#data) +See more details about adding `data` blocks to your configuration files in the [YAML specification](../../reference.md#data) When sending development data to your own HTTP endpoint, it will receive an event JSON blob at the given `schema` version. You can view event names, schema versions, and fields [here in the source code](https://github.com/continuedev/continue/tree/main/packages/config-yaml/src/schemas/data). diff --git a/docs/docs/customize/model-roles/intro.mdx b/docs/docs/customize/model-roles/intro.mdx index 3c3a6476e..5ed2ac129 100644 --- a/docs/docs/customize/model-roles/intro.mdx +++ b/docs/docs/customize/model-roles/intro.mdx @@ -18,7 +18,7 @@ Models in Continue can be configured to be used for various roles in the extensi - [`embed`](./embeddings.mdx): Used to generate embeddings used for vector search (@Codebase and @Docs context providers) - [`rerank`](./reranking.mdx): Used to rerank results from vector search -These roles can be specified for a `config.yaml` model block using `roles`. See the [YAML Specification](../../yaml-reference.md#models) for more details. +These roles can be specified for a `config.yaml` model block using `roles`. See the [YAML Specification](../../reference.md#models) for more details. ## Selecting model roles diff --git a/docs/docs/customize/slash-commands.mdx b/docs/docs/customize/slash-commands.mdx index e1890ba81..5aacb1cb9 100644 --- a/docs/docs/customize/slash-commands.mdx +++ b/docs/docs/customize/slash-commands.mdx @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"; import Tabs from "@theme/Tabs"; :::info -Slash commands can currently only be added using [`config.json`](../reference.md). The [`YAML Config Format`](../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../customize/deep-dives/prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../json-reference.md). The [`YAML Config Format`](../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../customize/deep-dives/prompt-files.md) to achieve similar functionality. ::: Slash commands are shortcuts that can be activated by typing '/' and selecting from the dropdown. For example, the built-in '/edit' slash command lets you stream edits directly into your editor. diff --git a/docs/docs/customize/tutorials/build-your-own-slash-command.md b/docs/docs/customize/tutorials/build-your-own-slash-command.md index f0cc1147f..27b0517b3 100644 --- a/docs/docs/customize/tutorials/build-your-own-slash-command.md +++ b/docs/docs/customize/tutorials/build-your-own-slash-command.md @@ -3,7 +3,7 @@ title: Build your own slash command --- :::info -Slash commands can currently only be added using [`config.json`](../../reference.md) or `config.ts`. The [`YAML Config Format`](../../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) to achieve similar functionality. +Slash commands can currently only be added using [`config.json`](../../json-reference.md) or `config.ts`. The [`YAML Config Format`](../../reference.md) is the new and preferred format. We recommend looking into [Prompt Files](../deep-dives/prompt-files.md) to achieve similar functionality. ::: There are two ways to add custom slash commands: diff --git a/docs/docs/hub/assistants/create-an-assistant.md b/docs/docs/hub/assistants/create-an-assistant.md index 207f1c955..62fdf666c 100644 --- a/docs/docs/hub/assistants/create-an-assistant.md +++ b/docs/docs/hub/assistants/create-an-assistant.md @@ -32,7 +32,6 @@ Choose a name, slug, description, and icon for your assistant. The easiest way to create an assistant is to click "Create assistant" with the default configuration and then add / remove blocks using the sidebar. -Alternatively, you can edit the assistant YAML directly before clicking "Create assistant". Refer to examples of assistants on [hub.continue.dev](https://hub.continue.dev/explore/assistants) and visit the [YAML Reference](../../yaml-reference.md#complete-yaml-config-example) docs for more details. +Alternatively, you can edit the assistant YAML directly before clicking "Create assistant". Refer to examples of assistants on [hub.continue.dev](https://hub.continue.dev/explore/assistants) and visit the [YAML Reference](../../reference.md#complete-yaml-config-example) docs for more details. ![New assistant YAML](/img/hub/assistant-create-yaml.png) - diff --git a/docs/docs/hub/blocks/block-types.md b/docs/docs/hub/blocks/block-types.md index 9091184d4..87c084db2 100644 --- a/docs/docs/hub/blocks/block-types.md +++ b/docs/docs/hub/blocks/block-types.md @@ -11,31 +11,31 @@ sidebar_label: Types Models are blocks that let you specify Large Language Models (LLMs) and other deep learning models to be used for various roles in the open-source IDE extension like Chat, Autocomplete, Edit, Embed, Rerank, etc. You can explore available models on [the hub](https://hub.continue.dev/explore/models). -Continue supports [many model providers](../../customize/model-providers), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](../../customize/model-roles). View [`models`](../../yaml-reference.md#models) in the YAML Reference for more details. +Continue supports [many model providers](../../customize/model-providers), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](../../customize/model-roles). View [`models`](../../reference.md#models) in the YAML Reference for more details. ## Context Context blocks define a context provider which can be referenced in Chat with `@` to pull in data from external sources such as files and folders, a URL, Jira or Confluence, and Github issues, among others. [Explore context provider blocks](https://hub.continue.dev/explore/context) on the hub. -Learn more about context providers [here](../../yaml-reference.md#context), and check out [this guide](../../customize/tutorials/build-your-own-context-provider.mdx) to creating your own custom context provider. The `config.yaml` spec for context can be found [`here`](../../yaml-reference.md#context). +Learn more about context providers [here](../../reference.md#context), and check out [this guide](../../customize/tutorials/build-your-own-context-provider.mdx) to creating your own custom context provider. The `config.yaml` spec for context can be found [`here`](../../reference.md#context). ## Docs Docs are blocks that point to documentation sites, which will be indexed locally and then can be referenced as context using @Docs in Chat. [Explore docs](https://hub.continue.dev/explore/docs) on the hub. -Learn more in the [@Docs deep dive](../../customize/deep-dives/docs.mdx), and view [`docs`](../../yaml-reference.md#docs) in the YAML Reference for more details. +Learn more in the [@Docs deep dive](../../customize/deep-dives/docs.mdx), and view [`docs`](../../reference.md#docs) in the YAML Reference for more details. ## MCP Servers Model Context Protocol (MCP) is a standard way of building and sharing tools for language models. MCP Servers can be defined in `mcpServers` blocks. [Explore MCP Servers](https://hub.continue.dev/explore/mcp) on the hub. -Learn more in the [Tools deep dive](../../customize/tools.mdx), and view [`mcpServers`](../../yaml-reference.md#mcpservers) in the YAML Reference for more details. +Learn more in the [Tools deep dive](../../customize/tools.mdx), and view [`mcpServers`](../../reference.md#mcpservers) in the YAML Reference for more details. ## Rules Rules blocks are instructions that your custom AI code assistant will always keep in mind - the contents of rules are inserted into the system message for all Chat requests. [Explore rules](https://hub.continue.dev/explore/rules) on the hub. -Learn more in the [rules deep dive](../../customize/deep-dives/rules.md), and view [`rules`](../../yaml-reference.md#rules) in the YAML Reference for more details. +Learn more in the [rules deep dive](../../customize/deep-dives/rules.md), and view [`rules`](../../reference.md#rules) in the YAML Reference for more details. ## Prompts @@ -46,10 +46,10 @@ Prompt blocks have the same syntax as [prompt files](../../customize/deep-dives/ 1. Currently, prompt blocks cannot use context providers 2. Prompt blocks are stored within `config.yaml` rather than `.continue/prompts` in project directory and -The `config.yaml` spec for `prompts` can be found [here](../../yaml-reference.md#prompts). +The `config.yaml` spec for `prompts` can be found [here](../../reference.md#prompts). ## Data Data blocks allow you send your development data to custom destinations of your choice. Development data can be used for a variety of purposes, including analyzing usage, gathering insights, or fine-tuning models. You can read more about development data [here](../../customize/deep-dives/development-data.md). Explore data block examples [here](https://hub.continue.dev/explore/data). -Data destinations are configured in the [`data`](../../yaml-reference.md#data) section of `config.yaml`. +Data destinations are configured in the [`data`](../../reference.md#data) section of `config.yaml`. diff --git a/docs/docs/hub/blocks/create-a-block.md b/docs/docs/hub/blocks/create-a-block.md index 870295c99..fcf12acfd 100644 --- a/docs/docs/hub/blocks/create-a-block.md +++ b/docs/docs/hub/blocks/create-a-block.md @@ -23,10 +23,10 @@ To create a block from scratch, you will need to click “New block” in the to ![New block button](/img/hub/block-new-button.png) -After filling out information on the block, you will want to create a block following the `config.yaml` [reference documentation](../../yaml-reference.md). Refer to examples of blocks on [hub.continue.dev](https://hub.continue.dev/explore/models) and visit the [YAML Reference](../../yaml-reference.md#complete-yaml-config-example) docs for more details. +After filling out information on the block, you will want to create a block following the `config.yaml` [reference documentation](../../reference.md). Refer to examples of blocks on [hub.continue.dev](https://hub.continue.dev/explore/models) and visit the [YAML Reference](../../reference.md#complete-yaml-config-example) docs for more details. ![New block page](/img/hub/block-new-page.png) ### Block inputs -Blocks can receive values, including secrets, as inputs through templating. For values that the user of the block needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their assistant. \ No newline at end of file +Blocks can receive values, including secrets, as inputs through templating. For values that the user of the block needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their assistant. diff --git a/docs/docs/hub/blocks/intro.md b/docs/docs/hub/blocks/intro.md index 919aa9f7d..69d0f9224 100644 --- a/docs/docs/hub/blocks/intro.md +++ b/docs/docs/hub/blocks/intro.md @@ -9,4 +9,4 @@ keywords: [blocks, introduction, basics] Blocks are the components you use to build a custom AI code assistant. These include [models](./block-types.md#models), [rules](./block-types.md#rules), [context providers](./block-types.md#context), [prompts](./block-types.md#prompts), [docs](./block-types.md#docs), [data destinations](./block-types.md#data), and [MCP servers](./block-types.md#mcp-servers). -Blocks follow the [`config.yaml`](../../yaml-reference.md) format. When combined with other blocks into a complete `config.yaml`, they form a custom AI code assistant. +Blocks follow the [`config.yaml`](../../reference.md) format. When combined with other blocks into a complete `config.yaml`, they form a custom AI code assistant. diff --git a/docs/docs/json-reference.md b/docs/docs/json-reference.md index 11e92a183..86546edbb 100644 --- a/docs/docs/json-reference.md +++ b/docs/docs/json-reference.md @@ -5,7 +5,7 @@ keywords: [config, config_schema.json, json] --- :::info -`config.json` is the original Continue configuration format. The newer and preferred format is [`YAML Config`](./reference). See the [migration guide](./yaml-migration). +We recently introduced a new configuration format, `config.yaml`, to replace `config.json`. See the `config.yaml` reference and migration guide [here](./reference.md). ::: Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). @@ -14,7 +14,7 @@ Below are details for each property that can be set in `config.json`. The config ### `models` -Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it), [Edit](./edit/how-to-use-it), and [Actions](./actions/how-to-use-it). +Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Actions](./actions/how-to-use-it.md). Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. **Properties:** @@ -36,7 +36,7 @@ Each model has specific configuration options tailored to its provider and funct - `engine`: Engine for Azure OpenAI requests. - `capabilities`: Override auto-detected capabilities: - `uploadImage`: Boolean indicating if the model supports image uploads. - - `tools`: Boolean indicating if the model supports tool calls. + - `tools`: Boolean indicating if the model supports tool use. _(AWS Only)_ @@ -59,7 +59,7 @@ Example: "contextLength": 128000, "title": "GPT-4o", "provider": "openai", - "apiKey": "" + "apiKey": "YOUR_API_KEY" } ] } @@ -97,7 +97,7 @@ Specifies options for tab autocompletion behavior. Example -````json title="config.json" +```json title="config.json" { "tabAutocompleteOptions": { "debounceDelay": 500, @@ -105,6 +105,7 @@ Example "disableInFiles": ["*.md"] } } +``` ### `embeddingsProvider` @@ -117,8 +118,8 @@ Embeddings model settings - the model used for @Codebase and @docs. - `apiKey`: API key for the provider. - `apiBase`: Base URL for API requests. - `requestOptions`: Additional HTTP request settings specific to the embeddings provider. -- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. -- `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. +- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. +- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. (AWS ONLY) @@ -132,12 +133,12 @@ Example: "embeddingsProvider": { "provider": "openai", "model": "text-embedding-ada-002", - "apiKey": "", - "maxChunkSize": 256, - "maxBatchSize": 5 + "apiKey": "", + "maxEmbeddingChunkSize": 256, + "maxEmbeddingBatchSize": 5 } } -```` +``` ### `completionOptions` @@ -150,7 +151,7 @@ Parameters that control the behavior of text generation and completion settings. - `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. - `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. - `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. -- `frequencePenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. +- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. - `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). - `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. - `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). @@ -220,7 +221,7 @@ Example "name": "voyage", "params": { "model": "rerank-2", - "apiKey": "" + "apiKey": "" } } } @@ -234,23 +235,21 @@ List of documentation sites to index. - `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. - `startUrl` (**required**): Start page for crawling - usually root or intro page for docs -- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL -- `maxDepth`: Maximum depth for crawling. Default `3` + +- `maxDepth`: Maximum link depth for crawling. Default `4` - `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). +- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler. Example ```json title="config.json" -{ - "docs": [ +"docs": [ { - "title": "Continue", - "startUrl": "https://docs.continue.dev/intro", - "rootUrl": "https://docs.continue.dev", - "faviconUrl": "https://docs.continue.dev/favicon.ico" - } - ] -} + "title": "Continue", + "startUrl": "https://docs.continue.dev/intro", + "faviconUrl": "https://docs.continue.dev/favicon.ico", + } +] ``` ### `slashCommands` @@ -261,7 +260,7 @@ Custom commands initiated by typing "/" in the sidebar. Commands include predefi - `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review". - `description`: Brief description of the command. -- `step`: Used for built-in commands; set the name for pre-configured options. +- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options. - `params`: Additional parameters to configure command behavior (command-specific - see code for command) Example: @@ -343,40 +342,6 @@ Example } ``` -### `disableSessionTitles` - -Prevents generating summary titles for each chat session when set to `true`. - -### `ui` - -Customizable UI settings to control interface appearance and behavior. - -**Properties:** - -- `codeBlockToolbarPosition`: Sets the toolbar position within code blocks, either `top` (default) or `bottom`. -- `fontSize`: Specifies font size for UI elements. -- `displayRawMarkdown`: If `true`, shows raw markdown in responses. -- `showChatScrollbar`: If `true`, enables a scrollbar in the chat window. -- `codeWrap`: If `true`, enables text wrapping in code blocks. - -Example: - -```json title="config.json" -{ - "ui": { - "codeBlockToolbarPosition": "bottom", - "fontSize": 14, - "displayRawMarkdown": false, - "showChatScrollbar": false, - "codeWrap": false - } -} -``` - -### `allowAnonymousTelemetry` - -When `true`, anonymous usage data is collected using Posthog, to improve features. Default is `true`. - ### `userToken` An optional token that identifies the user, primarily for authenticated services. @@ -437,3 +402,28 @@ Example } } ``` + +### Fully deprecated settings + +Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./customize/settings.md). If found in `config.json`, they will be migrated to the [User Settings Page](./customize/settings.md) and removed from `config.json`. + +- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`). +- `promptPath`: This value will override during migration. +- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`). +- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false +- `tabAutocompleteOptions` + - `useCache`: This value will override during migration. + - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated) + - `multilineCompletions`: This value will override during migration. +- `experimental` + - `useChromiumForDocsCrawling`: This value will override during migration. + - `readResponseTTS`: This value will override during migration. +- `ui` - all will override during migration + + - `codeBlockToolbarPosition` + - `fontSize` + - `codeWrap` + - `displayRawMarkdown` + - `showChatScrollbar` + + See [User Settings Page](./customize/settings.md) for more information about each option. diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 143fec98b..2039c3887 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -1,231 +1,273 @@ --- -title: config.json Reference -description: Reference for the Continue _config.json_ configuration file -keywords: [config, config_schema.json, json] +title: Config YAML Reference +description: Reference for the Continue configuration YAML file +keywords: [config, yaml, configuration, customize, customization] --- +# config.yaml Reference + +## Introduction + +Continue hub assistants are defined using the `config.yaml` specification. Local assistants can also be configured using a YAML file `config.yaml` placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) + :::info -We recently introduced a new configuration format, `config.yaml`, to replace `config.json`. See the `config.yaml` reference and migration guide [here](./yaml-reference.md). +Config YAML replaces `config.json`. View the **[Migration Guide](/yaml-migration)**. ::: -Below are details for each property that can be set in `config.json`. The config schema code is found in [`extensions/vscode/config_schema.json`](https://github.com/continuedev/continue/blob/main/extensions/vscode/config_schema.json). +An assistant is made up of: -**All properties at all levels are optional unless explicitly marked required** +1. **Top level properties**, which specify the `name`, `version`, and `config.yaml` `schema` for the assistant +2. **Block lists**, which are composable arrays of coding assistant building blocks available to the assistant, such as models, docs, and context providers. + +A block is a single standalone building block of a coding assistants, e.g., one model or one documentation source. In `config.yaml` syntax, a block consists of the same top-level properties as assistants (`name`, `version`, and `schema`), but only has **ONE** item under whichever block type it is. + +Examples of blocks and assistants can be found on the [Continue hub](https://hub.continue.dev/explore/assistants). + +Assistants can either explicitly define blocks - see [Properties](#properties) below - or import and configure existing hub blocks. + +### Using Blocks + +Hub blocks and assistants are identified with a slug in the format `owner-slug/block-or-assistant-slug`, where an owner can be a user or organization. + +Blocks can be imported into an assistant by adding a `uses` clause under the block type. This can be alongside other `uses` clauses or explicit blocks of that type. + +:::info +Note that `uses` blocks cannot be used with a local `config.yaml` +::: + +For example, the following assistant imports an Anthropic model and defines an Ollama DeepSeek one. + +```yaml title="Assistant models section" +models: + - uses: anthropic/claude-3.5-sonnet # an imported model block + - model: deepseek-reasoner # an explicit model block + provider: ollama +``` + +### Inputs + +Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows: + +```yaml title="Block config.yaml" +name: myprofile/custom-model +models: + - name: My Favorite Model + provider: anthropic + apiKey: ${{ inputs.ANTHROPIC_API_KEY }} + defaultCompletionOptions: + temperature: ${{ inputs.TEMP }} +``` + +Which can then be imported like + +```yaml title="Assistant config.yaml" +name: myprofile/custom-assistant +models: + - uses: myprofile/custom-model + with: + ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} + TEMP: 0.9 +``` + +Note that hub secrets can be passed as inputs, using the a similar mustache format: `secrets.SECRET_NAME`. + +### Overrides + +Block properties can be also be directly overriden using `override`. For example: + +```yaml title="Assistant config.yaml" +name: myprofile/custom-assistant +models: + - uses: myprofile/custom-model + with: + ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} + TEMP: 0.9 + override: + roles: + - chat +``` + +## Properties + +Below are details for each property that can be set in `config.yaml`. + +**All properties at all levels are optional unless explicitly marked as required.** + +The top-level properties in the `config.yaml` configuration file are: + +- [`name`](#name) (**required**) +- [`version`](#version) (**required**) +- [`schema`](#schema) (**required**) +- [`models`](#models) +- [`context`](#context) +- [`rules`](#rules) +- [`prompts`](#prompts) +- [`docs`](#docs) +- [`mcpServers`](#mcpservers) +- [`data`](#data) + +--- + +### `name` + +The `name` property specifies the name of your project or configuration. + +```yaml title="config.yaml" +name: MyProject +``` + +--- + +### `version` + +The `version` property specifies the version of your project or configuration. + +### `schema` + +The `schema` property specifies the schema version used for the `config.yaml`, e.g. `v1` + +--- ### `models` -Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Actions](./actions/how-to-use-it.md). -Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. +The `models` section defines the language models used in your configuration. Models are used for functionalities such as chat, editing, and summarizing. **Properties:** -- `title` (**required**): The title to assign to your model, shown in dropdowns, etc. -- `provider` (**required**): The provider of the model, which determines the type and interaction method. Options inclued `openai`, `ollama`, `xAI`, etc., see IntelliJ suggestions. -- `model` (**required**): The name of the model, used for prompt template auto-detection. Use `AUTODETECT` special name to get all available models. -- `apiKey`: API key required by providers like OpenAI, Anthropic, Cohere, and xAI. -- `apiBase`: The base URL of the LLM API. -- `contextLength`: Maximum context length of the model, typically in tokens (default: 2048). -- `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. -- `template`: Chat template to format messages. Auto-detected for most models but can be overridden. See intelliJ suggestions. -- `promptTemplates`: A mapping of prompt template names (e.g., `edit`) to template strings. [Customization Guide](https://docs.continue.dev/model-setup/configuration#customizing-the-edit-prompt). -- `completionOptions`: Model-specific completion options, same format as top-level [`completionOptions`](#completionoptions), which they override. -- `systemMessage`: A system message that will precede responses from the LLM. -- `requestOptions`: Model-specific HTTP request options, same format as top-level [`requestOptions`](#requestoptions), which they override. -- `apiType`: Specifies the type of API (`openai` or `azure`). -- `apiVersion`: Azure API version (e.g., `2023-07-01-preview`). -- `engine`: Engine for Azure OpenAI requests. -- `capabilities`: Override auto-detected capabilities: - - `uploadImage`: Boolean indicating if the model supports image uploads. - - `tools`: Boolean indicating if the model supports tool use. +- `name` (**required**): A unique name to identify the model within your configuration. +- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). +- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). +- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. The default value is `[chat, edit, apply, summarize]`. Note that the `summarize` role is not currently used. +- `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on provider and model. Supported capabilities include `tool_use` and `image_input`. +- `embedOptions`: If the model includes role `embed`, these settings apply for embeddings: -_(AWS Only)_ + - `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. + - `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. -- `profile`: AWS security profile for authorization. -- `modelArn`: AWS ARN for imported models (e.g., for `bedrockimport` provider). -- `region`: Region where the model is hosted (e.g., `us-east-1`, `eu-central-1`). +- `defaultCompletionOptions`: Default completion options for model settings. -Example: + **Properties:** -```json title="config.json" -{ - "models": [ - { - "title": "Ollama", - "provider": "ollama", - "model": "AUTODETECT" - }, - { - "model": "gpt-4o", - "contextLength": 128000, - "title": "GPT-4o", - "provider": "openai", - "apiKey": "YOUR_API_KEY" - } - ] -} + - `contextLength`: Maximum context length of the model, typically in tokens. + - `maxTokens`: Maximum number of tokens to generate in a completion. + - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). + - `topP`: The cumulative probability for nucleus sampling. + - `topK`: Maximum number of tokens considered at each step. + - `stop`: An array of stop tokens that will terminate the completion. + - `n`: Number of completions to generate. + +- `requestOptions`: HTTP request options specific to the model. + + **Properties:** + + - `timeout`: Timeout for each request to the language model. + - `verifySsl`: Whether to verify SSL certificates for requests. + - `caBundlePath`: Path to a custom CA bundle for HTTP requests. + - `proxy`: Proxy URL for HTTP requests. + - `headers`: Custom headers for HTTP requests. + - `extraBodyProperties`: Additional properties to merge with the HTTP request body. + - `noProxy`: List of hostnames that should bypass the specified proxy. + - `clientCertificate`: Client certificate for HTTP requests. + - `cert`: Path to the client certificate file. + - `key`: Path to the client certificate key file. + - `passphrase`: Optional passphrase for the client certificate key file. + +#### Example: + +```yaml title="config.yaml" +models: + - name: GPT-4o + provider: openai + model: gpt-4o + roles: + - chat + - edit + - apply + defaultCompletionOptions: + temperature: 0.7 + maxTokens: 1500 + + - name: Codestral + provider: mistral + model: codestral-latest + roles: + - autocomplete + + - name: My Model - OpenAI-Compatible + provider: openai + apiBase: http://my-endpoint/v1 + model: my-custom-model + capabilities: + - tool_use + - image_input + roles: + - chat + - edit ``` -### `tabAutocompleteModel` +--- -Specifies the model or models for tab autocompletion, defaulting to an Ollama instance. This property uses the same format as `models`. Can be an array of models or an object for one model. +### `context` + +The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. + +More information about usage/params for each context provider can be found [here](/customize/context-providers.mdx) + +**Properties:** + +- `provider` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`). +- `params`: Optional parameters to configure the context provider's behavior. + +**Example:** + +```yaml title="config.yaml" +context: + - provider: files + - provider: code + - provider: codebase + params: + nFinal: 10 + - provider: docs + - provider: diff + - provider: folder + - provider: terminal +``` + +--- + +### `rules` + +List of rules that the LLM should follow. These are inserted into the system message for all chat requests. Example -```json title="config.json" -{ - "tabAutocompleteModel": { - "title": "My Starcoder", - "provider": "ollama", - "model": "starcoder2:3b" - } -} +```yaml title="config.yaml" +rules: + - uses: myprofile/my-mood-setter + with: + MOOD: happy + - Always annotate Python functions with their parameter and return types + - Always write Google style docstrings for functions and classes ``` -### `tabAutocompleteOptions` +--- -Specifies options for tab autocompletion behavior. +### `prompts` -**Properties:** +A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. -- `disable`: If `true`, disables tab autocomplete (default: `false`). -- `maxPromptTokens`: Maximum number of tokens for the prompt (default: `1024`). -- `debounceDelay`: Delay (in ms) before triggering autocomplete (default: `350`). -- `maxSuffixPercentage`: Maximum percentage of prompt for suffix (default: `0.2`). -- `prefixPercentage`: Percentage of input for prefix (default: `0.3`). -- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables. -- `onlyMyCode`: If `true`, only includes code within the repository (default: `true`). - -Example - -```json title="config.json" -{ - "tabAutocompleteOptions": { - "debounceDelay": 500, - "maxPromptTokens": 1500, - "disableInFiles": ["*.md"] - } -} +```yaml title="config.yaml" +prompts: + - name: check + description: Check for mistakes in my code + prompt: | + Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: + - Syntax errors + - Logic errors + - Security vulnerabilities ``` -### `embeddingsProvider` - -Embeddings model settings - the model used for @Codebase and @docs. - -**Properties:** - -- `provider` (**required**): Specifies the embeddings provider, with options including `transformers.js`, `ollama`, `openai`, `cohere`, `gemini`, etc -- `model`: Model name for embeddings. -- `apiKey`: API key for the provider. -- `apiBase`: Base URL for API requests. -- `requestOptions`: Additional HTTP request settings specific to the embeddings provider. -- `maxEmbeddingChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. -- `maxEmbeddingBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. - -(AWS ONLY) - -- `region`: Specifies the region hosting the model. -- `profile`: AWS security profile. - -Example: - -```json title="config.json" -{ - "embeddingsProvider": { - "provider": "openai", - "model": "text-embedding-ada-002", - "apiKey": "", - "maxEmbeddingChunkSize": 256, - "maxEmbeddingBatchSize": 5 - } -} -``` - -### `completionOptions` - -Parameters that control the behavior of text generation and completion settings. Top-level `completionOptions` apply to all models, _unless overridden at the model level_. - -**Properties:** - -- `stream`: Whether to stream the LLM response. Currently only respected by the `anthropic` and `ollama` providers; other providers will always stream (default: `true`). -- `temperature`: Controls the randomness of the completion. Higher values result in more diverse outputs. -- `topP`: The cumulative probability for nucleus sampling. Lower values limit responses to tokens within the top probability mass. -- `topK`: The maximum number of tokens considered at each step. Limits the generated text to tokens within this probability. -- `presencePenalty`: Discourages the model from generating tokens that have already appeared in the output. -- `frequencyPenalty`: Penalizes tokens based on their frequency in the text, reducing repetition. -- `mirostat`: Enables Mirostat sampling, which controls the perplexity during text generation. Supported by Ollama, LM Studio, and llama.cpp providers (default: `0`, where `0` = disabled, `1` = Mirostat, and `2` = Mirostat 2.0). -- `stop`: An array of stop tokens that, when encountered, will terminate the completion. Allows specifying multiple end conditions. -- `maxTokens`: The maximum number of tokens to generate in a completion (default: `2048`). -- `numThreads`: The number of threads used during the generation process. Available only for Ollama as `num_thread`. -- `keepAlive`: For Ollama, this parameter sets the number of seconds to keep the model loaded after the last request, unloading it from memory if inactive (default: `1800` seconds, or 30 minutes). -- `useMmap`: For Ollama, this parameter allows the model to be mapped into memory. If disabled can enhance response time on low end devices but will slow down the stream. - -Example - -```json title="config.json" -{ - "completionOptions": { - "stream": false, - "temperature": 0.5 - } -} -``` - -### `requestOptions` - -Default HTTP request options that apply to all models and context providers, unless overridden at the model level. - -**Properties:** - -- `timeout`: Timeout for each request to the LLM (default: 7200 seconds). -- `verifySsl`: Whether to verify SSL certificates for requests. -- `caBundlePath`: Path to a custom CA bundle for HTTP requests - path to `.pem` file (or array of paths) -- `proxy`: Proxy URL to use for HTTP requests. -- `headers`: Custom headers for HTTP requests. -- `extraBodyProperties`: Additional properties to merge with the HTTP request body. -- `noProxy`: List of hostnames that should bypass the specified proxy. -- `clientCertificate`: Client certificate for HTTP requests. - - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -Example - -```json title="config.json" -{ - "requestOptions": { - "headers": { - "X-Auth-Token": "xxx" - } - } -} -``` - -### `reranker` - -Configuration for the reranker model used in response ranking. - -**Properties:** - -- `name` (**required**): Reranker name, e.g., `cohere`, `voyage`, `llm`, `huggingface-tei`, `bedrock` -- `params`: - - `model`: Model name - - `apiKey`: Api key - - `region`: Region (for Bedrock only) - -Example - -```json title="config.json" -{ - "reranker": { - "name": "voyage", - "params": { - "model": "rerank-2", - "apiKey": "" - } - } -} -``` +--- ### `docs` @@ -233,7 +275,7 @@ List of documentation sites to index. **Properties:** -- `title` (**required**): Title of the documentation site, displayed in dropdowns, etc. +- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. - `startUrl` (**required**): Start page for crawling - usually root or intro page for docs - `maxDepth`: Maximum link depth for crawling. Default `4` @@ -242,165 +284,194 @@ List of documentation sites to index. Example -```json title="config.json" -"docs": [ - { - "title": "Continue", - "startUrl": "https://docs.continue.dev/intro", - "faviconUrl": "https://docs.continue.dev/favicon.ico", - } -] +```yaml title="config.yaml" +docs: + - name: Continue + startUrl: https://docs.continue.dev/intro + favicon: https://docs.continue.dev/favicon.ico ``` -### `slashCommands` +--- -Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined. +### `mcpServers` + + + +The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. **Properties:** -- `name`: The command name. Options include "issue", "share", "cmd", "http", "commit", and "review". -- `description`: Brief description of the command. -- `step`: (Deprecated) Used for built-in commands; set the name for pre-configured options. -- `params`: Additional parameters to configure command behavior (command-specific - see code for command) +- `name` (**required**): The name of the MCP server. +- `command` (**required**): The command used to start the server. +- `args`: An optional array of arguments for the command. +- `env`: An optional map of environment variables for the server process. -Example: +**Example:** -```json title="config.json" -{ - "slashCommands": [ - { - "name": "commit", - "description": "Generate a commit message" - }, - { - "name": "share", - "description": "Export this session as markdown" - }, - { - "name": "cmd", - "description": "Generate a shell command" - } - ] -} +```yaml title="config.yaml" +mcpServers: + - name: My MCP Server + command: uvx + args: + - mcp-server-sqlite + - --db-path + - /Users/NAME/test.db ``` -### `customCommands` +### `data` -User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions. +Destinations to which [development data](./customize/deep-dives/development-data.md) will be sent. **Properties:** -- `name`: The name of the custom command. -- `prompt`: Text prompt for the command. -- `description`: Brief description explaining the command's function. +- `name` (**required**): The display name of the data destination +- `destination` (**required**): The destination/endpoint that will receive the data. Can be: + - an HTTP endpoint that will receive a POST request with a JSON blob + - a file URL to a directory in which events will be dumpted to `.jsonl` files +- `schema` (**required**): the schema version of the JSON blobs to be sent +- `events`: an array of event names to include. Defaults to all events if not specified. +- `level`: a pre-defined filter for event fields. Options include `all` and `noCode`; the latter excludes data like file contents, prompts, and completions. Defaults to `all` +- `apiKey`: api key to be sent with request (Bearer header) +- `requestOptions`: Options for event POST requests. Same format as [model requestOptions](#models). -Example: + **Example:** -```json title="config.json" -{ - "customCommands": [ - { - "name": "test", - "prompt": "Write a comprehensive set of unit tests for the selected code. It should setup, run tests that check for correctness including important edge cases, and teardown. Ensure that the tests are complete and sophisticated. Give the tests just as chat output, don't edit any file.", - "description": "Write unit tests for highlighted code" - } - ] -} +```yaml title="config.yaml" +data: + - name: Local Data Bank + destination: file:///Users/dallin/Documents/code/continuedev/continue-extras/external-data + schema: 0.2.0 + level: all + - name: My Private Company + destination: https://mycompany.com/ingest + schema: 0.2.0 + level: noCode + events: + - autocomplete + - chatInteraction ``` -### `contextProviders` +--- -List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`. +## Complete YAML Config Example -**Properties:** +Putting it all together, here's a complete example of a `config.yaml` configuration file: -- `name`: Name of the context provider, e.g. `docs` or `web` -- `params`: A context-provider-specific record of params to configure the context behavior +```yaml title="config.yaml" +name: MyProject +version: 0.0.1 +schema: v1 -Example +models: + - uses: anthropic/claude-3.5-sonnet + with: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + override: + defaultCompletionOptions: + temperature: 0.8 + - name: GPT-4 + provider: openai + model: gpt-4 + roles: + - chat + - edit + defaultCompletionOptions: + temperature: 0.5 + maxTokens: 2000 + requestOptions: + headers: + Authorization: Bearer YOUR_OPENAI_API_KEY -```json title="config.json" -{ - "contextProviders": [ - { - "name": "code", - "params": {} - }, - { - "name": "docs", - "params": {} - }, - { - "name": "diff", - "params": {} - }, - { - "name": "open", - "params": {} - } - ] -} + - name: Ollama Starcoder + provider: ollama + model: starcoder + roles: + - autocomplete + defaultCompletionOptions: + temperature: 0.3 + stop: + - "\n" + +rules: + - Give concise responses + - Always assume TypeScript rather than JavaScript + +prompts: + - name: test + description: Unit test a function + prompt: | + Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. + - uses: myprofile/my-favorite-prompt + +context: + - provider: diff + - provider: file + - provider: codebase + - provider: code + - provider: docs + params: + startUrl: https://docs.example.com/introduction + rootUrl: https://docs.example.com + maxDepth: 3 + +mcpServers: + - name: DevServer + command: npm + args: + - run + - dev + env: + PORT: "3000" + +data: + - name: My Private Company + destination: https://mycompany.com/ingest + schema: 0.2.0 + level: noCode + events: + - autocomplete + - chatInteraction ``` -### `userToken` +## Using YAML anchors to avoid config duplication -An optional token that identifies the user, primarily for authenticated services. +You can also use node anchors to avoid duplication of properties. To do so, +adding the YAML version header `%YAML 1.1` is needed, here's an example of +a `config.yaml` configuration file using anchors: -### `systemMessage` +```yaml title="config.yaml" +%YAML 1.1 +--- +name: MyProject +version: 0.0.1 +schema: v1 -Defines a system message that appears before every response from the language model, providing guidance or context. +model_defaults: &model_defaults + provider: openai + apiKey: my-api-key + apiBase: https://api.example.com/llm -### `experimental` +models: + - name: mistral + <<: *model_defaults + model: mistral-7b-instruct + roles: + - chat + - edit -Several experimental config parameters are available, as described below: + - name: qwen2.5-coder-7b-instruct + <<: *model_defaults + model: qwen2.5-coder-7b-instruct + roles: + - chat + - edit -`experimental`: - -- `defaultContext`: Defines the default context for the LLM. Uses the same format as `contextProviders` but includes an additional `query` property to specify custom query parameters.= -- `modelRoles`: - - `inlineEdit`: Model title for inline edits. - - `applyCodeBlock`: Model title for applying code blocks. - - `repoMapFileSelection`: Model title for repo map selections. -- `quickActions`: Array of custom quick actions - - `title` (**required**): Display title for the quick action. - - `prompt` (**required**): Prompt for quick action. - - `sendToChat`: If `true`, sends result to chat; else inserts in document. Default is `false`. -- `contextMenuPrompts`: - - `comment`: Prompt for commenting code. - - `docstring`: Prompt for adding docstrings. - - `fix`: Prompt for fixing code. - - `optimize`: Prompt for optimizing code. -- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol) - -Example - -```json title="config.json" -{ - "experimental": { - "modelRoles": { - "inlineEdit": "Edit Model" - }, - "quickActions": [ - { - "title": "Tags", - "prompt": "Return a list of any function and class names from the included code block", - "sendToChat": true - } - ], - "contextMenuPrompts": { - "fixGrammar": "Fix grammar in the above but allow for typos." - }, - "modelContextProtocolServers": [ - { - "transport": { - "type": "stdio", - "command": "uvx", - "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] - } - } - ] - } -} + - name: qwen2.5-coder-7b + <<: *model_defaults + model: qwen2.5-coder-7b + useLegacyCompletionsEndpoint: false + roles: + - autocomplete ``` ### Fully deprecated settings diff --git a/docs/docs/yaml-migration.md b/docs/docs/yaml-migration.md index ec189e429..9f2c878e8 100644 --- a/docs/docs/yaml-migration.md +++ b/docs/docs/yaml-migration.md @@ -12,7 +12,7 @@ See also - [Intro to YAML](https://yaml.org/) - [JSON Continue Config Reference](/json-reference) -- [YAML Continue Config Reference](/yaml-reference) +- [YAML Continue Config Reference](/reference) ## Create YAML file @@ -38,9 +38,9 @@ Add all model configurations in `config.json`, including models in `models`, `ta - `inlineEdit` -> e.g. `roles: [chat, edit]` - `applyCodeBlock` -> e.g. `roles: [chat, apply]` -Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/yaml-reference#requestoptions) +Model-level `requestOptions` remain, with minor changes. See [YAML Continue Config Reference](/reference#requestoptions) -Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/yaml-reference#completionoptions) +Model-level `completionOptions` are replaced by `defaultCompletionOptions`, with minor changes. See [YAML Continue Config Reference](/reference#completionoptions) @@ -329,7 +329,7 @@ mcpServers: Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./customize/settings.md) (Gear Icon). If found in `config.json`, they will be migrated to the [User Settings Page](./customize/settings.md) and removed from `config.json`. -See the [JSON Config Reference](./reference#fully-deprecated-settings) for more information on fully deprecated options. +See the [JSON Config Reference](./json-reference#fully-deprecated-settings) for more information on fully deprecated options. The following top-level fields from `config.json` still work when using `config.json` but have been deprecated and don't have a YAML equivalent: diff --git a/docs/docs/yaml-reference.md b/docs/docs/yaml-reference.md deleted file mode 100644 index 2039c3887..000000000 --- a/docs/docs/yaml-reference.md +++ /dev/null @@ -1,500 +0,0 @@ ---- -title: Config YAML Reference -description: Reference for the Continue configuration YAML file -keywords: [config, yaml, configuration, customize, customization] ---- - -# config.yaml Reference - -## Introduction - -Continue hub assistants are defined using the `config.yaml` specification. Local assistants can also be configured using a YAML file `config.yaml` placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) - -:::info -Config YAML replaces `config.json`. View the **[Migration Guide](/yaml-migration)**. -::: - -An assistant is made up of: - -1. **Top level properties**, which specify the `name`, `version`, and `config.yaml` `schema` for the assistant -2. **Block lists**, which are composable arrays of coding assistant building blocks available to the assistant, such as models, docs, and context providers. - -A block is a single standalone building block of a coding assistants, e.g., one model or one documentation source. In `config.yaml` syntax, a block consists of the same top-level properties as assistants (`name`, `version`, and `schema`), but only has **ONE** item under whichever block type it is. - -Examples of blocks and assistants can be found on the [Continue hub](https://hub.continue.dev/explore/assistants). - -Assistants can either explicitly define blocks - see [Properties](#properties) below - or import and configure existing hub blocks. - -### Using Blocks - -Hub blocks and assistants are identified with a slug in the format `owner-slug/block-or-assistant-slug`, where an owner can be a user or organization. - -Blocks can be imported into an assistant by adding a `uses` clause under the block type. This can be alongside other `uses` clauses or explicit blocks of that type. - -:::info -Note that `uses` blocks cannot be used with a local `config.yaml` -::: - -For example, the following assistant imports an Anthropic model and defines an Ollama DeepSeek one. - -```yaml title="Assistant models section" -models: - - uses: anthropic/claude-3.5-sonnet # an imported model block - - model: deepseek-reasoner # an explicit model block - provider: ollama -``` - -### Inputs - -Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows: - -```yaml title="Block config.yaml" -name: myprofile/custom-model -models: - - name: My Favorite Model - provider: anthropic - apiKey: ${{ inputs.ANTHROPIC_API_KEY }} - defaultCompletionOptions: - temperature: ${{ inputs.TEMP }} -``` - -Which can then be imported like - -```yaml title="Assistant config.yaml" -name: myprofile/custom-assistant -models: - - uses: myprofile/custom-model - with: - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} - TEMP: 0.9 -``` - -Note that hub secrets can be passed as inputs, using the a similar mustache format: `secrets.SECRET_NAME`. - -### Overrides - -Block properties can be also be directly overriden using `override`. For example: - -```yaml title="Assistant config.yaml" -name: myprofile/custom-assistant -models: - - uses: myprofile/custom-model - with: - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} - TEMP: 0.9 - override: - roles: - - chat -``` - -## Properties - -Below are details for each property that can be set in `config.yaml`. - -**All properties at all levels are optional unless explicitly marked as required.** - -The top-level properties in the `config.yaml` configuration file are: - -- [`name`](#name) (**required**) -- [`version`](#version) (**required**) -- [`schema`](#schema) (**required**) -- [`models`](#models) -- [`context`](#context) -- [`rules`](#rules) -- [`prompts`](#prompts) -- [`docs`](#docs) -- [`mcpServers`](#mcpservers) -- [`data`](#data) - ---- - -### `name` - -The `name` property specifies the name of your project or configuration. - -```yaml title="config.yaml" -name: MyProject -``` - ---- - -### `version` - -The `version` property specifies the version of your project or configuration. - -### `schema` - -The `schema` property specifies the schema version used for the `config.yaml`, e.g. `v1` - ---- - -### `models` - -The `models` section defines the language models used in your configuration. Models are used for functionalities such as chat, editing, and summarizing. - -**Properties:** - -- `name` (**required**): A unique name to identify the model within your configuration. -- `provider` (**required**): The provider of the model (e.g., `openai`, `ollama`). -- `model` (**required**): The specific model name (e.g., `gpt-4`, `starcoder`). -- `roles`: An array specifying the roles this model can fulfill, such as `chat`, `autocomplete`, `embed`, `rerank`, `edit`, `apply`, `summarize`. The default value is `[chat, edit, apply, summarize]`. Note that the `summarize` role is not currently used. -- `capabilities`: Array of strings denoting model capabilities, which will overwrite Continue's autodetection based on provider and model. Supported capabilities include `tool_use` and `image_input`. -- `embedOptions`: If the model includes role `embed`, these settings apply for embeddings: - - - `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens. - - `maxBatchSize`: Maximum number of chunks per request. Minimum is 1 chunk. - -- `defaultCompletionOptions`: Default completion options for model settings. - - **Properties:** - - - `contextLength`: Maximum context length of the model, typically in tokens. - - `maxTokens`: Maximum number of tokens to generate in a completion. - - `temperature`: Controls the randomness of the completion. Values range from `0.0` (deterministic) to `1.0` (random). - - `topP`: The cumulative probability for nucleus sampling. - - `topK`: Maximum number of tokens considered at each step. - - `stop`: An array of stop tokens that will terminate the completion. - - `n`: Number of completions to generate. - -- `requestOptions`: HTTP request options specific to the model. - - **Properties:** - - - `timeout`: Timeout for each request to the language model. - - `verifySsl`: Whether to verify SSL certificates for requests. - - `caBundlePath`: Path to a custom CA bundle for HTTP requests. - - `proxy`: Proxy URL for HTTP requests. - - `headers`: Custom headers for HTTP requests. - - `extraBodyProperties`: Additional properties to merge with the HTTP request body. - - `noProxy`: List of hostnames that should bypass the specified proxy. - - `clientCertificate`: Client certificate for HTTP requests. - - `cert`: Path to the client certificate file. - - `key`: Path to the client certificate key file. - - `passphrase`: Optional passphrase for the client certificate key file. - -#### Example: - -```yaml title="config.yaml" -models: - - name: GPT-4o - provider: openai - model: gpt-4o - roles: - - chat - - edit - - apply - defaultCompletionOptions: - temperature: 0.7 - maxTokens: 1500 - - - name: Codestral - provider: mistral - model: codestral-latest - roles: - - autocomplete - - - name: My Model - OpenAI-Compatible - provider: openai - apiBase: http://my-endpoint/v1 - model: my-custom-model - capabilities: - - tool_use - - image_input - roles: - - chat - - edit -``` - ---- - -### `context` - -The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. - -More information about usage/params for each context provider can be found [here](/customize/context-providers.mdx) - -**Properties:** - -- `provider` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`). -- `params`: Optional parameters to configure the context provider's behavior. - -**Example:** - -```yaml title="config.yaml" -context: - - provider: files - - provider: code - - provider: codebase - params: - nFinal: 10 - - provider: docs - - provider: diff - - provider: folder - - provider: terminal -``` - ---- - -### `rules` - -List of rules that the LLM should follow. These are inserted into the system message for all chat requests. - -Example - -```yaml title="config.yaml" -rules: - - uses: myprofile/my-mood-setter - with: - MOOD: happy - - Always annotate Python functions with their parameter and return types - - Always write Google style docstrings for functions and classes -``` - ---- - -### `prompts` - -A list of custom prompts that can be invoked from the chat window. Each prompt has a name, description, and the actual prompt text. - -```yaml title="config.yaml" -prompts: - - name: check - description: Check for mistakes in my code - prompt: | - Please read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant: - - Syntax errors - - Logic errors - - Security vulnerabilities -``` - ---- - -### `docs` - -List of documentation sites to index. - -**Properties:** - -- `name` (**required**): Name of the documentation site, displayed in dropdowns, etc. -- `startUrl` (**required**): Start page for crawling - usually root or intro page for docs - -- `maxDepth`: Maximum link depth for crawling. Default `4` -- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`). -- `useLocalCrawling`: Skip the default crawler and only crawl using a local crawler. - -Example - -```yaml title="config.yaml" -docs: - - name: Continue - startUrl: https://docs.continue.dev/intro - favicon: https://docs.continue.dev/favicon.ico -``` - ---- - -### `mcpServers` - - - -The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports any MCP server with the MCP context provider. - -**Properties:** - -- `name` (**required**): The name of the MCP server. -- `command` (**required**): The command used to start the server. -- `args`: An optional array of arguments for the command. -- `env`: An optional map of environment variables for the server process. - -**Example:** - -```yaml title="config.yaml" -mcpServers: - - name: My MCP Server - command: uvx - args: - - mcp-server-sqlite - - --db-path - - /Users/NAME/test.db -``` - -### `data` - -Destinations to which [development data](./customize/deep-dives/development-data.md) will be sent. - -**Properties:** - -- `name` (**required**): The display name of the data destination -- `destination` (**required**): The destination/endpoint that will receive the data. Can be: - - an HTTP endpoint that will receive a POST request with a JSON blob - - a file URL to a directory in which events will be dumpted to `.jsonl` files -- `schema` (**required**): the schema version of the JSON blobs to be sent -- `events`: an array of event names to include. Defaults to all events if not specified. -- `level`: a pre-defined filter for event fields. Options include `all` and `noCode`; the latter excludes data like file contents, prompts, and completions. Defaults to `all` -- `apiKey`: api key to be sent with request (Bearer header) -- `requestOptions`: Options for event POST requests. Same format as [model requestOptions](#models). - - **Example:** - -```yaml title="config.yaml" -data: - - name: Local Data Bank - destination: file:///Users/dallin/Documents/code/continuedev/continue-extras/external-data - schema: 0.2.0 - level: all - - name: My Private Company - destination: https://mycompany.com/ingest - schema: 0.2.0 - level: noCode - events: - - autocomplete - - chatInteraction -``` - ---- - -## Complete YAML Config Example - -Putting it all together, here's a complete example of a `config.yaml` configuration file: - -```yaml title="config.yaml" -name: MyProject -version: 0.0.1 -schema: v1 - -models: - - uses: anthropic/claude-3.5-sonnet - with: - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - override: - defaultCompletionOptions: - temperature: 0.8 - - name: GPT-4 - provider: openai - model: gpt-4 - roles: - - chat - - edit - defaultCompletionOptions: - temperature: 0.5 - maxTokens: 2000 - requestOptions: - headers: - Authorization: Bearer YOUR_OPENAI_API_KEY - - - name: Ollama Starcoder - provider: ollama - model: starcoder - roles: - - autocomplete - defaultCompletionOptions: - temperature: 0.3 - stop: - - "\n" - -rules: - - Give concise responses - - Always assume TypeScript rather than JavaScript - -prompts: - - name: test - description: Unit test a function - prompt: | - Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. - - uses: myprofile/my-favorite-prompt - -context: - - provider: diff - - provider: file - - provider: codebase - - provider: code - - provider: docs - params: - startUrl: https://docs.example.com/introduction - rootUrl: https://docs.example.com - maxDepth: 3 - -mcpServers: - - name: DevServer - command: npm - args: - - run - - dev - env: - PORT: "3000" - -data: - - name: My Private Company - destination: https://mycompany.com/ingest - schema: 0.2.0 - level: noCode - events: - - autocomplete - - chatInteraction -``` - -## Using YAML anchors to avoid config duplication - -You can also use node anchors to avoid duplication of properties. To do so, -adding the YAML version header `%YAML 1.1` is needed, here's an example of -a `config.yaml` configuration file using anchors: - -```yaml title="config.yaml" -%YAML 1.1 ---- -name: MyProject -version: 0.0.1 -schema: v1 - -model_defaults: &model_defaults - provider: openai - apiKey: my-api-key - apiBase: https://api.example.com/llm - -models: - - name: mistral - <<: *model_defaults - model: mistral-7b-instruct - roles: - - chat - - edit - - - name: qwen2.5-coder-7b-instruct - <<: *model_defaults - model: qwen2.5-coder-7b-instruct - roles: - - chat - - edit - - - name: qwen2.5-coder-7b - <<: *model_defaults - model: qwen2.5-coder-7b - useLegacyCompletionsEndpoint: false - roles: - - autocomplete -``` - -### Fully deprecated settings - -Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./customize/settings.md). If found in `config.json`, they will be migrated to the [User Settings Page](./customize/settings.md) and removed from `config.json`. - -- `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`). -- `promptPath`: This value will override during migration. -- `disableIndexing`: This value will be migrated to the safest merged value (`true` if either are `true`). -- `disableSessionTitles`/`ui.getChatTitles`: This value will be migrated to the safest merged value (`true` if either are `true`). `getChatTitles` takes precedence if set to false -- `tabAutocompleteOptions` - - `useCache`: This value will override during migration. - - `disableInFiles`: This value will be migrated to the safest merged value (arrays of file matches merged/deduplicated) - - `multilineCompletions`: This value will override during migration. -- `experimental` - - `useChromiumForDocsCrawling`: This value will override during migration. - - `readResponseTTS`: This value will override during migration. -- `ui` - all will override during migration - - - `codeBlockToolbarPosition` - - `fontSize` - - `codeWrap` - - `displayRawMarkdown` - - `showChatScrollbar` - - See [User Settings Page](./customize/settings.md) for more information about each option. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index c8d987266..b14018082 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -298,7 +298,11 @@ const config = { }, { to: "/reference", - from: ["/customization/code-config", "/reference/config"], + from: [ + "/customization/code-config", + "/reference/config", + "yaml-reference", + ], }, { to: "/customize/context-providers", diff --git a/docs/sidebars.js b/docs/sidebars.js index 0e83628a4..d8696c900 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -134,11 +134,6 @@ const sidebars = { label: "Reference", href: "/reference", }, - { - type: "link", - label: "YAML Reference", - href: "/yaml-reference", - }, "customize/changelog", ], hubSidebar: [