Skip to content

Commit a868fef

Browse files
Merge pull request #2013 from continuedev/pe/docs-documentation
docs: add 'talk to your docs'
2 parents 50bca94 + d9d001e commit a868fef

File tree

3 files changed

+92
-29
lines changed

3 files changed

+92
-29
lines changed

docs/docs/customization/context-providers.md

+2-24
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,13 @@ Type '@terminal' to reference the contents of your IDE's terminal.
5050

5151
### Documentation
5252

53-
Type `@docs` to index and retrieve snippets from any documentation site. You can add any site by selecting "Add Docs" in the dropdown, then entering the root URL of the documentation site and a title to remember it by. After the site has been indexed, you can type `@docs`, select your documentation from the dropdown, and Continue will use similarity search to automatically find important sections when answering your question.
53+
Type `@docs` to index and retrieve snippets from any documentation site.
5454

5555
```json
5656
{ "name": "docs" }
5757
```
5858

59-
Continue also pre-indexes a number of common sites, listed [here](https://github.com/continuedev/continue/blob/main/core/indexing/docs/preIndexedDocs.ts). The embeddings for these sites are hosted by us, but downloaded for local use after the first time. All other indexing occurs entirely locally.
60-
61-
#### Adding a Documentation Site via Configuration
62-
63-
To add a documentation site via configuration, update the `config.json` file as follows:
64-
65-
```json
66-
{
67-
"name": "docs",
68-
"params": {
69-
"sites": [
70-
{
71-
"title": "ExampleDocs",
72-
"startUrl": "https://exampledocs.com/docs",
73-
"rootUrl": "https://exampledocs.com",
74-
"maxDepth": 3 // Default
75-
}
76-
]
77-
}
78-
}
79-
```
80-
81-
The docs are indexed when you modify the configuration file, unless indexing is disabled. If you want to manually trigger the indexing, you can use the command `Continue: Docs Index`. For force indexing, you can use the command `Continue: Docs Force Re-Index`. Note that these commands will work even if automatic indexing is disabled.
59+
To learn more, visit [Talk To Your Docs](../features/talk-to-your-docs.md).
8260

8361
### Open Files
8462

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
title: Talk To Your Docs
3+
description: Learn how to access and search your project's documentation directly within Continue
4+
keywords: [documentation, indexing, context provider, embeddings]
5+
toc_max_heading_level: 5
6+
---
7+
8+
The [`@docs` context provider](http://localhost:3000/customization/context-providers#documentation) allows you to interact with your documentation directly within Continue. This feature enables you to index any static site or GitHub markdown pages, making it easier to access and utilize your documentation while coding.
9+
10+
## Enabling the `@docs` context provider
11+
12+
To enable the `@docs` context provider, you need to add it to the list of context providers in your `config.json` file.
13+
14+
```json
15+
{
16+
"contextProviders": [
17+
{ "name": "docs" }
18+
...
19+
]
20+
}
21+
```
22+
23+
## How It Works
24+
25+
The `@docs` context provider works by crawling specified documentation sites, generating embeddings, and storing them locally for you. This process allows for quick and efficient access to your documentation content.
26+
27+
1. We crawl the specified documentation site
28+
2. Generate embeddings for the content
29+
3. Store the embeddings locally on your machine
30+
4. Provide access to the indexed content through the `@docs` context provider
31+
32+
## Pre-indexed Documentation Sites
33+
34+
We offer a selection of pre-indexed documentation sites for popular frameworks and libraries. You can view the list of [available pre-indexed sites and request additions here](https://github.com/continuedev/continue/blob/main/core/indexing/docs/preIndexedDocs.ts).
35+
36+
## Indexing Your Own Documentation
37+
38+
### Through the `@docs` Context Provider
39+
40+
To add a single documentation site, we recommend going through the `@docs` context provider.
41+
42+
1. Type `@docs` in the chat panel, hit enter
43+
2. Type "add" and select the "Add Docs" option
44+
3. Enter the required information into the dialog
45+
46+
Indexing will begin upon submission.
47+
48+
### Through `config.json`
49+
50+
To add multiple documentation sites, we recommend adding them in bulk to your `config.json` file. Indexing will kick off upon file save.
51+
52+
The configuration schema is as follows:
53+
54+
```json
55+
"docs": [
56+
{
57+
"title": "Continue",
58+
"startUrl": "https://docs.continue.dev/intro",
59+
"rootUrl": "https://docs.continue.dev",
60+
"faviconUrl": "https://docs.continue.dev/favicon.ico",
61+
"maxDepth": 3
62+
}
63+
]
64+
```
65+
66+
- `title`: The name of the documentation site, used for identification in the UI.
67+
- `startUrl`: The URL where the indexing process should begin.
68+
- `rootUrl`: The base URL of the documentation site, used to determine which pages to index.
69+
- `faviconUrl`: The URL of the site's favicon, used for visual identification in the UI.
70+
- `maxDepth`: The maximum number of levels deep the indexer should crawl from the start URL.
71+
72+
## FAQ
73+
74+
### Why did my documentation site fail to index?
75+
76+
Our current crawler is designed to work with static websites and may encounter issues with dynamic or JavaScript-heavy sites. If your documentation site failed to index, it's possible that it contains non-static elements that our crawler couldn't process.
77+
78+
If you're experiencing issues with indexing a documentation site, please let us know. We're continuously improving our indexing capabilities and would appreciate your feedback to help us enhance the feature.
79+
80+
<a href="https://discord.com/channels/1108621136150929458/1156679146932535376" className="button button--primary">Report Indexing Issues on Discord</a>
81+
82+
### How often is the indexed content updated?
83+
84+
Currently we do not automatically re-index your docs. If you would like to force a re-index, you can use the following command: `Continue: Docs Force Re-Index`.

docs/sidebars.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const sidebars = {
6666
collapsed: true,
6767
items: [
6868
"features/codebase-embeddings",
69+
"features/talk-to-your-docs",
6970
"features/tab-autocomplete",
7071
"customization/context-providers",
7172
"customization/slash-commands",
@@ -97,9 +98,9 @@ const sidebars = {
9798
"development-data",
9899
"telemetry",
99100
{
100-
type: 'link',
101-
label: 'Privacy Policy',
102-
href: 'https://www.continue.dev/privacy',
101+
type: "link",
102+
label: "Privacy Policy",
103+
href: "https://www.continue.dev/privacy",
103104
},
104105
],
105106
},
@@ -114,8 +115,8 @@ const sidebars = {
114115
collapsed: true,
115116
items: [
116117
{
117-
type: 'autogenerated',
118-
dirName: 'reference/Model Providers',
118+
type: "autogenerated",
119+
dirName: "reference/Model Providers",
119120
},
120121
],
121122
},

0 commit comments

Comments
 (0)