Skip to content

Commit ed4a6b8

Browse files
Auto-edit GA for JetBrains and Visual Studio (#1236)
- https://linear.app/sourcegraph/issue/PROD-597/enablement-ga-auto-edit-in-jetbrains-and-visual-studio --------- Co-authored-by: graceshih-sg <grace.shih@sourcegraph.com>
1 parent 8ee0cc1 commit ed4a6b8

File tree

1 file changed

+65
-20
lines changed

1 file changed

+65
-20
lines changed

docs/cody/capabilities/auto-edit.mdx

Lines changed: 65 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,24 @@ The auto-edit feature can help you with various repetitive tasks in your code:
4141
- **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.
4242
- **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.
4343

44-
Auto-edit is supported by both Cody VS Code and JetBrains plugins.
44+
Auto-edit is supported by Cody VS Code, JetBrains, and Visual Studio plugins.
4545

4646
<Tabs>
4747
<Tab title="VS Code">
4848

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>
49+
<Callout type="info">Auto-edit is 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>
5050

5151
## Enabling auto-edit in VS Code
5252

5353
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.
5454

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

57-
### Auto-edit access for Enterprise customers
57+
### Configure auto-edit access
5858

59-
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:
59+
Auto-edit is available as default for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. To configure auto-edit:
6060

61-
1. Site administrators must:
62-
- Ensure the feature flag `cody-autoedit-experiment-enabled-flag` is enabled (enabled by default)
63-
- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters) (see below)
64-
2. Once enabled, auto-edit will become the default suggestion mode for all users
65-
3. Users can optionally switch back to autocomplete from the Cody extension settings
66-
4. Site admins can opt out of auto-edits using the `cody-autoedit-experiment-enabled-flag` feature flag
61+
- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters)
6762

6863
The following example demonstrates how to add Fireworks as an allowed LLM provider:
6964

@@ -93,28 +88,72 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid
9388

9489
<Tab title="JetBrains">
9590

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>
91+
<Callout type="info">JetBrains IDEs support auto-edit for 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>
9792

9893
## Enabling auto-edit in JetBrains
9994

100-
You can opt-in the auto-edit feature from the JetBrains Cody plugin settings.
95+
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 JetBrains extension settings.
96+
97+
Site admins can opt their organization out of the auto-edit feature by disabling it from their config settings.
10198

10299
- Click the three-dot menu on the top right of the Cody plugin window and select **Open Cody Settings Editor**
103100
- This will open the `cody_settings.json` file in your editor
104101
- Here, add `"cody.suggestions.mode": "auto-edit"` setting to enable the auto-edit feature
105102

106103
![JetBrains-Cody-Settings-Editor](https://storage.googleapis.com/sourcegraph-assets/Docs/jb-cody-settings.png)
107104

108-
### Auto-edit access for Enterprise customers
105+
### Configure auto-edit access
109106

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:
107+
Auto-edit is available as default for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. To configure auto-edit:
111108

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
109+
- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters)
110+
111+
The following example demonstrates how to add Fireworks as an allowed LLM provider:
112+
113+
```json
114+
115+
"cody.enabled": true,
116+
"modelConfiguration": {
117+
"sourcegraph": {
118+
"modelFilters": {
119+
// Only allow "beta" and "stable" models.
120+
// Not "experimental" or "deprecated".
121+
"statusFilter": ["beta", "stable"],
122+
123+
// Allow any models provided by Anthropic, OpenAI, Google and Fireworks.
124+
"allow": [
125+
"anthropic::*", // Anthropic models
126+
"openai::*", // OpenAI models
127+
"google::*", // Google Gemini models
128+
"fireworks::*", // Open source models hosted by Sourcegraph
129+
],
130+
}
131+
}
132+
}
133+
```
134+
135+
</Tab>
136+
137+
<Tab title="Visual Studio">
138+
139+
<Callout type="info">Visual Studio supports auto-edit for versions 17.6 and above. 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>
140+
141+
## Enabling auto-edit in Visual Studio
142+
143+
Auto-edit is enabled by default for Cody Pro Enterprise Starter and Enterprise users. Two settings must be enabled by default in the Visual Studio Cody extension settings to make the auto-edit feature work.
144+
145+
1. Automatically trigger completions
146+
2. Enable Cody Auto-edit
147+
148+
You can opt out and switch back to autocomplete by deselecting it from the Cody Visual Studio extension settings.
149+
150+
![Visual-Studio-Cody-Settings-Editor](https://storage.googleapis.com/sourcegraph-assets/Docs/visual-studio-auto-edit-settings.png)
151+
152+
### Configure auto-edit access
153+
154+
Auto-edit is available as default for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. To configure auto-edit:
155+
156+
- Add `fireworks::*` as an [allowed provider](https://sourcegraph.com/docs/cody/enterprise/model-configuration#model-filters)
118157

119158
The following example demonstrates how to add Fireworks as an allowed LLM provider:
120159

@@ -142,3 +181,9 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid
142181

143182
</Tab>
144183
</Tabs>
184+
185+
<Callout type="info">Self-hosted customers get autocomplete as default. They cannot opt-in for auto-edit until they allow gateway access to Cody.</Callout>
186+
187+
## Disable auto-edit
188+
189+
To turn-off the auto-edit feature, set the feature flag `cody-autoedit-experiment-enabled-flag` as `disabled` in your site configuration. Doing so will switch back to autocomplete as your default suggestion mode.

0 commit comments

Comments
 (0)