config yaml examples part 1

This commit is contained in:
Dallin Romney 2025-01-17 03:42:50 -08:00
parent 29719edf6f
commit 89045f79e7
45 changed files with 2898 additions and 2051 deletions

View file

@ -7,7 +7,7 @@ sidebar_position: 3
## Slash commands
Slash commands can be combined with additional instructions, including [context providers](chat/context-selection.md) or [highlighted code](chat/context-selection.md).
Slash commands can be combined with additional instructions, including [context providers](../customize/context-providers.mdx) or [highlighted code](../edit/context-selection#highlighted-code).
For example, with the “/edit” slash command you should describe the edit that you want the LLM to perform.

View file

@ -7,6 +7,6 @@ sidebar_position: 4
While many Actions are based on templated prompts and can be customized with .prompt files, there are a number that execute more complex code under the hood.
Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works.md).
Actions that generate inline diffs, like “/edit”, “/comment”, or right click actions, use the same prompt and response processing logic as [Edit](edit/how-it-works).
To learn how other slash commands work, see the full reference [here](../customize/slash-commands.md).
To learn how other slash commands work, see the full reference [here](../customize/slash-commands).

View file

@ -7,7 +7,7 @@ sidebar_position: 5
## Built-in slash commands
Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../reference.md) and add them to the `slashCommands` array.
Continue has a large library of built-in slash commands, but when you first install we only display the most commonly used ones, like “/edit”, “/comment”, and “/share”. To add more actions, you can open [config.json](../json-reference.md) and add them to the `slashCommands` array.
## Custom slash commands
@ -50,6 +50,7 @@ export function modifyConfig(config: Config): Config {
return config;
}
```
<!-- TODO: We need a config.ts reference -->
<!-- For full `config.ts` reference, see [here](reference/config-ts.md). -->

View file

@ -5,7 +5,7 @@ keywords: [customize]
sidebar_position: 5
---
Continue offers a handful of parameters in [`config.json`](../reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities:
Continue offers a handful of parameters in [`config.json` (Deprecated)](../json-reference.md) that can be tuned to find the perfect balance between suggestion quality and system performance for your specific needs and hardware capabilities:
```json title="config.json (Deprecated)"
"tabAutocompleteOptions": {

View file

@ -5,24 +5,40 @@ keywords: [model, autocomplete]
sidebar_position: 2
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
This page recommends models and providers for Autocomplete. Read more about how to set up your `config.json` [here](../reference.md).
This page recommends models and providers for Autocomplete. Read more about how to set up your `config.yaml` [here](../reference.md).
:::
## Best overall experience
For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context:
```json title="config.json (Deprecated)""
{
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "YOUR_API_KEY"
}
}
```
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Codestral
provider: mistral
model: codestral-latest
apiKey: YOUR_API_KEY
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "YOUR_API_KEY"
}
```
</TabItem>
</Tabs>
:::tip[Codestral API Key]
The API keys for Codestral and the general Mistral APIs are different. If you are using Codestral, you probably want a Codestral API key, but if you are sharing the key as a team or otherwise want to use `api.mistral.ai`, then make sure to set `"apiBase": "https://api.mistral.ai/v1"` in your `tabAutocompleteModel`.
@ -32,38 +48,65 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar
For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)).
```json title="config.json (Deprecated)""
{
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder 1.5B",
"model": "qwen2.5-coder:1.5b-base",
"provider": "ollama"
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Qwen2.5-Coder 1.5B
model: qwen2.5-coder:1.5b-base
provider: ollama
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder 1.5B",
"model": "qwen2.5-coder:1.5b-base",
"provider": "ollama"
}
}
}
```
```
</TabItem>
</Tabs>
Have more compute? Use `qwen2.5-coder:7b-base` for potentially higher-quality suggestions.
:::note
For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`). Use this path as the `model` value in your configuration.
:::
### Using a remote instance
When using a remote instance you need to set the `"apiBase"` value in the configuration:
```json title="config.json (Deprecated)""
{
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder 1.5B",
"model": "qwen2.5-coder:1.5b-base",
"provider": "ollama"
"apiBase": "http://<my endpoint>:11434"
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Qwen2.5-Coder 1.5B
model: qwen2.5-coder:1.5b-base
provider: ollama
apiBase: http://<my endpoint>:11434
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder 1.5B",
"model": "qwen2.5-coder:1.5b-base",
"provider": "ollama",
"apiBase": "http://<my endpoint>:11434"
}
}
}
```
```
</TabItem>
</Tabs>
## Other experiences

View file

@ -19,28 +19,28 @@ You can include the currently open file as context by pressing <kbd>opt</kbd> +
## Specific file
You can include a specific file in your current workspace as context by typing [`@Files`](../customize/context-providers.md#file) and selecting the file.
You can include a specific file in your current workspace as context by typing [`@Files`](../customize/context-providers.mdx#file) and selecting the file.
## Specific folder
You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.md#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder.
You can include a folder in your current workspace as context by typing [`@Folder`](../customize/context-providers.mdx#folder) and selecting the directory. It [works like `@Codebase`](../customize/deep-dives/codebase.md) but only includes the files in the selected folder.
## Codebase search
You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.md#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md).
You can automatically include relevant files from your codebase as context by typing [`@Codebase`](../customize/context-providers.mdx#codebase). You can learn about how @Codebase works [here](../customize/deep-dives/codebase.md).
## Documentation site
You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.md#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md).
You can include a documentation site as context by typing [`@Docs`](../customize/context-providers.mdx#docs) and selecting the documentation site. You can learn about how @Docs works [here](../customize/deep-dives/docs.md).
## Terminal contents
You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../customize/context-providers.md#terminal).
You can include the contents of the terminal in your IDE as context by typing [`@Terminal`](../customize/context-providers.mdx#terminal).
## Git diff
You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../customize/context-providers.md#git-diff).
You can include all of the changes you've made to your current branch by typing [`@Git Diff`](../customize/context-providers.mdx#git-diff).
## Other context
You can see a full list of built-in context providers [here](../customize/context-providers.md) and how to create your own custom context provider [here](../customize/tutorials/build-your-own-context-provider.md).
You can see a full list of built-in context providers [here](../customize/context-providers.mdx) and how to create your own custom context provider [here](../customize/tutorials/build-your-own-context-provider.md).

View file

@ -9,7 +9,7 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
This page recommends models and providers for Chat. Read more about how to set up your `config.json` [here](../reference.md).
This page recommends models and providers for Chat. Read more about how to set up your config [here](../reference.md).
:::
## Best overall experience
@ -20,99 +20,180 @@ For the best overall Chat experience, you will want to use a 400B+ parameter mod
Our current top recommendation is Claude Sonnet 3.5 from [Anthropic](../customize/model-providers/top-level/anthropic.md).
```json title="config.json (Deprecated)"
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "anthropic",
"model": "claude-3-5-sonnet-latest",
"apiKey": "[ANTHROPIC_API_KEY]"
}
]
```
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- title: Claude 3.5 Sonnet
provider: anthropic
model: claude-3-5-sonnet-latest
apiKeySecret: ANTHROPIC_API_KEY
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "anthropic",
"model": "claude-3-5-sonnet-latest",
"apiKey": "[ANTHROPIC_API_KEY]"
}
]
```
</TabItem>
</Tabs>
### Llama 3.1 405B from Meta
If you prefer to use an open-weight model, then Llama 3.1 405B from Meta is your best option right now. You will need to decide if you use it through a SaaS model provider (e.g. [Together](../customize/model-providers/more/together.md) or [Groq](../customize/model-providers/more/groq.md)) or self-host it (e.g. using [vLLM](../customize/model-providers//more/vllm.md) or [Ollama](../customize/model-providers/top-level/ollama.md)).
<Tabs groupId="providers">
<TabItem value="Together">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "together",
"model": "llama3.1-405b",
"apiKey": "[TOGETHER_API_KEY]"
}
]
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
<Tabs groupId="providers">
<TabItem value="Together">
```yaml title="Package or config.yaml"
models:
- title: "Llama 3.1 405B"
provider: "together"
model: "llama3.1-405b"
apiKeySecret: "TOGETHER_API_KEY"
```
</TabItem>
<TabItem value="Groq">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "groq",
"model": "llama3.1-405b",
"apiKey": "[GROQ_API_KEY]"
}
]
</TabItem>
<TabItem value="Groq">
```yaml title="Package or config.yaml"
models:
- title: "Llama 3.1 405B"
provider: "groq"
model: "llama3.1-405b"
apiKeySecret: "GROQ_API_KEY"
```
</TabItem>
<TabItem value="vLLM">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "vllm",
"model": "llama3.1-405b"
}
]
</TabItem>
<TabItem value="vLLM">
```yaml title="Package or config.yaml"
models:
- title: "Llama 3.1 405B"
provider: "vllm"
model: "llama3.1-405b"
```
</TabItem>
<TabItem value="Ollama">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "ollama",
"model": "llama3.1:405b"
}
]
</TabItem>
<TabItem value="Ollama">
```yaml title="Package or config.yaml"
models:
- title: "Llama 3.1 405B"
provider: "ollama"
model: "llama3.1:405b"
```
</TabItem>
</TabItem>
</Tabs>
</TabItem>
<TabItem value="json" label="JSON">
<Tabs groupId="providers">
<TabItem value="Together">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "together",
"model": "llama3.1-405b",
"apiKey": "[TOGETHER_API_KEY]"
}
]
```
</TabItem>
<TabItem value="Groq">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "groq",
"model": "llama3.1-405b",
"apiKey": "[GROQ_API_KEY]"
}
]
```
</TabItem>
<TabItem value="vLLM">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "vllm",
"model": "llama3.1-405b"
}
]
```
</TabItem>
<TabItem value="Ollama">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 405B",
"provider": "ollama",
"model": "llama3.1:405b"
}
]
```
</TabItem>
</Tabs>
</TabItem>
</Tabs>
### GPT-4o from OpenAI
If you prefer to use a model from [OpenAI](../customize/model-providers/top-level/openai.md), then we recommend GPT-4o.
```json title="config.json (Deprecated)"
"models": [
{
"title": "GPT-4o",
"provider": "openai",
"model": "",
"apiKey": "[OPENAI_API_KEY]"
}
]
```
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- title: GPT-4o
provider: openai
model: ''
apiKey: [OPENAI_API_KEY]
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "GPT-4o",
"provider": "openai",
"model": "",
"apiKey": "[OPENAI_API_KEY]"
}
]
```
</TabItem>
</Tabs>
### Gemini 1.5 Pro from Google
If you prefer to use a model from [Google](../customize/model-providers/top-level/gemini.md), then we recommend Gemini 1.5 Pro.
```json title="config.json (Deprecated)"
"models": [
{
"title": "Gemini 1.5 Pro",
"provider": "gemini",
"model": "gemini-1.5-pro-latest",
"apiKey": "[GEMINI_API_KEY]"
}
]
```
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- title: Gemini 1.5 Pro
provider: gemini
model: gemini-1.5-pro-latest
apiKey: [GEMINI_API_KEY]
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Gemini 1.5 Pro",
"provider": "gemini",
"model": "gemini-1.5-pro-latest",
"apiKey": "[GEMINI_API_KEY]"
}
]
```
</TabItem>
</Tabs>
## Local, offline experience
@ -122,37 +203,83 @@ For the best local, offline Chat experience, you will want to use a model that i
If your local machine can run an 8B parameter model, then we recommend running Llama 3.1 8B on your machine (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)).
<Tabs groupId="providers">
<TabItem value="Ollama">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 8B",
"provider": "ollama",
"model": "llama3.1:8b"
}
]
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
<Tabs groupId="providers">
<TabItem value="Ollama">
```yaml title="Package or config.yaml"
models:
- title: Llama 3.1 8B
provider: ollama
model: llama3.1:8b
```
</TabItem>
<TabItem value="LM Studio">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 8B",
"provider": "lmstudio",
"model": "llama3.1-8b"
}
]
</TabItem>
<TabItem value="LM Studio">
```yaml title="Package or config.yaml"
models:
- title: Llama 3.1 8B
provider: lmstudio
model: llama3.1:8b
```
</TabItem>
</TabItem>
</Tabs>
</TabItem>
<TabItem value="json" label="JSON">
<Tabs groupId="providers">
<TabItem value="Ollama">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 8B",
"provider": "ollama",
"model": "llama3.1:8b"
}
]
```
</TabItem>
<TabItem value="LM Studio">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama 3.1 8B",
"provider": "lmstudio",
"model": "llama3.1-8b"
}
]
```
</TabItem>
</Tabs>
</TabItem>
</Tabs>
### DeepSeek Coder 2 16B
If your local machine can run a 16B parameter model, then we recommend running DeepSeek Coder 2 16B (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)).
<Tabs groupId="providers">
<TabItem value="Ollama">
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
<Tabs groupId="providers">
<TabItem value="Ollama">
```yaml title="Package or config.yaml"
models:
- title: DeepSeek Coder 2 16B
provider: ollama
model: deepseek-coder-v2:16b
```
</TabItem>
<TabItem value="LM Studio">
```yaml title="Package or config.yaml"
models:
- title: DeepSeek Coder 2 16B
provider: lmstudio
model: deepseek-coder-v2:16b
```
</TabItem>
</Tabs>
</TabItem>
<TabItem value="json" label="JSON">
<Tabs groupId="providers">
<TabItem value="Ollama">
```json title="config.json (Deprecated)"
"models": [
{
@ -162,10 +289,8 @@ If your local machine can run a 16B parameter model, then we recommend running D
}
]
```
</TabItem>
<TabItem value="LM Studio">
</TabItem>
<TabItem value="LM Studio">
```json title="config.json (Deprecated)"
"models": [
{
@ -175,8 +300,9 @@ If your local machine can run a 16B parameter model, then we recommend running D
}
]
```
</TabItem>
</TabItem>
</Tabs>
</TabItem>
</Tabs>
## Other experiences

View file

@ -1,676 +0,0 @@
---
title: Context providers
description: Type '@' to select content to the LLM as context
keywords: [context, "@", provider, LLM]
---
Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider.
As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input.
![Context Items](/img/context-provider-example.png)
## Built-in Context Providers
To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list.
### `@File`
Reference any file in your current workspace.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "file"
}
]
}
```
### `@Code`
Reference specific functions or classes from throughout your project.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "code"
}
]
}
```
### `@Git Diff`
Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "diff"
}
]
}
```
### `@Current File`
Reference the currently open file.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "currentFile"
}
]
}
```
### `@Terminal`
Reference the last command you ran in your IDE's terminal and its output.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "terminal"
}
]
}
```
### `@Docs`
Reference the contents from any documentation site.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "docs"
}
]
}
```
Note that this will only enable the `@Docs` context provider.
To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information.
### `@Open`
Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "open",
"params": {
"onlyPinned": true
}
}
]
}
```
### `@Web`
Reference relevant pages from across the web, automatically determined from your input.
Optionally, set "n" to limit the number of results returned (default 6).
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "web",
"params": {
"n": 5
}
}
]
}
```
### `@Codebase`
Reference the most relevant snippets from your codebase.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "codebase"
}
]
}
```
Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md).
### `@Folder`
Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "folder"
}
]
}
```
### `@Search`
Reference the results of codebase search, just like the results you would get from VS Code search.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "search"
}
]
}
```
This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
### `@Url`
Reference the markdown converted contents of a given URL.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "url"
}
]
}
```
### `@Clipboard`
Reference recent clipboard items
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "clipboard"
}
]
}
```
### `@Tree`
Reference the structure of your current workspace.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "tree"
}
]
}
```
### `@Problems`
Get Problems from the current file.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "problems"
}
]
}
```
### `@Debugger`
Reference the contents of the local variables in the debugger. Currently only available in VS Code.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "debugger",
"params": {
"stackDepth": 3
}
}
]
}
```
Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
### `@Repository Map`
Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "repo-map",
"params": {
"includeSignatures": false // default true
}
}
]
}
```
Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
### `@Operating System`
Reference the architecture and platform of your current operating system.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "os"
}
]
}
```
### Model Context Protocol
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. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this:
```json title="config.json (Deprecated)"
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
}
}
]
}
}
```
You'll then be able to type "@" and see "MCP" in the context providers dropdown.
### Prompt Files
See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers.
### `@Issue`
Reference the conversation in a GitHub issue.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "issue",
"params": {
"repos": [
{
"owner": "continuedev",
"repo": "continue"
}
],
"githubToken": "ghp_xxx"
}
}
]
}
```
Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited.
### `@Database`
Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "database",
"params": {
"connections": [
{
"name": "examplePostgres",
"connection_type": "postgres",
"connection": {
"user": "username",
"host": "localhost",
"database": "exampleDB",
"password": "yourPassword",
"port": 5432
}
},
{
"name": "exampleMssql",
"connection_type": "mssql",
"connection": {
"user": "username",
"server": "localhost",
"database": "exampleDB",
"password": "yourPassword"
}
},
{
"name": "exampleSqlite",
"connection_type": "sqlite",
"connection": {
"filename": "/path/to/your/sqlite/database.db"
}
}
]
}
}
]
}
```
Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
Available connection types:
- `postgres`
- `mysql`
- `sqlite`
### `@Postgres`
Reference the schema of a table, and some sample rows
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "postgres",
"params": {
"host": "localhost",
"port": 5436,
"user": "myuser",
"password": "catsarecool",
"database": "animals",
"schema": "public",
"sampleRows": 3
}
}
]
}
```
The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas.
[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
### `@Google`
Reference the results of a Google search.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "google",
"params": {
"serperApiKey": "<your serper.dev api key>"
}
}
]
}
```
For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
Note: You can get an API key for free at [serper.dev](https://serper.dev).
### `@Gitlab Merge Request`
Reference an open MR for this branch on GitLab.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "gitlab-mr",
"params": {
"token": "..."
}
}
]
}
```
You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope.
#### Using Self-Hosted GitLab
You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "gitlab-mr",
"params": {
"token": "...",
"domain": "gitlab.example.com"
}
}
]
}
```
#### Filtering Comments
If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`.
### `@Jira`
Reference the conversation in a Jira issue.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "jira",
"params": {
"domain": "company.atlassian.net",
"token": "ATATT..."
}
}
]
}
```
Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email.
#### Jira Datacenter Support
This context provider supports both Jira API version 2 and 3. It will use version 3 by default since
that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
to set the API Version to 2 using the `apiVersion` property.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "jira",
"params": {
"apiVersion": "2"
}
}
]
}
```
#### Issue Query
By default, the following query will be used to find issues:
```jql
assignee = currentUser() AND resolution = Unresolved order by updated DESC
```
You can override this query by setting the `issueQuery` parameter.
### `@Discord`
Reference the messages in a Discord channel.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "discord",
"params": {
"discordKey": "bot token",
"guildId": "1234567890",
"channels": [
{
"id": "123456",
"name": "example-channel"
},
{
"id": "678901",
"name": "example-channel-2"
}
]
}
}
]
}
```
Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels.
### `@HTTP`
The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "http",
"params": {
"url": "https://api.example.com/v1/users"
}
}
]
}
```
The receiving URL should expect to receive the following parameters:
```js title="POST parameters"
{
query: string,
fullInput: string
}
```
The response 200 OK should be a JSON object with the following structure:
```json title="Response"
[
{
"name": "",
"description": "",
"content": ""
}
]
// OR
{
"name": "",
"description": "",
"content": ""
}
```
### `@Commits`
Reference specific git commit metadata and diff or all of the recent commits.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "commit",
"params": {
"Depth": 50,
"LastXCommitsDepth": 10
}
}
]
}
```
The depth is how many commits will be loaded into the submenu, defaults to 50.
The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
### `@Clipboard`
Reference recent clipboard items
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "clipboard"
}
]
}
```
### `@Greptile`
Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "greptile",
"params": {
"GreptileToken": "...",
"GithubToken": "..."
}
}
]
}
```
### Requesting Context Providers
Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider.

View file

@ -0,0 +1,990 @@
---
title: Context providers
description: Type '@' to select content to the LLM as context
keywords: [context, "@", provider, LLM]
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Context Providers allow you to type '@' and see a dropdown of content that can all be fed to the LLM as context. Every context provider is a plugin, which means if you want to reference some source of information that you don't see here, you can request (or build!) a new context provider.
As an example, say you are working on solving a new GitHub Issue. You type '@Issue' and select the one you are working on. Continue can now see the issue title and contents. You also know that the issue is related to the files 'readme.md' and 'helloNested.py', so you type '@readme' and '@hello' to find and select them. Now these 3 "Context Items" are displayed inline with the rest of your input.
![Context Items](/img/context-provider-example.png)
## Built-in Context Providers
To use any of the built-in context providers, open `config.json` and add it to the `contextProviders` list.
### `@File`
Reference any file in your current workspace.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: file
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "file"
}
]
```
</TabItem>
</Tabs>
### `@Code`
Reference specific functions or classes from throughout your project.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: code
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "code"
}
]
```
</TabItem>
</Tabs>
### `@Git Diff`
Reference all of the changes you've made to your current branch. This is useful if you want to summarize what you've done or ask for a general review of your work before committing.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: diff
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "diff"
}
]
```
</TabItem>
</Tabs>
### `@Current File`
Reference the currently open file.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: currentFile
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "currentFile"
}
]
```
</TabItem>
</Tabs>
### `@Terminal`
Reference the last command you ran in your IDE's terminal and its output.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: terminal
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "terminal"
}
]
```
</TabItem>
</Tabs>
### `@Docs`
Reference the contents from any documentation site.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: docs
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "docs"
}
]
```
</TabItem>
</Tabs>
Note that this will only enable the `@Docs` context provider.
To use it, you need to add a documentation site to your `config.json`. See the [docs](../customize/deep-dives/docs.md) page for more information.
### `@Open`
Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: open
with:
onlyPinned: true
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "open",
"params": {
"onlyPinned": true
}
}
]
```
</TabItem>
</Tabs>
### `@Web`
Reference relevant pages from across the web, automatically determined from your input.
Optionally, set `n` to limit the number of results returned (default 6).
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: web
with:
n: 5
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "web",
"params": {
"n": 5
}
}
]
```
</TabItem>
</Tabs>
### `@Codebase`
Reference the most relevant snippets from your codebase.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: codebase
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "codebase"
}
]
```
</TabItem>
</Tabs>
Read more about indexing and retrieval [here](../customize/deep-dives/codebase.md).
### `@Folder`
Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: folder
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "folder"
}
]
```
</TabItem>
</Tabs>
### `@Search`
Reference the results of codebase search, just like the results you would get from VS Code search.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: search
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "search"
}
]
```
</TabItem>
</Tabs>
This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
### `@Url`
Reference the markdown converted contents of a given URL.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: url
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "url"
}
]
```
</TabItem>
</Tabs>
### `@Clipboard`
Reference recent clipboard items
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: clipboard
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "clipboard"
}
]
```
</TabItem>
</Tabs>
### `@Tree`
Reference the structure of your current workspace.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: tree
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "tree"
}
]
```
</TabItem>
</Tabs>
### `@Problems`
Get Problems from the current file.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: problems
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "problems"
}
]
```
</TabItem>
</Tabs>
### `@Debugger`
Reference the contents of the local variables in the debugger. Currently only available in VS Code.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: debugger
with:
stackDepth: 3
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "debugger",
"params": {
"stackDepth": 3
}
}
]
```
</TabItem>
</Tabs>
Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
### `@Repository Map`
Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
`includeSignatures` params can be set to false to exclude signatures. This could be necessary for large codebases and/or to reduce context size significantly. Signatures will not be included if indexing is disabled.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: repo-map
with:
includeSignatures: false # default true
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "repo-map",
"params": {
"includeSignatures": false // default true
}
}
]
```
</TabItem>
</Tabs>
Provides a list of files and the call signatures of top-level classes, functions, and methods in those files. This helps the model better understand how a particular piece of code relates to the rest of the codebase.
In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
### `@Operating System`
Reference the architecture and platform of your current operating system.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: os
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "os"
}
]
```
</TabItem>
</Tabs>
### Model Context Protocol
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. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
mcpServers:
- name: My MCP Server
command: uvx
args:
- mcp-server-sqlite
- --db-path
- /Users/NAME/test.db
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
}
}
]
}
```
</TabItem>
</Tabs>
You'll then be able to type "@" and see "MCP" in the context providers dropdown.
### Prompt Files
See [Prompt Files](/customize/deep-dives/prompt-files). Prompt files are not added directly to the config file; prompt files are parsed and injected into the config automatically, to be used like other context providers.
### `@Issue`
Reference the conversation in a GitHub issue.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: issue
with:
repos:
- owner: continuedev
repo: continue
githubToken: ghp_xxx
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "issue",
"params": {
"repos": [
{
"owner": "continuedev",
"repo": "continue"
}
],
"githubToken": "ghp_xxx"
}
}
]
```
</TabItem>
</Tabs>
Make sure to include your own [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to avoid being rate-limited.
### `@Database`
Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: database
with:
connections:
- name: examplePostgres
connection_type: postgres
connection:
user: username
host: localhost
database: exampleDB
password: yourPassword
port: 5432
- name: exampleMssql
connection_type: mssql
connection:
user: username
server: localhost
database: exampleDB
password: yourPassword
- name: exampleSqlite
connection_type: sqlite
connection:
filename: /path/to/your/sqlite/database.db
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "database",
"params": {
"connections": [
{
"name": "examplePostgres",
"connection_type": "postgres",
"connection": {
"user": "username",
"host": "localhost",
"database": "exampleDB",
"password": "yourPassword",
"port": 5432
}
},
{
"name": "exampleMssql",
"connection_type": "mssql",
"connection": {
"user": "username",
"server": "localhost",
"database": "exampleDB",
"password": "yourPassword"
}
},
{
"name": "exampleSqlite",
"connection_type": "sqlite",
"connection": {
"filename": "/path/to/your/sqlite/database.db"
}
}
]
}
}
]
```
</TabItem>
</Tabs>
Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
Available connection types:
- `postgres`
- `mysql`
- `sqlite`
### `@Postgres`
Reference the schema of a table, and some sample rows
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: postgres
with:
host: localhost
port: 5436
user: myuser
password: catsarecool
database: animals
schema: public
sampleRows: 3
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "postgres",
"params": {
"host": "localhost",
"port": 5436,
"user": "myuser",
"password": "catsarecool",
"database": "animals",
"schema": "public",
"sampleRows": 3
}
}
]
```
</TabItem>
</Tabs>
The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
By default, the `schema` filter is set to `public`, and the `sampleRows` is set to 3. You may unset the schema if you want to include tables from all schemas.
[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
### `@Google`
Reference the results of a Google search.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: google
with:
serperApiKey: "<your serper.dev api key>"
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "google",
"params": {
"serperApiKey": "<your serper.dev api key>"
}
}
]
```
</TabItem>
</Tabs>
For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
Note: You can get an API key for free at [serper.dev](https://serper.dev).
### `@Gitlab Merge Request`
Reference an open MR for this branch on GitLab.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: gitlab-mr
with:
token: "..."
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "gitlab-mr",
"params": {
"token": "..."
}
}
]
```
</TabItem>
</Tabs>
You will need to create a [personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with the `read_api` scope.
#### Using Self-Hosted GitLab
You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: gitlab-mr
with:
token: "..."
domain: "gitlab.example.com"
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "gitlab-mr",
"params": {
"token": "...",
"domain": "gitlab.example.com"
}
}
]
```
</TabItem>
</Tabs>
#### Filtering Comments
If you select some code to be edited, you can have the context provider filter out comments for other files. To enable this feature, set `filterComments` to `true`.
### `@Jira`
Reference the conversation in a Jira issue.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: jira
with:
domain: company.atlassian.net
token: ATATT...
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "jira",
"params": {
"domain": "company.atlassian.net",
"token": "ATATT..."
}
}
]
```
</TabItem>
</Tabs>
Make sure to include your own [Atlassian API Token](https://id.atlassian.com/manage-profile/security/api-tokens), or use your `email` and `token`, with token set to your password for basic authentication. If you use your own Atlassian API Token, don't configure your email.
#### Jira Datacenter Support
This context provider supports both Jira API version 2 and 3. It will use version 3 by default since
that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
to set the API Version to 2 using the `apiVersion` property.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: jira
with:
apiVersion: "2"
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "jira",
"params": {
"apiVersion": "2"
}
}
]
```
</TabItem>
</Tabs>
#### Issue Query
By default, the following query will be used to find issues:
```jql
assignee = currentUser() AND resolution = Unresolved order by updated DESC
```
You can override this query by setting the `issueQuery` parameter.
### `@Discord`
Reference the messages in a Discord channel.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: discord
with:
discordKey: "bot token"
guildId: "1234567890"
channels:
- id: "123456"
name: "example-channel"
- id: "678901"
name: "example-channel-2"
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "discord",
"params": {
"discordKey": "bot token",
"guildId": "1234567890",
"channels": [
{
"id": "123456",
"name": "example-channel"
},
{
"id": "678901",
"name": "example-channel-2"
}
]
}
}
]
```
</TabItem>
</Tabs>
Make sure to include your own [Bot Token](https://discord.com/developers/applications), and join it to your related server . If you want more granular control over which channels are searched, you can specify a list of channel IDs to search in. If you don't want to specify any channels, just include the guild id(Server ID) and all channels will be included. The provider only reads text channels.
### `@HTTP`
The HttpContextProvider makes a POST request to the url passed in the configuration. The server must return 200 OK with a ContextItem object or an array of ContextItems.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: http
with:
url: "https://api.example.com/v1/users"
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "http",
"params": {
"url": "https://api.example.com/v1/users"
}
}
]
```
</TabItem>
</Tabs>
The receiving URL should expect to receive the following parameters:
```js title="POST parameters"
{
query: string,
fullInput: string
}
```
The response 200 OK should be a JSON object with the following structure:
```json title="Response"
[
{
"name": "",
"description": "",
"content": ""
}
]
// OR
{
"name": "",
"description": "",
"content": ""
}
```
### `@Commits`
Reference specific git commit metadata and diff or all of the recent commits.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: commit
with:
Depth: 50
LastXCommitsDepth: 10
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "commit",
"params": {
"Depth": 50,
"LastXCommitsDepth": 10
}
}
]
```
</TabItem>
</Tabs>
The depth is how many commits will be loaded into the submenu, defaults to 50.
The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
### `@Greptile`
Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: greptile
with:
greptileToken: "..."
githubToken: "..."
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "greptile",
"params": {
"GreptileToken": "...",
"GithubToken": "..."
}
}
]
```
</TabItem>
</Tabs>
### Requesting Context Providers
Not seeing what you want? Create an issue [here](https://github.com/continuedev/continue/issues/new?assignees=TyDunn&labels=enhancement&projects=&template=feature-request-%F0%9F%92%AA.md&title=) to request a new Context Provider.

View file

@ -3,20 +3,38 @@ title: Autocomplete
keywords: [autocomplete]
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
### Setting up with Codestral (recommended)
If you want to have the best autocomplete experience, we recommend using Codestral, which is available through the [Mistral API](https://console.mistral.ai/). To do this, obtain an API key and add it to your `config.json`:
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "YOUR_API_KEY"
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Codestral
provider: mistral
model: codestral-latest
apiKeySecret: CODESTRAL_API_KEY
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest",
"apiKey": "YOUR_API_KEY"
}
}
}
```
```
</TabItem>
</Tabs>
### Setting up with Ollama (default)
@ -32,17 +50,29 @@ Once it has been downloaded, you should begin to see completions in VS Code.
All of the configuration options available for chat models are available to use for tab-autocomplete. For example, if you wanted to use a remote Ollama instance you would edit your `config.json` like this (note that it is not inside the models array):
```json title="config.json (Deprecated)"
{
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Tab Autocomplete Model
provider: ollama
model: qwen2.5-coder:1.5b-base
apiBase: https://<my endpoint>
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b-base",
"apiBase": "https://<my endpoint>"
},
...
}
```
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b-base",
"apiBase": "https://<my endpoint>"
}
```
</TabItem>
</Tabs>
If you aren't yet familiar with the available options, you can find the full reference [here](./configuration.md).
@ -71,21 +101,36 @@ This object allows you to customize the behavior of tab-autocomplete. The availa
### Full example
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b-base",
"apiBase": "https://<my endpoint>"
},
"tabAutocompleteOptions": {
"debounceDelay": 500,
"maxPromptTokens": 1500,
"disableInFiles": ["*.md"]
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Tab Autocomplete Model
provider: ollama
model: qwen2.5-coder:1.5b-base
apiBase: https://<my endpoint>
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b-base",
"apiBase": "https://<my endpoint>"
},
"tabAutocompleteOptions": {
"debounceDelay": 500,
"maxPromptTokens": 1500,
"disableInFiles": ["*.md"]
}
}
}
```
```
</TabItem>
</Tabs>
## FAQs

View file

@ -3,6 +3,9 @@ description: Talk to your codebase
keywords: [talk, embeddings, reranker, codebase, experimental]
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
# @Codebase
Continue indexes your codebase so that it can later automatically pull in the most relevant context from throughout your workspace. This is done via a combination of embeddings-based retrieval and keyword search. By default, all embeddings are calculated locally using `transformers.js` and stored locally in `~/.continue/index`.
@ -40,20 +43,32 @@ Here are use cases where it is not useful:
There are a few options that let you configure the behavior of the codebase context provider. These can be set in `config.json`, and are the same for the codebase, docs, and folder context providers:
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "codebase",
"params": {
"nRetrieve": 25,
"nFinal": 5,
"useReranking": true
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
context:
- uses: codebase
with:
nRetrieve: 25,
nFinal: 5,
useReranking: true
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"contextProviders": [
{
"name": "codebase",
"params": {
"nRetrieve": 25,
"nFinal": 5,
"useReranking": true
}
}
}
]
}
```
]
```
</TabItem>
</Tabs>
### `nRetrieve`
@ -79,4 +94,4 @@ If you need to force a refresh of the index, reload the VS Code window with <kbd
## Repository map
Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context-providers.md#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase.
Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context-providers.mdx#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase.

View file

@ -23,7 +23,7 @@ In the vast majority of cases, you will only need to edit `config.json`. However
## `config.json`
See the full reference for `config.json` [here](../../reference.md).
See the full reference for `config.json` [here](../../json-reference.md).
## `.continuerc.json`

View file

@ -6,7 +6,7 @@ toc_max_heading_level: 5
# @Docs
The [`@Docs` context provider](customize/context-providers.md#docs) allows you to interact with your documentation directly within Continue. This feature enables you to index any static site or GitHub markdown pages, making it easier to access and utilize your documentation while coding.
The [`@Docs` context provider](customize/context-providers.mdx#docs) allows you to interact with your documentation directly within Continue. This feature enables you to index any static site or GitHub markdown pages, making it easier to access and utilize your documentation while coding.
## Enabling the `@Docs` context provider

View file

@ -47,7 +47,7 @@ If you don't need any of these parameters, you can leave out the preamble and do
### Context
Many [context provider](../context-providers.md) can be referenced by typing "@" followed by the name of the context provider. The currently supported list is:
Many [context provider](../context-providers.mdx) can be referenced by typing "@" followed by the name of the context provider. The currently supported list is:
- `@terminal` - The contents of the terminal
- `@currentFile` - The currently active file

View file

@ -1,120 +0,0 @@
---
title: Amazon Bedrock
slug: ../bedrock
---
Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API.
## Chat model
We recommend configuring **Claude 3.5 Sonnet** as your chat model.
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "bedrock",
"model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"region": "us-east-1",
"profile": "bedrock"
}
]
}
```
> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.`
> You can fix this using the following config.json
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "bedrock",
"model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
"region": "us-east-1",
"profile": "bedrock"
}
]
}
```
## Autocomplete model
Bedrock currently does not offer any autocomplete models.
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
## Embeddings model
We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model.
```json title="config.json (Deprecated)"
{
"embeddingsProvider": {
"title": "Embeddings Model",
"provider": "bedrock",
"model": "amazon.titan-embed-text-v2:0",
"region": "us-west-2"
}
}
```
## Reranking model
We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`.
```json title="config.json (Deprecated)"
{
"reranker": {
"name": "bedrock",
"params": {
"model": "cohere.rerank-v3-5:0",
"region": "us-west-2"
}
}
}
```
## Authentication
Authentication will be through temporary or long-term credentials in
`~/.aws/credentials` under a configured profile (e.g. "bedrock").
```title="~/.aws/credentials
[bedrock]
aws_access_key_id = abcdefg
aws_secret_access_key = hijklmno
aws_session_token = pqrstuvwxyz # Optional: means short term creds.
```
## Custom Imported Models
To setup Bedrock using custom imported models, add the following to your `config.json` file:
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "AWS Bedrock deepseek-coder-6.7b-instruct",
"provider": "bedrockimport",
"model": "deepseek-coder-6.7b-instruct",
"modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX",
"region": "us-west-2",
"profile": "bedrock"
}
]
}
```
Authentication will be through temporary or long-term credentials in
~/.aws/credentials under a configured profile (e.g. "bedrock").
```title="~/.aws/credentials
[bedrock]
aws_access_key_id = abcdefg
aws_secret_access_key = hijklmno
aws_session_token = pqrstuvwxyz # Optional: means short term creds.
```

View file

@ -0,0 +1,192 @@
---
title: Amazon Bedrock
slug: ../bedrock
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Amazon Bedrock is a fully managed service on AWS that provides access to foundation models from various AI companies through a single API.
## Chat model
We recommend configuring **Claude 3.5 Sonnet** as your chat model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Claude 3.5 Sonnet
provider: bedrock
model: anthropic.claude-3-5-sonnet-20240620-v1:0
region: us-east-1
profile: bedrock
roles:
- chat
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "bedrock",
"model": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"region": "us-east-1",
"profile": "bedrock"
}
]
```
</TabItem>
</Tabs>
> If you run into the following error when connecting to the new Claude 3.5 Sonnet 2 models from AWS - `400 Invocation of model ID anthropic.claude-3-5-sonnet-20241022-v2:0 with on-demand throughput isn't supported. Retry your request with the ID or ARN of an inference profile that contains this model.`
> You can fix this using the following config:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Claude 3.5 Sonnet
provider: bedrock
model: us.anthropic.claude-3-5-sonnet-20241022-v2:0
region: us-east-1
profile: bedrock
roles:
- chat
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Claude 3.5 Sonnet",
"provider": "bedrock",
"model": "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
"region": "us-east-1",
"profile": "bedrock"
}
]
```
</TabItem>
</Tabs>
## Autocomplete model
Bedrock currently does not offer any autocomplete models.
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
## Embeddings model
We recommend configuring [`amazon.titan-embed-text-v2:0`](https://docs.aws.amazon.com/bedrock/latest/devguide/models.html#amazon.titan-embed-text-v2-0) as your embeddings model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Embeddings Model
provider: bedrock
model: amazon.titan-embed-text-v2:0
region: us-west-2
roles:
- embed
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"embeddingsProvider": {
"title": "Embeddings Model",
"provider": "bedrock",
"model": "amazon.titan-embed-text-v2:0",
"region": "us-west-2"
}
```
</TabItem>
</Tabs>
## Reranking model
We recommend configuring `cohere.rerank-v3-5:0` as your reranking model, you may also use `amazon.rerank-v1:0`.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Bedrock Reranker
provider: bedrock
model: cohere.rerank-v3-5:0
region: us-west-2
roles:
- rerank
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"reranker": {
"name": "bedrock",
"params": {
"model": "cohere.rerank-v3-5:0",
"region": "us-west-2"
}
}
```
</TabItem>
</Tabs>
## Authentication
Authentication will be through temporary or long-term credentials in
`~/.aws/credentials` under a configured profile (e.g. "bedrock").
```title="~/.aws/credentials
[bedrock]
aws_access_key_id = abcdefg
aws_secret_access_key = hijklmno
aws_session_token = pqrstuvwxyz # Optional: means short term creds.
```
## Custom Imported Models
To setup Bedrock using custom imported models, add the following to your config file:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: AWS Bedrock deepseek-coder-6.7b-instruct
provider: bedrockimport
model: deepseek-coder-6.7b-instruct
modelArn: arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX
region: us-west-2
profile: bedrock
roles:
- chat
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "AWS Bedrock deepseek-coder-6.7b-instruct",
"provider": "bedrockimport",
"model": "deepseek-coder-6.7b-instruct",
"modelArn": "arn:aws:bedrock:us-west-2:XXXXX:imported-model/XXXXXX",
"region": "us-west-2",
"profile": "bedrock"
}
]
```
</TabItem>
</Tabs>
Authentication will be through temporary or long-term credentials in
~/.aws/credentials under a configured profile (e.g. "bedrock").
```title="~/.aws/credentials
[bedrock]
aws_access_key_id = abcdefg
aws_secret_access_key = hijklmno
aws_session_token = pqrstuvwxyz # Optional: means short term creds.
```

View file

@ -1,53 +0,0 @@
---
title: Gemini
slug: ../gemini
---
:::info
You can get an API key from the [Google AI Studio](https://aistudio.google.com/).
:::
## Chat model
We recommend configuring **Gemini 1.5 Pro** as your chat model.
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Gemini 1.5 Pro",
"provider": "gemini",
"model": "gemini-1.5-pro-latest",
"apiKey": "[API_KEY]"
}
]
}
```
## Autocomplete model
Gemini currently does not offer any autocomplete models.
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
## Embeddings model
We recommend configuring **text-embedding-004** as your embeddings model.
```json title="config.json (Deprecated)"
{
"embeddingsProvider": {
"provider": "gemini",
"model": "models/text-embedding-004",
"apiKey": "[API_KEY]"
}
}
```
## Reranking model
Gemini currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.

View file

@ -0,0 +1,80 @@
---
title: Gemini
slug: ../gemini
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
You can get an API key from the [Google AI Studio](https://aistudio.google.com/).
:::
## Chat model
We recommend configuring **Gemini 1.5 Pro** as your chat model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Gemini 1.5 Pro
provider: gemini
model: gemini-1.5-pro-latest
apiKey: "[API_KEY]"
roles:
- chat
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Gemini 1.5 Pro",
"provider": "gemini",
"model": "gemini-1.5-pro-latest",
"apiKey": "[API_KEY]"
}
]
```
</TabItem>
</Tabs>
## Autocomplete model
Gemini currently does not offer any autocomplete models.
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
## Embeddings model
We recommend configuring **text-embedding-004** as your embeddings model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Gemini Embeddings
provider: gemini
model: models/text-embedding-004
apiKey: "[API_KEY]"
roles:
- embed
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"embeddingsProvider": {
"provider": "gemini",
"model": "models/text-embedding-004",
"apiKey": "[API_KEY]"
}
```
</TabItem>
</Tabs>
## Reranking model
Gemini currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.

View file

@ -1,63 +0,0 @@
---
title: Mistral
slug: ../mistral
---
:::info
You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`.
:::
## Chat model
We recommend configuring **Mistral Large** as your chat model.
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Mistral Large",
"provider": "mistral",
"model": "mistral-large-latest",
"apiKey": "[API_KEY]"
}
]
}
```
## Autocomplete model
We recommend configuring **Codestral** as your autocomplete model.
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest"
// "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
}
}
```
## Embeddings model
We recommend configuring **Mistral Embed** as your embeddings model.
```json title="config.json (Deprecated)"
{
"embeddingsProvider": {
"provider": "mistral",
"model": "mistral-embed",
"apiKey": "[API_KEY]",
"apiBase": "https://api.mistral.ai/v1"
}
}
```
## Reranking model
Mistral currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.

View file

@ -0,0 +1,104 @@
---
title: Mistral
slug: ../mistral
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
You can get an API key from the [Mistral Dashboard](https://console.mistral.ai). Note that the API key for Codestral (codestral.mistral.ai) is different from for all other models (api.mistral.ai). If you are using a Codestral API key, you should set the `apiBase` to `https://codestral.mistral.ai/v1`. Otherwise, we will default to using `https://api.mistral.ai/v1`.
:::
## Chat model
We recommend configuring **Mistral Large** as your chat model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Mistral Large
provider: mistral
model: mistral-large-latest
apiKeySecret: MISTRAL_API_KEY
roles:
- chat
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Mistral Large",
"provider": "mistral",
"model": "mistral-large-latest",
"apiKey": "[API_KEY]"
}
]
```
</TabItem>
</Tabs>
## Autocomplete model
We recommend configuring **Codestral** as your autocomplete model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Codestral
provider: mistral
model: codestral-latest
# apiBase: https://codestral.mistral.ai/v1 # Do this if you are using a Codestral API key
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"tabAutocompleteModel": {
"title": "Codestral",
"provider": "mistral",
"model": "codestral-latest"
// "apiBase": "https://codestral.mistral.ai/v1" // Do this if you are using a Codestral API key
}
```
</TabItem>
</Tabs>
## Embeddings model
We recommend configuring **Mistral Embed** as your embeddings model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Mistral Embed
provider: mistral
model: mistral-embed
apiKeySecret: MISTRAL_API_KEY
apiBase: https://api.mistral.ai/v1
roles:
- embed
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"embeddingsProvider": {
"provider": "mistral",
"model": "mistral-embed",
"apiKey": "[API_KEY]",
"apiBase": "https://api.mistral.ai/v1"
}
```
</TabItem>
</Tabs>
## Reranking model
Mistral currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.

View file

@ -1,72 +0,0 @@
---
title: Ollama
slug: ../ollama
---
Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command.
## Chat model
We recommend configuring **Llama3.1 8B** as your chat model.
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Llama3.1 8B",
"provider": "ollama",
"model": "llama3.1:8b"
}
]
}
```
## Autocomplete model
We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
```json title="config.json (Deprecated)"
{
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder 1.5B",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b-base"
}
}
```
## Embeddings model
We recommend configuring **Nomic Embed Text** as your embeddings model.
```json title="config.json (Deprecated)"
{
"embeddingsProvider": {
"provider": "ollama",
"model": "nomic-embed-text"
}
}
```
## Reranking model
Ollama currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
## Using a remote instance
To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json:
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Llama3.1 8B",
"provider": "ollama",
"model": "llama3.1:8b",
"apiBase": "http://<my endpoint>:11434"
}
]
}
```

View file

@ -0,0 +1,120 @@
---
title: Ollama
slug: ../ollama
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Ollama is an open-source tool that allows to run large language models (LLMs) locally on their own computers. To use Ollama, you can install it [here](https://ollama.ai/download) and download the model you want to run with the `ollama run` command.
## Chat model
We recommend configuring **Llama3.1 8B** as your chat model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- name: Llama3.1 8B
provider: ollama
model: llama3.1:8b
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama3.1 8B",
"provider": "ollama",
"model": "llama3.1:8b"
}
]
```
</TabItem>
</Tabs>
## Autocomplete model
We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- name: Qwen2.5-Coder 1.5B
provider: ollama
model: qwen2.5-coder:1.5b-base
roles:
- autocomplete
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"tabAutocompleteModel": {
"title": "Qwen2.5-Coder 1.5B",
"provider": "ollama",
"model": "qwen2.5-coder:1.5b-base"
}
```
</TabItem>
</Tabs>
## Embeddings model
We recommend configuring **Nomic Embed Text** as your embeddings model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- name: Nomic Embed Text
provider: ollama
model: nomic-embed-text
roles:
- embed
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"embeddingsProvider": {
"provider": "ollama",
"model": "nomic-embed-text"
}
```
</TabItem>
</Tabs>
## Reranking model
Ollama currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
## Using a remote instance
To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
models:
- title: Llama3.1 8B
provider: ollama
model: llama3.1:8b
apiBase: http://<my endpoint>:11434
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "Llama3.1 8B",
"provider": "ollama",
"model": "llama3.1:8b",
"apiBase": "http://<my endpoint>:11434"
}
]
```
</TabItem>
</Tabs>

View file

@ -1,103 +0,0 @@
---
title: OpenAI
slug: ../openai
---
:::info
You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys)
:::
## Chat model
We recommend configuring **GPT-4o** as your chat model.
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "GPT-4o",
"provider": "openai",
"model": "gpt-4o",
"apiKey": "[API_KEY]"
}
]
}
```
## Autocomplete model
OpenAI currently does not offer any autocomplete models.
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
## Embeddings model
We recommend configuring **text-embedding-3-large** as your embeddings model.
```json title="config.json (Deprecated)"
{
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-large",
"apiKey": "[API_KEY]"
}
}
```
## Reranking model
OpenAI currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
## OpenAI compatible servers / APIs
OpenAI compatible servers
- [KoboldCpp](https://github.com/lostruins/koboldcpp)
- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation)
- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md)
- [LocalAI](https://localai.io/basics/getting_started/)
- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server)
- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples)
- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html)
- [BerriAI/litellm](https://github.com/BerriAI/litellm)
OpenAI compatible APIs
- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others)
- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints)
If you are using an OpenAI compatible server / API, you can change the `apiBase` like this:
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "OpenAI-compatible server / API",
"provider": "openai",
"model": "MODEL_NAME",
"apiKey": "EMPTY",
"apiBase": "http://localhost:8000/v1"
}
]
}
```
To force usage of `chat/completions` instead of `completions` endpoint you can set:
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "OpenAI-compatible server / API",
"provider": "openai",
"model": "MODEL_NAME",
"apiBase": "http://localhost:8000/v1",
"useLegacyCompletionsEndpoint": true
}
]
}
```

View file

@ -0,0 +1,160 @@
---
title: OpenAI
slug: ../openai
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
You can get an API key from the [OpenAI console](https://platform.openai.com/account/api-keys)
:::
## Chat model
We recommend configuring **GPT-4o** as your chat model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: GPT-4o
provider: openai
model: gpt-4o
apiKeySecret: OPENAI_KEY
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "GPT-4o",
"provider": "openai",
"model": "gpt-4o",
"apiKey": "[API_KEY]"
}
]
}
```
</TabItem>
</Tabs>
## Autocomplete model
OpenAI currently does not offer any autocomplete models.
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers.
## Embeddings model
We recommend configuring **text-embedding-3-large** as your embeddings model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: OpenAI Embeddings
provider: openai
model: text-embedding-3-large
apiKey: <API_KEY>
roles:
- embed
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-3-large",
"apiKey": "[API_KEY]"
}
}
```
</TabItem>
</Tabs>
## Reranking model
OpenAI currently does not offer any reranking models.
[Click here](../../model-types/reranking.md) to see a list of reranking model providers.
## OpenAI compatible servers / APIs
OpenAI compatible servers
- [KoboldCpp](https://github.com/lostruins/koboldcpp)
- [text-gen-webui](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai#setup--installation)
- [FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/openai_api.md)
- [LocalAI](https://localai.io/basics/getting_started/)
- [llama-cpp-python](https://github.com/abetlen/llama-cpp-python#web-server)
- [TensorRT-LLM](https://github.com/NVIDIA/trt-llm-as-openai-windows?tab=readme-ov-file#examples)
- [vLLM](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html)
- [BerriAI/litellm](https://github.com/BerriAI/litellm)
OpenAI compatible APIs
- [Anyscale Endpoints](https://github.com/continuedev/deploy-os-code-llm#others)
- [Anyscale Private Endpoints](https://github.com/continuedev/deploy-os-code-llm#anyscale-private-endpoints)
If you are using an OpenAI compatible server / API, you can change the `apiBase` like this:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: OpenAI-compatible server / API
provider: openai
model: MODEL_NAME
apiBase: http://localhost:8000/v1
apiKeySecret: EMPTY
roles:
- chat
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "OpenAI-compatible server / API",
"provider": "openai",
"model": "MODEL_NAME",
"apiKey": "EMPTY",
"apiBase": "http://localhost:8000/v1"
}
]
```
</TabItem>
</Tabs>
To force usage of `chat/completions` instead of `completions` endpoint you can set:
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: OpenAI-compatible server / API
provider: openai
model: MODEL_NAME
apiBase: http://localhost:8000/v1
useLegacyCompletionsEndpoint: true
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "OpenAI-compatible server / API",
"provider": "openai",
"model": "MODEL_NAME",
"apiBase": "http://localhost:8000/v1",
"useLegacyCompletionsEndpoint": true
}
]
}
```
</TabItem>
</Tabs>

View file

@ -4,6 +4,13 @@ description: Shortcuts that can be activated by prefacing your input with '/'
keywords: [slash command, custom commands, step]
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
Slash commands can currently only be added using [`config.json`](../json-reference.md), which has been deprecated in favor of the [`YAML Config Format`](../reference.md). 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.
![slash-commands](/img/slash-commands.png)
@ -109,23 +116,36 @@ The onboard slash command helps to familiarize yourself with a new project by an
### Model Context Protocol
The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this:
The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a standard proposed by Anthropic to unify prompts, context, and tool use. Continue supports MCP "prompts" by creating slash commands. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then set up your configuration like this:
```json title="config.json (Deprecated)"
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
mcpServers:
- name: My MCP Server
command: uvx
args:
- mcp-server-sqlite
- --db-path
- /Users/NAME/test.db
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
}
}
}
]
}
}
```
]
}
```
</TabItem>
</Tabs>
### Build your own Slash Command

View file

@ -4,6 +4,9 @@ description: Tool use and customization
keywords: [tool, use, function calling, claude, automatic]
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
Tools allow Continue to take action in your IDE and beyond (when you give permission). Currently, they are only supported for the following providers:
- [Anthropic](./model-providers/top-level/anthropic.md) - see recommended models [here](https://docs.anthropic.com/en/docs/build-with-claude/tool-use#choosing-a-model).
@ -23,18 +26,31 @@ To let you balance speed and safety, each tool can be set to 1 of 3 modes:
Currently custom tools can be configured using the [Model Context Protocol](https://modelcontextprotocol.io/introduction), a standard proposed by Anthropic to unify prompts, context, and tool use. Read their [quickstart](https://modelcontextprotocol.io/quickstart) to learn how to set up a local server and then configure your `config.json` like this:
```json title="config.json (Deprecated)"
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="Package or config.yaml"
mcpServers:
- name: My MCP Server
command: uvx
args:
- mcp-server-sqlite
- --db-path
- /Users/NAME/test.db
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
}
}
}
]
}
}
```
]
}
```
</TabItem>
</Tabs>

View file

@ -2,6 +2,10 @@
title: Build your own slash command
---
:::info
Slash commands can currently only be added using [`config.json`](../json-reference.md) or `config.ts`, which have been deprecated in favor of the [`YAML Config Format`](../reference.md). We recommend looking into [Prompt Files](../customize/deep-dives//prompt-files.md) to achieve similar functionality.
:::
There are two ways to add custom slash commands:
1. With natural language prompts - this is simpler and only requires writing a string or string template.
@ -19,9 +23,9 @@ Custom commands are great when you are frequently reusing a prompt. For example,
```json title="config.json (Deprecated)"
customCommands=[{
"name": "check",
"description": "Check for mistakes in my code",
"prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
"name": "check",
"description": "Check for mistakes in my code",
"prompt": "{{{ input }}}\n\nPlease read the highlighted code and check for any mistakes. You should look for the following, and be extremely vigilant:\n- Syntax errors\n- Logic errors\n- Security vulnerabilities\n- Performance issues\n- Anything else that looks wrong\n\nOnce you find an error, please explain it as clearly as possible, but without using extra words. For example, instead of saying 'I think there is a syntax error on line 5', you should say 'Syntax error on line 5'. Give your answer as one bullet point per mistake found."
}]
```

View file

@ -7,4 +7,4 @@ keywords: [edit, cmd l, model]
By default, Edit uses the [same model as Chat](chat/model-setup.mdx) since we recommend a similar, 400B+ parameter model or one of the frontier model for code edits.
You can configure a different model to be used for edits by updating your [`config.json`](../reference.md).
You can configure a different model to be used for edits by updating your [configuration](../reference.md).

View file

@ -19,7 +19,7 @@ keywords:
**Continue is the leading open-source AI code assistant inside of [VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) and [JetBrains](https://plugins.jetbrains.com/plugin/22707-continue-extension)**
- [Chat](chat/how-to-use-it.md) to understand and iterate on code in the sidebar
- [Autocomplete](autocomplete/how-to-use-it.md) to receive inline code suggestions as you type
- [Edit](edit/how-to-use-it.md) to modify code without leaving your current file
- [Actions](actions/how-to-use-it.md) to establish shortcuts for common use cases
- [Chat](chat/how-to-use-it) to understand and iterate on code in the sidebar
- [Autocomplete](autocomplete/how-to-use-it) to receive inline code suggestions as you type
- [Edit](edit/how-to-use-it) to modify code without leaving your current file
- [Actions](actions/how-to-use-it) to establish shortcuts for common use cases

451
docs/docs/json-reference.md Normal file
View file

@ -0,0 +1,451 @@
---
title: config.json Reference
description: Reference for the Continue _config.json_ configuration file
keywords: [config, config_schema.json, json]
---
:::info
`config.json` has been deprecated in favor of the [`YAML Config Format`](./yaml-reference). See 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).
**All properties at all levels are optional unless explicitly marked required**
### `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).
Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json.
**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`, 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, and Cohere.
- `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.
_(AWS Only)_
- `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`).
Example:
```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"
}
]
}
```
### `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.
Example
```json title="config.json"
{
"tabAutocompleteModel": {
"title": "My Starcoder",
"provider": "ollama",
"model": "starcoder2:3b"
}
}
```
### `tabAutocompleteOptions`
Specifies options for tab autocompletion behavior.
**Properties:**
- `disable`: If `true`, disables tab autocomplete (default: `false`).
- `useFileSuffix`: If `true`, includes file suffix in the prompt.
- `maxPromptTokens`: Maximum number of tokens for the prompt.
- `debounceDelay`: Delay (in ms) before triggering autocomplete.
- `maxSuffixPercentage`: Maximum percentage of prompt for suffix.
- `prefixPercentage`: Percentage of input for prefix.
- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables.
- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`).
- `useCache`: If `true`, caches completions.
- `onlyMyCode`: If `true`, only includes code within the repository.
- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled.
Example
```json title="config.json"
{
"tabAutocompleteOptions": {
"debounceDelay": 500,
"maxPromptTokens": 1500,
"disableInFiles": ["*.md"]
}
}
```
### `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`, `free-trial`, `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.
- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
- `maxBatchSize`: 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": "<API_KEY>",
"maxChunkSize": 256,
"maxBatchSize": 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.
- `frequencePenalty`: 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`, `free-trial`, `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": "<VOYAGE_API_KEY>"
}
}
}
```
### `docs`
List of documentation sites to index.
**Properties:**
- `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`
- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
Example
```json title="config.json"
"docs": [
{
"title": "Continue",
"startUrl": "https://docs.continue.dev/intro",
"rootUrl": "https://docs.continue.dev",
"faviconUrl": "https://docs.continue.dev/favicon.ico",
}
]
```
### `slashCommands`
Custom commands initiated by typing "/" in the sidebar. Commands include predefined functionality or may be user-defined.
**Properties:**
- `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.
- `params`: Additional parameters to configure command behavior (command-specific - see code for command)
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"
}
]
}
```
### `customCommands`
User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
**Properties:**
- `name`: The name of the custom command.
- `prompt`: Text prompt for the command.
- `description`: Brief description explaining the command's function.
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"
}
]
}
```
### `contextProviders`
List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
**Properties:**
- `name`: Name of the context provider, e.g. `docs` or `web`
- `params`: A context-provider-specific record of params to configure the context behavior
Example
```json title="config.json"
{
"contextProviders": [
{
"name": "code",
"params": {}
},
{
"name": "docs",
"params": {}
},
{
"name": "diff",
"params": {}
},
{
"name": "open",
"params": {}
}
]
}
```
### `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.
### `systemMessage`
Defines a system message that appears before every response from the language model, providing guidance or context.
### `disableIndexing`
Prevents indexing of the codebase, useful primarily for debugging purposes.
### `experimental`
Several experimental config parameters are available, as described below:
`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.
- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`.
- `promptPath`: Change the path to custom prompt files from the default ".prompts"
- `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.
- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`..
- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol)
Example
```json title="config.json"
{
"experimental": {
"modelRoles": {
"inlineEdit": "Edit Model"
},
"promptPath": "custom/.prompts",
"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."
},
"readResponseTTS": false,
"useChromiumForDocsCrawling": true,
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
}
}
]
}
}
```

View file

@ -1,230 +1,175 @@
---
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]
---
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).
# Config YAML Reference
**All properties at all levels are optional unless explicitly marked required**
<!-- TODO - data and packages sections -->
Continue can be configured using a YAML file `config.yaml` which for local configuration can be placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`)
Below are details for each property that can be set in `config.yaml`.
:::info
Config YAML replaces `config.json`, which has been deprecated. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release.
:::
**All properties at all levels are optional unless explicitly marked as required.**
## Properties
The top-level properties in the `config.yaml` configuration file are:
- [`name`](#name) (**required**)
<!-- - [`packages`](#packages) -->
- [`version`](#version) (**required**)
- [`models`](#models)
- [`context`](#context)
- [`rules`](#rules)
- [`prompts`](#prompts)
- [`docs`](#docs)
<!-- - [`data`](#data) -->
<!-- - [`tools`](#tools) -->
- [`mcpServers`](#mcpservers)
---
### `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.
---
### `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`, 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, and Cohere.
- `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.
- `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`.
- `defaultCompletionOptions`: Default completion options for model settings.
_(AWS Only)_
**Properties:**
- `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`).
- `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.
Example:
- `requestOptions`: HTTP request options specific to the model.
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "Ollama",
"provider": "ollama",
"model": "AUTODETECT"
},
{
"model": "gpt-4o",
"contextLength": 128000,
"title": "GPT-4o",
"provider": "openai",
"apiKey": "YOUR_API_KEY"
}
]
}
**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
```
### `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)
**Properties:**
- `uses` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`).
- `with`: Optional parameters to configure the context provider's behavior.
**Example:**
```yaml title="config.yaml"
context:
- uses: files
- uses: code
- uses: codebase
with:
nFinal: 10
- uses: docs
- uses: diff
- uses: folder
- uses: 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 (Deprecated)"
{
"tabAutocompleteModel": {
"title": "My Starcoder",
"provider": "ollama",
"model": "starcoder2:3b"
}
}
```yaml title="config.yaml"
rules:
- 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`).
- `useFileSuffix`: If `true`, includes file suffix in the prompt.
- `maxPromptTokens`: Maximum number of tokens for the prompt.
- `debounceDelay`: Delay (in ms) before triggering autocomplete.
- `maxSuffixPercentage`: Maximum percentage of prompt for suffix.
- `prefixPercentage`: Percentage of input for prefix.
- `template`: Template string for autocomplete, using Mustache templating. You can use the `{{{ prefix }}}`, `{{{ suffix }}}`, `{{{ filename }}}`, `{{{ reponame }}}`, and `{{{ language }}}` variables.
- `multilineCompletions`: Controls multiline completions (`"always"`, `"never"`, or `"auto"`).
- `useCache`: If `true`, caches completions.
- `onlyMyCode`: If `true`, only includes code within the repository.
- `disableInFiles`: Array of glob patterns for files where autocomplete is disabled.
Example
```json title="config.json (Deprecated)"
{
"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`, `free-trial`, `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.
- `maxChunkSize`: Maximum tokens per document chunk. Minimum is 128 tokens.
- `maxBatchSize`: 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 (Deprecated)"
{
"embeddingsProvider": {
"provider": "openai",
"model": "text-embedding-ada-002",
"apiKey": "<API_KEY>",
"maxChunkSize": 256,
"maxBatchSize": 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.
- `frequencePenalty`: 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 (Deprecated)"
{
"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 (Deprecated)"
{
"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`, `free-trial`, `huggingface-tei`, `bedrock`
- `params`:
- `model`: Model name
- `apiKey`: Api key
- `region`: Region (for Bedrock only)
Example
```json title="config.json (Deprecated)"
{
"reranker": {
"name": "voyage",
"params": {
"model": "rerank-2",
"apiKey": "<VOYAGE_API_KEY>"
}
}
}
```
---
### `docs`
@ -232,216 +177,145 @@ 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
- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL
- `maxDepth`: Maximum depth for crawling. Default `3`
- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
Example
```json title="config.json (Deprecated)"
"docs": [
{
"title": "Continue",
"startUrl": "https://docs.continue.dev/intro",
"rootUrl": "https://docs.continue.dev",
"faviconUrl": "https://docs.continue.dev/favicon.ico",
}
]
```yaml title="config.yaml"
docs:
- name: Continue
startUrl: https://docs.continue.dev/intro
rootUrl: https://docs.continue.dev
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.
<!-- ### `tools`
The `tools` section specifies external tools or APIs that can be used within your configuration.
**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)
- `url` (**required**): The URL of the tool's API or endpoint.
- `apiKey`: An optional API key required by the tool.
Example:
**Example:**
```json title="config.json (Deprecated)"
{
"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"
tools:
- url: https://api.exampletool.com/tool1
apiKey: YOUR_API_KEY
```
### `customCommands`
--- -->
User-defined commands for prompt shortcuts in the sidebar, allowing quick access to common actions.
### `mcpServers`
<!-- TODO is this correct? -->
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 name of the custom command.
- `prompt`: Text prompt for the command.
- `description`: Brief description explaining the command's function.
- `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 (Deprecated)"
{
"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"
mcpServers:
- name: My MCP Server
command: uvx
args:
- mcp-server-sqlite
- --db-path
- /Users/NAME/test.db
```
### `contextProviders`
<!-- ### `data`
List of the pre-defined context providers that will show up as options while typing in the chat, and their customization with `params`.
The `data` section specifies data providers used in your configuration. Data providers supply data or resources for use in various operations.
**Properties:**
- `name`: Name of the context provider, e.g. `docs` or `web`
- `params`: A context-provider-specific record of params to configure the context behavior
- `provider` (**required**): The name of the data provider.
Example
**Example:**
```json title="config.json (Deprecated)"
{
"contextProviders": [
{
"name": "code",
"params": {}
},
{
"name": "docs",
"params": {}
},
{
"name": "diff",
"params": {}
},
{
"name": "open",
"params": {}
}
]
}
```yaml title="config.yaml"
data:
- provider: embeddings
```
### `disableSessionTitles`
--- -->
Prevents generating summary titles for each chat session when set to `true`.
---
### `ui`
## Complete YAML Config Example
Customizable UI settings to control interface appearance and behavior.
Putting it all together, here's a complete example of a `config.yaml` configuration file:
**Properties:**
```yaml title="config.yaml"
name: MyProject
version: 0.0.1
- `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.
models:
- 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
Example:
- name: Ollama Starcoder
provider: ollama
model: starcoder
roles:
- autocomplete
defaultCompletionOptions:
temperature: 0.3
stop:
- "\n"
```json title="config.json (Deprecated)"
{
"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.
### `systemMessage`
Defines a system message that appears before every response from the language model, providing guidance or context.
### `disableIndexing`
Prevents indexing of the codebase, useful primarily for debugging purposes.
### `experimental`
Several experimental config parameters are available, as described below:
`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.
- `readResponseTTS`: If `true`, reads LLM responses aloud with TTS. Default is `true`.
- `promptPath`: Change the path to custom prompt files from the default ".prompts"
- `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.
- `useChromiumForDocsCrawling`: Use Chromium to crawl docs locally. Useful if the default Cheerio crawler fails on sites that require JavaScript rendering. Downloads and installs Chromium to `~/.continue/.utils`..
- `modelContextProtocolServers`: See [Model Context Protocol](/customize/context-providers#model-context-protocol)
Example
```json title="config.json (Deprecated)"
{
"experimental": {
"modelRoles": {
"inlineEdit": "Edit Model"
},
"promptPath": "custom/.prompts",
"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."
},
"readResponseTTS": false,
"useChromiumForDocsCrawling": true,
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
}
}
]
}
}
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.
context:
- uses: diff
- uses: file
- uses: codebase
- uses: code
- uses: docs
with:
startUrl: https://docs.example.com/introduction
rootUrl: https://docs.example.com
maxDepth: 3
mcpServers:
- name: DevServer
command: npm
args:
- run
- dev
env:
PORT: "3000"
```

View file

@ -4,6 +4,9 @@ description: Troubleshooting while waiting for help during beta / alpha testing
keywords: [reload, delete, manually, logs, server, console]
---
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
The Continue VS Code extension is currently in beta, and the JetBrains extension is in Alpha. If you are having trouble, please follow the steps below.
1. [Check the logs](#check-the-logs)
@ -24,7 +27,9 @@ To solve many problems, the first step is reading the logs to find the relevant
In order to view debug logs, which contain extra information, click the dropdown at the top that says "Default levels" and select "Verbose".
:::
1. <kbd>cmd</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> for MacOS or <kbd>ctrl</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> for Windows
1. <kbd>cmd</kbd> + <kbd>shift</kbd> + <kbd>P</kbd> for MacOS or <kbd>ctrl</kbd> + <kbd>
shift
</kbd> + <kbd>P</kbd> for Windows
2. Search for and then select "Developer: Toggle Developer Tools"
3. This will open the [Chrome DevTools window](https://developer.chrome.com/docs/devtools/)
4. Select the `Console` tab
@ -85,20 +90,31 @@ If your keyboard shortcuts are not resolving, you may have other commands that a
If you're seeing a `fetch failed` error and your network requires custom certificates, you will need to configure them in `config.json`. In each of the objects in the `"models"` array, add `requestOptions.caBundlePath` like this:
```json title="config.json (Deprecated)"
{
"models": [
{
"title": "My Model",
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: My Model
...
"requestOptions": {
"caBundlePath": "/path/to/cert.pem"
requestOptions:
caBundlePath: /path/to/cert.pem
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json (Deprecated)"
"models": [
{
"title": "My Model",
...
"requestOptions": {
"caBundlePath": "/path/to/cert.pem"
}
}
}
],
...
}
```
],
...
```
</TabItem>
</Tabs>
You may also set `requestOptions.caBundlePath` to an array of paths to multiple certificates.

View file

@ -11,8 +11,8 @@ Continue's YAML configuration format provides more readable, maintainable, consi
See also
- [Intro to YAML](https://yaml.org/)
- [JSON Continue Config Reference](/reference)
- [YAML Continue Config Reference](/yaml-reference)
- [JSON Continue Config Reference](/json-reference)
- [YAML Continue Config Reference](/reference)
## Create YAML file
@ -279,8 +279,6 @@ docs:
### MCP Servers
<!-- TODO this is definitely wrong -->
**Properties:**
- `name` (**required**): The name of the MCP server.

View file

@ -1,321 +0,0 @@
---
title: Config YAML Reference
description: Reference for the Continue configuration YAML file
keywords: [config, yaml, configuration, customize, customization]
---
# Config YAML Reference
<!-- TODO - data and packages sections -->
Continue can be configured using a YAML file `config.yaml` which for local configuration can be placed in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`)
Below are details for each property that can be set in `config.yaml`.
:::info
Config YAML does not work alongside `config.json` - it replaces it. View the **[Migration Guide](/yaml-migration)**. `config.yaml` currently only works in VS Code pre-release.
:::
**All properties at all levels are optional unless explicitly marked as required.**
## Properties
The top-level properties in the `config.yaml` configuration file are:
- [`name`](#name) (**required**)
<!-- - [`packages`](#packages) -->
- [`version`](#version) (**required**)
- [`models`](#models)
- [`context`](#context)
- [`rules`](#rules)
- [`prompts`](#prompts)
- [`docs`](#docs)
<!-- - [`data`](#data) -->
<!-- - [`tools`](#tools) -->
- [`mcpServers`](#mcpservers)
---
### `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.
---
### `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`.
- `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
```
---
### `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)
**Properties:**
- `uses` (**required**): The identifier or name of the context provider (e.g., `code`, `docs`, `web`).
- `with`: Optional parameters to configure the context provider's behavior.
**Example:**
```yaml title="config.yaml"
context:
- uses: files
- uses: code
- uses: codebase
with:
nFinal: 10
- uses: docs
- uses: diff
- uses: folder
- uses: 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:
- 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
- `rootUrl`: Crawler will only index docs within this domain - pages that contain this URL
- `favicon`: URL for site favicon (default is `/favicon.ico` from `startUrl`).
Example
```yaml title="config.yaml"
docs:
- name: Continue
startUrl: https://docs.continue.dev/intro
rootUrl: https://docs.continue.dev
favicon: https://docs.continue.dev/favicon.ico
```
---
<!-- ### `tools`
The `tools` section specifies external tools or APIs that can be used within your configuration.
**Properties:**
- `url` (**required**): The URL of the tool's API or endpoint.
- `apiKey`: An optional API key required by the tool.
**Example:**
```yaml title="config.yaml"
tools:
- url: https://api.exampletool.com/tool1
apiKey: YOUR_API_KEY
```
--- -->
### `mcpServers`
<!-- TODO is this correct? -->
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`
The `data` section specifies data providers used in your configuration. Data providers supply data or resources for use in various operations.
**Properties:**
- `provider` (**required**): The name of the data provider.
**Example:**
```yaml title="config.yaml"
data:
- provider: embeddings
```
--- -->
---
## 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
models:
- 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.
context:
- uses: diff
- uses: file
- uses: codebase
- uses: code
- uses: docs
with:
startUrl: https://docs.example.com/introduction
rootUrl: https://docs.example.com
maxDepth: 3
mcpServers:
- name: DevServer
command: npm
args:
- run
- dev
env:
PORT: "3000"
```

View file

@ -7,7 +7,7 @@ sidebar_position: 5
## 内置的斜杠命令
Continue 有一个大的内置斜杠命令库,但是当你首次安装时,我们只显示最常用的一些,比如 "/edit", "/comment" 和 "/share" 。为了添加更多的 action ,你可以打开 [config.json](../reference.md) 并添加它们到 `slashCommands` 列表中。
Continue 有一个大的内置斜杠命令库,但是当你首次安装时,我们只显示最常用的一些,比如 "/edit", "/comment" 和 "/share" 。为了添加更多的 action ,你可以打开 [config.json](../json-reference.md) 并添加它们到 `slashCommands` 列表中。
## 定制斜杠命令

View file

@ -5,7 +5,7 @@ keywords: [定制]
sidebar_position: 5
---
Continue 在 [`config.json`](../reference.md) 提供少量的参数,对于你的特定需求和硬件能力,可以调整找到建议质量和系统性能之间的最佳平衡:
Continue 在 [`config.json`](../json-reference.md) 提供少量的参数,对于你的特定需求和硬件能力,可以调整找到建议质量和系统性能之间的最佳平衡:
```json title="config.json"
"tabAutocompleteOptions": {

View file

@ -19,28 +19,28 @@ sidebar_position: 3
## 指定文件
你可以通过输入 [`@Files`](../customize/context-providers.md#file) 并选择文件,包含当前工作区中的指定文件作为上下文。
你可以通过输入 [`@Files`](../customize/context-providers.mdx#file) 并选择文件,包含当前工作区中的指定文件作为上下文。
## 指定目录
你可以通过输入 [`@Folder`](../customize/context-providers.md#folder) 并选择目录,包含当前工作区中指定目录作为上下文。它像 [`@Codebase`](../customize/deep-dives/codebase.md) 一样工作,但是只包含指定目录中的文件。
你可以通过输入 [`@Folder`](../customize/context-providers.mdx#folder) 并选择目录,包含当前工作区中指定目录作为上下文。它像 [`@Codebase`](../customize/deep-dives/codebase.md) 一样工作,但是只包含指定目录中的文件。
## 整个代码库
你可以通过输入 [`@Codebase`](../customize/context-providers.md#codebase) 包含整个代码库作为上下文。你可以 [在这里](../customize/deep-dives/codebase.md) 了解 `@Codebase` 是如何工作的。
你可以通过输入 [`@Codebase`](../customize/context-providers.mdx#codebase) 包含整个代码库作为上下文。你可以 [在这里](../customize/deep-dives/codebase.md) 了解 `@Codebase` 是如何工作的。
## 文档网址
你可以通过输入 [`@Docs`](../customize/context-providers.md#docs) 并选择文档网址,包含文档网址作文上下文。你可以 [在这里](../customize/deep-dives/docs.md) 了解 `@Docs` 是如何工作的。
你可以通过输入 [`@Docs`](../customize/context-providers.mdx#docs) 并选择文档网址,包含文档网址作文上下文。你可以 [在这里](../customize/deep-dives/docs.md) 了解 `@Docs` 是如何工作的。
## 终端内容
你可以通过输入 [`@Terminal`](../customize/context-providers.md#terminal) ,包含 IDE 中终端的内容作为上下文。
你可以通过输入 [`@Terminal`](../customize/context-providers.mdx#terminal) ,包含 IDE 中终端的内容作为上下文。
## Git diff
你可以通过输入 [`@Git Diff`](../customize/context-providers.md#git-diff) ,包含当前分支中你做的所有变更作为上下文。
你可以通过输入 [`@Git Diff`](../customize/context-providers.mdx#git-diff) ,包含当前分支中你做的所有变更作为上下文。
## 其他上下文
你可以 [在这里](../customize/context-providers.md) 看到完整的内置上下文提供者列表,以及 [在这里](../customize/tutorials/build-your-own-context-provider.md) 看到如何创建你自己定制的上下文提供者。
你可以 [在这里](../customize/context-providers.mdx) 看到完整的内置上下文提供者列表,以及 [在这里](../customize/tutorials/build-your-own-context-provider.md) 看到如何创建你自己定制的上下文提供者。

View file

@ -9,7 +9,7 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
:::info
这个页面推荐聊天的模型和提供者。在 [这里](../reference.md) 了解更多关于如何设置你的 `config.json` 。
这个页面推荐聊天的模型和提供者。在 [这里](../json-reference.md) 了解更多关于如何设置你的 `config.json` 。
:::
## 最好的总体体验

View file

@ -44,7 +44,7 @@ ollama run starcoder2:3b
}
```
如果你对可用选项不熟悉,你可以在 [这里](../../reference.md) 查找完整的参考。
如果你对可用选项不熟悉,你可以在 [这里](../../json-reference.md) 查找完整的参考。
## 配置选项

View file

@ -73,4 +73,4 @@ Continue 遵守 `.gitignore` 文件,为了确定哪些文件不需要索引。
## 仓库 map
Claude 3, Llama 3.1, Gemini 1.5 和 GPT-4o 家族的模型在代码库检索时会自动地使用 [仓库 map](../context-providers.md#repository-map) ,允许模型理解你的代码库的结构,并使用它回答问题。当前,仓库 map 仅包含代码库中的文件路径。
Claude 3, Llama 3.1, Gemini 1.5 和 GPT-4o 家族的模型在代码库检索时会自动地使用 [仓库 map](../context-providers.mdx#repository-map) ,允许模型理解你的代码库的结构,并使用它回答问题。当前,仓库 map 仅包含代码库中的文件路径。

View file

@ -79,7 +79,7 @@ Write unit tests for the above selected code, following each of these instructio
### 上下文提供者
任何你添加到配置中的 [上下文提供者](../context-providers.md) ,可以使用上下文提供者的名称引用。接收输入的上下文提供者也支持。
任何你添加到配置中的 [上下文提供者](../context-providers.mdx) ,可以使用上下文提供者的名称引用。接收输入的上下文提供者也支持。
- `{{{ terminal }}}` - 终端的内容
- `{{{ url "https://github.com/continuedev/continue" }}}` - URL 的内容

View file

@ -8,13 +8,13 @@ Continue 可以深度定制。这个主要通过编辑位于 `~/.continue/config
## 开始
要打开 `config.json` ,在 Continue 聊天侧边栏的右下角点击 "齿轮" 图标。当编辑这个文件时,你可以使用 IntelliSense ,随着你的输入来查看有效的选项,或者你可以查看 [完整参考](../reference.md) 。
要打开 `config.json` ,在 Continue 聊天侧边栏的右下角点击 "齿轮" 图标。当编辑这个文件时,你可以使用 IntelliSense ,随着你的输入来查看有效的选项,或者你可以查看 [完整参考](../json-reference.md) 。
当你保存 `config.json` 时, Continue 会自动地刷新,应用你的变更。
## 每个工作区的配置
如果你想要限制指定的配置到一个特定的工作区,你可以添加一个 `.continuerc.json` 到你的项目根目录。它有和 `config.json` 相同的 [定义](../reference.md) ,会自动地应用到本地 `config.json` 之上。
如果你想要限制指定的配置到一个特定的工作区,你可以添加一个 `.continuerc.json` 到你的项目根目录。它有和 `config.json` 相同的 [定义](../json-reference.md) ,会自动地应用到本地 `config.json` 之上。
## 可编程的配置

View file

@ -7,4 +7,4 @@ keywords: [编辑, cmd l, 模型]
默认情况下,编辑使用 [与聊天相同的模型](../chat/model-setup.mdx) ,所以对于代码编辑,我们推荐相同的 400B+ 参数模型或者领先的模型之一。
你可以通过更新你的 [`config.json`](../reference.md) 为编辑配置一个不同的模型。
你可以通过更新你的 [`config.json`](../json-reference.md) 为编辑配置一个不同的模型。

View file

@ -138,11 +138,11 @@ const sidebars = {
label: "Reference",
href: "/reference",
},
// {
// type: "link",
// label: "YAML Reference",
// href: "/yaml-reference",
// },
{
type: "link",
label: "JSON Reference",
href: "/json-reference",
},
// {
// type: "link",
// label: "YAML Migration",