Elffuss BraidHub

kikocis/continue public

main · 1.5 KiBRenderedRawPermalink
1# Next Edit Prediction
2
3## What is it?
4
5## How is it different from autocomplete?
6
7## Where are we right now?
8
9- Users can decide to switch between autocomplete and next edit.
10- Next edit triggers at the same time autocomplete is triggered, via vscode's inline completion provider.
11- The following happens after the trigger:
12 - User's current cursor position is captured.
13 - We define an editable range, ±5 lines from the current cursor position.
14 - User's most recent edit is captured as a unified diff. (this is currently buggy)
15 - This is sent to the model, which returns a new editable range with next edit predictions.
16 - We display this new editable range in a SVG decoration.
17 - User can either tab to accept or esc to reject.
18 - 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.
19 - On reject, nothing happens.
20
21## What needs to be worked on?
22
23- User edit captures.
24- Find a better way to trigger next edit (this links back to the diff capture problem).
25 - We can see that next edit triggers as soon as the user accepts a change. This is because autocomplete runs the same way.
26 - I think autocomplete has some filter logic that doesn't display the ghost text under some conditions, which I am guessing are the following:
27 - The model does not have any more completions to create.
28 - The prediction at the cursor location has been cached.
29- JetBrains integration.