continue-custom/core/nextEdit
Jacob Kim f27e7c71de
feat: add user-friendly way to toggle between FIM and next edit (#7355)
* feat: don't format when model is not mercury

* chore: bump

* fix: remove mercury-coder-nextedit

* refactor: remove refs to mercury-coder-nextedit

* feat: add util function for converting model name to enum

* refactor: add new types

* refactor: create an abstract base class for providers

* refactor: add child provider for instinct

* refactor: add provider for mercury coder

* refactor: provider factory

* refactor: use factory to create model providers based on helper.modelName

* refactor: clean up redundant logic to be more provider-friendly

* add buildPromptMetadata as an abstract method

* refactor: use handlebars and provider-specific template renderers

* refactor: use this.modelProvider instead of prompt engine

* refactor: remove redundant helper

* fix: update vitest after refactor

* feat: add test for convertNextEditModelNameToEnum

* fix: add isSecurityConcern imports

* feat: add functions to return next edit menu items and update config

* fix: get rid of callbacks

* feat: render next edit menu items

* fix: get rid of redundant completion request

* feat: update next edit status on vscode workspace config update, refactor out common logic

* feat: add continue.enableNextEdit

* feat: add aborted field to check for false positives

* fix: remove zetaDataset suffix

* feat: make sure that we are tracking completions

* feat: log aborts and move id generation to the top

* feat: all requests are tracked. when request is aborted, log as aborted with zero-value data. else, graduate it from pending completion and set aborted to false

* feat: add aborted to schema

* feat: add a toggleNextEditEnabled command

* feat: show (NE) in the status bar when next edit is enabled, add keymap

* feat: add command definitions for toggleNextEditEnabled

* refactor: handle validation in VsCodeExtension

* feat: check if model does not support next edit

* feat: use better menu item labels

* fix: casing

* chore: bump

* feat: add a function to disable next edit

* feat: disable next edit before e2e tests

* chore: bump

* fix: add a small delay to wait for UI loading

* fix: NE is shown for all statuses

* fix: wait for the NE to pop up

* fix: wait longer for disableNextEdit, clear potential next edit notifications

* fix: roll back clearAllNotifications

* fix: try disabling next edit before each

* fix: revert

* feat: add sane defaults when no workspace settings are set

* fix: fall back to false

* fix: debugging

* chore: change name

* fix: try waiting for text

* debug: more debug logs

* fix: clear notifs

* fix: suppress warning

* fix: string matching

* fix: jump label overlapping with the inline tip label (#7399)

* feat: add methods to temporarily hide and show tooltip

* feat: hide the inline tooltip when the jumpmanager's tooltip is shown

* feat: focus on chat input after apply

* revert

* fix: HOTFIX local assistant loading (#7354)

* fix: local assistant loading

* fix: no need for excluding .continue/.continue

* test: cases for config.yml and config.yaml names

* feat: remove hide/show logic for creating a new svgbuilder instance

* feat: use a new svgBuilder istance

* chore: update package-lock.json

---------

Co-authored-by: uinstinct <61635505+uinstinct@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Co-authored-by: Ting-Wai <40179554+tingwai@users.noreply.github.com>

---------

Co-authored-by: uinstinct <61635505+uinstinct@users.noreply.github.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Co-authored-by: Ting-Wai <40179554+tingwai@users.noreply.github.com>
2025-08-26 21:54:29 -04:00
..
context fix: prevent security file reads cleanup 2025-08-21 14:18:53 -07:00
diff fix: properly calculate diff group 2025-08-05 13:23:17 -07:00
providers feat: add user-friendly way to toggle between FIM and next edit (#7355) 2025-08-26 21:54:29 -04:00
templating refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
constants.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
DocumentHistoryTracker.ts fix: handle empty map cases properly 2025-07-30 14:56:31 -07:00
DocumentHistoryTracker.vitest.ts test: add vitest for DocumentHistoryTracker 2025-07-30 14:56:39 -07:00
NextEditEditableRegionCalculator.ts feat: sliding jump starts at the cursor line and expands outwards 2025-08-11 17:45:57 -07:00
NextEditLoggingService.ts feat: add user-friendly way to toggle between FIM and next edit (#7355) 2025-08-26 21:54:29 -04:00
NextEditPrefetchQueue.ts feat: add more next edit endpoints to protocol (#7110) 2025-08-12 21:25:01 -04:00
NextEditProvider.ts feat: add user-friendly way to toggle between FIM and next edit (#7355) 2025-08-26 21:54:29 -04:00
NextEditProvider.vitest.ts fix: stale tests 2025-08-05 16:18:31 -07:00
NextEditProviderFactory.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
README.md add README 2025-06-30 13:32:44 -07:00
types.ts feat: add user-friendly way to toggle between FIM and next edit (#7355) 2025-08-26 21:54:29 -04:00
utils.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00
utils.vitest.ts refactor: code cleanup for next edit (#7312) 2025-08-22 17:44:37 -04:00

Next Edit Prediction

What is it?

How is it different from autocomplete?

Where are we right now?

  • Users can decide to switch between autocomplete and next edit.
  • Next edit triggers at the same time autocomplete is triggered, via vscode's inline completion provider.
  • The following happens after the trigger:
    • User's current cursor position is captured.
    • We define an editable range, ±5 lines from the current cursor position.
    • User's most recent edit is captured as a unified diff. (this is currently buggy)
    • This is sent to the model, which returns a new editable range with next edit predictions.
    • We display this new editable range in a SVG decoration.
    • User can either tab to accept or esc to reject.
      • On accept, the old editable range will be replaced by the new editable region. The cursor will be moved to the last line containing some change.
      • On reject, nothing happens.

What needs to be worked on?

  • User edit captures.
  • Find a better way to trigger next edit (this links back to the diff capture problem).
    • We can see that next edit triggers as soon as the user accepts a change. This is because autocomplete runs the same way.
    • I think autocomplete has some filter logic that doesn't display the ghost text under some conditions, which I am guessing are the following:
      • The model does not have any more completions to create.
      • The prediction at the cursor location has been cached.
  • JetBrains integration.