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: docs/cody/capabilities/auto-edit.mdx
+65-20Lines changed: 65 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -41,29 +41,24 @@ The auto-edit feature can help you with various repetitive tasks in your code:
41
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
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
43
44
-
Auto-edit is supported by both Cody VS Codeand JetBrains plugins.
44
+
Auto-edit is supported by Cody VS Code, JetBrains, and Visual Studio plugins.
45
45
46
46
<Tabs>
47
47
<Tabtitle="VS Code">
48
48
49
-
<Callouttype="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
+
<Callouttype="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>
50
50
51
51
## Enabling auto-edit in VS Code
52
52
53
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.
54
54
55
55
Site admins can opt their organization out of the auto-edit feature by disabling it from their config settings.
56
56
57
-
### Auto-edit access for Enterprise customers
57
+
### Configure auto-edit access
58
58
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:
60
60
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)
67
62
68
63
The following example demonstrates how to add Fireworks as an allowed LLM provider:
69
64
@@ -93,28 +88,72 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid
93
88
94
89
<Tabtitle="JetBrains">
95
90
96
-
<Callouttype="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
+
<Callouttype="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>
97
92
98
93
## Enabling auto-edit in JetBrains
99
94
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.
101
98
102
99
- Click the three-dot menu on the top right of the Cody plugin window and select **Open Cody Settings Editor**
103
100
- This will open the `cody_settings.json` file in your editor
104
101
- Here, add `"cody.suggestions.mode": "auto-edit"` setting to enable the auto-edit feature
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:
111
108
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
+
<Tabtitle="Visual Studio">
138
+
139
+
<Callouttype="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.
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)
118
157
119
158
The following example demonstrates how to add Fireworks as an allowed LLM provider:
120
159
@@ -142,3 +181,9 @@ The following example demonstrates how to add Fireworks as an allowed LLM provid
142
181
143
182
</Tab>
144
183
</Tabs>
184
+
185
+
<Callouttype="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