diff --git a/docs/docs.json b/docs/docs.json index 5c88b72ce..e256797e0 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -46,7 +46,8 @@ "features/autocomplete/how-it-works", "features/autocomplete/model-setup", "features/autocomplete/how-to-customize", - "features/autocomplete/context-selection" + "features/autocomplete/context-selection", + "features/autocomplete/next-edit" ] }, { diff --git a/docs/features/autocomplete/how-it-works.mdx b/docs/features/autocomplete/how-it-works.mdx index c0c0fddee..960cf6778 100644 --- a/docs/features/autocomplete/how-it-works.mdx +++ b/docs/features/autocomplete/how-it-works.mdx @@ -25,3 +25,10 @@ Language models aren't perfect, but can be made much closer by adjusting their o - Occasionally discarding low-quality responses, such as those with excessive repetition You can learn more about how it works in the [Autocomplete deep dive](/customization/models#autocomplete). + + + **Looking for AI that predicts your next changes or additions?** Check out + [Next Edit](/features/autocomplete/next-edit), an experimental feature that + proactively suggests code changes before you even start typing, going beyond + traditional autocomplete to anticipate entire code modifications. + diff --git a/docs/features/autocomplete/model-setup.mdx b/docs/features/autocomplete/model-setup.mdx index 0325b7fd2..80dd7a85b 100644 --- a/docs/features/autocomplete/model-setup.mdx +++ b/docs/features/autocomplete/model-setup.mdx @@ -46,6 +46,16 @@ This model provides good suggestions while keeping your code completely private. 2. Add [Qwen 2.5 Coder 1.5B](https://hub.continue.dev/ollama/qwen2.5-coder-1.5b) to your assistant on Continue Hub 3. Click `Reload config` in the assistant selector in the Continue IDE extension +## Next Edit Model + +For proactive code prediction that anticipates your next edit, Continue supports specialized [Next Edit](/features/edit/next-edit) models: + +**Supported Next Edit model:** + +- `mercury-coder-nextedit`: Primary model optimized for next edit prediction + +Next Edit automatically activates when you have a compatible model configured for autocomplete and the appropriate access permissions. + ## Need Help? If you're not seeing any completions or need more detailed configuration options, check out our comprehensive [autocomplete deep dive guide](/customize/deep-dives/autocomplete). diff --git a/docs/features/autocomplete/next-edit.mdx b/docs/features/autocomplete/next-edit.mdx new file mode 100644 index 000000000..cf4af6af0 --- /dev/null +++ b/docs/features/autocomplete/next-edit.mdx @@ -0,0 +1,153 @@ +--- +title: "Next Edit" +description: "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" +--- + + + Next Edit is currently an experimental feature. It requires Mercury Coder Next + Edit model configured in your Continue autocomplete settings and is not yet + available for JetBrains use. + + +## What is Next Edit? + +Next 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. + +Think of it as having an AI pair programmer that understands your coding flow and suggests the logical next step in your development process. + +## How Next Edit Works + +### The Prediction Process + +1. **Context Analysis**: Captures your current cursor position and recent edit history +2. **Pattern Recognition**: Analyzes your coding patterns and the surrounding code context +3. **Next Step Prediction**: Uses specialized AI models to predict what you'll likely change next +4. **Visual Presentation**: Shows predictions as diff overlays rather than simple text completions +5. **Interactive Review**: Lets you accept (Tab) or reject (Esc) the suggested changes +6. **Jump to Next Edit Location**: Lets you jump (Tab) to the next edit location or reject (Esc) + +### Intelligent Triggering + +Next Edit activates automatically when: + +- You finish making a code change +- The AI detects a logical continuation point +- Specialized next-edit models are available +- The current context suggests a predictable next step + +## Next Edit vs Traditional Autocomplete + + + + **Autocomplete**: Completes the current line or statement you're typing + + **Next Edit**: Predicts entire code modifications across multiple lines + + + + **Autocomplete**: Shows ghost text at your cursor position + + **Next Edit**: Displays diff overlays showing before/after changes, while also displaying ghost text if the change is purely additive. + + + + + **Autocomplete**: Reactive - responds to what you're currently typing + + **Next Edit**: Proactive - anticipates what you'll do next + + + + **Autocomplete**: Focuses on immediate code completion + + **Next Edit**: Analyzes recent edit patterns and broader code context + + + +## How to Use Next Edit + +### Prerequisites + +Next Edit requires: + +- Compatible AI models (Mercury Coder Next Edit) +- Continue development team access +- VS Code (JetBrains support coming soon) +- **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) + + + To use Next Edit, you must have the Mercury Coder Next Edit model configured + in your Continue autocomplete model settings. This model is specifically + designed for next edit predictions. Once it's been loaded, you must reload VS + Code to activate it. + Next Edit Model Setup + + +### Using Next Edit Predictions + + + + Edit your code normally. Next Edit will analyze your change patterns. + + + + When Next Edit activates, you'll see a diff overlay showing predicted changes + in an editable region. + + + + - **Tab**: Accept the prediction and apply changes - **Esc**: Reject the + prediction and continue coding normally + + + + If accepted, your cursor moves to the last changed line. If rejected, your + workflow continues uninterrupted. + + + +## What are the Model Requirements for Next Edit? + +### Specialized Models + +Next Edit requires AI models specifically trained for code prediction: + +- **Mercury Coder Next Edit**: Primary model optimized for next edit prediction + +### Automatic Detection + +Continue automatically enables Next Edit when: + +1. Your configured autocomplete model supports next edit capabilities +2. You have development team access permissions +3. The current code context suggests predictable next steps + +## Best Practices + + + + Let Next Edit observe your coding patterns for a few editing sessions before expecting highly accurate predictions. + + + + Always review suggested changes before accepting, especially for complex logic + modifications. + + + + Have feedback? We want to hear it. __[Add your thoughts to our feedback + discussions](https://github.com/continuedev/continue/discussions/categories/feedback)__ + to help us improve. + + + + Use Next Edit alongside Continue's Chat and Agent modes for comprehensive AI-assisted development. + + + +--- + +_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._ diff --git a/docs/features/edit/how-it-works.mdx b/docs/features/edit/how-it-works.mdx index ba8969691..79921ba7b 100644 --- a/docs/features/edit/how-it-works.mdx +++ b/docs/features/edit/how-it-works.mdx @@ -13,4 +13,8 @@ When you start an edit session, Continue: If you accept the diff, we remove the previously highlighted lines, and if you reject the diff, we remove the proposed changes. + +**Looking for AI that predicts your next edit?** Check out [Next Edit](/features/edit/next-edit), an experimental feature that proactively suggests code changes before you even start typing, going beyond traditional autocomplete to anticipate entire code modifications. + + If you would like to view the exact prompt that is sent to the model during an edit, you can [find it in the prompt logs](/troubleshooting#check-the-logs). diff --git a/docs/images/features/autocomplete/images/mercury-coder-next-edit.png b/docs/images/features/autocomplete/images/mercury-coder-next-edit.png new file mode 100644 index 000000000..0793becd0 Binary files /dev/null and b/docs/images/features/autocomplete/images/mercury-coder-next-edit.png differ