| 1 | --- |
| 2 | title: "Context Providers" |
| 3 | description: "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." |
| 4 | --- |
| 5 | |
| 6 | 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. |
| 7 | |
| 8 |  |
| 9 | |
| 10 | ## Context blocks[](#context-blocks "Direct link to Context blocks") |
| 11 | |
| 12 | You can add context providers to assistants using [`context` blocks](/hub/blocks/block-types#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context). |
| 13 | |
| 14 | ## Built-in Context Providers[](#built-in-context-providers "Direct link to Built-in Context Providers") |
| 15 | |
| 16 | You can add any built-in context-providers in your config file as shown below: |
| 17 | |
| 18 | ### `@File`[](#file "Direct link to file") |
| 19 | |
| 20 | Reference any file in your current workspace. |
| 21 | |
| 22 | - YAML |
| 23 | - JSON |
| 24 | |
| 25 | config.yaml |
| 26 | |
| 27 | ``` |
| 28 | context: - provider: file |
| 29 | ``` |
| 30 | |
| 31 | config.json |
| 32 | |
| 33 | ```json |
| 34 | { "contextProviders": [{ "name": "file" }] } |
| 35 | ``` |
| 36 | |
| 37 | ### `@Code`[](#code "Direct link to code") |
| 38 | |
| 39 | Reference specific functions or classes from throughout your project. |
| 40 | |
| 41 | - YAML |
| 42 | - JSON |
| 43 | |
| 44 | config.yaml |
| 45 | |
| 46 | ``` |
| 47 | context: - provider: code |
| 48 | ``` |
| 49 | |
| 50 | config.json |
| 51 | |
| 52 | ```json |
| 53 | { "contextProviders": [{ "name": "code" }] } |
| 54 | ``` |
| 55 | |
| 56 | ### `@Git Diff`[](#git-diff "Direct link to git-diff") |
| 57 | |
| 58 | 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. |
| 59 | |
| 60 | - YAML |
| 61 | - JSON |
| 62 | |
| 63 | config.yaml |
| 64 | |
| 65 | ``` |
| 66 | context: - provider: diff |
| 67 | ``` |
| 68 | |
| 69 | config.json |
| 70 | |
| 71 | ```json |
| 72 | { "contextProviders": [{ "name": "diff" }] } |
| 73 | ``` |
| 74 | |
| 75 | ### `@Current File`[](#current-file "Direct link to current-file") |
| 76 | |
| 77 | Reference the currently open file. |
| 78 | |
| 79 | - YAML |
| 80 | - JSON |
| 81 | |
| 82 | config.yaml |
| 83 | |
| 84 | ``` |
| 85 | context: - provider: currentFile |
| 86 | ``` |
| 87 | |
| 88 | config.json |
| 89 | |
| 90 | ```json |
| 91 | { "contextProviders": [{ "name": "currentFile" }] } |
| 92 | ``` |
| 93 | |
| 94 | ### `@Terminal`[](#terminal "Direct link to terminal") |
| 95 | |
| 96 | Reference the last command you ran in your IDE's terminal and its output. |
| 97 | |
| 98 | - YAML |
| 99 | - JSON |
| 100 | |
| 101 | config.yaml |
| 102 | |
| 103 | ``` |
| 104 | context: - provider: terminal |
| 105 | ``` |
| 106 | |
| 107 | config.json |
| 108 | |
| 109 | ```json |
| 110 | { "contextProviders": [{ "name": "terminal" }] } |
| 111 | ``` |
| 112 | |
| 113 | ### `@Docs`[](#docs "Direct link to docs") |
| 114 | |
| 115 | Reference the contents from any documentation site. |
| 116 | |
| 117 | - YAML |
| 118 | - JSON |
| 119 | |
| 120 | config.yaml |
| 121 | |
| 122 | ``` |
| 123 | context: - provider: docs |
| 124 | ``` |
| 125 | |
| 126 | config.json |
| 127 | |
| 128 | ```json |
| 129 | { "contextProviders": [{ "name": "docs" }] } |
| 130 | ``` |
| 131 | |
| 132 | Note that this will only enable the `@Docs` context provider. |
| 133 | |
| 134 | To use it, you need to add a documentation site to your config file. See the [docs](/customization/overview#documentation-context) page for more information. |
| 135 | |
| 136 | ### `@Open`[](#open "Direct link to open") |
| 137 | |
| 138 | Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files. |
| 139 | |
| 140 | - YAML |
| 141 | - JSON |
| 142 | |
| 143 | config.yaml |
| 144 | |
| 145 | ``` |
| 146 | context: - provider: open params: onlyPinned: true |
| 147 | ``` |
| 148 | |
| 149 | config.json |
| 150 | |
| 151 | ```json |
| 152 | { "contextProviders": [{ "name": "open", "params": { "onlyPinned": true } }] } |
| 153 | ``` |
| 154 | |
| 155 | ### `@Web`[](#web "Direct link to web") |
| 156 | |
| 157 | Reference relevant pages from across the web, automatically determined from your input. |
| 158 | |
| 159 | Optionally, set `n` to limit the number of results returned (default 6). |
| 160 | |
| 161 | - YAML |
| 162 | - JSON |
| 163 | |
| 164 | config.yaml |
| 165 | |
| 166 | ``` |
| 167 | context: - provider: web params: n: 5 |
| 168 | ``` |
| 169 | |
| 170 | config.json |
| 171 | |
| 172 | ```json |
| 173 | { "contextProviders": [{ "name": "web", "params": { "n": 5 } }] } |
| 174 | ``` |
| 175 | |
| 176 | ### `@Codebase`[](#codebase "Direct link to codebase") |
| 177 | |
| 178 | Reference the most relevant snippets from your codebase. |
| 179 | |
| 180 | - YAML |
| 181 | - JSON |
| 182 | |
| 183 | config.yaml |
| 184 | |
| 185 | ``` |
| 186 | context: - provider: codebase |
| 187 | ``` |
| 188 | |
| 189 | config.json |
| 190 | |
| 191 | ```json |
| 192 | { "contextProviders": [{ "name": "codebase" }] } |
| 193 | ``` |
| 194 | |
| 195 | Read more about indexing and retrieval [here](/customization/overview#codebase-context). |
| 196 | |
| 197 | ### `@Folder`[](#folder "Direct link to folder") |
| 198 | |
| 199 | Uses the same retrieval mechanism as `@Codebase`, but only on a single folder. |
| 200 | |
| 201 | - YAML |
| 202 | - JSON |
| 203 | |
| 204 | config.yaml |
| 205 | |
| 206 | ``` |
| 207 | context: - provider: folder |
| 208 | ``` |
| 209 | |
| 210 | config.json |
| 211 | |
| 212 | ```json |
| 213 | { "contextProviders": [{ "name": "folder" }] } |
| 214 | ``` |
| 215 | |
| 216 | ### `@Search`[](#search "Direct link to search") |
| 217 | |
| 218 | Reference the results of codebase search, just like the results you would get from VS Code search. |
| 219 | |
| 220 | - YAML |
| 221 | - JSON |
| 222 | |
| 223 | config.yaml |
| 224 | |
| 225 | ``` |
| 226 | context: - provider: search params: maxResults: 100 # optional, defaults to 200 |
| 227 | ``` |
| 228 | |
| 229 | config.json |
| 230 | |
| 231 | ```json |
| 232 | { "contextProviders": [ { "name": "search", "params": { "maxResults": 100 // optional, defaults to 200 } } ]} |
| 233 | ``` |
| 234 | |
| 235 | This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep). |
| 236 | |
| 237 | ### `@Url`[](#url "Direct link to url") |
| 238 | |
| 239 | Reference the markdown converted contents of a given URL. |
| 240 | |
| 241 | - YAML |
| 242 | - JSON |
| 243 | |
| 244 | config.yaml |
| 245 | |
| 246 | ``` |
| 247 | context: - provider: url |
| 248 | ``` |
| 249 | |
| 250 | config.json |
| 251 | |
| 252 | ```json |
| 253 | { "contextProviders": [{ "name": "url" }] } |
| 254 | ``` |
| 255 | |
| 256 | ### `@Clipboard`[](#clipboard "Direct link to clipboard") |
| 257 | |
| 258 | Reference recent clipboard items |
| 259 | |
| 260 | - YAML |
| 261 | - JSON |
| 262 | |
| 263 | config.yaml |
| 264 | |
| 265 | ``` |
| 266 | context: - provider: clipboard |
| 267 | ``` |
| 268 | |
| 269 | config.json |
| 270 | |
| 271 | ```json |
| 272 | { "contextProviders": [{ "name": "clipboard" }] } |
| 273 | ``` |
| 274 | |
| 275 | ### `@Tree`[](#tree "Direct link to tree") |
| 276 | |
| 277 | Reference the structure of your current workspace. |
| 278 | |
| 279 | - YAML |
| 280 | - JSON |
| 281 | |
| 282 | config.yaml |
| 283 | |
| 284 | ``` |
| 285 | context: - provider: tree |
| 286 | ``` |
| 287 | |
| 288 | config.json |
| 289 | |
| 290 | ```json |
| 291 | { "contextProviders": [{ "name": "tree" }] } |
| 292 | ``` |
| 293 | |
| 294 | ### `@Problems`[](#problems "Direct link to problems") |
| 295 | |
| 296 | Get Problems from the current file. |
| 297 | |
| 298 | - YAML |
| 299 | - JSON |
| 300 | |
| 301 | config.yaml |
| 302 | |
| 303 | ``` |
| 304 | context: - provider: problems |
| 305 | ``` |
| 306 | |
| 307 | config.json |
| 308 | |
| 309 | ```json |
| 310 | { "contextProviders": [{ "name": "problems" }] } |
| 311 | ``` |
| 312 | |
| 313 | ### `@Debugger`[](#debugger "Direct link to debugger") |
| 314 | |
| 315 | Reference the contents of the local variables in the debugger. Currently only available in VS Code. |
| 316 | |
| 317 | - YAML |
| 318 | - JSON |
| 319 | |
| 320 | config.yaml |
| 321 | |
| 322 | ``` |
| 323 | context: - provider: debugger params: stackDepth: 3 |
| 324 | ``` |
| 325 | |
| 326 | config.json |
| 327 | |
| 328 | ```json |
| 329 | { "contextProviders": [{ "name": "debugger", "params": { "stackDepth": 3 } }] } |
| 330 | ``` |
| 331 | |
| 332 | Uses the top _n_ levels (defaulting to 3) of the call stack for that thread. |
| 333 | |
| 334 | ### `@Repository Map`[](#repository-map "Direct link to repository-map") |
| 335 | |
| 336 | Reference the outline of your codebase. By default, signatures are included along with file in the repo map. |
| 337 | |
| 338 | `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. |
| 339 | |
| 340 | - YAML |
| 341 | - JSON |
| 342 | |
| 343 | config.yaml |
| 344 | |
| 345 | ``` |
| 346 | context: - provider: repo-map params: includeSignatures: false # default true |
| 347 | ``` |
| 348 | |
| 349 | config.json |
| 350 | |
| 351 | ```json |
| 352 | { "contextProviders": [ { "name": "repo-map", "params": { "includeSignatures": false // default true } } ]} |
| 353 | ``` |
| 354 | |
| 355 | 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. |
| 356 | |
| 357 | In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from. |
| 358 | |
| 359 | This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html). |
| 360 | |
| 361 | ### `@Operating System`[](#operating-system "Direct link to operating-system") |
| 362 | |
| 363 | Reference the architecture and platform of your current operating system. |
| 364 | |
| 365 | - YAML |
| 366 | - JSON |
| 367 | |
| 368 | config.yaml |
| 369 | |
| 370 | ``` |
| 371 | context: - provider: os |
| 372 | ``` |
| 373 | |
| 374 | config.json |
| 375 | |
| 376 | ```json |
| 377 | { "contextProviders": [{ "name": "os" }] } |
| 378 | ``` |
| 379 | |
| 380 | ### Model Context Protocol[](#model-context-protocol "Direct link to Model Context Protocol") |
| 381 | |
| 382 | 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: |
| 383 | |
| 384 | - YAML |
| 385 | - JSON |
| 386 | |
| 387 | config.yaml |
| 388 | |
| 389 | ``` |
| 390 | mcpServers: - name: My MCP Server command: uvx args: - mcp-server-sqlite - --db-path - /Users/NAME/test.db |
| 391 | ``` |
| 392 | |
| 393 | config.json |
| 394 | |
| 395 | ```json |
| 396 | { |
| 397 | "experimental": { |
| 398 | "modelContextProtocolServers": [ |
| 399 | { |
| 400 | "transport": { |
| 401 | "type": "stdio", |
| 402 | "command": "uvx", |
| 403 | "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"] |
| 404 | } |
| 405 | } |
| 406 | ] |
| 407 | } |
| 408 | } |
| 409 | ``` |
| 410 | |
| 411 | You'll then be able to type "@" and see "MCP" in the context providers dropdown. |
| 412 | |
| 413 | ### `@Issue`[](#issue "Direct link to issue") |
| 414 | |
| 415 | Reference the conversation in a GitHub issue. |
| 416 | |
| 417 | - YAML |
| 418 | - JSON |
| 419 | |
| 420 | config.yaml |
| 421 | |
| 422 | ``` |
| 423 | context: - provider: issue params: repos: - owner: continuedev repo: continue githubToken: ghp_xxx |
| 424 | ``` |
| 425 | |
| 426 | config.json |
| 427 | |
| 428 | ```json |
| 429 | { |
| 430 | "contextProviders": [ |
| 431 | { |
| 432 | "name": "issue", |
| 433 | "params": { |
| 434 | "repos": [{ "owner": "continuedev", "repo": "continue" }], |
| 435 | "githubToken": "ghp_xxx" |
| 436 | } |
| 437 | } |
| 438 | ] |
| 439 | } |
| 440 | ``` |
| 441 | |
| 442 | 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. |
| 443 | |
| 444 | ### `@Database`[](#database "Direct link to database") |
| 445 | |
| 446 | Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases. |
| 447 | |
| 448 | - YAML |
| 449 | - JSON |
| 450 | |
| 451 | config.yaml |
| 452 | |
| 453 | ``` |
| 454 | context: - provider: 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 |
| 455 | ``` |
| 456 | |
| 457 | config.json |
| 458 | |
| 459 | ```json |
| 460 | { |
| 461 | "contextProviders": [ |
| 462 | { |
| 463 | "name": "database", |
| 464 | "params": { |
| 465 | "connections": [ |
| 466 | { |
| 467 | "name": "examplePostgres", |
| 468 | "connection_type": "postgres", |
| 469 | "connection": { |
| 470 | "user": "username", |
| 471 | "host": "localhost", |
| 472 | "database": "exampleDB", |
| 473 | "password": "yourPassword", |
| 474 | "port": 5432 |
| 475 | } |
| 476 | }, |
| 477 | { |
| 478 | "name": "exampleMssql", |
| 479 | "connection_type": "mssql", |
| 480 | "connection": { |
| 481 | "user": "username", |
| 482 | "server": "localhost", |
| 483 | "database": "exampleDB", |
| 484 | "password": "yourPassword" |
| 485 | } |
| 486 | }, |
| 487 | { |
| 488 | "name": "exampleSqlite", |
| 489 | "connection_type": "sqlite", |
| 490 | "connection": { "filename": "/path/to/your/sqlite/database.db" } |
| 491 | } |
| 492 | ] |
| 493 | } |
| 494 | } |
| 495 | ] |
| 496 | } |
| 497 | ``` |
| 498 | |
| 499 | Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type. |
| 500 | |
| 501 | Available connection types: |
| 502 | |
| 503 | - `postgres` |
| 504 | - `mysql` |
| 505 | - `sqlite` |
| 506 | |
| 507 | ### `@Postgres`[](#postgres "Direct link to postgres") |
| 508 | |
| 509 | Reference the schema of a table, and some sample rows |
| 510 | |
| 511 | - YAML |
| 512 | - JSON |
| 513 | |
| 514 | config.yaml |
| 515 | |
| 516 | ``` |
| 517 | context: - provider: postgres params: host: localhost port: 5436 user: myuser password: catsarecool database: animals schema: public sampleRows: 3 |
| 518 | ``` |
| 519 | |
| 520 | config.json |
| 521 | |
| 522 | ```json |
| 523 | { |
| 524 | "contextProviders": [ |
| 525 | { |
| 526 | "name": "postgres", |
| 527 | "params": { |
| 528 | "host": "localhost", |
| 529 | "port": 5436, |
| 530 | "user": "myuser", |
| 531 | "password": "catsarecool", |
| 532 | "database": "animals", |
| 533 | "schema": "public", |
| 534 | "sampleRows": 3 |
| 535 | } |
| 536 | } |
| 537 | ] |
| 538 | } |
| 539 | ``` |
| 540 | |
| 541 | The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`. |
| 542 | |
| 543 | 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. |
| 544 | |
| 545 | [Here is a short demo.](https://github.com/continuedev/continue/pull/859) |
| 546 | |
| 547 | ### `@Google`[](#google "Direct link to google") |
| 548 | |
| 549 | Reference the results of a Google search. |
| 550 | |
| 551 | - YAML |
| 552 | - JSON |
| 553 | |
| 554 | config.yaml |
| 555 | |
| 556 | ``` |
| 557 | context: - provider: google params: serperApiKey: <YOUR_SERPER.DEV_API_KEY> |
| 558 | ``` |
| 559 | |
| 560 | config.json |
| 561 | |
| 562 | ```json |
| 563 | { |
| 564 | "contextProviders": [ |
| 565 | { |
| 566 | "name": "google", |
| 567 | "params": { "serperApiKey": "<YOUR_SERPER.DEV_API_KEY>" } |
| 568 | } |
| 569 | ] |
| 570 | } |
| 571 | ``` |
| 572 | |
| 573 | For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python. |
| 574 | |
| 575 | Note: You can get an API key for free at [serper.dev](https://serper.dev). |
| 576 | |
| 577 | ### `@Gitlab Merge Request`[](#gitlab-merge-request "Direct link to gitlab-merge-request") |
| 578 | |
| 579 | Reference an open MR for this branch on GitLab. |
| 580 | |
| 581 | - YAML |
| 582 | - JSON |
| 583 | |
| 584 | config.yaml |
| 585 | |
| 586 | ``` |
| 587 | context: - provider: gitlab-mr params: token: "..." |
| 588 | ``` |
| 589 | |
| 590 | config.json |
| 591 | |
| 592 | ```json |
| 593 | { "contextProviders": [{ "name": "gitlab-mr", "params": { "token": "..." } }] } |
| 594 | ``` |
| 595 | |
| 596 | 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. |
| 597 | |
| 598 | #### Using Self-Hosted GitLab[](#using-self-hosted-gitlab "Direct link to Using Self-Hosted GitLab") |
| 599 | |
| 600 | You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`. |
| 601 | |
| 602 | - YAML |
| 603 | - JSON |
| 604 | |
| 605 | config.yaml |
| 606 | |
| 607 | ``` |
| 608 | context: - provider: gitlab-mr params: token: "..." domain: "gitlab.example.com" |
| 609 | ``` |
| 610 | |
| 611 | config.json |
| 612 | |
| 613 | ```json |
| 614 | { |
| 615 | "contextProviders": [ |
| 616 | { |
| 617 | "name": "gitlab-mr", |
| 618 | "params": { "token": "...", "domain": "gitlab.example.com" } |
| 619 | } |
| 620 | ] |
| 621 | } |
| 622 | ``` |
| 623 | |
| 624 | #### Filtering Comments[](#filtering-comments "Direct link to Filtering Comments") |
| 625 | |
| 626 | 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`. |
| 627 | |
| 628 | ### `@Jira`[](#jira "Direct link to jira") |
| 629 | |
| 630 | Reference the conversation in a Jira issue. |
| 631 | |
| 632 | - YAML |
| 633 | - JSON |
| 634 | |
| 635 | config.yaml |
| 636 | |
| 637 | ``` |
| 638 | context: - provider: jira params: domain: company.atlassian.net token: ATATT... |
| 639 | ``` |
| 640 | |
| 641 | config.json |
| 642 | |
| 643 | ```json |
| 644 | { |
| 645 | "contextProviders": [ |
| 646 | { |
| 647 | "name": "jira", |
| 648 | "params": { "domain": "company.atlassian.net", "token": "ATATT..." } |
| 649 | } |
| 650 | ] |
| 651 | } |
| 652 | ``` |
| 653 | |
| 654 | 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. |
| 655 | |
| 656 | #### Jira Datacenter Support[](#jira-datacenter-support "Direct link to Jira Datacenter Support") |
| 657 | |
| 658 | 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. |
| 659 | |
| 660 | - YAML |
| 661 | - JSON |
| 662 | |
| 663 | config.yaml |
| 664 | |
| 665 | ``` |
| 666 | context: - provider: jira params: apiVersion: "2" |
| 667 | ``` |
| 668 | |
| 669 | config.json |
| 670 | |
| 671 | ```json |
| 672 | { "contextProviders": [{ "name": "jira", "params": { "apiVersion": "2" } }] } |
| 673 | ``` |
| 674 | |
| 675 | #### Issue Query[](#issue-query "Direct link to Issue Query") |
| 676 | |
| 677 | By default, the following query will be used to find issues: |
| 678 | |
| 679 | ``` |
| 680 | assignee = currentUser() AND resolution = Unresolved order by updated DESC |
| 681 | ``` |
| 682 | |
| 683 | You can override this query by setting the `issueQuery` parameter. |
| 684 | |
| 685 | #### Max results[](#max-results "Direct link to Max results") |
| 686 | |
| 687 | You can set the `maxResults` parameter to limit the number of results returned. The default is `50`. |
| 688 | |
| 689 | ### `@Discord`[](#discord "Direct link to discord") |
| 690 | |
| 691 | Reference the messages in a Discord channel. |
| 692 | |
| 693 | - YAML |
| 694 | - JSON |
| 695 | |
| 696 | config.yaml |
| 697 | |
| 698 | ``` |
| 699 | context: - provider: discord params: discordKey: "bot token" guildId: "1234567890" channels: - id: "123456" name: "example-channel" - id: "678901" name: "example-channel-2" |
| 700 | ``` |
| 701 | |
| 702 | config.json |
| 703 | |
| 704 | ```json |
| 705 | { |
| 706 | "contextProviders": [ |
| 707 | { |
| 708 | "name": "discord", |
| 709 | "params": { |
| 710 | "discordKey": "bot token", |
| 711 | "guildId": "1234567890", |
| 712 | "channels": [ |
| 713 | { "id": "123456", "name": "example-channel" }, |
| 714 | { "id": "678901", "name": "example-channel-2" } |
| 715 | ] |
| 716 | } |
| 717 | } |
| 718 | ] |
| 719 | } |
| 720 | ``` |
| 721 | |
| 722 | 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. |
| 723 | |
| 724 | ### `@HTTP`[](#http "Direct link to http") |
| 725 | |
| 726 | 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. |
| 727 | |
| 728 | - YAML |
| 729 | - JSON |
| 730 | |
| 731 | config.yaml |
| 732 | |
| 733 | ``` |
| 734 | context: - provider: http params: url: "https://api.example.com/v1/users" |
| 735 | ``` |
| 736 | |
| 737 | config.json |
| 738 | |
| 739 | ```json |
| 740 | { |
| 741 | "contextProviders": [ |
| 742 | { "name": "http", "params": { "url": "https://api.example.com/v1/users" } } |
| 743 | ] |
| 744 | } |
| 745 | ``` |
| 746 | |
| 747 | The receiving URL should expect to receive the following parameters: |
| 748 | |
| 749 | POST parameters |
| 750 | |
| 751 | ```json |
| 752 | { query: string, fullInput: string} |
| 753 | ``` |
| 754 | |
| 755 | The response 200 OK should be a JSON object with the following structure: |
| 756 | |
| 757 | Response |
| 758 | |
| 759 | ``` |
| 760 | [ { "name": "", "description": "", "content": "" }]// OR{ "name": "", "description": "", "content": ""} |
| 761 | ``` |
| 762 | |
| 763 | ### `@Commits`[](#commits "Direct link to commits") |
| 764 | |
| 765 | Reference specific git commit metadata and diff or all of the recent commits. |
| 766 | |
| 767 | - YAML |
| 768 | - JSON |
| 769 | |
| 770 | config.yaml |
| 771 | |
| 772 | ``` |
| 773 | context: - provider: commit params: Depth: 50 LastXCommitsDepth: 10 |
| 774 | ``` |
| 775 | |
| 776 | config.json |
| 777 | |
| 778 | ```json |
| 779 | { |
| 780 | "contextProviders": [ |
| 781 | { "name": "commit", "params": { "Depth": 50, "LastXCommitsDepth": 10 } } |
| 782 | ] |
| 783 | } |
| 784 | ``` |
| 785 | |
| 786 | 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. |
| 787 | |
| 788 | ### `@Greptile`[](#greptile "Direct link to greptile") |
| 789 | |
| 790 | Query a [Greptile](https://www.greptile.com/) index of the current repo/branch. |
| 791 | |
| 792 | - YAML |
| 793 | - JSON |
| 794 | |
| 795 | config.yaml |
| 796 | |
| 797 | ``` |
| 798 | context: - provider: greptile params: greptileToken: "..." githubToken: "..." |
| 799 | ``` |
| 800 | |
| 801 | config.json |
| 802 | |
| 803 | ```json |
| 804 | { |
| 805 | "contextProviders": [ |
| 806 | { |
| 807 | "name": "greptile", |
| 808 | "params": { "GreptileToken": "...", "GithubToken": "..." } |
| 809 | } |
| 810 | ] |
| 811 | } |
| 812 | ``` |
| 813 | |
| 814 | ### Requesting Context Providers[](#requesting-context-providers "Direct link to Requesting Context Providers") |
| 815 | |
| 816 | 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. |