Elffuss BraidHub

kikocis/continue public

renamce context
Changeset51d123c71c19b4795e5bb792206a6301ea13f04829305971837d778eefc7626f
AuthorBrian 'bdougie' Douglas <brian@opensauced.pizza> · 2025-07-02 21:24 -07:00
CommitterBrian 'bdougie' Douglas <brian@opensauced.pizza> · 2025-07-02 21:24 -07:00
Parents5a680856c957

Browse the files at this changeset

13 files changed

modified docs/docs/advanced/00-overview.mdx +1 −1
@@ -12,7 +12,7 @@
1212
1313 Master how Continue understands your codebase and integrates with your development tools.
1414
15-[Explore Context & Integration →](./context-integration/custom-providers)
15+[Explore Context & Integration →](./context/custom-providers)
1616
1717 ## Deep Dives
1818
deleted docs/docs/advanced/context-integration/_category_.json +0 −4
@@ -1,4 +0,0 @@
1-{
2- "label": "Context",
3- "position": 2
4-}
deleted docs/docs/advanced/context-integration/codebase.mdx +0 −99
@@ -1,99 +0,0 @@
1----
2-description: Talk to your codebase
3-keywords: [talk, embeddings, reranker, codebase, experimental]
4----
5-
6-import TabItem from "@theme/TabItem";
7-import Tabs from "@theme/Tabs";
8-
9-# @Codebase
10-
11-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`.
12-
13-:::info[`transformers.js cannot be used in JetBrains`]
14-Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-roles/embeddings.mdx).
15-:::
16-
17-Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files.
18-
19-Here are some common use cases where it can be useful:
20-
21-- Asking high-level questions about your codebase
22- - "How do I add a new endpoint to the server?"
23- - "Do we use VS Code's CodeLens feature anywhere?"
24- - "Is there any code written already to convert HTML to markdown?"
25-- Generate code using existing samples as reference
26- - "Generate a new React component with a date picker, using the same patterns as existing components"
27- - "Write a draft of a CLI application for this project using Python's argparse"
28- - "Implement the `foo` method in the `bar` class, following the patterns seen in other subclasses of `baz`.
29-- Use `@Folder` to ask questions about a specific folder, increasing the likelihood of relevant results
30- - "What is the main purpose of this folder?"
31- - "How do we use VS Code's CodeLens API?"
32- - Or any of the above examples, but with `@Folder` instead of `@Codebase`
33-
34-Here are use cases where it is not useful:
35-
36-- When you need the LLM to see _literally every_ file in your codebase
37- - "Find everywhere where the `foo` function is called"
38- - "Review our codebase and find any spelling mistakes"
39-- Refactoring
40- - "Add a new parameter to the `bar` function and update usages"
41-
42-## Configuration
43-
44-There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider:
45-
46-<Tabs groupId="config-example">
47- <TabItem value="yaml" label="YAML">
48- ```yaml title="config.yaml"
49- context:
50- - provider: codebase
51- params:
52- nRetrieve: 25
53- nFinal: 5
54- useReranking: true
55- ```
56- </TabItem>
57- <TabItem value="json" label="JSON">
58- ```json title="config.json"
59- {
60- "contextProviders": [
61- {
62- "name": "codebase",
63- "params": {
64- "nRetrieve": 25,
65- "nFinal": 5,
66- "useReranking": true
67- }
68- }
69- ]
70- }
71- ```
72- </TabItem>
73-</Tabs>
74-
75-### `nRetrieve`
76-
77-Number of results to initially retrieve from vector database (default: 25)
78-
79-### `nFinal`
80-
81-Final number of results to use after re-ranking (default: 5)
82-
83-### `useReranking`
84-
85-Whether to use re-ranking, which will allow initial selection of `nRetrieve` results, then will use an LLM to select the top `nFinal` results (default: true)
86-
87-## Ignore files during indexing
88-
89-Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`.
90-
91-Continue also supports a **global** `.continueignore` file that will be respected for all workspaces, which can be created at `~/.continue/.continueignore`.
92-
93-If you want to see exactly what files Continue has indexed, the metadata is stored in `~/.continue/index/index.sqlite`. You can use a tool like [DB Browser for SQLite](https://sqlitebrowser.org/) to view the `tag_catalog` table within this file.
94-
95-If you need to force a refresh of the index, reload the VS Code window with <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd> + "Reload Window".
96-
97-## Repository map
98-
99-Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](./custom-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.
deleted docs/docs/advanced/context-integration/custom-providers.mdx +0 −1059
@@ -1,1059 +0,0 @@
1----
2-title: Context Providers
3-description: Type '@' to select content to the LLM as context
4-keywords: [context, "@", provider, LLM]
5----
6-
7-import TabItem from "@theme/TabItem";
8-import Tabs from "@theme/Tabs";
9-
10-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.
11-
12-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.
13-
14-![Context Items](/img/context-provider-example.png)
15-
16-## Context blocks
17-
18-You can add context providers to assistants using [`context` blocks](../../hub/blocks/block-types.md#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
19-
20-## Built-in Context Providers
21-
22-You can add any built-in context-providers in your config file as shown below:
23-
24-### `@File`
25-
26-Reference any file in your current workspace.
27-
28-<Tabs groupId="config-example">
29- <TabItem value="yaml" label="YAML">
30- ```yaml title="config.yaml"
31- context:
32- - provider: file
33- ```
34- </TabItem>
35- <TabItem value="json" label="JSON">
36- ```json title="config.json"
37- {
38- "contextProviders": [
39- {
40- "name": "file"
41- }
42- ]
43- }
44- ```
45- </TabItem>
46-</Tabs>
47-
48-### `@Code`
49-
50-Reference specific functions or classes from throughout your project.
51-
52-<Tabs groupId="config-example">
53- <TabItem value="yaml" label="YAML">
54- ```yaml title="config.yaml"
55- context:
56- - provider: code
57- ```
58- </TabItem>
59- <TabItem value="json" label="JSON">
60- ```json title="config.json"
61- {
62- "contextProviders": [
63- {
64- "name": "code"
65- }
66- ]
67- }
68- ```
69- </TabItem>
70-</Tabs>
71-
72-### `@Git Diff`
73-
74-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.
75-
76-<Tabs groupId="config-example">
77- <TabItem value="yaml" label="YAML">
78- ```yaml title="config.yaml"
79- context:
80- - provider: diff
81- ```
82- </TabItem>
83- <TabItem value="json" label="JSON">
84- ```json title="config.json"
85- {
86- "contextProviders": [
87- {
88- "name": "diff"
89- }
90- ]
91- }
92- ```
93- </TabItem>
94-</Tabs>
95-
96-### `@Current File`
97-
98-Reference the currently open file.
99-
100-<Tabs groupId="config-example">
101- <TabItem value="yaml" label="YAML">
102- ```yaml title="config.yaml"
103- context:
104- - provider: currentFile
105- ```
106- </TabItem>
107- <TabItem value="json" label="JSON">
108- ```json title="config.json"
109- {
110- "contextProviders": [
111- {
112- "name": "currentFile"
113- }
114- ]
115- }
116- ```
117- </TabItem>
118-</Tabs>
119-
120-### `@Terminal`
121-
122-Reference the last command you ran in your IDE's terminal and its output.
123-
124-<Tabs groupId="config-example">
125- <TabItem value="yaml" label="YAML">
126- ```yaml title="config.yaml"
127- context:
128- - provider: terminal
129- ```
130- </TabItem>
131- <TabItem value="json" label="JSON">
132- ```json title="config.json"
133- {
134- "contextProviders": [
135- {
136- "name": "terminal"
137- }
138- ]
139- }
140- ```
141- </TabItem>
142-</Tabs>
143-
144-### `@Docs`
145-
146-Reference the contents from any documentation site.
147-
148-<Tabs groupId="config-example">
149- <TabItem value="yaml" label="YAML">
150- ```yaml title="config.yaml"
151- context:
152- - provider: docs
153- ```
154- </TabItem>
155- <TabItem value="json" label="JSON">
156- ```json title="config.json"
157- {
158- "contextProviders": [
159- {
160- "name": "docs"
161- }
162- ]
163- }
164- ```
165- </TabItem>
166-</Tabs>
167-
168-Note that this will only enable the `@Docs` context provider.
169-
170-To use it, you need to add a documentation site to your config file. See the [docs](../deep-dives/docs.mdx) page for more information.
171-
172-### `@Open`
173-
174-Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
175-
176-<Tabs groupId="config-example">
177- <TabItem value="yaml" label="YAML">
178- ```yaml title="config.yaml"
179- context:
180- - provider: open
181- params:
182- onlyPinned: true
183- ```
184- </TabItem>
185- <TabItem value="json" label="JSON">
186- ```json title="config.json"
187- {
188- "contextProviders": [
189- {
190- "name": "open",
191- "params": {
192- "onlyPinned": true
193- }
194- }
195- ]
196- }
197- ```
198- </TabItem>
199-</Tabs>
200-
201-### `@Web`
202-
203-Reference relevant pages from across the web, automatically determined from your input.
204-
205-Optionally, set `n` to limit the number of results returned (default 6).
206-
207-<Tabs groupId="config-example">
208- <TabItem value="yaml" label="YAML">
209- ```yaml title="config.yaml"
210- context:
211- - provider: web
212- params:
213- n: 5
214- ```
215- </TabItem>
216- <TabItem value="json" label="JSON">
217- ```json title="config.json"
218- {
219- "contextProviders": [
220- {
221- "name": "web",
222- "params": {
223- "n": 5
224- }
225- }
226- ]
227- }
228- ```
229- </TabItem>
230-</Tabs>
231-
232-### `@Codebase`
233-
234-Reference the most relevant snippets from your codebase.
235-
236-<Tabs groupId="config-example">
237- <TabItem value="yaml" label="YAML">
238- ```yaml title="config.yaml"
239- context:
240- - provider: codebase
241- ```
242- </TabItem>
243- <TabItem value="json" label="JSON">
244- ```json title="config.json"
245- {
246- "contextProviders": [
247- {
248- "name": "codebase"
249- }
250- ]
251- }
252- ```
253- </TabItem>
254-</Tabs>
255-
256-Read more about indexing and retrieval [here](../deep-dives/codebase.mdx).
257-
258-### `@Folder`
259-
260-Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
261-
262-<Tabs groupId="config-example">
263- <TabItem value="yaml" label="YAML">
264- ```yaml title="config.yaml"
265- context:
266- - provider: folder
267- ```
268- </TabItem>
269- <TabItem value="json" label="JSON">
270- ```json title="config.json"
271- {
272- "contextProviders": [
273- {
274- "name": "folder"
275- }
276- ]
277- }
278- ```
279- </TabItem>
280-</Tabs>
281-
282-### `@Search`
283-
284-Reference the results of codebase search, just like the results you would get from VS Code search.
285-
286-<Tabs groupId="config-example">
287- <TabItem value="yaml" label="YAML">
288- ```yaml title="config.yaml"
289- context:
290- - provider: search
291- params:
292- maxResults: 100 # optional, defaults to 200
293- ```
294- </TabItem>
295- <TabItem value="json" label="JSON">
296- ```json title="config.json"
297- {
298- "contextProviders": [
299- {
300- "name": "search",
301- "params": {
302- "maxResults": 100 // optional, defaults to 200
303- }
304- }
305- ]
306- }
307- ```
308- </TabItem>
309-</Tabs>
310-
311-This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
312-
313-### `@Url`
314-
315-Reference the markdown converted contents of a given URL.
316-
317-<Tabs groupId="config-example">
318- <TabItem value="yaml" label="YAML">
319- ```yaml title="config.yaml"
320- context:
321- - provider: url
322- ```
323- </TabItem>
324- <TabItem value="json" label="JSON">
325- ```json title="config.json"
326- {
327- "contextProviders": [
328- {
329- "name": "url"
330- }
331- ]
332- }
333- ```
334- </TabItem>
335-</Tabs>
336-
337-### `@Clipboard`
338-
339-Reference recent clipboard items
340-
341-<Tabs groupId="config-example">
342- <TabItem value="yaml" label="YAML">
343- ```yaml title="config.yaml"
344- context:
345- - provider: clipboard
346- ```
347- </TabItem>
348- <TabItem value="json" label="JSON">
349- ```json title="config.json"
350- {
351- "contextProviders": [
352- {
353- "name": "clipboard"
354- }
355- ]
356- }
357- ```
358- </TabItem>
359-</Tabs>
360-
361-### `@Tree`
362-
363-Reference the structure of your current workspace.
364-
365-<Tabs groupId="config-example">
366- <TabItem value="yaml" label="YAML">
367- ```yaml title="config.yaml"
368- context:
369- - provider: tree
370- ```
371- </TabItem>
372- <TabItem value="json" label="JSON">
373- ```json title="config.json"
374- {
375- "contextProviders": [
376- {
377- "name": "tree"
378- }
379- ]
380- }
381- ```
382- </TabItem>
383-</Tabs>
384-
385-### `@Problems`
386-
387-Get Problems from the current file.
388-
389-<Tabs groupId="config-example">
390- <TabItem value="yaml" label="YAML">
391- ```yaml title="config.yaml"
392- context:
393- - provider: problems
394- ```
395- </TabItem>
396- <TabItem value="json" label="JSON">
397- ```json title="config.json"
398- {
399- "contextProviders": [
400- {
401- "name": "problems"
402- }
403- ]
404- }
405- ```
406- </TabItem>
407-</Tabs>
408-
409-### `@Debugger`
410-
411-Reference the contents of the local variables in the debugger. Currently only available in VS Code.
412-
413-<Tabs groupId="config-example">
414- <TabItem value="yaml" label="YAML">
415- ```yaml title="config.yaml"
416- context:
417- - provider: debugger
418- params:
419- stackDepth: 3
420- ```
421- </TabItem>
422- <TabItem value="json" label="JSON">
423- ```json title="config.json"
424- {
425- "contextProviders": [
426- {
427- "name": "debugger",
428- "params": {
429- "stackDepth": 3
430- }
431- }
432- ]
433- }
434- ```
435- </TabItem>
436-</Tabs>
437-
438-Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
439-
440-### `@Repository Map`
441-
442-Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
443-
444-`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.
445-
446-<Tabs groupId="config-example">
447- <TabItem value="yaml" label="YAML">
448- ```yaml title="config.yaml"
449- context:
450- - provider: repo-map
451- params:
452- includeSignatures: false # default true
453- ```
454- </TabItem>
455- <TabItem value="json" label="JSON">
456- ```json title="config.json"
457- {
458- "contextProviders": [
459- {
460- "name": "repo-map",
461- "params": {
462- "includeSignatures": false // default true
463- }
464- }
465- ]
466- }
467- ```
468- </TabItem>
469-</Tabs>
470-
471-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.
472-
473-In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
474-
475-This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
476-
477-### `@Operating System`
478-
479-Reference the architecture and platform of your current operating system.
480-
481-<Tabs groupId="config-example">
482- <TabItem value="yaml" label="YAML">
483- ```yaml title="config.yaml"
484- context:
485- - provider: os
486- ```
487- </TabItem>
488- <TabItem value="json" label="JSON">
489- ```json title="config.json"
490- {
491- "contextProviders": [
492- {
493- "name": "os"
494- }
495- ]
496- }
497- ```
498- </TabItem>
499-</Tabs>
500-
501-### Model Context Protocol
502-
503-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:
504-
505-<Tabs groupId="config-example">
506- <TabItem value="yaml" label="YAML">
507- ```yaml title="config.yaml"
508- mcpServers:
509- - name: My MCP Server
510- command: uvx
511- args:
512- - mcp-server-sqlite
513- - --db-path
514- - /Users/NAME/test.db
515- ```
516- </TabItem>
517- <TabItem value="json" label="JSON">
518- ```json title="config.json"
519- {
520- "experimental": {
521- "modelContextProtocolServers": [
522- {
523- "transport": {
524- "type": "stdio",
525- "command": "uvx",
526- "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
527- }
528- }
529- ]
530- }
531- }
532- ```
533- </TabItem>
534-</Tabs>
535-
536-You'll then be able to type "@" and see "MCP" in the context providers dropdown.
537-
538-### `@Issue`
539-
540-Reference the conversation in a GitHub issue.
541-
542-<Tabs groupId="config-example">
543- <TabItem value="yaml" label="YAML">
544- ```yaml title="config.yaml"
545- context:
546- - provider: issue
547- params:
548- repos:
549- - owner: continuedev
550- repo: continue
551- githubToken: ghp_xxx
552- ```
553- </TabItem>
554- <TabItem value="json" label="JSON">
555- ```json title="config.json"
556- {
557- "contextProviders": [
558- {
559- "name": "issue",
560- "params": {
561- "repos": [
562- {
563- "owner": "continuedev",
564- "repo": "continue"
565- }
566- ],
567- "githubToken": "ghp_xxx"
568- }
569- }
570- ]
571- }
572- ```
573- </TabItem>
574-</Tabs>
575-
576-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.
577-
578-### `@Database`
579-
580-Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
581-
582-<Tabs groupId="config-example">
583- <TabItem value="yaml" label="YAML">
584- ```yaml title="config.yaml"
585- context:
586- - provider: database
587- params:
588- connections:
589- - name: examplePostgres
590- connection_type: postgres
591- connection:
592- user: username
593- host: localhost
594- database: exampleDB
595- password: yourPassword
596- port: 5432
597- - name: exampleMssql
598- connection_type: mssql
599- connection:
600- user: username
601- server: localhost
602- database: exampleDB
603- password: yourPassword
604- - name: exampleSqlite
605- connection_type: sqlite
606- connection:
607- filename: /path/to/your/sqlite/database.db
608- ```
609- </TabItem>
610- <TabItem value="json" label="JSON">
611- ```json title="config.json"
612- {
613- "contextProviders": [
614- {
615- "name": "database",
616- "params": {
617- "connections": [
618- {
619- "name": "examplePostgres",
620- "connection_type": "postgres",
621- "connection": {
622- "user": "username",
623- "host": "localhost",
624- "database": "exampleDB",
625- "password": "yourPassword",
626- "port": 5432
627- }
628- },
629- {
630- "name": "exampleMssql",
631- "connection_type": "mssql",
632- "connection": {
633- "user": "username",
634- "server": "localhost",
635- "database": "exampleDB",
636- "password": "yourPassword"
637- }
638- },
639- {
640- "name": "exampleSqlite",
641- "connection_type": "sqlite",
642- "connection": {
643- "filename": "/path/to/your/sqlite/database.db"
644- }
645- }
646- ]
647- }
648- }
649- ]
650- }
651- ```
652- </TabItem>
653-</Tabs>
654-
655-Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
656-
657-Available connection types:
658-
659-- `postgres`
660-- `mysql`
661-- `sqlite`
662-
663-### `@Postgres`
664-
665-Reference the schema of a table, and some sample rows
666-
667-<Tabs groupId="config-example">
668- <TabItem value="yaml" label="YAML">
669- ```yaml title="config.yaml"
670- context:
671- - provider: postgres
672- params:
673- host: localhost
674- port: 5436
675- user: myuser
676- password: catsarecool
677- database: animals
678- schema: public
679- sampleRows: 3
680- ```
681- </TabItem>
682- <TabItem value="json" label="JSON">
683- ```json title="config.json"
684- {
685- "contextProviders": [
686- {
687- "name": "postgres",
688- "params": {
689- "host": "localhost",
690- "port": 5436,
691- "user": "myuser",
692- "password": "catsarecool",
693- "database": "animals",
694- "schema": "public",
695- "sampleRows": 3
696- }
697- }
698- ]
699- }
700- ```
701- </TabItem>
702-</Tabs>
703-
704-The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
705-
706-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.
707-
708-[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
709-
710-### `@Google`
711-
712-Reference the results of a Google search.
713-
714-<Tabs groupId="config-example">
715- <TabItem value="yaml" label="YAML">
716- ```yaml title="config.yaml"
717- context:
718- - provider: google
719- params:
720- serperApiKey: <YOUR_SERPER.DEV_API_KEY>
721- ```
722- </TabItem>
723- <TabItem value="json" label="JSON">
724- ```json title="config.json"
725- {
726- "contextProviders": [
727- {
728- "name": "google",
729- "params": {
730- "serperApiKey": "<YOUR_SERPER.DEV_API_KEY>"
731- }
732- }
733- ]
734- }
735- ```
736- </TabItem>
737-</Tabs>
738-
739-For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
740-
741-Note: You can get an API key for free at [serper.dev](https://serper.dev).
742-
743-### `@Gitlab Merge Request`
744-
745-Reference an open MR for this branch on GitLab.
746-
747-<Tabs groupId="config-example">
748- <TabItem value="yaml" label="YAML">
749- ```yaml title="config.yaml"
750- context:
751- - provider: gitlab-mr
752- params:
753- token: "..."
754- ```
755- </TabItem>
756- <TabItem value="json" label="JSON">
757- ```json title="config.json"
758- {
759- "contextProviders": [
760- {
761- "name": "gitlab-mr",
762- "params": {
763- "token": "..."
764- }
765- }
766- ]
767- }
768- ```
769- </TabItem>
770-</Tabs>
771-
772-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.
773-
774-#### Using Self-Hosted GitLab
775-
776-You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
777-
778-<Tabs groupId="config-example">
779- <TabItem value="yaml" label="YAML">
780- ```yaml title="config.yaml"
781- context:
782- - provider: gitlab-mr
783- params:
784- token: "..."
785- domain: "gitlab.example.com"
786- ```
787- </TabItem>
788- <TabItem value="json" label="JSON">
789- ```json title="config.json"
790- {
791- "contextProviders": [
792- {
793- "name": "gitlab-mr",
794- "params": {
795- "token": "...",
796- "domain": "gitlab.example.com"
797- }
798- }
799- ]
800- }
801- ```
802- </TabItem>
803-</Tabs>
804-
805-#### Filtering Comments
806-
807-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`.
808-
809-### `@Jira`
810-
811-Reference the conversation in a Jira issue.
812-
813-<Tabs groupId="config-example">
814- <TabItem value="yaml" label="YAML">
815- ```yaml title="config.yaml"
816- context:
817- - provider: jira
818- params:
819- domain: company.atlassian.net
820- token: ATATT...
821- ```
822- </TabItem>
823- <TabItem value="json" label="JSON">
824- ```json title="config.json"
825- {
826- "contextProviders": [
827- {
828- "name": "jira",
829- "params": {
830- "domain": "company.atlassian.net",
831- "token": "ATATT..."
832- }
833- }
834- ]
835- }
836- ```
837- </TabItem>
838-</Tabs>
839-
840-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.
841-
842-#### Jira Datacenter Support
843-
844-This context provider supports both Jira API version 2 and 3. It will use version 3 by default since
845-that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
846-to set the API Version to 2 using the `apiVersion` property.
847-
848-<Tabs groupId="config-example">
849- <TabItem value="yaml" label="YAML">
850- ```yaml title="config.yaml"
851- context:
852- - provider: jira
853- params:
854- apiVersion: "2"
855- ```
856- </TabItem>
857- <TabItem value="json" label="JSON">
858- ```json title="config.json"
859- {
860- "contextProviders": [
861- {
862- "name": "jira",
863- "params": {
864- "apiVersion": "2"
865- }
866- }
867- ]
868- }
869- ```
870- </TabItem>
871-</Tabs>
872-
873-#### Issue Query
874-
875-By default, the following query will be used to find issues:
876-
877-```jql
878-assignee = currentUser() AND resolution = Unresolved order by updated DESC
879-```
880-
881-You can override this query by setting the `issueQuery` parameter.
882-
883-#### Max results
884-
885-You can set the `maxResults` parameter to limit the number of results returned. The default is `50`.
886-
887-### `@Discord`
888-
889-Reference the messages in a Discord channel.
890-
891-<Tabs groupId="config-example">
892- <TabItem value="yaml" label="YAML">
893- ```yaml title="config.yaml"
894- context:
895- - provider: discord
896- params:
897- discordKey: "bot token"
898- guildId: "1234567890"
899- channels:
900- - id: "123456"
901- name: "example-channel"
902- - id: "678901"
903- name: "example-channel-2"
904- ```
905- </TabItem>
906- <TabItem value="json" label="JSON">
907- ```json title="config.json"
908- {
909- "contextProviders": [
910- {
911- "name": "discord",
912- "params": {
913- "discordKey": "bot token",
914- "guildId": "1234567890",
915- "channels": [
916- {
917- "id": "123456",
918- "name": "example-channel"
919- },
920- {
921- "id": "678901",
922- "name": "example-channel-2"
923- }
924- ]
925- }
926- }
927- ]
928- }
929- ```
930- </TabItem>
931-</Tabs>
932-
933-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.
934-
935-### `@HTTP`
936-
937-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.
938-
939-<Tabs groupId="config-example">
940- <TabItem value="yaml" label="YAML">
941- ```yaml title="config.yaml"
942- context:
943- - provider: http
944- params:
945- url: "https://api.example.com/v1/users"
946- ```
947- </TabItem>
948- <TabItem value="json" label="JSON">
949- ```json title="config.json"
950- {
951- "contextProviders": [
952- {
953- "name": "http",
954- "params": {
955- "url": "https://api.example.com/v1/users"
956- }
957- }
958- ]
959- }
960- ```
961- </TabItem>
962-</Tabs>
963-
964-The receiving URL should expect to receive the following parameters:
965-
966-```js title="POST parameters"
967-{
968- query: string,
969- fullInput: string
970-}
971-```
972-
973-The response 200 OK should be a JSON object with the following structure:
974-
975-```json title="Response"
976-[
977- {
978- "name": "",
979- "description": "",
980- "content": ""
981- }
982-]
983-
984-// OR
985-{
986- "name": "",
987- "description": "",
988- "content": ""
989-}
990-```
991-
992-### `@Commits`
993-
994-Reference specific git commit metadata and diff or all of the recent commits.
995-
996-<Tabs groupId="config-example">
997- <TabItem value="yaml" label="YAML">
998- ```yaml title="config.yaml"
999- context:
1000- - provider: commit
1001- params:
1002- Depth: 50
1003- LastXCommitsDepth: 10
1004- ```
1005- </TabItem>
1006- <TabItem value="json" label="JSON">
1007- ```json title="config.json"
1008- {
1009- "contextProviders": [
1010- {
1011- "name": "commit",
1012- "params": {
1013- "Depth": 50,
1014- "LastXCommitsDepth": 10
1015- }
1016- }
1017- ]
1018- }
1019- ```
1020- </TabItem>
1021-</Tabs>
1022-
1023-The depth is how many commits will be loaded into the submenu, defaults to 50.
1024-The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
1025-
1026-### `@Greptile`
1027-
1028-Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
1029-
1030-<Tabs groupId="config-example">
1031- <TabItem value="yaml" label="YAML">
1032- ```yaml title="config.yaml"
1033- context:
1034- - provider: greptile
1035- params:
1036- greptileToken: "..."
1037- githubToken: "..."
1038- ```
1039- </TabItem>
1040- <TabItem value="json" label="JSON">
1041- ```json title="config.json"
1042- {
1043- "contextProviders": [
1044- {
1045- "name": "greptile",
1046- "params": {
1047- "GreptileToken": "...",
1048- "GithubToken": "..."
1049- }
1050- }
1051- ]
1052- }
1053- ```
1054- </TabItem>
1055-</Tabs>
1056-
1057-### Requesting Context Providers
1058-
1059-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.
deleted docs/docs/advanced/context-integration/documentation.mdx +0 −408
@@ -1,408 +0,0 @@
1----
2-description: Learn how to access and search your project's documentation directly within Continue
3-keywords:
4- [
5- documentation,
6- indexing,
7- context provider,
8- embeddings,
9- docs,
10- embedder,
11- embeddings provider,
12- documentation,
13- ]
14-toc_max_heading_level: 5
15----
16-
17-import TabItem from "@theme/TabItem";
18-import Tabs from "@theme/Tabs";
19-
20-# @Docs
21-
22-The [`@Docs` context provider](./custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
23-
24-## Enabling the `@Docs` context provider
25-
26-To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file.
27-
28-<Tabs groupId="config-example">
29- <TabItem value="yaml" label="YAML">
30- ```yaml title="config.yaml"
31- context:
32- - provider: docs
33- ```
34- </TabItem>
35- <TabItem value="json" label="JSON">
36- ```json title="config.json"
37- {
38- "contextProviders": [
39- {
40- "name": "docs"
41- }
42- ]
43- }
44- ```
45- </TabItem>
46-</Tabs>
47-
48-## How It Works
49-
50-The `@Docs` context provider works by
51-
52-1. Crawling specified documentation sites
53-2. Generating embeddings for the chunked content
54-3. Storing the embeddings locally on your machine
55-4. Embedding chat input to include similar documentation chunks as context
56-
57-## Indexing Your Own Documentation
58-
59-### Hub `docs` Blocks
60-
61-@Docs uses [`docs` blocks](../../hub/blocks/block-types.md#docs) in Assistants from the hub. Visit the hub to [explore `docs` blocks](https://hub.continue.dev/explore/docs) or [create your own](https://hub.continue.dev/new?type=block&blockType=docs).
62-
63-### 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-![Add documentation form](/img/docs-form.png)
85-
86-### In a configuration file
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 groupId="config-example">
91- <TabItem value="yaml" label="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- </TabItem>
99- <TabItem value="json" label="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- </TabItem>
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-## Configuration
119-
120-### Using Your Embeddings Provider
121-
122-If you have set up an [embeddings provider](../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-### Reranking
125-
126-As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`.
127-
128-<Tabs groupId="config-example">
129- <TabItem value="yaml" label="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- </TabItem>
139- <TabItem value="json" label="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- </TabItem>
155-</Tabs>
156-
157-### GitHub
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 groupId="config-example">
162- <TabItem value="yaml" label="YAML">
163- ```yaml title="config.yaml"
164- context:
165- - provider: docs
166- params:
167- githubToken: <GITHUB_TOKEN>
168- ```
169- </TabItem>
170- <TabItem value="json" label="JSON">
171- ```json title="config.json"
172- {
173- "contextProviders": [
174- {
175- "name": "docs",
176- "params": {
177- "githubToken": "github_..."
178- }
179- }
180- ]
181- }
182- ```
183- </TabItem>
184-</Tabs>
185-
186-### Local Crawling
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 groupId="config-example">
193- <TabItem value="yaml" label="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- </TabItem>
202- <TabItem value="json" label="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- </TabItem>
216-</Tabs>
217-
218-:::info
219-Chromium crawling has been deprecated
220-{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */}
221-:::
222-
223-Further notes:
224-
225-- 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.
226-- 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.
227-
228-## Managing your docs indexes
229-
230-You can view indexing statuses and manage your documentation sites from the `@docs indexes` section of the `More` page (three dots)
231-
232-- Continue does not automatically re-index your docs. Use `Click to re-index` to trigger a reindex for a specific source
233-- While a site is indexing, click `Cancel indexing` to cancel the process
234-- Failed indexing attempts will show an error status bar and icon
235-- Delete a documentation site from your configuration using the trash icon
236-
237-![More Page @docs indexes section](/img/docs-indexes.png)
238-
239-You can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page
240-
241-![Documentation indexing peek](/img/docs-indexing-peek.png)
242-
243-You can also use the following IDE command to force a re-index of all docs: `Continue: Docs Force Re-Index`.
244-
245-## Examples
246-
247-### VS Code minimal setup
248-
249-The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking.
250-
251-<Tabs groupId="config-example">
252- <TabItem value="yaml" label="YAML">
253- ```yaml title="config.yaml"
254- context:
255- - provider: docs
256-
257- docs:
258- - title: Nest.js
259- startUrl: https://docs.nestjs.com/
260- ```
261- </TabItem>
262- <TabItem value="json" label="JSON">
263- ```json title="config.json"
264- {
265- "contextProviders": [
266- {
267- "name": "docs",
268- }
269- ],
270- "docs": [
271- {
272- "title": "Nest.js",
273- "startUrl": "https://docs.nestjs.com/",
274- },
275- ]
276- }
277- ```
278- </TabItem>
279-</Tabs>
280-
281-### Jetbrains minimal setup
282-
283-Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-roles/embeddings.mdx).
284-
285-<Tabs groupId="config-example">
286- <TabItem value="yaml" label="YAML">
287- ```yaml title="config.yaml"
288- models:
289- - name: LMStudio embedder
290- provider: lmstudio
291- model: nomic-ai/nomic-embed-text-v1.5-GGUF
292- roles:
293- - embed
294- context:
295- - provider: docs
296- docs:
297- - title: Nest.js
298- startUrl: https://docs.nestjs.com/
299- ```
300- </TabItem>
301- <TabItem value="json" label="JSON">
302- ```json title="config.json"
303- {
304- "contextProviders": [
305- {
306- "name": "docs",
307- }
308- ],
309- "docs": [
310- {
311- "title": "Nest.js",
312- "startUrl": "https://docs.nestjs.com/",
313- },
314- ],
315- "embeddingsProvider": {
316- "provider": "lmstudio",
317- "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
318- }
319- }
320- ```
321- </TabItem>
322-</Tabs>
323-
324-### Full-power setup (VS Code or Jetbrains)
325-
326-The following configuration example includes:
327-
328-- Examples of both public and private documentation sources
329-- A custom embeddings provider
330-- A reranker model available, with reranking parameters customized
331-- A GitHub token to enable GitHub crawling
332-
333-<Tabs groupId="config-example">
334- <TabItem value="yaml" label="YAML">
335- ```yaml title="config.yaml"
336- models:
337- - name: LMStudio Nomic Text
338- provider: lmstudio
339- model: nomic-ai/nomic-embed-text-v1.5-GGUF
340- roles:
341- - embed
342- - name: Voyage Rerank-2
343- provider: voyage
344- apiKey: <VOYAGE_API_KEY>
345- model: rerank-2
346- roles:
347- - rerank
348- context:
349- - provider: docs
350- params:
351- githubToken: <GITHUB_TOKEN>
352- nRetrieve: 25
353- nFinal: 5
354- useReranking: true
355- docs:
356- - title: Nest.js
357- startUrl: https://docs.nestjs.com/
358- - title: My Private Docs
359- startUrl: http://10.2.1.2/docs
360- faviconUrl: http://10.2.1.2/docs/assets/favicon.ico
361- maxDepth: 4
362- useLocalCrawling: true
363- ```
364- </TabItem>
365- <TabItem value="json" label="JSON">
366- ```json title="config.json"
367- {
368- "contextProviders": [
369- {
370- "name": "docs",
371- "params": {
372- "githubToken": "github_...",
373- "nRetrieve": 25,
374- "nFinal": 5,
375- "useReranking": true
376- }
377- }
378- ],
379- "docs": [
380- {
381- "title": "Nest.js",
382- "startUrl": "https://docs.nestjs.com/"
383- },
384- {
385- "title": "My Private Docs",
386- "startUrl": "http://10.2.1.2/docs",
387- "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
388- "maxDepth": 4,
389- "useLocalCrawling": true
390- }
391- ],
392- "reranker": {
393- "name": "voyage",
394- "params": {
395- "model": "rerank-2",
396- "apiKey": "<YOUR_VOYAGE_API_KEY>"
397- }
398- },
399- "embeddingsProvider": {
400- "provider": "lmstudio",
401- "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
402- }
403- }
404- ```
405- </TabItem>
406-</Tabs>
407-
408-{/* This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../deep-dives/settings.md). */}
deleted docs/docs/advanced/context-integration/slash-commands.mdx +0 −33
@@ -1,33 +0,0 @@
1----
2-title: Slash Commands
3-description: Shortcuts that can be activated by prefacing your input with '/'
4-keywords: [slash command, custom commands, step]
5----
6-
7-import TabItem from "@theme/TabItem";
8-import Tabs from "@theme/Tabs";
9-
10-![actions](/img/actions.gif)
11-
12-## Slash commands
13-
14-Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown.
15-![slash-commands](/img/slash-commands.png)
16-
17-Slash commands can be combined with additional instructions, including [context providers](./custom-providers.mdx) or highlighted code.
18-
19-## Prompts
20-
21-### Assistant prompt blocks
22-
23-The easiest way to add a slash command is by adding [`prompt` blocks](../../hub/blocks/block-types.md#prompts) to your assistant, which show up as slash commands in [Chat](../../features/chat/how-it-works.mdx).
24-
25-### Prompt files
26-
27-It is also possible to write your own slash command by defining a “.prompt file.” Prompt files can be as simple as a text file, but also include templating so that you can refer to files, URLs, highlighted code, and more.
28-
29-Learn more about prompt files [here](../deep-dives/prompts.md)
30-
31-### MCP Server prompts
32-
33-Any prompts provided by [Model Context Protocol](https://modelcontextprotocol.io/introduction) servers are also accessible in chat as Slash Commands. See the [MCP Server Deep Dive](../deep-dives/mcp.mdx) for more details.
added docs/docs/advanced/context/_category_.json +4 −0
@@ -0,0 +1,4 @@
1+{
2+ "label": "Context",
3+ "position": 2
4+}
added docs/docs/advanced/context/codebase.mdx +99 −0
@@ -0,0 +1,99 @@
1+---
2+description: Talk to your codebase
3+keywords: [talk, embeddings, reranker, codebase, experimental]
4+---
5+
6+import TabItem from "@theme/TabItem";
7+import Tabs from "@theme/Tabs";
8+
9+# @Codebase
10+
11+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`.
12+
13+:::info[`transformers.js cannot be used in JetBrains`]
14+Currently, `transformers.js` cannot be used in JetBrains IDEs. However, you can select a differet embeddings model from [the list here](../model-roles/embeddings.mdx).
15+:::
16+
17+Currently, the codebase retrieval feature is available as the "codebase" and "folder" context providers. You can use them by typing `@Codebase` or `@Folder` in the input box, and then asking a question. The contents of the input box will be compared with the embeddings from the rest of the codebase (or folder) to determine relevant files.
18+
19+Here are some common use cases where it can be useful:
20+
21+- Asking high-level questions about your codebase
22+ - "How do I add a new endpoint to the server?"
23+ - "Do we use VS Code's CodeLens feature anywhere?"
24+ - "Is there any code written already to convert HTML to markdown?"
25+- Generate code using existing samples as reference
26+ - "Generate a new React component with a date picker, using the same patterns as existing components"
27+ - "Write a draft of a CLI application for this project using Python's argparse"
28+ - "Implement the `foo` method in the `bar` class, following the patterns seen in other subclasses of `baz`.
29+- Use `@Folder` to ask questions about a specific folder, increasing the likelihood of relevant results
30+ - "What is the main purpose of this folder?"
31+ - "How do we use VS Code's CodeLens API?"
32+ - Or any of the above examples, but with `@Folder` instead of `@Codebase`
33+
34+Here are use cases where it is not useful:
35+
36+- When you need the LLM to see _literally every_ file in your codebase
37+ - "Find everywhere where the `foo` function is called"
38+ - "Review our codebase and find any spelling mistakes"
39+- Refactoring
40+ - "Add a new parameter to the `bar` function and update usages"
41+
42+## Configuration
43+
44+There are a few options that let you configure the behavior of the `@codebase` context provider, which are the same for the `@folder` context provider:
45+
46+<Tabs groupId="config-example">
47+ <TabItem value="yaml" label="YAML">
48+ ```yaml title="config.yaml"
49+ context:
50+ - provider: codebase
51+ params:
52+ nRetrieve: 25
53+ nFinal: 5
54+ useReranking: true
55+ ```
56+ </TabItem>
57+ <TabItem value="json" label="JSON">
58+ ```json title="config.json"
59+ {
60+ "contextProviders": [
61+ {
62+ "name": "codebase",
63+ "params": {
64+ "nRetrieve": 25,
65+ "nFinal": 5,
66+ "useReranking": true
67+ }
68+ }
69+ ]
70+ }
71+ ```
72+ </TabItem>
73+</Tabs>
74+
75+### `nRetrieve`
76+
77+Number of results to initially retrieve from vector database (default: 25)
78+
79+### `nFinal`
80+
81+Final number of results to use after re-ranking (default: 5)
82+
83+### `useReranking`
84+
85+Whether to use re-ranking, which will allow initial selection of `nRetrieve` results, then will use an LLM to select the top `nFinal` results (default: true)
86+
87+## Ignore files during indexing
88+
89+Continue respects `.gitignore` files in order to determine which files should not be indexed. If you'd like to exclude additional files, you can add them to a `.continueignore` file, which follows the exact same rules as `.gitignore`.
90+
91+Continue also supports a **global** `.continueignore` file that will be respected for all workspaces, which can be created at `~/.continue/.continueignore`.
92+
93+If you want to see exactly what files Continue has indexed, the metadata is stored in `~/.continue/index/index.sqlite`. You can use a tool like [DB Browser for SQLite](https://sqlitebrowser.org/) to view the `tag_catalog` table within this file.
94+
95+If you need to force a refresh of the index, reload the VS Code window with <kbd>cmd/ctrl</kbd> + <kbd>shift</kbd> + <kbd>p</kbd> + "Reload Window".
96+
97+## Repository map
98+
99+Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](./custom-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.
added docs/docs/advanced/context/custom-providers.mdx +1059 −0
@@ -0,0 +1,1059 @@
1+---
2+title: Context Providers
3+description: Type '@' to select content to the LLM as context
4+keywords: [context, "@", provider, LLM]
5+---
6+
7+import TabItem from "@theme/TabItem";
8+import Tabs from "@theme/Tabs";
9+
10+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.
11+
12+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.
13+
14+![Context Items](/img/context-provider-example.png)
15+
16+## Context blocks
17+
18+You can add context providers to assistants using [`context` blocks](../../hub/blocks/block-types.md#context). Explore available context blocks in [the hub](https://hub.continue.dev/explore/context).
19+
20+## Built-in Context Providers
21+
22+You can add any built-in context-providers in your config file as shown below:
23+
24+### `@File`
25+
26+Reference any file in your current workspace.
27+
28+<Tabs groupId="config-example">
29+ <TabItem value="yaml" label="YAML">
30+ ```yaml title="config.yaml"
31+ context:
32+ - provider: file
33+ ```
34+ </TabItem>
35+ <TabItem value="json" label="JSON">
36+ ```json title="config.json"
37+ {
38+ "contextProviders": [
39+ {
40+ "name": "file"
41+ }
42+ ]
43+ }
44+ ```
45+ </TabItem>
46+</Tabs>
47+
48+### `@Code`
49+
50+Reference specific functions or classes from throughout your project.
51+
52+<Tabs groupId="config-example">
53+ <TabItem value="yaml" label="YAML">
54+ ```yaml title="config.yaml"
55+ context:
56+ - provider: code
57+ ```
58+ </TabItem>
59+ <TabItem value="json" label="JSON">
60+ ```json title="config.json"
61+ {
62+ "contextProviders": [
63+ {
64+ "name": "code"
65+ }
66+ ]
67+ }
68+ ```
69+ </TabItem>
70+</Tabs>
71+
72+### `@Git Diff`
73+
74+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.
75+
76+<Tabs groupId="config-example">
77+ <TabItem value="yaml" label="YAML">
78+ ```yaml title="config.yaml"
79+ context:
80+ - provider: diff
81+ ```
82+ </TabItem>
83+ <TabItem value="json" label="JSON">
84+ ```json title="config.json"
85+ {
86+ "contextProviders": [
87+ {
88+ "name": "diff"
89+ }
90+ ]
91+ }
92+ ```
93+ </TabItem>
94+</Tabs>
95+
96+### `@Current File`
97+
98+Reference the currently open file.
99+
100+<Tabs groupId="config-example">
101+ <TabItem value="yaml" label="YAML">
102+ ```yaml title="config.yaml"
103+ context:
104+ - provider: currentFile
105+ ```
106+ </TabItem>
107+ <TabItem value="json" label="JSON">
108+ ```json title="config.json"
109+ {
110+ "contextProviders": [
111+ {
112+ "name": "currentFile"
113+ }
114+ ]
115+ }
116+ ```
117+ </TabItem>
118+</Tabs>
119+
120+### `@Terminal`
121+
122+Reference the last command you ran in your IDE's terminal and its output.
123+
124+<Tabs groupId="config-example">
125+ <TabItem value="yaml" label="YAML">
126+ ```yaml title="config.yaml"
127+ context:
128+ - provider: terminal
129+ ```
130+ </TabItem>
131+ <TabItem value="json" label="JSON">
132+ ```json title="config.json"
133+ {
134+ "contextProviders": [
135+ {
136+ "name": "terminal"
137+ }
138+ ]
139+ }
140+ ```
141+ </TabItem>
142+</Tabs>
143+
144+### `@Docs`
145+
146+Reference the contents from any documentation site.
147+
148+<Tabs groupId="config-example">
149+ <TabItem value="yaml" label="YAML">
150+ ```yaml title="config.yaml"
151+ context:
152+ - provider: docs
153+ ```
154+ </TabItem>
155+ <TabItem value="json" label="JSON">
156+ ```json title="config.json"
157+ {
158+ "contextProviders": [
159+ {
160+ "name": "docs"
161+ }
162+ ]
163+ }
164+ ```
165+ </TabItem>
166+</Tabs>
167+
168+Note that this will only enable the `@Docs` context provider.
169+
170+To use it, you need to add a documentation site to your config file. See the [docs](../deep-dives/docs.mdx) page for more information.
171+
172+### `@Open`
173+
174+Reference the contents of all of your open files. Set `onlyPinned` to `true` to only reference pinned files.
175+
176+<Tabs groupId="config-example">
177+ <TabItem value="yaml" label="YAML">
178+ ```yaml title="config.yaml"
179+ context:
180+ - provider: open
181+ params:
182+ onlyPinned: true
183+ ```
184+ </TabItem>
185+ <TabItem value="json" label="JSON">
186+ ```json title="config.json"
187+ {
188+ "contextProviders": [
189+ {
190+ "name": "open",
191+ "params": {
192+ "onlyPinned": true
193+ }
194+ }
195+ ]
196+ }
197+ ```
198+ </TabItem>
199+</Tabs>
200+
201+### `@Web`
202+
203+Reference relevant pages from across the web, automatically determined from your input.
204+
205+Optionally, set `n` to limit the number of results returned (default 6).
206+
207+<Tabs groupId="config-example">
208+ <TabItem value="yaml" label="YAML">
209+ ```yaml title="config.yaml"
210+ context:
211+ - provider: web
212+ params:
213+ n: 5
214+ ```
215+ </TabItem>
216+ <TabItem value="json" label="JSON">
217+ ```json title="config.json"
218+ {
219+ "contextProviders": [
220+ {
221+ "name": "web",
222+ "params": {
223+ "n": 5
224+ }
225+ }
226+ ]
227+ }
228+ ```
229+ </TabItem>
230+</Tabs>
231+
232+### `@Codebase`
233+
234+Reference the most relevant snippets from your codebase.
235+
236+<Tabs groupId="config-example">
237+ <TabItem value="yaml" label="YAML">
238+ ```yaml title="config.yaml"
239+ context:
240+ - provider: codebase
241+ ```
242+ </TabItem>
243+ <TabItem value="json" label="JSON">
244+ ```json title="config.json"
245+ {
246+ "contextProviders": [
247+ {
248+ "name": "codebase"
249+ }
250+ ]
251+ }
252+ ```
253+ </TabItem>
254+</Tabs>
255+
256+Read more about indexing and retrieval [here](../deep-dives/codebase.mdx).
257+
258+### `@Folder`
259+
260+Uses the same retrieval mechanism as `@Codebase`, but only on a single folder.
261+
262+<Tabs groupId="config-example">
263+ <TabItem value="yaml" label="YAML">
264+ ```yaml title="config.yaml"
265+ context:
266+ - provider: folder
267+ ```
268+ </TabItem>
269+ <TabItem value="json" label="JSON">
270+ ```json title="config.json"
271+ {
272+ "contextProviders": [
273+ {
274+ "name": "folder"
275+ }
276+ ]
277+ }
278+ ```
279+ </TabItem>
280+</Tabs>
281+
282+### `@Search`
283+
284+Reference the results of codebase search, just like the results you would get from VS Code search.
285+
286+<Tabs groupId="config-example">
287+ <TabItem value="yaml" label="YAML">
288+ ```yaml title="config.yaml"
289+ context:
290+ - provider: search
291+ params:
292+ maxResults: 100 # optional, defaults to 200
293+ ```
294+ </TabItem>
295+ <TabItem value="json" label="JSON">
296+ ```json title="config.json"
297+ {
298+ "contextProviders": [
299+ {
300+ "name": "search",
301+ "params": {
302+ "maxResults": 100 // optional, defaults to 200
303+ }
304+ }
305+ ]
306+ }
307+ ```
308+ </TabItem>
309+</Tabs>
310+
311+This context provider is powered by [ripgrep](https://github.com/BurntSushi/ripgrep).
312+
313+### `@Url`
314+
315+Reference the markdown converted contents of a given URL.
316+
317+<Tabs groupId="config-example">
318+ <TabItem value="yaml" label="YAML">
319+ ```yaml title="config.yaml"
320+ context:
321+ - provider: url
322+ ```
323+ </TabItem>
324+ <TabItem value="json" label="JSON">
325+ ```json title="config.json"
326+ {
327+ "contextProviders": [
328+ {
329+ "name": "url"
330+ }
331+ ]
332+ }
333+ ```
334+ </TabItem>
335+</Tabs>
336+
337+### `@Clipboard`
338+
339+Reference recent clipboard items
340+
341+<Tabs groupId="config-example">
342+ <TabItem value="yaml" label="YAML">
343+ ```yaml title="config.yaml"
344+ context:
345+ - provider: clipboard
346+ ```
347+ </TabItem>
348+ <TabItem value="json" label="JSON">
349+ ```json title="config.json"
350+ {
351+ "contextProviders": [
352+ {
353+ "name": "clipboard"
354+ }
355+ ]
356+ }
357+ ```
358+ </TabItem>
359+</Tabs>
360+
361+### `@Tree`
362+
363+Reference the structure of your current workspace.
364+
365+<Tabs groupId="config-example">
366+ <TabItem value="yaml" label="YAML">
367+ ```yaml title="config.yaml"
368+ context:
369+ - provider: tree
370+ ```
371+ </TabItem>
372+ <TabItem value="json" label="JSON">
373+ ```json title="config.json"
374+ {
375+ "contextProviders": [
376+ {
377+ "name": "tree"
378+ }
379+ ]
380+ }
381+ ```
382+ </TabItem>
383+</Tabs>
384+
385+### `@Problems`
386+
387+Get Problems from the current file.
388+
389+<Tabs groupId="config-example">
390+ <TabItem value="yaml" label="YAML">
391+ ```yaml title="config.yaml"
392+ context:
393+ - provider: problems
394+ ```
395+ </TabItem>
396+ <TabItem value="json" label="JSON">
397+ ```json title="config.json"
398+ {
399+ "contextProviders": [
400+ {
401+ "name": "problems"
402+ }
403+ ]
404+ }
405+ ```
406+ </TabItem>
407+</Tabs>
408+
409+### `@Debugger`
410+
411+Reference the contents of the local variables in the debugger. Currently only available in VS Code.
412+
413+<Tabs groupId="config-example">
414+ <TabItem value="yaml" label="YAML">
415+ ```yaml title="config.yaml"
416+ context:
417+ - provider: debugger
418+ params:
419+ stackDepth: 3
420+ ```
421+ </TabItem>
422+ <TabItem value="json" label="JSON">
423+ ```json title="config.json"
424+ {
425+ "contextProviders": [
426+ {
427+ "name": "debugger",
428+ "params": {
429+ "stackDepth": 3
430+ }
431+ }
432+ ]
433+ }
434+ ```
435+ </TabItem>
436+</Tabs>
437+
438+Uses the top _n_ levels (defaulting to 3) of the call stack for that thread.
439+
440+### `@Repository Map`
441+
442+Reference the outline of your codebase. By default, signatures are included along with file in the repo map.
443+
444+`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.
445+
446+<Tabs groupId="config-example">
447+ <TabItem value="yaml" label="YAML">
448+ ```yaml title="config.yaml"
449+ context:
450+ - provider: repo-map
451+ params:
452+ includeSignatures: false # default true
453+ ```
454+ </TabItem>
455+ <TabItem value="json" label="JSON">
456+ ```json title="config.json"
457+ {
458+ "contextProviders": [
459+ {
460+ "name": "repo-map",
461+ "params": {
462+ "includeSignatures": false // default true
463+ }
464+ }
465+ ]
466+ }
467+ ```
468+ </TabItem>
469+</Tabs>
470+
471+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.
472+
473+In the submenu that appears, you can select either `Entire codebase`, or specify a subfolder to generate the repostiory map from.
474+
475+This context provider is inpsired by [Aider's repository map](https://aider.chat/2023/10/22/repomap.html).
476+
477+### `@Operating System`
478+
479+Reference the architecture and platform of your current operating system.
480+
481+<Tabs groupId="config-example">
482+ <TabItem value="yaml" label="YAML">
483+ ```yaml title="config.yaml"
484+ context:
485+ - provider: os
486+ ```
487+ </TabItem>
488+ <TabItem value="json" label="JSON">
489+ ```json title="config.json"
490+ {
491+ "contextProviders": [
492+ {
493+ "name": "os"
494+ }
495+ ]
496+ }
497+ ```
498+ </TabItem>
499+</Tabs>
500+
501+### Model Context Protocol
502+
503+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:
504+
505+<Tabs groupId="config-example">
506+ <TabItem value="yaml" label="YAML">
507+ ```yaml title="config.yaml"
508+ mcpServers:
509+ - name: My MCP Server
510+ command: uvx
511+ args:
512+ - mcp-server-sqlite
513+ - --db-path
514+ - /Users/NAME/test.db
515+ ```
516+ </TabItem>
517+ <TabItem value="json" label="JSON">
518+ ```json title="config.json"
519+ {
520+ "experimental": {
521+ "modelContextProtocolServers": [
522+ {
523+ "transport": {
524+ "type": "stdio",
525+ "command": "uvx",
526+ "args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
527+ }
528+ }
529+ ]
530+ }
531+ }
532+ ```
533+ </TabItem>
534+</Tabs>
535+
536+You'll then be able to type "@" and see "MCP" in the context providers dropdown.
537+
538+### `@Issue`
539+
540+Reference the conversation in a GitHub issue.
541+
542+<Tabs groupId="config-example">
543+ <TabItem value="yaml" label="YAML">
544+ ```yaml title="config.yaml"
545+ context:
546+ - provider: issue
547+ params:
548+ repos:
549+ - owner: continuedev
550+ repo: continue
551+ githubToken: ghp_xxx
552+ ```
553+ </TabItem>
554+ <TabItem value="json" label="JSON">
555+ ```json title="config.json"
556+ {
557+ "contextProviders": [
558+ {
559+ "name": "issue",
560+ "params": {
561+ "repos": [
562+ {
563+ "owner": "continuedev",
564+ "repo": "continue"
565+ }
566+ ],
567+ "githubToken": "ghp_xxx"
568+ }
569+ }
570+ ]
571+ }
572+ ```
573+ </TabItem>
574+</Tabs>
575+
576+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.
577+
578+### `@Database`
579+
580+Reference table schemas from Sqlite, Postgres, MSSQL, and MySQL databases.
581+
582+<Tabs groupId="config-example">
583+ <TabItem value="yaml" label="YAML">
584+ ```yaml title="config.yaml"
585+ context:
586+ - provider: database
587+ params:
588+ connections:
589+ - name: examplePostgres
590+ connection_type: postgres
591+ connection:
592+ user: username
593+ host: localhost
594+ database: exampleDB
595+ password: yourPassword
596+ port: 5432
597+ - name: exampleMssql
598+ connection_type: mssql
599+ connection:
600+ user: username
601+ server: localhost
602+ database: exampleDB
603+ password: yourPassword
604+ - name: exampleSqlite
605+ connection_type: sqlite
606+ connection:
607+ filename: /path/to/your/sqlite/database.db
608+ ```
609+ </TabItem>
610+ <TabItem value="json" label="JSON">
611+ ```json title="config.json"
612+ {
613+ "contextProviders": [
614+ {
615+ "name": "database",
616+ "params": {
617+ "connections": [
618+ {
619+ "name": "examplePostgres",
620+ "connection_type": "postgres",
621+ "connection": {
622+ "user": "username",
623+ "host": "localhost",
624+ "database": "exampleDB",
625+ "password": "yourPassword",
626+ "port": 5432
627+ }
628+ },
629+ {
630+ "name": "exampleMssql",
631+ "connection_type": "mssql",
632+ "connection": {
633+ "user": "username",
634+ "server": "localhost",
635+ "database": "exampleDB",
636+ "password": "yourPassword"
637+ }
638+ },
639+ {
640+ "name": "exampleSqlite",
641+ "connection_type": "sqlite",
642+ "connection": {
643+ "filename": "/path/to/your/sqlite/database.db"
644+ }
645+ }
646+ ]
647+ }
648+ }
649+ ]
650+ }
651+ ```
652+ </TabItem>
653+</Tabs>
654+
655+Each connection should include a unique name, the `connection_type`, and the necessary connection parameters specific to each database type.
656+
657+Available connection types:
658+
659+- `postgres`
660+- `mysql`
661+- `sqlite`
662+
663+### `@Postgres`
664+
665+Reference the schema of a table, and some sample rows
666+
667+<Tabs groupId="config-example">
668+ <TabItem value="yaml" label="YAML">
669+ ```yaml title="config.yaml"
670+ context:
671+ - provider: postgres
672+ params:
673+ host: localhost
674+ port: 5436
675+ user: myuser
676+ password: catsarecool
677+ database: animals
678+ schema: public
679+ sampleRows: 3
680+ ```
681+ </TabItem>
682+ <TabItem value="json" label="JSON">
683+ ```json title="config.json"
684+ {
685+ "contextProviders": [
686+ {
687+ "name": "postgres",
688+ "params": {
689+ "host": "localhost",
690+ "port": 5436,
691+ "user": "myuser",
692+ "password": "catsarecool",
693+ "database": "animals",
694+ "schema": "public",
695+ "sampleRows": 3
696+ }
697+ }
698+ ]
699+ }
700+ ```
701+ </TabItem>
702+</Tabs>
703+
704+The only required settings are those for creating the database connection: `host`, `port`, `user`, `password`, and `database`.
705+
706+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.
707+
708+[Here is a short demo.](https://github.com/continuedev/continue/pull/859)
709+
710+### `@Google`
711+
712+Reference the results of a Google search.
713+
714+<Tabs groupId="config-example">
715+ <TabItem value="yaml" label="YAML">
716+ ```yaml title="config.yaml"
717+ context:
718+ - provider: google
719+ params:
720+ serperApiKey: <YOUR_SERPER.DEV_API_KEY>
721+ ```
722+ </TabItem>
723+ <TabItem value="json" label="JSON">
724+ ```json title="config.json"
725+ {
726+ "contextProviders": [
727+ {
728+ "name": "google",
729+ "params": {
730+ "serperApiKey": "<YOUR_SERPER.DEV_API_KEY>"
731+ }
732+ }
733+ ]
734+ }
735+ ```
736+ </TabItem>
737+</Tabs>
738+
739+For example, type "@Google python tutorial" if you want to search and discuss ways of learning Python.
740+
741+Note: You can get an API key for free at [serper.dev](https://serper.dev).
742+
743+### `@Gitlab Merge Request`
744+
745+Reference an open MR for this branch on GitLab.
746+
747+<Tabs groupId="config-example">
748+ <TabItem value="yaml" label="YAML">
749+ ```yaml title="config.yaml"
750+ context:
751+ - provider: gitlab-mr
752+ params:
753+ token: "..."
754+ ```
755+ </TabItem>
756+ <TabItem value="json" label="JSON">
757+ ```json title="config.json"
758+ {
759+ "contextProviders": [
760+ {
761+ "name": "gitlab-mr",
762+ "params": {
763+ "token": "..."
764+ }
765+ }
766+ ]
767+ }
768+ ```
769+ </TabItem>
770+</Tabs>
771+
772+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.
773+
774+#### Using Self-Hosted GitLab
775+
776+You can specify the domain to communicate with by setting the `domain` parameter in your configurtion. By default this is set to `gitlab.com`.
777+
778+<Tabs groupId="config-example">
779+ <TabItem value="yaml" label="YAML">
780+ ```yaml title="config.yaml"
781+ context:
782+ - provider: gitlab-mr
783+ params:
784+ token: "..."
785+ domain: "gitlab.example.com"
786+ ```
787+ </TabItem>
788+ <TabItem value="json" label="JSON">
789+ ```json title="config.json"
790+ {
791+ "contextProviders": [
792+ {
793+ "name": "gitlab-mr",
794+ "params": {
795+ "token": "...",
796+ "domain": "gitlab.example.com"
797+ }
798+ }
799+ ]
800+ }
801+ ```
802+ </TabItem>
803+</Tabs>
804+
805+#### Filtering Comments
806+
807+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`.
808+
809+### `@Jira`
810+
811+Reference the conversation in a Jira issue.
812+
813+<Tabs groupId="config-example">
814+ <TabItem value="yaml" label="YAML">
815+ ```yaml title="config.yaml"
816+ context:
817+ - provider: jira
818+ params:
819+ domain: company.atlassian.net
820+ token: ATATT...
821+ ```
822+ </TabItem>
823+ <TabItem value="json" label="JSON">
824+ ```json title="config.json"
825+ {
826+ "contextProviders": [
827+ {
828+ "name": "jira",
829+ "params": {
830+ "domain": "company.atlassian.net",
831+ "token": "ATATT..."
832+ }
833+ }
834+ ]
835+ }
836+ ```
837+ </TabItem>
838+</Tabs>
839+
840+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.
841+
842+#### Jira Datacenter Support
843+
844+This context provider supports both Jira API version 2 and 3. It will use version 3 by default since
845+that's what the cloud version uses, but if you have the datacenter version of Jira, you'll need
846+to set the API Version to 2 using the `apiVersion` property.
847+
848+<Tabs groupId="config-example">
849+ <TabItem value="yaml" label="YAML">
850+ ```yaml title="config.yaml"
851+ context:
852+ - provider: jira
853+ params:
854+ apiVersion: "2"
855+ ```
856+ </TabItem>
857+ <TabItem value="json" label="JSON">
858+ ```json title="config.json"
859+ {
860+ "contextProviders": [
861+ {
862+ "name": "jira",
863+ "params": {
864+ "apiVersion": "2"
865+ }
866+ }
867+ ]
868+ }
869+ ```
870+ </TabItem>
871+</Tabs>
872+
873+#### Issue Query
874+
875+By default, the following query will be used to find issues:
876+
877+```jql
878+assignee = currentUser() AND resolution = Unresolved order by updated DESC
879+```
880+
881+You can override this query by setting the `issueQuery` parameter.
882+
883+#### Max results
884+
885+You can set the `maxResults` parameter to limit the number of results returned. The default is `50`.
886+
887+### `@Discord`
888+
889+Reference the messages in a Discord channel.
890+
891+<Tabs groupId="config-example">
892+ <TabItem value="yaml" label="YAML">
893+ ```yaml title="config.yaml"
894+ context:
895+ - provider: discord
896+ params:
897+ discordKey: "bot token"
898+ guildId: "1234567890"
899+ channels:
900+ - id: "123456"
901+ name: "example-channel"
902+ - id: "678901"
903+ name: "example-channel-2"
904+ ```
905+ </TabItem>
906+ <TabItem value="json" label="JSON">
907+ ```json title="config.json"
908+ {
909+ "contextProviders": [
910+ {
911+ "name": "discord",
912+ "params": {
913+ "discordKey": "bot token",
914+ "guildId": "1234567890",
915+ "channels": [
916+ {
917+ "id": "123456",
918+ "name": "example-channel"
919+ },
920+ {
921+ "id": "678901",
922+ "name": "example-channel-2"
923+ }
924+ ]
925+ }
926+ }
927+ ]
928+ }
929+ ```
930+ </TabItem>
931+</Tabs>
932+
933+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.
934+
935+### `@HTTP`
936+
937+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.
938+
939+<Tabs groupId="config-example">
940+ <TabItem value="yaml" label="YAML">
941+ ```yaml title="config.yaml"
942+ context:
943+ - provider: http
944+ params:
945+ url: "https://api.example.com/v1/users"
946+ ```
947+ </TabItem>
948+ <TabItem value="json" label="JSON">
949+ ```json title="config.json"
950+ {
951+ "contextProviders": [
952+ {
953+ "name": "http",
954+ "params": {
955+ "url": "https://api.example.com/v1/users"
956+ }
957+ }
958+ ]
959+ }
960+ ```
961+ </TabItem>
962+</Tabs>
963+
964+The receiving URL should expect to receive the following parameters:
965+
966+```js title="POST parameters"
967+{
968+ query: string,
969+ fullInput: string
970+}
971+```
972+
973+The response 200 OK should be a JSON object with the following structure:
974+
975+```json title="Response"
976+[
977+ {
978+ "name": "",
979+ "description": "",
980+ "content": ""
981+ }
982+]
983+
984+// OR
985+{
986+ "name": "",
987+ "description": "",
988+ "content": ""
989+}
990+```
991+
992+### `@Commits`
993+
994+Reference specific git commit metadata and diff or all of the recent commits.
995+
996+<Tabs groupId="config-example">
997+ <TabItem value="yaml" label="YAML">
998+ ```yaml title="config.yaml"
999+ context:
1000+ - provider: commit
1001+ params:
1002+ Depth: 50
1003+ LastXCommitsDepth: 10
1004+ ```
1005+ </TabItem>
1006+ <TabItem value="json" label="JSON">
1007+ ```json title="config.json"
1008+ {
1009+ "contextProviders": [
1010+ {
1011+ "name": "commit",
1012+ "params": {
1013+ "Depth": 50,
1014+ "LastXCommitsDepth": 10
1015+ }
1016+ }
1017+ ]
1018+ }
1019+ ```
1020+ </TabItem>
1021+</Tabs>
1022+
1023+The depth is how many commits will be loaded into the submenu, defaults to 50.
1024+The LastXCommitsDepth is how many recent commits will be included, defaults to 10.
1025+
1026+### `@Greptile`
1027+
1028+Query a [Greptile](https://www.greptile.com/) index of the current repo/branch.
1029+
1030+<Tabs groupId="config-example">
1031+ <TabItem value="yaml" label="YAML">
1032+ ```yaml title="config.yaml"
1033+ context:
1034+ - provider: greptile
1035+ params:
1036+ greptileToken: "..."
1037+ githubToken: "..."
1038+ ```
1039+ </TabItem>
1040+ <TabItem value="json" label="JSON">
1041+ ```json title="config.json"
1042+ {
1043+ "contextProviders": [
1044+ {
1045+ "name": "greptile",
1046+ "params": {
1047+ "GreptileToken": "...",
1048+ "GithubToken": "..."
1049+ }
1050+ }
1051+ ]
1052+ }
1053+ ```
1054+ </TabItem>
1055+</Tabs>
1056+
1057+### Requesting Context Providers
1058+
1059+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.
added docs/docs/advanced/context/documentation.mdx +408 −0
@@ -0,0 +1,408 @@
1+---
2+description: Learn how to access and search your project's documentation directly within Continue
3+keywords:
4+ [
5+ documentation,
6+ indexing,
7+ context provider,
8+ embeddings,
9+ docs,
10+ embedder,
11+ embeddings provider,
12+ documentation,
13+ ]
14+toc_max_heading_level: 5
15+---
16+
17+import TabItem from "@theme/TabItem";
18+import Tabs from "@theme/Tabs";
19+
20+# @Docs
21+
22+The [`@Docs` context provider](./custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
23+
24+## Enabling the `@Docs` context provider
25+
26+To enable the `@Docs` context provider, add it to the list of context providers in your `config.json` file.
27+
28+<Tabs groupId="config-example">
29+ <TabItem value="yaml" label="YAML">
30+ ```yaml title="config.yaml"
31+ context:
32+ - provider: docs
33+ ```
34+ </TabItem>
35+ <TabItem value="json" label="JSON">
36+ ```json title="config.json"
37+ {
38+ "contextProviders": [
39+ {
40+ "name": "docs"
41+ }
42+ ]
43+ }
44+ ```
45+ </TabItem>
46+</Tabs>
47+
48+## How It Works
49+
50+The `@Docs` context provider works by
51+
52+1. Crawling specified documentation sites
53+2. Generating embeddings for the chunked content
54+3. Storing the embeddings locally on your machine
55+4. Embedding chat input to include similar documentation chunks as context
56+
57+## Indexing Your Own Documentation
58+
59+### Hub `docs` Blocks
60+
61+@Docs uses [`docs` blocks](../../hub/blocks/block-types.md#docs) in Assistants from the hub. Visit the hub to [explore `docs` blocks](https://hub.continue.dev/explore/docs) or [create your own](https://hub.continue.dev/new?type=block&blockType=docs).
62+
63+### 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+![Add documentation form](/img/docs-form.png)
85+
86+### In a configuration file
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 groupId="config-example">
91+ <TabItem value="yaml" label="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+ </TabItem>
99+ <TabItem value="json" label="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+ </TabItem>
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+## Configuration
119+
120+### Using Your Embeddings Provider
121+
122+If you have set up an [embeddings provider](../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+### Reranking
125+
126+As with [@Codebase context provider configuration](./codebase#configuration), you can adjust the reranking behavior of the `@Docs` context provider with the `nRetrieve`, `nFinal`, and `useReranking`.
127+
128+<Tabs groupId="config-example">
129+ <TabItem value="yaml" label="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+ </TabItem>
139+ <TabItem value="json" label="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+ </TabItem>
155+</Tabs>
156+
157+### GitHub
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 groupId="config-example">
162+ <TabItem value="yaml" label="YAML">
163+ ```yaml title="config.yaml"
164+ context:
165+ - provider: docs
166+ params:
167+ githubToken: <GITHUB_TOKEN>
168+ ```
169+ </TabItem>
170+ <TabItem value="json" label="JSON">
171+ ```json title="config.json"
172+ {
173+ "contextProviders": [
174+ {
175+ "name": "docs",
176+ "params": {
177+ "githubToken": "github_..."
178+ }
179+ }
180+ ]
181+ }
182+ ```
183+ </TabItem>
184+</Tabs>
185+
186+### Local Crawling
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 groupId="config-example">
193+ <TabItem value="yaml" label="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+ </TabItem>
202+ <TabItem value="json" label="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+ </TabItem>
216+</Tabs>
217+
218+:::info
219+Chromium crawling has been deprecated
220+{/* The default local crawler is a lightweight tool that cannot render sites that are dynamically generated using JavaScript. If your sites need to be rendered, you can enable the experimental `Use Chromium for Docs Crawling` feature from your [User Settings Page](../deep-dives/settings.md) This will download and install Chromium to `~/.continue/.utils`, and use it as the local crawler. */}
221+:::
222+
223+Further notes:
224+
225+- 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.
226+- 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.
227+
228+## Managing your docs indexes
229+
230+You can view indexing statuses and manage your documentation sites from the `@docs indexes` section of the `More` page (three dots)
231+
232+- Continue does not automatically re-index your docs. Use `Click to re-index` to trigger a reindex for a specific source
233+- While a site is indexing, click `Cancel indexing` to cancel the process
234+- Failed indexing attempts will show an error status bar and icon
235+- Delete a documentation site from your configuration using the trash icon
236+
237+![More Page @docs indexes section](/img/docs-indexes.png)
238+
239+You can also view the overall status of currently indexing docs from a hideable progress bar at the bottom of the chat page
240+
241+![Documentation indexing peek](/img/docs-indexing-peek.png)
242+
243+You can also use the following IDE command to force a re-index of all docs: `Continue: Docs Force Re-Index`.
244+
245+## Examples
246+
247+### VS Code minimal setup
248+
249+The following configuration example works out of the box for VS Code. This uses the built-in embeddings provider with no reranking.
250+
251+<Tabs groupId="config-example">
252+ <TabItem value="yaml" label="YAML">
253+ ```yaml title="config.yaml"
254+ context:
255+ - provider: docs
256+
257+ docs:
258+ - title: Nest.js
259+ startUrl: https://docs.nestjs.com/
260+ ```
261+ </TabItem>
262+ <TabItem value="json" label="JSON">
263+ ```json title="config.json"
264+ {
265+ "contextProviders": [
266+ {
267+ "name": "docs",
268+ }
269+ ],
270+ "docs": [
271+ {
272+ "title": "Nest.js",
273+ "startUrl": "https://docs.nestjs.com/",
274+ },
275+ ]
276+ }
277+ ```
278+ </TabItem>
279+</Tabs>
280+
281+### Jetbrains minimal setup
282+
283+Here is the equivalent minimal example for Jetbrains, which requires setting up an [embeddings provider](../model-roles/embeddings.mdx).
284+
285+<Tabs groupId="config-example">
286+ <TabItem value="yaml" label="YAML">
287+ ```yaml title="config.yaml"
288+ models:
289+ - name: LMStudio embedder
290+ provider: lmstudio
291+ model: nomic-ai/nomic-embed-text-v1.5-GGUF
292+ roles:
293+ - embed
294+ context:
295+ - provider: docs
296+ docs:
297+ - title: Nest.js
298+ startUrl: https://docs.nestjs.com/
299+ ```
300+ </TabItem>
301+ <TabItem value="json" label="JSON">
302+ ```json title="config.json"
303+ {
304+ "contextProviders": [
305+ {
306+ "name": "docs",
307+ }
308+ ],
309+ "docs": [
310+ {
311+ "title": "Nest.js",
312+ "startUrl": "https://docs.nestjs.com/",
313+ },
314+ ],
315+ "embeddingsProvider": {
316+ "provider": "lmstudio",
317+ "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
318+ }
319+ }
320+ ```
321+ </TabItem>
322+</Tabs>
323+
324+### Full-power setup (VS Code or Jetbrains)
325+
326+The following configuration example includes:
327+
328+- Examples of both public and private documentation sources
329+- A custom embeddings provider
330+- A reranker model available, with reranking parameters customized
331+- A GitHub token to enable GitHub crawling
332+
333+<Tabs groupId="config-example">
334+ <TabItem value="yaml" label="YAML">
335+ ```yaml title="config.yaml"
336+ models:
337+ - name: LMStudio Nomic Text
338+ provider: lmstudio
339+ model: nomic-ai/nomic-embed-text-v1.5-GGUF
340+ roles:
341+ - embed
342+ - name: Voyage Rerank-2
343+ provider: voyage
344+ apiKey: <VOYAGE_API_KEY>
345+ model: rerank-2
346+ roles:
347+ - rerank
348+ context:
349+ - provider: docs
350+ params:
351+ githubToken: <GITHUB_TOKEN>
352+ nRetrieve: 25
353+ nFinal: 5
354+ useReranking: true
355+ docs:
356+ - title: Nest.js
357+ startUrl: https://docs.nestjs.com/
358+ - title: My Private Docs
359+ startUrl: http://10.2.1.2/docs
360+ faviconUrl: http://10.2.1.2/docs/assets/favicon.ico
361+ maxDepth: 4
362+ useLocalCrawling: true
363+ ```
364+ </TabItem>
365+ <TabItem value="json" label="JSON">
366+ ```json title="config.json"
367+ {
368+ "contextProviders": [
369+ {
370+ "name": "docs",
371+ "params": {
372+ "githubToken": "github_...",
373+ "nRetrieve": 25,
374+ "nFinal": 5,
375+ "useReranking": true
376+ }
377+ }
378+ ],
379+ "docs": [
380+ {
381+ "title": "Nest.js",
382+ "startUrl": "https://docs.nestjs.com/"
383+ },
384+ {
385+ "title": "My Private Docs",
386+ "startUrl": "http://10.2.1.2/docs",
387+ "faviconUrl": "http://10.2.1.2/docs/assets/favicon.ico",
388+ "maxDepth": 4,
389+ "useLocalCrawling": true
390+ }
391+ ],
392+ "reranker": {
393+ "name": "voyage",
394+ "params": {
395+ "model": "rerank-2",
396+ "apiKey": "<YOUR_VOYAGE_API_KEY>"
397+ }
398+ },
399+ "embeddingsProvider": {
400+ "provider": "lmstudio",
401+ "model": "nomic-ai/nomic-embed-text-v1.5-GGUF"
402+ }
403+ }
404+ ```
405+ </TabItem>
406+</Tabs>
407+
408+{/* This could also involve enabling Chromium as a backup for local documentation the [User Settings Page](../deep-dives/settings.md). */}
modified docs/docs/advanced/deep-dives/codebase.mdx +1 −1
@@ -96,4 +96,4 @@
9696
9797 ## Repository map
9898
99-Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context-integration/custom-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.
99+Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context/custom-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.
modified docs/docs/advanced/deep-dives/docs.mdx +1 −1
@@ -19,7 +19,7 @@
1919
2020 # @Docs
2121
22-The [`@Docs` context provider](../context-integration/custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
22+The [`@Docs` context provider](../context/custom-providers#docs) allows you to efficiently reference documentation directly within Continue.
2323
2424 ## Enabling the `@Docs` context provider
2525
modified docs/docs/advanced/deep-dives/slash-commands.mdx +1 −1
@@ -14,7 +14,7 @@
1414 Slash commands are shortcuts that can be activated by typing '/' in a chat session (press <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains)), and selecting from the dropdown.
1515 ![slash-commands](/img/slash-commands.png)
1616
17-Slash commands can be combined with additional instructions, including [context providers](../context-integration/custom-providers.mdx) or highlighted code.
17+Slash commands can be combined with additional instructions, including [context providers](../context/custom-providers.mdx) or highlighted code.
1818
1919 ## Prompts
2020