Elffuss BraidHub

kikocis/continue public

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