Skip to content

Commit 58b5111

Browse files
committed
mb-edits
1 parent 68091e7 commit 58b5111

File tree

1 file changed

+16
-36
lines changed

1 file changed

+16
-36
lines changed
Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,64 @@
11
# Auto-edit
22

3-
<p className="subtitle">Auto-edit suggests code changes by analyzing your 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>
3+
<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 in the Experimental stage for all Cody users. Enterprise users can also use this, but with limited support. If you have feedback or questions, please visit our [support forum](https://community.sourcegraph.com/).</Callout>
5+
<Callout type="info">Auto-edit is currently available in VS Code extension in the Experimental stage for all Cody Pro users and Enterprise users on Cody Gateway (but with limited support).</Callout>
66

77
## Capabilities of auto-edit
88

99
- Can automatically insert and delete text
10-
1110
- Can modify code before and after the cursor position
12-
13-
- Can handle complex refactoring operations like adding parameters and unpacking functions
14-
1511
- Works with repetitive tasks, especially in test files
16-
1712
- Can propose similar changes across multiple locations based on recent edits
13+
- Can handle complex refactoring operations like adding parameters and unpacking functions
1814

1915
## Enabling auto-edit
2016

21-
Auto-edit is available exclusively for Pro and Enterprise users during the experimental release phase. Eligible Pro users will be gradually enrolled in the feature and will receive an in-editor notification when access is granted.
17+
Eligible Cody Pro users will gradually be given access to the auto-edit feature. Once you have it, you will receive an in-editor notification.
2218

2319
![Auto-edit demo](https://p21.p4.n0.cdn.zight.com/items/4guL2xzb/6d545dab-e2db-4114-a05e-c54b08e7f0bd.jpg?v=a3673b4b48aed41b1977858f18ba0369)
2420

2521
🔴 **Image to be uploaded to GCP** 🔴
2622

2723
### Auto-edit access for Enterprise customers
2824

29-
Auto-edit is available exclusively for Enterprise customers with [Sourcegraph Cody Gateway](/cody/core-concepts/cody-gateway#sourcegraph-cody-gateway) access. Enabling the feature requires two steps:
25+
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:
3026

31-
1. Site administrators must enable the feature flag `cody-autoedit-experiment-enabled-flag`
27+
1. Site administrators must enable the feature flag `cody-autoedit-experiment-enabled-flag`
3228
2. Once enabled, developers will receive a notification in their editor when the feature becomes available
3329

3430
## How does auto-edit work?
3531

36-
The system detects potential changes based on:
32+
The system detects potential changes based on the following:
3733

3834
- Cursor placement in the code
39-
4035
- Recent changes made in similar contexts
41-
4236
- Function usage patterns
43-
4437
- Common refactoring patterns
4538

4639
## Auto-edit vs. Autocomplete
4740

48-
Autocomplete:
49-
50-
- Can only insert text, not delete
51-
52-
- Only proposes content after the cursor position
41+
| **Feature** | **Autocomplete** | **Auto-edit** |
42+
| ---------------------- | -------------------------------------- | -------------------------------------------------- |
43+
| **Text modification** | Can only insert text, not delete | Can both insert and delete text |
44+
| **Cursor position** | Only proposes content after the cursor | Can modify code before and after the cursor |
45+
| **Suggestion trigger** | Suggests on every character typed | Proposes changes based on context and recent edits |
46+
| **Scope** | - | Can do everything autocomplete can do |
5347

54-
- Suggests on every character typed
48+
## Use cases
5549

56-
Auto-edit:
57-
58-
- Can both insert and delete text
59-
60-
- Can modify code before and after the cursor position
61-
62-
- Proposes changes based on context and recent edits
63-
64-
- Can do everything autocomplete can do
65-
66-
## Auto-edit use cases
50+
The auto-edit feature can help you with various repetitive tasks in your code:
6751

6852
1. Function signature refactoring (adding error returns)
69-
7053
2. Updating function call sites after signature changes
71-
7254
3. Repetitive modifications in test files
73-
7455
4. Parameter additions and function unpacking
75-
7656
5. Type system updates across multiple locations
7757

7858
## Known limitations
7959

8060
- Requires at least one character edit in the codebase before suggestions become active
8161
- May not propose all necessary changes in complex refactoring scenarios, requiring some manual edits
82-
- Suggestions are limited to a fixed number of lines around the cursor.
62+
- Suggestions are limited to a fixed number of lines around the cursor
8363
- Sometimes requires manual deletion or cleanup of code
8464
- Suggestions may not cover all similar instances of code that could be changed

0 commit comments

Comments
 (0)