Skip to content

Commit c0775dd

Browse files
authored
Merge branch 'main' into main
2 parents 311d81b + 1346a18 commit c0775dd

File tree

10 files changed

+711
-50
lines changed

10 files changed

+711
-50
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sourcegraph Docs
22

3-
<!-- Working branch for September 2024 Release -->
3+
<!-- Working branch for October 2024 Release -->
44

55
Welcome to the Sourcegraph documentation! We're excited to have you contribute to our docs. We've recently rearchitectured our docs tech stack — powered by Next.js, TailwindCSS and deployed on Vercel. This guide will walk you through the process of contributing to our documentation using the new tech stack.
66

docs.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const config = {
2-
DOCS_LATEST_VERSION: '5.7'
2+
DOCS_LATEST_VERSION: '5.8'
33
};
44

55
module.exports = config;

docs/CHANGELOG.mdx

Lines changed: 603 additions & 0 deletions
Large diffs are not rendered by default.

docs/admin/code_hosts/aws_codecommit.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,24 @@ To add CodeCommit repositories in Docker Container:
8787
1. Follow the rest of the steps detailed in the [AWS SSH setup guide](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html) to make sure you can connect to the code host locally.
8888
1. Confirm you have the connection by running the following ssh command locally: `ssh git-codecommit.us-west-1.amazonaws.com` (Update link with your server region)
8989
1. Confirm you can clone the repository locally.
90+
91+
### Configuring SSH credentials in the Web UI
92+
93+
```json
94+
{
95+
"gitURLType": "ssh",
96+
"gitSSHKeyID": "<SSH key ID>",
97+
"gitSSHCredential": {
98+
// make sure the key is base64 encoded
99+
// $ cat ~/.ssh/id_rsa | base64
100+
"privateKey": "<base64 encoded of the SSH private key>",
101+
"passphrase": "<passphrase if applicable, omit if none is needed>"
102+
}
103+
}
104+
```
105+
106+
### Mounting SSH keys into the container
107+
90108
1. Copy all the files at your `$HOME/.ssh directory` to `$HOME/.sourcegraph/config/ssh` directory. See [docs](/admin/deploy/docker-single-container/#ssh-authentication-config-keys-knownhosts) for more information about our ssh file system.
91109
1. Read our [guide here](/admin/deploy/docker-compose/#git-ssh-configuration) for Docker Compose deployments
92110
1. Read our [guide here](/admin/deploy/kubernetes/configure#ssh-for-cloning) for Kubernetes deployments

docs/admin/repo/auth.mdx

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,47 @@ If authentication (HTTP(S) or SSH) is required to `git clone` a repository then
44

55
First, ensure your **Site admin > Manage code hosts** code host configuration is configured to use SSH. For example, by setting the `gitURLType` field to "ssh". Alternatively, you may use the "Generic Git host" code host type, which allows you to directly specify Git repository URLs for cloning.
66

7-
Then, follow the directions below depending on your deployment type:
7+
Then, you need to supply the SSH keys and passphrase to Sourcegraph if applicable. You have two options:
8+
9+
- **Option 1**: Configure the SSH credentials in code host configuration in the Web UI. (Recommended)
10+
- **Option 2**: Mount the SSH keys into the container.
11+
12+
## Configuring SSH credentials in the Web UI (Recommended)
13+
14+
In supported code hosts configuration, you can provide the credentials in the JSON configuration. For example:
15+
16+
```json
17+
{
18+
"url": "https://github.com",
19+
"token": "<personal access token>",
20+
"gitURLType": "ssh",
21+
"gitSSHCredential": {
22+
// make sure the key is base64 encoded
23+
// $ cat ~/.ssh/id_rsa | base64
24+
"privateKey": "<base64 encoded of the SSH private key>",
25+
"passphrase": "<passphrase if applicable, omit if none is needed>"
26+
}
27+
}
28+
```
29+
30+
Some providers may require additional configuration, consult the [code host specific documentation](/admin/code_hosts/) for more information.
31+
32+
## Mounting SSH keys into the container
833

934
- [Sourcegraph with Docker Compose](/admin/deploy/docker-compose/): See [the Docker Compose git configuration guide](/admin/deploy/docker-compose/#git-configuration).
1035
- [Sourcegraph with Kubernetes](/admin/deploy/kubernetes/): See [Configure repository cloning via SSH](/admin/deploy/kubernetes/configure#ssh-for-cloning).
1136
- [Single-container Sourcegraph](/admin/deploy/docker-single-container/): See [the single-container git configuration guide](/admin/deploy/docker-single-container/#git-configuration-and-authentication).
1237

13-
>NOTE: Repository access over SSH is not yet supported on [Sourcegraph Cloud](/cloud/).
14-
1538
## Troubleshooting
1639

40+
### Error: `illegal base64 data at input byte 0`
41+
42+
This error indicates that the provided private key is not base64-encoded. Ensure that the private key is base64-encoded before providing it to Sourcegraph.
43+
44+
```bash
45+
cat ~/.ssh/id_rsa | base64
46+
```
47+
1748
### What should be included in my config file?
1849

1950
We recommend adding the `StrictHostKeyChecking no` and `AddKeysToAgent yes` flags to prevent the need to give permission interactively when cloning from a new host.

docs/cody/clients/feature-reference.mdx

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,36 @@
44

55
## Chat
66

7-
| **Feature** | **VS Code** | **JetBrains** | **Web** |
8-
| ---------------------------------------- | ----------- | ------------- | -------------------- |
9-
| Chat with Cody ||||
10-
| Chat history ||||
11-
| Clear chat history ||||
12-
| Edit sent messages ||||
13-
| Show context files ||||
14-
| @-file ||||
15-
| @-symbol ||||
16-
| Ollama support (experimental) ||||
17-
| LLM Selection ||||
18-
| **Context Selection** | | | |
19-
| Single-repo context ||||
20-
| Multi-repo context ||| ✅ (public code only) |
21-
| Local context ||||
22-
| OpenCtx context providers (experimental) ||||
7+
| **Feature** | **VS Code** | **JetBrains** | **Web** | **CLI** |
8+
| ---------------------------------------- | ----------- | ------------- | -------------------- | ------- |
9+
| Chat with Cody |||||
10+
| Chat history |||||
11+
| Clear chat history |||||
12+
| Edit sent messages |||||
13+
| Show context files |||||
14+
| @-file |||||
15+
| @-symbol |||||
16+
| Ollama support (experimental) |||||
17+
| LLM Selection |||||
18+
| **Context Selection** | | | | |
19+
| Single-repo context |||||
20+
| Multi-repo context ||| ✅ (public code only) ||
21+
| Local context |||||
22+
| OpenCtx context providers (experimental) |||||
2323
| **Prompts and Commands** | | | |
24-
| Access to prompts and Prompt library ||||
25-
| Custom commands ||||
26-
| Edit code ||||
27-
| Generate unit test ||||
28-
| Ask Cody to Fix ||||
24+
| Access to prompts and Prompt library |||||
25+
| Custom commands |||||
26+
| Edit code |||||
27+
| Generate unit test |||||
28+
| Ask Cody to Fix |||||
2929

3030
## Code Autocomplete
3131

3232
| **Feature** | **VS Code** | **JetBrains** |
3333
| --------------------------------------------- | ----------- | ------------- |
3434
| Single and multi-line autocompletion |||
3535
| Cycle through multiple completion suggestions |||
36+
| Accept suggestions word-by-word |||
3637
| Ollama support (experimental) |||
3738

3839
Few exceptions that apply to Cody Pro and Cody Enterprise users:

docs/cody/core-concepts/cody-gateway.mdx

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
Sourcegraph Cody Gateway powers the default `"provider": "sourcegraph"` and Cody completions for Sourcegraph Enterprise users. It supports a variety of upstream LLM providers, such as [Anthropic](https://www.anthropic.com/) and [OpenAI](https://openai.com/), with rate limits, quotas, and model availability tied to your Sourcegraph Enterprise subscription.
88

9+
## Supported Models
10+
11+
See our page on [Supported LLMs](/cody/capabilities/supported-models) for a current list of supported models and providers.
12+
913
## Using Cody Gateway in Sourcegraph Enterprise
1014

1115
To enable completions provided by Cody Gateway on your Sourcegraph Enterprise instance, make sure your license key is set, and Cody is enabled in your [site configuration](/admin/config/site_config):
@@ -14,6 +18,9 @@ To enable completions provided by Cody Gateway on your Sourcegraph Enterprise in
1418
{
1519
"licenseKey": "<...>",
1620
"cody.enabled": true,
21+
"completions": {
22+
"provider": "sourcegraph"
23+
}
1724
}
1825
```
1926

@@ -27,25 +34,6 @@ Cody Gateway is hosted at `cody-gateway.sourcegraph.com`. To use Cody Gateway, y
2734

2835
<Callout type="warning">Sourcegraph Cody Gateway access must be included in your Sourcegraph Enterprise subscription. You can verify it by checking it with your account manager. If you are a [Sourcegraph Cloud](/cloud/) user, Cody is enabled by default on your instance starting with Sourcegraph 5.1.</Callout>
2936

30-
## Configuring custom models
31-
32-
To configure custom models for various Cody configurations (for example, `"completions"`), specify the desired model with the upstream provider as a prefix to the name of the model. For example, to use the `claude-2` model from Anthropic, you would configure:
33-
34-
```json
35-
{
36-
"completions": { "chatModel": "anthropic/claude-2.0" },
37-
}
38-
```
39-
40-
The currently supported upstream providers for models are:
41-
42-
- [`anthropic/`](https://www.anthropic.com/)
43-
- [`openai/`](https://openai.com/)
44-
45-
For Sourcegraph Enterprise customers, model availability depends on your Sourcegraph Enterprise subscription.
46-
47-
<Callout type="warning">When using OpenAI models for completions, only chat completions will work - code completions are currently unsupported.</Callout>
48-
4937
## Rate limits and quotas
5038

5139
Rate limits, quotas, and model availability are tied to your Sourcegraph Enterprise license for Sourcegraph Enterprise instances.
@@ -62,6 +50,4 @@ In addition to the above, we may throttle concurrent requests to Cody Gateway pe
6250

6351
Sourcegraph Cody Gateway does not retain sensitive data (prompt test and source code included in requests, etc.) from any traffic received. Only rate limit consumption per Sourcegraph Enterprise license and some high-level diagnostic data (error codes from upstream, numeric/enum request parameters, etc) are tracked.
6452

65-
The code that powers Cody Gateway is also [source-available](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph$+f:cmd/cody-gateway+lang:go&patternType=keyword&groupBy=path) for audit.
66-
6753
For more details about Cody Gateway security practices, please reach out to your account manager. You can also refer to the [Cody usage and privacy notice](https://about.sourcegraph.com/terms/cody-notice) for more privacy details about Cody in general.

docs/cody/troubleshooting.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ On the free plan, Cody provides **unlimited autocomplete suggestions** and **200
7373

7474
On the Pro and Enterprise plans, there are much higher limits that are used to keep our services operational. These limits reset within a day.
7575

76-
### Error logging in VS Code on Linux
76+
### Error logging in VS Code on Linux and Windows
7777

7878
If you encounter difficulties logging in to Cody on Linux using your Sourcegraph instance URL, along with a valid access token, and notice that the sign-in process in VS Code hangs, it might be related to underlying networking rules concerning SSL certificates.
7979

@@ -83,6 +83,12 @@ To address this, follow these steps:
8383
- In your terminal, type and run the following command: `echo "export NODE_TLS_REJECT_UNAUTHORIZED=0">> ~/.bashrc`
8484
- Restart VS Code and try the sign in process again
8585

86+
On Windows,
87+
88+
- Close Visual Studio Code
89+
- In your Command Prompt or PowerShell window, run the following command: `setx NODE_TLS_REJECT_UNAUTHORIZED 0`
90+
- Restart Visual Studio Code and try the sign in process again
91+
8692
### Error exceeding `localStorage` quota
8793

8894
When using Cody chat, you may come across this error:
@@ -168,3 +174,18 @@ If you notice the Cody agent reaching 100% CPU utilization, try the following:
168174
1. Disable the Cody plugin.
169175
1. Re-enable the plugin.
170176
This simple action of turning the plugin off and on again can often resolve the high CPU usage issue.
177+
178+
179+
180+
## Android Studio extension
181+
182+
### Cody cannot start. Stuck on spinning icon.
183+
184+
This issue occurs because JCEF isn't supported in Android Studio and causes Cody not to start. The suggested workaround is to;
185+
186+
1. Go to `Help` > `Find Action: Registry`.
187+
1. Scroll to `ide.browser.jcef.sandbox.enable`.
188+
1. Disable that key and close.
189+
1. Then go to `Help` > `Find Action: Choose Boot runtime for the IDE`.
190+
1. Select the last option.
191+
1. Restart Android Studio.

docs/legacy.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
<Accordion title="Sourcegraph 5.X">
66

7+
- [5.7](https://5.7.sourcegraph.com/)
78
- [5.6](https://5.6.sourcegraph.com/)
89
- [5.5](https://5.5.sourcegraph.com/)
910
- [5.4](https://5.4.sourcegraph.com/docs)

src/data/versions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export const versions: VersionI[] = [
1515
url: '/',
1616
},
1717
{
18-
name: 'v5.6',
19-
url: 'https://5.6.sourcegraph.com/'
18+
name: 'v5.7',
19+
url: 'https://5.7.sourcegraph.com/'
2020
},
2121
];
2222

0 commit comments

Comments
 (0)