You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/pull_request_template.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
3
3
## Pull Request approval
4
4
5
-
Although pull request approval is not enforced for this repository in order to reduce friction, merging without a review will generate a ticket for the docs team to review your changes. So if possible, have your pull request approved before merging.
5
+
You will need to get your PR approved by at least one member of the Sourcegraph team. For reviews of docs formatting, styles, and component usage, please tag the docs team via the #docs Slack channel.
<pclassName="subtitle">Learn how Cody helps you get contextually-aware autocompletions for your codebase.</p>
3
+
<pclassName="subtitle">Learn how Cody helps you get contextually-aware autocompletion for your codebase.</p>
4
4
5
-
Cody provides intelligent **autocomplete** suggestions as you type using context from your code, such as your open files and file history. Cody autocompletes single lines or whole functions in any programming language, configuration file, or documentation. It’s powered by the latest instant LLM models for accuracy and performance.
5
+
Cody predicts what you're trying to write before you even type it. It offers single-line and multi-line suggestions based on the provided code context, ensuring accurate autocomplete suggestions. Cody autocomplete supports a [wide range of programming languages](/cody/faq#what-programming-languages-does-cody-support) because it uses LLMs trained on broad data.
6
6
7
-
Autocomplete supports any programming language because it uses LLMs trained on broad data. It works exceptionally well for Python, Go, JavaScript, and TypeScript.
Code autocompletions are optimized for both server-side and client-side performance, ensuring seamless integration into your coding workflow. The **default** autocomplete model for Cody Free, Pro, and Enterprise users is **[DeepSeek V2](https://huggingface.co/deepseek-ai/DeepSeek-V2)**, which significantly helps boost both the responsiveness and accuracy of autocomplete.
12
8
13
9
## Cody's autocomplete capabilities
14
10
15
-
Cody's autocompletion model has been designed to enhance speed, accuracy, and the overall user experience. Both Cody Free and Pro users can expect the following with Cody's autocomplete:
11
+
The autocompletion model is designed to enhance speed, accuracy, and the overall user experience that offers:
16
12
17
13
-**Increased speed and reduced latency**: The P75 latency is reduced by 350 ms, making the autocomplete function faster
18
14
-**Improved accuracy for multi-line completions**: Completions across multiple lines are more relevant and accurately aligned with the surrounding code context
19
15
-**Higher completion acceptance rates**: The average completion acceptance rate (CAR) is improved by more than 4%, providing a more intuitive user interaction
20
16
21
-
On the technical side, Cody's autocomplete is optimized for both server-side and client-side performance, ensuring seamless integration into your coding workflow. The **default** autocomplete model for Cody Free, Pro and Enterprise users is **[DeepSeek V2](https://huggingface.co/deepseek-ai/DeepSeek-V2)**, which significantly helps boost both the responsiveness and accuracy of autocomplete. Cody Enterprise users get **StarCoder** as the default autocomplete model.
22
-
23
-
## Prerequisites
17
+
## How does autocomplete work?
24
18
25
-
To view how Cody provides code completions , you'll need to have the following:
19
+
First, you'll need the following setup:
26
20
27
-
- A Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise account
28
-
- A supported editor extension (VS Code, JetBrains) installed
21
+
- A Free or Pro account via Sourcegraph.com or a Sourcegraph Enterprise instance
22
+
- A supported editor extension (VS Code, JetBrains)
29
23
30
-
## Working with code autocomplete
24
+
The autocomplete feature is enabled by default on all IDE extensions, i.e., VS Code and JetBrains. Generally, there's a checkbox in the extension settings that confirms whether the autocomplete feature is enabled or not. In addition, some autocomplete settings are optionally and explicitly supported by some IDEs. For example, JetBrains IDEs have settings that allow you to customize colors and styles of the autocomplete suggestions.
31
25
32
-
The autocomplete feature is enabled by default on all IDE extensions, i.e., VS Code and JetBrains. Generally, there's a checkbox in the extension settings that confirms whether the autocomplete feature is enabled or not. In addition, some autocomplete settings are optionally and explicitly supported by some IDEs. For example, JetBrains IDEs have custom settings that allow you to customize colors and styles of the autocomplete suggestions.
26
+
When you start typing, Cody will automatically provide suggestions and context-aware completions based on your coding patterns and the code context. These autocomplete suggestions appear as grayed text. Press the `Enter` or `Tab`to accept the suggestion.
33
27
34
-
You can start typing and Cody will automatically provide suggestions and context-aware completions based on your coding patterns and the code context. These autocomplete suggestions appear as grayed text. To accept the suggestion, press the `Enter` or `Tab` key.
## Configure autocomplete on an Enterprise Sourcegraph instance
37
33
34
+
<Callouttype="note">Users with admin access can only configure autocomplete settings.</Callout>
35
+
38
36
By default, a fully configured Sourcegraph instance picks a default LLM to generate code autocomplete. Custom models can be used for Cody autocomplete based on your specific requirements. To do so:
39
37
40
38
- Go to the **Site admin** of your Sourcegraph instance
41
39
- Navigate to **Configuration > Site configuration**
42
40
- Here, edit the `completionModel` option inside the `completions`
43
41
- Click the **Save** button to save the changes
44
42
45
-
<Callouttype="note">Cody autocomplete works only with Anthropic's Claude Instant model. Support for other models will be coming later.</Callout>
46
-
47
-
<Callouttype="info">Self-hosted customers must update to version 5.0.4 or more to use autocomplete.</Callout>
48
-
49
-
Before configuring the autocomplete feature, it's recommended to read more about [Enabling Cody on Sourcegraph Enterprise](/cody/clients/enable-cody-enterprise) guide.
50
-
51
-
Cody Autocomplete goes beyond basic suggestions. It understands your code context, offering tailored recommendations based on your current project, language, and coding patterns. Let's view a quick demo using the VS Code extension.
Here, Cody provides suggestions based on your current project, language, and coding patterns. Initially, the `code.js` file is empty. Start writing a function for `bubbleSort`. As you type, Cody suggests the function name and the function parameters.
58
-
59
-
Cody automatically suggests the next few code snippets for every new line based on your current context, i.e., functions for `insertionSort` and `selectionSort`.
43
+
Cody supports and uses a set of models for autocomplete. Learn more about these [here](/cody/capabilities/supported-models#autocomplete). It's also recommended to read the [Enabling Cody on Sourcegraph Enterprise](/cody/clients/enable-cody-enterprise) docs.
Copy file name to clipboardExpand all lines: docs/cody/faq.mdx
+26-1Lines changed: 26 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,32 @@ Yes, Cody relies on Sourcegraph for two essential functions:
41
41
42
42
### What programming languages does Cody support?
43
43
44
-
Cody supports a wide range of programming languages, including JavaScript, TypeScript, PHP, Python, Java, C/C++, C#, Ruby, Go, SQL, Swift, Objective-C, Perl, Rust, Kotlin, Scala, Groovy, R, MATLAB, Dart, Lua, Julia, COBOL, and shell scripting languages (like Bash, PowerShell).
44
+
Cody supports a wide range of programming languages, including:
45
+
46
+
- JavaScript
47
+
- TypeScript
48
+
- PHP
49
+
- Python
50
+
- Java
51
+
- C/C++
52
+
- C#
53
+
- Ruby
54
+
- Go
55
+
- SQL
56
+
- Swift
57
+
- Objective-C
58
+
- Perl
59
+
- Rust
60
+
- Kotlin
61
+
- Scala
62
+
- Groovy
63
+
- R
64
+
- MATLAB
65
+
- Dart
66
+
- Lua
67
+
- Julia
68
+
- COBOL
69
+
- Shell scripting languages (like Bash, PowerShell)
45
70
46
71
Cody's response quality on a programming language depends on many factors, including the underlying LLM being used. We monitor accuracy metrics across all languages and regularly make improvements. [Let us know](https://community.sourcegraph.com/) if you're seeing poor quality on a particular programming language.
Copy file name to clipboardExpand all lines: docs/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
Sourcegraph is a Code Intelligence platform that deeply understands your code, no matter how large or where it’s hosted, to power modern developer experiences.
2
2
3
-
-**AI code assistant**: Use Cody to read, write, and understand your entire codebase faster
3
+
-**Cody**: Use Cody our AI code assistant to read, write, and understand your entire codebase faster
4
4
-**Code search:** Search through all of your repositories across all branches and all code hosts
5
5
-**Code intelligence:** Navigate code, find references, see code owners, trace history, and more
6
6
-**Fix & refactor:** Roll out and track large-scale changes and migrations across repos at once
0 commit comments