Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
76 changes: 76 additions & 0 deletions docs/cody/capabilities/auto-edits.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Auto-edits

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 not Auto-edits) as per the decision here

Copy link
Member

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 👍


<p className="subtitle">Auto-edits 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>

<Callout type="info">Auto-edits 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>

## Capabilities of auto-edits

- Can automatically insert and delete text

- 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

Auto-edits 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.

### Auto-edits access for Enterprise customers

**TBD -- waiting for Aravind to provide the details.**

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

- Can only insert text, not delete

- Only proposes content after the cursor position

- Suggests on every character typed

Choose a reason for hiding this comment

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

This point looks same as Requires typing to trigger suggestions should we only keep one of them.
Also, another major limitation of autocomplete is that it doesn't propose anything when there is existing content after the cursor (suffix), but there is no such limitation in auto-edit.

Also @valerybugakov to any more limitation.

Copy link
Member

Choose a reason for hiding this comment

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

To be precise, our autocomplete implementation offers suggestions when we have only braces at the end of the current line but no other characters.

Copy link
Member

Choose a reason for hiding this comment

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

Only proposes content after the cursor position

There's also a limitation from the VS Code API: our autocomplete can only suggest content after the cursor position on the current line. So, if the model proposes an insertion into the middle or end of the following line, we don't have a way to render it. There's no such limitation for auto-edit.


Auto-edits:

- Can both insert and delete text

- Can modify code before and after the cursor position

- Proposes changes based on context and recent edits

- Can do everything autocomplete can do

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

## 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
- Sometimes requires manual deletion or cleanup of code
- Suggestions may not cover all similar instances of code that could be changed
Loading
Loading