Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1053fda
Auto-edits docs
MaedahBatool Jan 15, 2025
80ecc0b
initial draft
MaedahBatool Jan 15, 2025
eed8724
Add details about auto-edits feature
jdorfman Jan 15, 2025
867fa9b
Update auto-edits feature details with Hitesh's feedback
jdorfman Jan 15, 2025
35260ee
Update src/data/navigation.ts
jdorfman Jan 16, 2025
b8516a1
Rename auto-edits.mdx to auto-edit.mdx
jdorfman Jan 16, 2025
713d69d
feat: Rename "Auto-edits" to "Auto-edit"
jdorfman Jan 16, 2025
4d327f1
feat: Add auto-edit demo image and note for GCP upload
jdorfman Jan 16, 2025
7112fc8
feat: Clarify auto-edit access for Enterprise customers
jdorfman Jan 16, 2025
b2acdd3
feat: Add limitations to Auto-edit feature documentation
jdorfman Jan 16, 2025
68091e7
Merge branch 'main' into auto-edits-docs
MaedahBatool Jan 20, 2025
58b5111
mb-edits
MaedahBatool Jan 20, 2025
deefb1a
Update docs/cody/capabilities/auto-edit.mdx
jdorfman Jan 22, 2025
8ccc0a9
Merge branch 'main' into auto-edits-docs
MaedahBatool Jan 23, 2025
64ce07c
Merge branch 'main' into auto-edits-docs
MaedahBatool Jan 27, 2025
46adec8
Add minor edits
MaedahBatool Jan 27, 2025
fb64839
Replace static image with video for auto-edit feature
jdorfman Jan 27, 2025
0c8b350
Add steps to enable auto-edit feature
jdorfman Jan 28, 2025
9961cb6
Remove scope row from auto-edit comparison table
jdorfman Jan 28, 2025
94dc92d
Expand description of auto-edit capabilities (for Grace)
jdorfman Jan 28, 2025
6a10d16
Remove requirement for initial character edit in auto-edit feature
jdorfman Jan 28, 2025
7ff0d65
Simplify steps to enable auto-edit feature
jdorfman Jan 28, 2025
c11b266
Update allowed provider configuration
jdorfman Jan 28, 2025
c438e0e
fix(auto-edit): improve wording and consistency in feature description
jdorfman Jan 28, 2025
24deab9
docs(auto-edit): expand description of feature capabilities (via Arav…
jdorfman Jan 29, 2025
1b0e878
docs(auto-edit): add instructions for configuring Fireworks as an all…
jdorfman Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/cody/capabilities/auto-edit.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Auto-edit

<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>

<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.</Callout>

## Capabilities of auto-edit

- Can automatically insert and delete text
- Can modify code before and after the cursor position
- Works with repetitive tasks, especially in test files
- Can propose similar changes across multiple locations based on recent edits
- Can handle complex refactoring operations like adding parameters and unpacking functions

## Enabling auto-edit

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.

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

### Auto-edit access for Enterprise customers

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:

1. Site administrators must enable the feature flag `cody-autoedit-experiment-enabled-flag`
2. Once enabled, developers will receive a notification in their editor to turn it on

## How does auto-edit work?

The system detects potential changes based on the following:

- Cursor placement in the code
- Recent changes made in similar contexts
- Function usage patterns
- Common refactoring patterns

## Auto-edit vs. Autocomplete

In terms of feature-set and functionality, auto-edit and autocomplete have some key differences:

| **Feature** | **Autocomplete** | **Auto-edit** |
| ---------------------- | -------------------------------------- | -------------------------------------------------- |
| **Text modification** | Can only insert text, not delete | Can both insert and delete text |
| **Cursor position** | Only proposes content after the cursor | Can modify code before and after the cursor |
| **Suggestion trigger** | Suggests on every character typed | Proposes changes based on context and recent edits |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the amazing doc @MaedahBatool
I just noticed this section, I think Suggestion trigger for Auto-edit should be every char typed + Cursor movement within the codebase. Since based on context and recent edits are just the context sources which we use in the autocomplete as well.

| **Scope** | - | Can do everything autocomplete can do |

## Use cases

The auto-edit feature can help you with various repetitive tasks in your code:

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

## Known limitations

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