Skip to content

Commit 995ce3b

Browse files
authored
Merge branch 'main' into baseai-memory
2 parents 4182e89 + f52265f commit 995ce3b

File tree

8 files changed

+67
-37
lines changed

8 files changed

+67
-37
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Pull Request approval
44

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.
Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,43 @@
11
# Autocomplete
22

3-
<p className="subtitle">Learn how Cody helps you get contextually-aware autocompletions for your codebase.</p>
3+
<p className="subtitle">Learn how Cody helps you get contextually-aware autocompletion for your codebase.</p>
44

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.
66

7-
Autocomplete supports any programming language because it uses LLMs trained on broad data. It works exceptionally well for Python, Go, JavaScript, and TypeScript.
8-
9-
<video width="1920" height="1080" loop playsInline controls style={{ width: '100%', height: 'auto' }}>
10-
<source src="https://storage.googleapis.com/sourcegraph-assets/Docs/Media/cody-in-action.mp4" type="video/mp4" />
11-
</video>
7+
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.
128

139
## Cody's autocomplete capabilities
1410

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:
1612

1713
- **Increased speed and reduced latency**: The P75 latency is reduced by 350 ms, making the autocomplete function faster
1814
- **Improved accuracy for multi-line completions**: Completions across multiple lines are more relevant and accurately aligned with the surrounding code context
1915
- **Higher completion acceptance rates**: The average completion acceptance rate (CAR) is improved by more than 4%, providing a more intuitive user interaction
2016

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?
2418

25-
To view how Cody provides code completions , you'll need to have the following:
19+
First, you'll need the following setup:
2620

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)
2923

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.
3125

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.
3327

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.
28+
<video width="1920" height="1080" loop playsInline controls style={{ width: '100%', height: 'auto' }}>
29+
<source src="https://storage.googleapis.com/sourcegraph-assets/Docs/Media/cody-in-action.mp4" type="video/mp4" />
30+
</video>
3531

3632
## Configure autocomplete on an Enterprise Sourcegraph instance
3733

34+
<Callout type="note">Users with admin access can only configure autocomplete settings.</Callout>
35+
3836
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:
3937

4038
- Go to the **Site admin** of your Sourcegraph instance
4139
- Navigate to **Configuration > Site configuration**
4240
- Here, edit the `completionModel` option inside the `completions`
4341
- Click the **Save** button to save the changes
4442

45-
<Callout type="note">Cody autocomplete works only with Anthropic's Claude Instant model. Support for other models will be coming later.</Callout>
46-
47-
<Callout type="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.
52-
53-
<video width="1920" height="1080" loop playsInline controls style={{ width: '100%', height: 'auto' }}>
54-
<source src="https://storage.googleapis.com/sourcegraph-assets/Docs/Media/contexual-autocpmplete.mp4" type="video/mp4" />
55-
</video>
56-
57-
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.

docs/cody/faq.mdx

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,32 @@ Yes, Cody relies on Sourcegraph for two essential functions:
4141

4242
### What programming languages does Cody support?
4343

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)
4570

4671
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.
4772

docs/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
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.
22

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
44
- **Code search:** Search through all of your repositories across all branches and all code hosts
55
- **Code intelligence:** Navigate code, find references, see code owners, trace history, and more
66
- **Fix & refactor:** Roll out and track large-scale changes and migrations across repos at once

docs/technical-changelog.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ This page documents all notable changes to Sourcegraph. For more detailed change
44

55
{/* CHANGELOG_START */}
66

7+
78
# sourcegraph 5 Release 8 Patch 1
89

10+
## v5.8.1579
11+
- [sourcegraph](https://github.com/sourcegraph/sourcegraph/releases/tag/v5.8.1579)
12+
- [docker-compose](https://github.com/sourcegraph/deploy-sourcegraph-docker/releases/tag/v5.8.1579)
13+
- [helm](https://github.com/sourcegraph/deploy-sourcegraph-helm/releases/tag/v5.8.1579)
14+
- [kustomize](https://github.com/sourcegraph/deploy-sourcegraph-kustomize/releases/tag/v5.8.1579)
15+
916
### Features
1017

1118
#### Telemetry

src/components/PreCodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export async function PreCodeBlock({ children, ...props }: PreProps) {
7979
<div className="relative">
8080
<pre className="pt-12" data-language={lang} data-theme={dataTheme}>
8181
<CopyButton lang={lang} text={codeContent} />
82-
{codeContent}
82+
{children}
8383
</pre>
8484
</div>
8585
)

src/utils/constants/supportedModelsConfiguration.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const chatTableDataConf: any = {
1111
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: 'anthropic/claude-3-sonnet-20240229' },
1212
{ provider: 'Anthropic', model: 'claude-3 Opus', status: 'anthropic/claude-3-opus-20240229' },
1313
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: 'anthropic/claude-3-5-sonnet-20240620' },
14+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: 'anthropic/claude-3-5-sonnet-20241022' },
1415
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: 'google/gemini-1.5-pro-latest' },
1516
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: 'google/gemini-1.5-flash-latest' },
1617
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -28,6 +29,7 @@ export const chatTableDataConf: any = {
2829
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '❌' },
2930
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '❌' },
3031
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '❌' },
32+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '❌' },
3133
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
3234
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
3335
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -45,6 +47,7 @@ export const chatTableDataConf: any = {
4547
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: 'anthropic/claude-3-sonnet-20240229' },
4648
{ provider: 'Anthropic', model: 'claude-3 Opus', status: 'anthropic/claude-3-opus-20240229' },
4749
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: 'anthropic/claude-3-5-sonnet-20240620' },
50+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: 'anthropic/claude-3-5-sonnet-20241022' },
4851
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
4952
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
5053
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -62,6 +65,7 @@ export const chatTableDataConf: any = {
6265
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '❌' },
6366
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '❌' },
6467
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '❌' },
68+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '❌' },
6569
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: 'google/gemini-1.5-pro-latest' },
6670
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: 'google/gemini-1.5-flash-latest' },
6771
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -79,6 +83,7 @@ export const chatTableDataConf: any = {
7983
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '❌' },
8084
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '❌' },
8185
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '❌' },
86+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '❌' },
8287
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
8388
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
8489
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -96,13 +101,14 @@ export const chatTableDataConf: any = {
96101
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: 'anthropic.claude-3-sonnet-20240229-v1:0' },
97102
{ provider: 'Anthropic', model: 'claude-3 Opus', status: 'anthropic.claude-3-opus-20240229-v1:0' },
98103
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: 'anthropic.claude-3-5-sonnet-20240620-v1:0' },
104+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: 'anthropic.claude-3-5-sonnet-20241022-v2:0' },
99105
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
100106
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
101107
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
102108
{ provider: 'Ollama*', model: 'variety', status: '❌' }
103109
],
104110
'GCP Vertex': [
105-
{ provider: 'OpenAI', model: 'gpt-3.5 turbo', status: '❌' },
111+
{ provider: 'OpenAI', model: 'gpt-3.5 turbo', status: '❌' },
106112
{ provider: 'OpenAI', model: 'gpt-4', status: '❌' },
107113
{ provider: 'OpenAI', model: 'gpt-4 turbo', status: '❌' },
108114
{ provider: 'OpenAI', model: 'gpt-4o', status: '❌' },
@@ -113,6 +119,7 @@ export const chatTableDataConf: any = {
113119
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: 'claude-3-sonnet@20240229' },
114120
{ provider: 'Anthropic', model: 'claude-3 Opus', status: 'claude-3-opus@20240229' },
115121
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: 'claude-3-5-sonnet@20240620' },
122+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: 'claude-3-5-sonnet@20241022' },
116123
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
117124
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
118125
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },

src/utils/constants/supportedModelsEnt.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export const chatTableDataEnt: any = {
2727
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '✅ *(5.3.9104 and above)' },
2828
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '✅ *(5.3.9104 and above)' },
2929
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '✅ *(5.5.0 and above)' },
30+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '✅ *(5.9 and above)' },
3031
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '✅ *(5.4.5099 and above)' },
3132
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '✅ *(5.4.5099 and above)' },
3233
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -44,6 +45,7 @@ export const chatTableDataEnt: any = {
4445
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '❌' },
4546
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '❌' },
4647
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '❌' },
48+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '❌' },
4749
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
4850
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
4951
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -61,6 +63,7 @@ export const chatTableDataEnt: any = {
6163
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '✅ *(5.3.9104 and above)' },
6264
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '✅ *(5.3.9104 and above)' },
6365
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '✅ *(5.5.0 and above)' },
66+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '✅ *(5.5.0 and above)' },
6467
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
6568
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
6669
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -78,6 +81,7 @@ export const chatTableDataEnt: any = {
7881
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '❌' },
7982
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '❌' },
8083
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '❌' },
84+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '❌' },
8185
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '✅ *(5.4.5099 and above)' },
8286
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '✅ *(5.4.5099 and above)' },
8387
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -95,6 +99,7 @@ export const chatTableDataEnt: any = {
9599
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '❌' },
96100
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '❌' },
97101
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '❌' },
102+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '❌' },
98103
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
99104
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
100105
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -112,6 +117,7 @@ export const chatTableDataEnt: any = {
112117
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '✅ *(5.3.9104 and above)' },
113118
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '✅ *(5.3.9104 and above)' },
114119
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '✅ *(5.5.0 and above)' },
120+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '✅ *(5.5.0 and above)' },
115121
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
116122
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
117123
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },
@@ -129,6 +135,7 @@ export const chatTableDataEnt: any = {
129135
{ provider: 'Anthropic', model: 'claude-3 Sonnet', status: '✅ *(5.3.9104 and above)' },
130136
{ provider: 'Anthropic', model: 'claude-3 Opus', status: '✅ *(5.3.9104 and above)' },
131137
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet', status: '✅ *(5.5.0 and above)' },
138+
{ provider: 'Anthropic', model: 'claude-3.5 Sonnet (Latest)', status: '✅ *(5.5.0 and above)' },
132139
{ provider: 'Google', model: 'Gemini 1.5 Pro', status: '❌' },
133140
{ provider: 'Google', model: 'Gemini 1.5 Flash', status: '❌' },
134141
{ provider: 'Fireworks', model: 'mixtral 8x7b', status: '❌' },

0 commit comments

Comments
 (0)