Skip to content

Commit b0edb62

Browse files
authored
Merge branch 'main' into sg-arch-docs
2 parents 37f0209 + d6c3820 commit b0edb62

File tree

24 files changed

+8560
-8296
lines changed

24 files changed

+8560
-8296
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Navigate to the project directory by typing the following command in your termin
1818
cd sourcegraph-docs
1919
```
2020

21-
Before the dependencies are install make sure your local machine has the following versions of `node` and `pnpm`:
21+
Before the dependencies are install make sure your local machine has the following versions of `node` and `pnpm` installed:
2222

2323
* node: `v20.8.1`
2424
* pnpm: `8.13.1`
@@ -148,11 +148,10 @@ As you make changes to the documentation, the development server will automatica
148148

149149
### Previewing Vercel Deployments
150150

151-
When you open a PR Vercel deploys and provides you with a preview deployment link. To view your deployment, click the "Visit Preview" and then append `/docs` at the end of the URL. The original link gives you a `404`.
151+
When you open a PR Vercel deploys and provides you with a preview deployment link. To view your deployment, click the **Visit Preview** link from Vercel's deployment panel in your PRs and you get a preview of your docs
152152

153153
![CleanShot 2024-11-05 at 10 11 29@2x](https://github.com/user-attachments/assets/b0911e2e-95a7-4f56-b2ff-b659d13077d8)
154154

155-
156155
## Submitting your Contribution
157156

158157
Once you're satisfied with your changes, follow these steps:

baseai/memory/docs/index.ts renamed to baseai/memory/memory-sg-docs-live/index.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { MemoryI } from '@baseai/core';
22

33
const memoryDocs = (): MemoryI => ({
4-
name: 'docs',
5-
description: 'Docs folder of sourcegraph docs repository as an auto-synced memory',
4+
name: 'memory-sg-docs-live',
5+
description: 'An AI memory storing all Sourcegraph docs.',
66
git: {
77
enabled: true,
88
include: ['**/*.mdx'],
99
gitignore: true,
10-
deployedAt: '5f3fec8530280d01a783aadcdeb0ccc3f9cd8b70',
11-
embeddedAt: ''
10+
embeddedAt: '',
11+
deployedAt: 'ab6065ecc6c667a5b8c0ded35498a17659d34333'
1212
},
1313
documents: {
1414
meta: doc => {
@@ -22,3 +22,6 @@ const memoryDocs = (): MemoryI => ({
2222
});
2323

2424
export default memoryDocs;
25+
26+
// Old
27+
// deployedAt: '5f3fec8530280d01a783aadcdeb0ccc3f9cd8b70',

docs/admin/deploy/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Sourcegraph is a powerful code intelligence platform that can be deployed in var
1414
Carefully consider your organization's needs and technical expertise when selecting a Sourcegraph deployment method. Each option has different capabilities, resource requirements, and levels of technical expertise needed. Changing deployment methods in the future requires a complete redeployment and database migration.
1515

1616
Sourcegraph's recommended deployment methods are, in order:
17-
1. [Sourcegraph Cloud](#sourcegraph-cloud) - This provides a fully managed solution where Sourcegraph handles all of the maintence, monitoring, and upgrading tasks to give you an optimal Sourcegraph experience while immediately getting the latest features into your users' hands. This solution does require your code hosts to be connected to the Sourcegraph managed environment.
17+
1. [Sourcegraph Cloud](#sourcegraph-cloud) - This provides a fully managed solution where Sourcegraph handles all of the maintenance, monitoring, and upgrading tasks to give you an optimal Sourcegraph experience while immediately getting the latest features into your users' hands. This solution does require your code hosts to be connected to the Sourcegraph managed environment.
1818
2. [Kubernetes Helm](#kubernetes) - Sourcegraph's Kubernetes deployment provides the most robust, scalable, and vetted self-hosted solution. This solution is ideal across many self-hosted customers capable of deploying a multi-node instance, and can be supported by all mainstream managed Kubernetes platforms.
1919
3. [Docker Compose](#docker-compose) - Docker Compose provides the preferred single-node deployment solution for Sourcegraph. It can be a good option when the complexities and flexibility provided by Kubernetes Helm are not needed.
2020
4. [Kubernetes Kustomize](#kubernetes) - Helm is Sourcegraph's more standardized and vetted approach to deploying with Kubernetes, but if Kustomize is your preferred deployment method it is a viable and supported approach.
@@ -56,7 +56,7 @@ Single-node, self hosted solution for enterprises looking for a simpler, non-Kub
5656

5757
Best for enterprises looking for a self-hosted solution on the Cloud provider of their choice.
5858

59-
Machine images provide a preconfigured Sourcegraph instance that can be deployed in minutes with minimal effort. While they offer simplicity, they are designed as a standardized solution and do not support customization. Currently available on the following hosts:
59+
Machine images provide a pre-configured Sourcegraph instance that can be deployed in minutes with minimal effort. While they offer simplicity, they are designed as a standardized solution and do not support customization. Currently available on the following hosts:
6060

6161
<QuickLinks>
6262
<QuickLink title="Amazon Machine Image (AMI)" icon='lightbulb' href="/admin/deploy/machine-images/aws-ami" />

docs/admin/permissions/api.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ You can call `setRepositoryPermissionsForUsers` repeatedly to set permissions fo
9999

100100
## Setting sub-repository permissions for users
101101

102+
> NOTE: If a user has no sub-repo permissions set for a specific repository (assuming that they have general access to the repository), they will have access to the entire repository contents.
103+
102104
Sourcegraph supports permissions on a per-file/directory basis.
103105

104106
To enable the sub-repo permissions API, add the following to the [site configuration](/admin/config/site_config):

docs/admin/subscriptions/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ Sourcegraph administrators can view the lines of code count for each repository
3131
## Updating your license key
3232

3333
- Navigate to **Site admin > Configuration > Site configuration**, update the `licenseKey` field with the new value, and then click **Save changes**.
34+
- Note: once you apply the license it may take 10-15 minutes for the change to take effect. You can always restart the front-end service to apply the change faster, if needed.

docs/analytics/self-hosted.mdx renamed to docs/analytics/air-gapped.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Sourcegraph Self-Hosted Analytics
1+
# Sourcegraph Air-gapped Analytics
22

33
<Callout type="note">This feature is not yet available. Coming soon.</Callout>
44

5-
Sourcegraph Self-Hosted Analytics is coming soon! Self-hosted customers can view usage metrics in a locally deployed analytics service built on Grafana.
5+
Sourcegraph Air-gapped Analytics is coming soon! Air-gapped customers can view usage metrics in a locally deployed analytics service built on Grafana.
66

77
This product is in development now. If you would like to learn more, please contact your Sourcegraph representative.
88

docs/analytics/cloud.mdx

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

3-
The following instructions are for all Sourcegraph Cloud and self-hosted customers who have upgraded to a sufficient version of Sourcegraph (5.9+) and fully enabled usage telemetry. Customers that self-host can also view our [self-hosted analytics enablement](/self-hosted).
3+
The following instructions are for all Sourcegraph Cloud and self-hosted customers who have upgraded to a sufficient version of Sourcegraph (5.9+) and fully enabled usage telemetry.
44

55
![Sourcegraph-cloud-analytics](https://storage.googleapis.com/sourcegraph-assets/cloud-analytics.png)
66

docs/cody/capabilities/auto-edit.mdx

Lines changed: 84 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p className="subtitle">Auto-edit suggests code changes by analyzing cursor movements and typing. After you've made at least one character edit in your codebase, it begins proposing contextual modifications based on your cursor position and recent changes.</p>
44

5-
<Callout type="info">Auto-edit is currently supported in the VS Code extension with Sourcegraph v6.0+. It's available in Beta for Pro, Enterprise Starter and Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can [disable the feature flag](#auto-edit-access-for-enterprise-customers)</Callout>
5+
<Callout type="info">Auto-edit is currently supported with Sourcegraph v6.0+ for Pro, Enterprise Starter, and Enterprise accounts on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag.</Callout>
66

77
## Capabilities of auto-edit
88

@@ -12,9 +12,45 @@
1212
- Can propose similar changes across multiple locations based on recent edits
1313
- Can handle complex refactoring operations like adding parameters and unpacking functions
1414

15-
## Enabling auto-edit
15+
## How does auto-edit work?
16+
17+
The system detects potential changes based on the following:
18+
19+
- Cursor placement in the code
20+
- Recent changes made in similar contexts
21+
- Function usage patterns
22+
- Common refactoring patterns
23+
24+
## Auto-edit vs. Autocomplete
25+
26+
In terms of feature set and functionality, auto-edit and autocomplete have some key differences:
27+
28+
| **Feature** | **Autocomplete** | **Auto-edit** |
29+
| ---------------------- | -------------------------------------- | -------------------------------------------------- |
30+
| **Text modification** | Can only insert text, not delete | Can both insert and delete text |
31+
| **Cursor position** | Only proposes content after the cursor | Can modify code before and after the cursor |
32+
| **Suggestion trigger** | Suggests on every character typed | Proposes changes based on context and recent edits |
33+
34+
## Use cases
35+
36+
The auto-edit feature can help you with various repetitive tasks in your code:
1637

17-
Auto-edit is enabled by default for Cody Pro Enterprise Starter, and Enterprise users. You can opt out and switch back to **autocomplete** by selecting it from the suggestion mode in the Cody VS Code extension settings.
38+
- **Function signature refactoring**: Automatically suggests adding error returns, new parameters, or changing return types across function definitions. For example, when you modify a function to return both a value and an error, auto-edit helps update the function signature.
39+
- **Call site updates**: When you change a function's signature, auto-edit detects all locations where the function is called and suggests necessary modifications to match the new signature. This includes updating parameter orders, adding error handling, and adjusting return value usage.
40+
- **Test file maintenance**: Helps with repetitive updates in test files, such as modifying test assertions, updating mock objects, or changing test data structures. Auto-edit recognizes patterns from your recent changes and suggests similar modifications across related tests.
41+
- **Parameter refactoring**: Assists in adding, removing, or reorganizing function parameters. When you unpack a function to handle more cases, auto-edit helps restructure the parameter list and suggests corresponding changes at call sites.
42+
- **Type system modifications**: Auto-edit identifies and suggests consistent changes across your codebase when updating type definitions or interfaces. This includes updating variable declarations, function parameters, and return types to maintain type consistency.
43+
44+
Auto-edit is supported by both Cody VS Code and JetBrains plugins.
45+
46+
<Tabs>
47+
<Tab title="VS Code">
48+
49+
<Callout type="info">Auto-edit for VS Code is currently in Beta. It's available for Pro, Enterprise Starter, and Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag.</Callout>
50+
51+
## Enabling auto-edit in VS Code
52+
53+
Auto-edit is enabled by default for Cody Pro Enterprise Starter and Enterprise users. You can opt out and switch back to autocomplete by selecting it from the suggestion mode in the Cody VS Code extension settings.
1854

1955
Site admins can opt their organization out of the auto-edit feature by disabling it from their config settings.
2056

@@ -53,31 +89,56 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid
5389
}
5490
```
5591

56-
## How does auto-edit work?
92+
</Tab>
5793

58-
The system detects potential changes based on the following:
94+
<Tab title="JetBrains">
5995

60-
- Cursor placement in the code
61-
- Recent changes made in similar contexts
62-
- Function usage patterns
63-
- Common refactoring patterns
96+
<Callout type="info">Auto-edit for JetBrains IDEs is Experimental and supports JetBrains versions 7.84.0+. It's available for Pro, Enterprise Starter, and Enterprise users on Cody Gateway. Auto-edit requires Fireworks to be enabled as a provider. Enterprise customers without Fireworks enabled can disable the feature flag.</Callout>
6497

65-
## Auto-edit vs. Autocomplete
98+
## Enabling auto-edit in JetBrains
6699

67-
In terms of feature-set and functionality, auto-edit and autocomplete have some key differences:
100+
You can opt-in the auto-edit feature from the JetBrains Cody plugin settings.
68101

69-
| **Feature** | **Autocomplete** | **Auto-edit** |
70-
| ---------------------- | -------------------------------------- | -------------------------------------------------- |
71-
| **Text modification** | Can only insert text, not delete | Can both insert and delete text |
72-
| **Cursor position** | Only proposes content after the cursor | Can modify code before and after the cursor |
73-
| **Suggestion trigger** | Suggests on every character typed | Proposes changes based on context and recent edits |
102+
- Click the three-dot menu on the top right of the Cody plugin window and select **Open Cody Settings Editor**
103+
- This will open the `cody_settings.json` file in your editor
104+
- Here, add `"cody.suggestions.mode": "auto-edit"` setting to enable the auto-edit feature
74105

75-
## Use cases
106+
![JetBrains-Cody-Settings-Editor](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-cody-settings.png)
76107

77-
The auto-edit feature can help you with various repetitive tasks in your code:
108+
### Auto-edit access for Enterprise customers
78109

79-
- **Function signature refactoring**: Automatically suggests adding error returns, new parameters, or changing return types across function definitions. For example, when you modify a function to return both a value and an error, auto-edit helps update the function signature.
80-
- **Call site updates**: When you change a function's signature, auto-edit detects all locations where the function is called and suggests necessary modifications to match the new signature. This includes updating parameter orders, adding error handling, and adjusting return value usage.
81-
- **Test file maintenance**: Helps with repetitive updates in test files, such as modifying test assertions, updating mock objects, or changing test data structures. Auto-edit recognizes patterns from your recent changes and suggests similar modifications across related tests.
82-
- **Parameter refactoring**: Assists in adding, removing, or reorganizing function parameters. When you unpack a function to handle more cases, auto-edit helps restructure the parameter list and suggests corresponding changes at call sites.
83-
- **Type system modifications**: Auto-edit identifies and suggests consistent changes across your codebase when updating type definitions or interfaces. This includes updating variable declarations, function parameters, and return types to maintain type consistency.
110+
Auto-edit is available for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. Enabling the feature requires two steps:
111+
112+
1. Site administrators must:
113+
- Ensure the feature flag `cody-autoedit-experiment-enabled-flag` is enabled from the settings editor
114+
- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) (see below)
115+
2. Once enabled, auto-edit will become the default suggestion mode for all users
116+
3. Users can optionally switch back to autocomplete from the Cody extension settings
117+
4. Site admins can opt out of auto-edits using the `cody-autoedit-experiment-enabled-flag` feature flag
118+
119+
The following example demonstrates how to add Fireworks as an allowed LLM provider:
120+
121+
```json
122+
123+
"cody.enabled": true,
124+
"modelConfiguration": {
125+
"sourcegraph": {
126+
"modelFilters": {
127+
// Only allow "beta" and "stable" models.
128+
// Not "experimental" or "deprecated".
129+
"statusFilter": ["beta", "stable"],
130+
131+
// Allow any models provided by Anthropic, OpenAI, Google and Fireworks.
132+
"allow": [
133+
"anthropic::*", // Anthropic models
134+
"openai::*", // OpenAI models
135+
"google::*", // Google Gemini models
136+
"fireworks::*", // Open source models hosted by Sourcegraph
137+
],
138+
}
139+
}
140+
}
141+
```
142+
143+
</Tab>
144+
</Tabs>

docs/cody/capabilities/supported-models.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ Cody supports a variety of cutting-edge large language models for use in chat an
2323

2424
<Callout type="note">To use Claude 3 Sonnet models with Cody Enterprise, make sure you've upgraded your Sourcegraph instance to the latest version. </Callout>
2525

26-
### CLaude 3.7 Sonnet
26+
### Claude 3.7 Sonnet
2727

2828
Claude 3.7 has two variants — Claude 3.7 Sonnet and Claude 3.7 Extended Thinking — to support deep reasoning and fast, responsive edit workflows. This means you can use Claude 3.7 in different contexts depending on whether long-form reasoning is required or for tasks where speed and performance are a priority.
2929

30-
Claude 3.7 Extended Thinking version will be the recommended default chat model for Cloud customers. Self-hosted customers are encouraged to follow this recommendation, as Claude 3.7 outperforms 3.5 in most scenarios.
30+
Claude 3.7 Extended Thinking is the recommended default chat model for Cloud customers. Self-hosted customers are encouraged to follow this recommendation, as Claude 3.7 outperforms 3.5 in most scenarios.
3131

3232
#### Claude 3.7 for GCP
3333

34-
In addition, Sourcegraph Enterprise customers using GCP vertex (Google Cloud Platform) for Claude models can use both these variants of Claude 3.7 to optimize extended reasoning and deeper understanding. Customers using AWS Bedrock doesn't have Claude 3.7 Extended Thinking variant.
34+
In addition, Sourcegraph Enterprise customers using GCP Vertex (Google Cloud Platform) for Claude models can use both these variants of Claude 3.7 to optimize extended reasoning and deeper understanding. Customers using AWS Bedrock do not have the Claude 3.7 Extended Thinking variant.
3535

3636
<Callout type="info">Claude 3.7 Sonnet with thinking is not supported for BYOK deployments.</Callout>
3737

0 commit comments

Comments
 (0)