Elffuss BraidHub

kikocis/continue public

1d6a8dcaaf43 · 5.6 KiBRawPermalink
1---
2title: "Next Edit"
3description: "Learn how Continue's Next Edit feature predicts and suggests your next code changes using AI, going beyond traditional autocomplete to anticipate entire code modifications"
4---
5
6<Warning>
7 Next Edit is currently an experimental feature. It requires [Mercury Coder
8 model](https://hub.continue.dev/inceptionlabs/mercury-coder) configured in
9 your Continue autocomplete settings and is not yet available for JetBrains
10 use.
11</Warning>
12
13## What is Next Edit?
14
15Next Edit is an advanced AI-powered code prediction feature that anticipates what changes you'll make next in your code. Unlike traditional autocomplete that reacts to your typing, Next Edit proactively analyzes your recent edits and coding patterns to suggest entire code modifications before you even start typing.
16
17Think of it as having an AI pair programmer that understands your coding flow and suggests the logical next step in your development process.
18
19## How Next Edit Works
20
21### The Prediction Process
22
231. **Context Analysis**: Captures your current cursor position and recent edit history
242. **Pattern Recognition**: Analyzes your coding patterns and the surrounding code context
253. **Next Step Prediction**: Uses specialized AI models to predict what you'll likely change next
264. **Visual Presentation**: Shows predictions as diff overlays rather than simple text completions
275. **Interactive Review**: Lets you accept (Tab) or reject (Esc) the suggested changes
286. **Jump to Next Edit Location**: Lets you jump (Tab) to the next edit location or reject (Esc)
29
30### Intelligent Triggering
31
32Next Edit activates automatically when:
33
34- You finish making a code change
35- The AI detects a logical continuation point
36- Specialized next-edit models are available
37- The current context suggests a predictable next step
38
39## Next Edit vs Traditional Autocomplete
40
41<AccordionGroup>
42 <Accordion title="Prediction Scope">
43 **Autocomplete**: Completes the current line or statement you're typing
44
45 **Next Edit**: Predicts entire code modifications across multiple lines
46 </Accordion>
47
48 <Accordion title="User Interaction">
49 **Autocomplete**: Shows ghost text at your cursor position
50
51 **Next Edit**: Displays diff overlays showing before/after changes, while also displaying ghost text if the change is purely additive.
52
53 </Accordion>
54
55 <Accordion title="Timing">
56 **Autocomplete**: Reactive - responds to what you're currently typing
57
58 **Next Edit**: Proactive - anticipates what you'll do next
59 </Accordion>
60
61 <Accordion title="Context Awareness">
62 **Autocomplete**: Focuses on immediate code completion
63
64 **Next Edit**: Analyzes recent edit patterns and broader code context
65 </Accordion>
66</AccordionGroup>
67
68## How to Use Next Edit
69
70### Prerequisites
71
72Next Edit requires:
73
74- Compatible AI models (Mercury Coder)
75- Continue development team access
76- VS Code (JetBrains support coming soon)
77- **API Keys**: Organizations can add API keys to [org secrets](/hub/secrets/secret-types) for team-wide access. Individual users need to provide their own API keys in their [model configuration](/customize/model-providers/overview)
78
79<Note>
80 To use Next Edit, you must have the Mercury Coder model configured in your
81 Continue autocomplete model settings. This model is specifically designed for
82 next edit predictions. Once it's been loaded, you must reload VS Code to
83 activate it.
84 <img
85 src="/images/features/autocomplete/images/mercury-coder-next-edit.png"
86 alt="Next Edit Model Setup"
87 />
88</Note>
89
90### Using Next Edit Predictions
91
92<Steps>
93 <Step title="Make a Code Change">
94 Edit your code normally. Next Edit will analyze your change patterns.
95 </Step>
96
97<Step title="Review Predictions">
98 When Next Edit activates, you'll see a diff overlay showing predicted changes
99 in an editable region.
100</Step>
101
102<Step title="Accept or Reject">
103 - **Tab**: Accept the prediction and apply changes - **Esc**: Reject the
104 prediction and continue coding normally
105</Step>
106
107 <Step title="Continue Coding">
108 If accepted, your cursor moves to the last changed line. If rejected, your
109 workflow continues uninterrupted.
110 </Step>
111</Steps>
112
113## What are the Model Requirements for Next Edit?
114
115### Specialized Models
116
117Next Edit requires AI models specifically trained for code prediction:
118
119- **Mercury Coder**: Primary model optimized for next edit prediction
120
121### Automatic Detection
122
123Continue automatically enables Next Edit when:
124
1251. Your configured autocomplete model supports next edit capabilities
1262. You have development team access permissions
1273. The current code context suggests predictable next steps
128
129## Best Practices
130
131<CardGroup cols={2}>
132 <Card title="Trust the Process" icon="robot">
133 Let Next Edit observe your coding patterns for a few editing sessions before expecting highly accurate predictions.
134 </Card>
135
136<Card title="Review Carefully" icon="magnifying-glass">
137 Always review suggested changes before accepting, especially for complex logic
138 modifications.
139</Card>
140
141<Card title="Provide Feedback" icon="message">
142 Have feedback? We want to hear it. __[Add your thoughts to our feedback
143 discussions](https://github.com/continuedev/continue/discussions/categories/feedback)__
144 to help us improve.
145</Card>
146
147 <Card title="Combine with Other Features" icon="puzzle-piece">
148 Use Next Edit alongside Continue's Chat and Agent modes for comprehensive AI-assisted development.
149 </Card>
150</CardGroup>
151
152---
153
154_Next Edit represents Continue's vision for proactive AI coding assistance that anticipates developer needs rather than just reacting to input. As this feature evolves, it will become a powerful tool for accelerating development workflows and reducing repetitive coding tasks._