Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
89 changes: 89 additions & 0 deletions docs/cody/capabilities/auto-edits.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# 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 is a feature that suggests changes while you navigate your codebase. It's the next generation of our Autocomplete feature.</p>

<Callout type="info">Auto-edits is currently in the ........</Callout>

## Capabilities of auto-edits

- Can automatically insert and delete text

- Proposes changes by cursor placement without requiring typing

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

### Auto-edits access for Enterprise customers

Configure auto-edits on an Enterprise Sourcegraph instance...

<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

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:

- Works by cursor placement alone, no typing needed

Choose a reason for hiding this comment

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

I think this can be a bit mis-leading. It triggers both on typing + cursor movements. Suggestions on cursor movement, generally trigger after atleast one char is typed by the user (so if someone just opens the editor, and place their cursor -- they won't see any suggestions.)


- Can both insert and delete text

- Can modify code before and after the cursor position

- Proposes changes based on context and recent edits

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

- Sometimes doesn't propose all necessary changes

- May require manual deletion in some cases

- Certain changes may need to be applied manually

- Sometimes, auto-edits fail to accept completions when a user has Vim installed and is currently in Vim’s normal mode
Loading
Loading