Elffuss BraidHub

kikocis/continue public

main · 5.7 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/inception/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- 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 Instinct or Mercury Coder model configured
81 in your Continue autocomplete model settings. This model is specifically
82 designed for next edit predictions. Once it's been loaded, you must reload VS
83 Code to activate it.
84 <img
85 src="/images/features/autocomplete/images/instinct-autocomplete.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- **Instinct**: The leading open Next Edit model, trained by Continue
121
122### Automatic Detection
123
124Continue automatically enables Next Edit when:
125
1261. Your configured autocomplete model supports next edit capabilities
1272. You have development team access permissions
1283. The current code context suggests predictable next steps
129
130## Best Practices
131
132<CardGroup cols={2}>
133 <Card title="Trust the Process" icon="robot">
134 Let Next Edit observe your coding patterns for a few editing sessions before expecting highly accurate predictions.
135 </Card>
136
137<Card title="Review Carefully" icon="magnifying-glass">
138 Always review suggested changes before accepting, especially for complex logic
139 modifications.
140</Card>
141
142<Card title="Provide Feedback" icon="message">
143 Have feedback? We want to hear it. __[Add your thoughts to our feedback
144 discussions](https://github.com/continuedev/continue/discussions/categories/feedback)__
145 to help us improve.
146</Card>
147
148 <Card title="Combine with Other Features" icon="puzzle-piece">
149 Use Next Edit alongside Continue's Chat and Agent modes for comprehensive AI-assisted development.
150 </Card>
151</CardGroup>
152
153---
154
155_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._