Context Providers
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.
Built-in Context Providers
To use any of the built-in context providers, open ~/.continue/config.json
and add it to the contextProviders
list.
Code
Type '@code' to reference specific functions or classes from throughout your project.
{ "name": "code" }
Git Diff
Type '@diff' to 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.
{ "name": "diff" }
Terminal
Type '@terminal' to reference the contents of your IDE's terminal.
{ "name": "terminal" }
Documentation
Type @docs
to index and retrieve snippets from any documentation site. You can add any site by selecting "Add Docs" in the dropdown, then entering the root URL of the documentation site and a title to remember it by. After the site has been indexed, you can type @docs
, select your documentation from the dropdown, and Continue will use similarity search to automatically find important sections when answering your question.
{ "name": "docs" }
Continue also pre-indexes a number of common sites, listed here. The embeddings for these sites are hosted by us, but downloaded for local use after the first time. All other indexing occurs entirely locally.
Open Files
Type '@open' to reference the contents of all of your open files. Set onlyPinned
to true
to only reference pinned files.
{ "name": "open", "params": { "onlyPinned": true } }
Codebase Retrieval
Type '@codebase' to automatically retrieve the most relevant snippets from your codebase. Read more about indexing and retrieval here.
{ "name": "codebase" }
Folders
Type '@folder' to use the same retrieval mechanism as '@codebase', but only on a single folder.
{ "name": "folder" }
Exact Search
Type '@search' to reference the results of codebase search, just like the results you would get from VS Code search. This context provider is powered by ripgrep.
{ "name": "search" }
URL
Type '@url' and input a URL, then Continue will convert it to a markdown document to pass to the model.
{ "name": "url" }
File Tree
Type '@tree' to reference the structure of your current workspace. The LLM will be able to see the nested directory structure of your project.
{ "name": "tree" }
Google
Type '@google' to reference the results of a Google search. For example, type "@google python tutorial" if you want to search and discuss ways of learning Python.
{
"name": "google",
"params": { "serperApiKey": "<your serper.dev api key>" }
}
Note: You can get an API key for free at serper.dev.