Elffuss BraidHub

kikocis/continue public

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