continue-custom/core/nextEdit
Jacob Kim 83b5a3c14f
feat: wrap each recently viewed code snippet inside a token block (#7269)
* feat: wrap each recently viewed code snippet inside a token block

* fix: update vitest

* fix: update test
2025-08-20 21:00:32 -04:00
..
context add modelProvider to PromptLog 2025-08-13 22:06:01 -07:00
diff fix: properly calculate diff group 2025-08-05 13:23:17 -07:00
templating feat: wrap each recently viewed code snippet inside a token block (#7269) 2025-08-20 21:00:32 -04:00
constants.ts Merge branch 'main' of github.com:continuedev/continue into jacob/con-3563 2025-08-18 21:55:51 -07: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 add posthog telemetry 2025-07-03 18:04:15 -07:00
NextEditPrefetchQueue.ts feat: add more next edit endpoints to protocol (#7110) 2025-08-12 21:25:01 -04:00
NextEditProvider.ts feat: fix the next edit provider to use the new edit endpoint (#7233) 2025-08-19 03:22:35 -04:00
NextEditProvider.vitest.ts fix: stale tests 2025-08-05 16:18:31 -07:00
README.md add README 2025-06-30 13:32:44 -07:00
types.ts refactor: rename model 1 to instinct 2025-08-11 17:44:11 -07:00
utils.ts fix: next edit renders that should render decorations will render them properly (#7160) 2025-08-15 15:18:17 -04:00
utils.vitest.ts fix: next edit renders that should render decorations will render them properly (#7160) 2025-08-15 15:18:17 -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.