| 1 | --- |
| 2 | title: "@Docs (Deprecated)" |
| 3 | description: Deprecated documentation context provider - use the new documentation awareness approach instead |
| 4 | keywords: [deprecated, documentation, docs, context, embeddings, legacy] |
| 5 | noindex: true |
| 6 | --- |
| 7 | |
| 8 | <Warning> |
| 9 | **This feature is deprecated.** The `@Docs` context provider has been deprecated in favor of a more integrated approach to documentation awareness. Please refer to our [Guide on Making Agents Aware of Codebases and Documentation](/guides/codebase-documentation-awareness) for the recommended approach. |
| 10 | </Warning> |
| 11 | |
| 12 | ## Migration Guide |
| 13 | |
| 14 | If you're currently using the `@Docs` context provider, please migrate to the new approach outlined in our [codebase and documentation awareness guide](/guides/codebase-documentation-awareness). The new approach provides: |
| 15 | |
| 16 | - Better integration with Continue's Agent features |
| 17 | - More intelligent context selection |
| 18 | - Improved performance and accuracy |
| 19 | |
| 20 | ## Legacy Documentation |
| 21 | |
| 22 | **Below is the original documentation for the `@Docs` context provider, preserved for reference** |
| 23 | |
| 24 | The `@Docs` context provider allows you to efficiently reference documentation directly within Continue. |
| 25 | |
| 26 | ## How to Enable the @Docs Context Provider |
| 27 | |
| 28 | To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file. |
| 29 | |
| 30 | <Tabs> |
| 31 | <Tab title="YAML"> |
| 32 | ```yaml title="config.yaml" |
| 33 | context: |
| 34 | - provider: docs |
| 35 | ``` |
| 36 | </Tab> |
| 37 | <Tab title="JSON"> |
| 38 | ```json title="config.json" |
| 39 | { |
| 40 | "contextProviders": [ |
| 41 | { |
| 42 | "name": "docs" |
| 43 | } |
| 44 | ] |
| 45 | } |
| 46 | ``` |
| 47 | </Tab> |
| 48 | </Tabs> |
| 49 | |
| 50 | ## How the @Docs Context Provider Works |
| 51 | |
| 52 | The `@Docs` context provider works by |
| 53 | |
| 54 | 1. Crawling specified documentation sites |
| 55 | 2. Generating embeddings for the chunked content |
| 56 | 3. Storing the embeddings locally on your machine |
| 57 | 4. Embedding chat input to include similar documentation chunks as context |
| 58 | |
| 59 | ## How to Index Your Own Documentation |
| 60 | |
| 61 | **Note:** Documentation configuration should now be done directly in your `config.yaml` file. The previous `docs` blocks functionality has been deprecated. |
| 62 | |
| 63 | ### How to Add Documentation Through the @Docs Context Provider |
| 64 | |
| 65 | To add a single documentation site, we recommend using the **Add Documentation** Form within the GUI. This can be accessed |
| 66 | |
| 67 | - from the `@Docs` context provider - type `@Docs` in the chat, hit `Enter`, and search for `Add Docs` |
| 68 | - from the `More` page (three dots icon) in the `@docs indexes` section |
| 69 | the `@Docs` context provider. |
| 70 | |
| 71 | In the **Add Documentation** Form, enter a `Title` and `Start URL` for the site. |
| 72 | |
| 73 | - `Title`: The name of the documentation site, used for identification in the UI. |
| 74 | - `Start URL`: The URL where the indexing process should begin. |
| 75 | |
| 76 | Indexing will begin upon submission. Progress can be viewed in the form or later in the `@docs indexes` section of the `More` page. |
| 77 | |
| 78 | Documentation sources may be suggested based on package files in your repo. This currently works for Python `requirements.txt` files and Node.js (Javascript/Typescript) `package.json` files. |
| 79 | |
| 80 | - Packages with a valid documentation URL (with a `+` icon) can be clicked to immediately kick off indexing |
| 81 | - Packages with partial information (with a pen icon) can be clicked to fill the form with the available information |
| 82 | - Note that you can hover over the information icon to see where the package suggestion was found. |
| 83 | |
| 84 |  |
| 85 | |
| 86 | ### How to Add Documentation in Configuration Files |
| 87 | |
| 88 | For bulk documentation site adds or edits, we recommend editing your global configuration file directly. Documentation sites are stored in an array within `docs` in your global configuration, as follows: |
| 89 | |
| 90 | <Tabs> |
| 91 | <Tab title="YAML"> |
| 92 | ```yaml title="config.yaml" |
| 93 | docs: |
| 94 | - title: Nest.js |
| 95 | startUrl: https://docs.nestjs.com/ |
| 96 | faviconUrl: https://docs.nestjs.com/favicon.ico |
| 97 | ``` |
| 98 | </Tab> |
| 99 | <Tab title="JSON"> |
| 100 | ```json title="config.json" |
| 101 | { |
| 102 | "docs": [ |
| 103 | { |
| 104 | "title": "Nest.js", |
| 105 | "startUrl": "https://docs.nestjs.com/", |
| 106 | "faviconUrl": "https://docs.nestjs.com/favicon.ico" |
| 107 | } |
| 108 | ] |
| 109 | } |
| 110 | ``` |
| 111 | </Tab> |
| 112 | </Tabs> |
| 113 | |
| 114 | See [the config reference](/reference) for all documentation site configuration options. |
| 115 | |
| 116 | Indexing will re-sync upon saving the configuration file. |
| 117 | |
| 118 | ## How to Configure @Docs Advanced Settings |
| 119 | |
| 120 | ### How to Use Your Custom Embeddings Provider |
| 121 | |
| 122 | If you have set up an [embeddings provider](../customize/model-roles/embeddings.mdx), @docs will use your embeddings provider. Switching embeddings providers will trigger a re-index of all documentation sites in your configuration. |
| 123 | |
| 124 | ### How to Configure Reranking for Better Results |
| 125 | |
| 126 | As with [@Codebase context provider configuration](./deprecated-codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`. |
| 127 | |
| 128 | <Tabs> |
| 129 | <Tab title="YAML"> |
| 130 | ```yaml title="config.yaml" |
| 131 | context: |
| 132 | - provider: docs |
| 133 | params: |
| 134 | nRetrieve: 25 # The number of docs to retrieve from the embeddings query |
| 135 | nFinal: 5 # The number of docs chunks to return IF reranking |
| 136 | useReranking: true # use reranking if a reranker is configured (defaults to true) |
| 137 | ``` |
| 138 | </Tab> |
| 139 | <Tab title="JSON"> |
| 140 | ```json title="config.json" |
| 141 | { |
| 142 | "contextProviders": [ |
| 143 | { |
| 144 | "name": "docs", |
| 145 | "params": { |
| 146 | "nRetrieve": 25, // The number of docs to retrieve from the embeddings query |
| 147 | "nFinal": 5, // The number of docs chunks to return IF reranking |
| 148 | "useReranking": true // use reranking if a reranker is configured (defaults to true) |
| 149 | } |
| 150 | } |
| 151 | ] |
| 152 | } |
| 153 | ``` |
| 154 | </Tab> |
| 155 | </Tabs> |
| 156 | |
| 157 | ### How to Set Up GitHub Token for GitHub Documentation |
| 158 | |
| 159 | The GitHub API rate limits public requests to 60 per hour. If you want to reliably index GitHub repos, you can add a github token to your config file: |
| 160 | |
| 161 | <Tabs> |
| 162 | <Tab title="YAML"> |
| 163 | ```yaml title="config.yaml" |
| 164 | context: |
| 165 | - provider: docs |
| 166 | params: |
| 167 | githubToken: <GITHUB_TOKEN> |
| 168 | ``` |
| 169 | </Tab> |
| 170 | <Tab title="JSON"> |
| 171 | ```json title="config.json" |
| 172 | { |
| 173 | "contextProviders": [ |
| 174 | { |
| 175 | "name": "docs", |
| 176 | "params": { |
| 177 | "githubToken": "github_..." |
| 178 | } |
| 179 | } |
| 180 | ] |
| 181 | } |
| 182 | ``` |
| 183 | </Tab> |
| 184 | </Tabs> |
| 185 | |
| 186 | ### How to Enable Local Crawling for Private Documentation |
| 187 | |
| 188 | By default, Continue crawls documentation sites using a specialized crawling service that provides the best experience for most users and documentation sites. |
| 189 | |
| 190 | If your documentation is private, you can skip the default crawler and use a local crawler instead by setting `useLocalCrawling` to `true`. |
| 191 | |
| 192 | <Tabs> |
| 193 | <Tab title="YAML"> |
| 194 | ```yaml title="config.yaml" |
| 195 | docs: |
| 196 | - title: My Private Docs |
| 197 | startUrl: http://10.2.1.2/docs |
| 198 | faviconUrl: http://10.2.1.2/docs/assets/favicon.ico, |
| 199 | useLocalCrawling: true |
| 200 | ``` |
| 201 | </Tab> |
| 202 | <Tab title="JSON"> |
| 203 | ```json title="config.json" |
| 204 | { |
| 205 | "docs": [ |
| 206 | { |
| 207 | "title": "My Private Docs", |
| 208 | "startUrl": "http://10.2.1.2/docs", |
| 209 | "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico", |
| 210 | "useLocalCrawling": true |
| 211 | } |
| 212 | ] |
| 213 | } |
| 214 | ``` |
| 215 | </Tab> |
| 216 | </Tabs> |
| 217 | |
| 218 | <Info> |
| 219 | The default local crawler is a lightweight tool that cannot render sites that |
| 220 | are dynamically generated using JavaScript. If your sites need to be rendered, |
| 221 | you can enable the experimental `Use Chromium for Docs Crawling` feature from |
| 222 | your User Settings Page. This will download and install Chromium |
| 223 | to `~/.continue/.utils`, and use it as the local crawler. **Note:** Chromium |
| 224 | crawling support is being deprecated and may be removed in future versions. |
| 225 | </Info> |
| 226 | |
| 227 | Further notes: |
| 228 | |
| 229 | - If the site is only locally accessible, the default crawler will fail anyways and fall back to the local crawler. `useLocalCrawling` is especially useful if the URL itself is confidential. |
| 230 | - For GitHub Repos this has no effect because only the GitHub Crawler will be used, and if the repo is private it can only be accessed with a priveleged GitHub token anyways. |
| 231 | |
| 232 | ## How to Manage Your Documentation Indexes |
| 233 | |
| 234 | You can view indexing statuses and manage your documentation sites from the `@docs indexes` section of the `More` page (three dots) |
| 235 | |
| 236 | - Continue does not automatically re-index your docs. Use `Click to re-index` to trigger a reindex for a specific source |
| 237 | - While a site is indexing, click `Cancel indexing` to cancel the process |
| 238 | - Failed indexing attempts will show an error status bar and icon |
| 239 | - Delete a documentation site from your configuration using the trash icon |
| 240 | |
| 241 |  |
| 242 | |
| 243 | You can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page |
| 244 | |
| 245 |  |
| 246 | |
| 247 | You can also use the following IDE command to force a re-index of all docs: `Continue: Docs Force Re-Index`. |
| 248 | |
| 249 | ## Configuration Examples for Different Setups |
| 250 | |
| 251 | ### How to Set Up @Docs in VS Code (Minimal Configuration) |
| 252 | |
| 253 | The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking. |
| 254 | |
| 255 | <Tabs> |
| 256 | <Tab title="YAML"> |
| 257 | ```yaml title="config.yaml" |
| 258 | context: |
| 259 | - provider: docs |
| 260 | |
| 261 | docs: |
| 262 | - title: Nest.js |
| 263 | startUrl: https://docs.nestjs.com/ |
| 264 | ``` |
| 265 | </Tab> |
| 266 | <Tab title="JSON"> |
| 267 | ```json title="config.json" |
| 268 | { |
| 269 | "contextProviders": [ |
| 270 | { |
| 271 | "name": "docs", |
| 272 | } |
| 273 | ], |
| 274 | "docs": [ |
| 275 | { |
| 276 | "title": "Nest.js", |
| 277 | "startUrl": "https://docs.nestjs.com/", |
| 278 | }, |
| 279 | ] |
| 280 | } |
| 281 | ``` |
| 282 | </Tab> |
| 283 | </Tabs> |
| 284 | |
| 285 | ### How to Set Up @Docs in JetBrains IDEs (Minimal Configuration) |
| 286 | |
| 287 | Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../customize/model-roles/embeddings.mdx). |
| 288 | |
| 289 | <Tabs> |
| 290 | <Tab title="YAML"> |
| 291 | ```yaml title="config.yaml" |
| 292 | models: |
| 293 | - name: LMStudio embedder |
| 294 | provider: lmstudio |
| 295 | model: nomic-ai/nomic-embed-text-v1.5-GGUF |
| 296 | roles: |
| 297 | - embed |
| 298 | context: |
| 299 | - provider: docs |
| 300 | docs: |
| 301 | - title: Nest.js |
| 302 | startUrl: https://docs.nestjs.com/ |
| 303 | ``` |
| 304 | </Tab> |
| 305 | <Tab title="JSON"> |
| 306 | ```json title="config.json" |
| 307 | { |
| 308 | "contextProviders": [ |
| 309 | { |
| 310 | "name": "docs", |
| 311 | } |
| 312 | ], |
| 313 | "docs": [ |
| 314 | { |
| 315 | "title": "Nest.js", |
| 316 | "startUrl": "https://docs.nestjs.com/", |
| 317 | }, |
| 318 | ], |
| 319 | "embeddingsProvider": { |
| 320 | "provider": "lmstudio", |
| 321 | "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" |
| 322 | } |
| 323 | } |
| 324 | ``` |
| 325 | </Tab> |
| 326 | </Tabs> |
| 327 | |
| 328 | ### How to Set Up @Docs with Advanced Features (VS Code or JetBrains) |
| 329 | |
| 330 | The following configuration example includes: |
| 331 | |
| 332 | - Examples of both public and private documentation sources |
| 333 | - A custom embeddings provider |
| 334 | - A reranker model available, with reranking parameters customized |
| 335 | - A GitHub token to enable GitHub crawling |
| 336 | |
| 337 | <Tabs> |
| 338 | <Tab title="YAML"> |
| 339 | ```yaml title="config.yaml" |
| 340 | models: |
| 341 | - name: LMStudio Nomic Text |
| 342 | provider: lmstudio |
| 343 | model: nomic-ai/nomic-embed-text-v1.5-GGUF |
| 344 | roles: |
| 345 | - embed |
| 346 | - name: Voyage Rerank-2 |
| 347 | provider: voyage |
| 348 | apiKey: <VOYAGE_API_KEY> |
| 349 | model: rerank-2 |
| 350 | roles: |
| 351 | - rerank |
| 352 | context: |
| 353 | - provider: docs |
| 354 | params: |
| 355 | githubToken: <GITHUB_TOKEN> |
| 356 | nRetrieve: 25 |
| 357 | nFinal: 5 |
| 358 | useReranking: true |
| 359 | docs: |
| 360 | - title: Nest.js |
| 361 | startUrl: https://docs.nestjs.com/ |
| 362 | - title: My Private Docs |
| 363 | startUrl: http://10.2.1.2/docs |
| 364 | faviconUrl: http://10.2.1.2/docs/assets/favicon.ico |
| 365 | useLocalCrawling: true |
| 366 | ``` |
| 367 | </Tab> |
| 368 | <Tab title="JSON"> |
| 369 | ```json title="config.json" |
| 370 | { |
| 371 | "contextProviders": [ |
| 372 | { |
| 373 | "name": "docs", |
| 374 | "params": { |
| 375 | "githubToken": "github_...", |
| 376 | "nRetrieve": 25, |
| 377 | "nFinal": 5, |
| 378 | "useReranking": true |
| 379 | } |
| 380 | } |
| 381 | ], |
| 382 | "docs": [ |
| 383 | { |
| 384 | "title": "Nest.js", |
| 385 | "startUrl": "https://docs.nestjs.com/" |
| 386 | }, |
| 387 | { |
| 388 | "title": "My Private Docs", |
| 389 | "startUrl": "http://10.2.1.2/docs", |
| 390 | "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico", |
| 391 | "maxDepth": 4, |
| 392 | "useLocalCrawling": true |
| 393 | } |
| 394 | ], |
| 395 | "reranker": { |
| 396 | "name": "voyage", |
| 397 | "params": { |
| 398 | "model": "rerank-2", |
| 399 | "apiKey": "<YOUR_VOYAGE_API_KEY>" |
| 400 | } |
| 401 | }, |
| 402 | "embeddingsProvider": { |
| 403 | "provider": "lmstudio", |
| 404 | "model": "nomic-ai/nomic-embed-text-v1.5-GGUF" |
| 405 | } |
| 406 | } |
| 407 | ``` |
| 408 | </Tab> |
| 409 | </Tabs> |
| 410 | |
| 411 | This setup could also involve enabling Chromium as a backup for local documentation through the User Settings Page (Gear Icon). |