-
Notifications
You must be signed in to change notification settings - Fork 76
Auto-edit docs #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-edit docs #899
Changes from 3 commits
1053fda
80ecc0b
eed8724
867fa9b
35260ee
b8516a1
713d69d
4d327f1
7112fc8
b2acdd3
68091e7
58b5111
deefb1a
8ccc0a9
64ce07c
46adec8
fb64839
0c8b350
9961cb6
94dc92d
6a10d16
7ff0d65
c11b266
c438e0e
24deab9
1b0e878
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Auto-edits | ||
|
|
||
| <p className="subtitle">Auto-edits is a feature that suggests changes while you navigate your codebase. It's the next generation of our Autocomplete feature.</p> | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <Callout type="info">Auto-edits is currently in the ........</Callout> | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Capabilities of auto-edits | ||
|
|
||
| - Can automatically insert and delete text | ||
|
|
||
| - Proposes changes by cursor placement without requiring typing | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Can modify code before and after the cursor position | ||
|
|
||
| - Can handle complex refactoring operations like adding parameters and unpacking functions | ||
|
|
||
| - Works with repetitive tasks, especially in test files | ||
|
|
||
| - Can propose similar changes across multiple locations based on recent edits | ||
|
|
||
| ## Enable auto-edits | ||
|
|
||
| **TBD** | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Auto-edits access for Enterprise customers | ||
|
|
||
| Configure auto-edits on an Enterprise Sourcegraph instance... | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| <Callout type="note">Users with admin access can only configure auto-edits settings.</Callout> | ||
|
|
||
| **TBD** | ||
|
|
||
| It's also recommended to read the [Enabling Cody on Sourcegraph Enterprise](/cody/clients/enable-cody-enterprise) docs. | ||
|
|
||
| ## How do auto-edits work? | ||
|
|
||
| The system detects potential changes based on: | ||
|
|
||
| - Cursor placement in the code | ||
|
|
||
| - Recent changes made in similar contexts | ||
|
|
||
| - Function usage patterns | ||
|
|
||
| - Common refactoring patterns | ||
|
|
||
| ## Auto-edits vs. Autocomplete | ||
|
|
||
| Autocomplete: | ||
|
|
||
| - Requires typing to trigger suggestions | ||
|
|
||
| - Can only insert text, not delete | ||
|
|
||
| - Only proposes content after the cursor position | ||
|
|
||
| - Suggests on every character typed | ||
|
||
|
|
||
| Auto-edits: | ||
|
|
||
| - Works by cursor placement alone, no typing needed | ||
|
||
|
|
||
| - Can both insert and delete text | ||
|
|
||
| - Can modify code before and after the cursor position | ||
|
|
||
| - Proposes changes based on context and recent edits | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Auto-edits use cases | ||
|
|
||
| 1. Function signature refactoring (adding error returns) | ||
|
|
||
| 2. Updating function call sites after signature changes | ||
|
|
||
| 3. Repetitive modifications in test files | ||
|
|
||
| 4. Parameter additions and function unpacking | ||
|
|
||
| 5. Type system updates across multiple locations | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Known limitations | ||
|
|
||
| - Sometimes doesn't propose all necessary changes | ||
|
|
||
| - May require manual deletion in some cases | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Certain changes may need to be applied manually | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - Sometimes, auto-edits fail to accept completions when a user has Vim installed and is currently in Vim’s normal mode | ||
jdorfman marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throughout the doc, we can mention
Auto-Edit(and notAuto-edits) as per the decision hereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, Hitesh already caught it 👍