continue
continue copied to clipboard
When using /edit in IntelliJ on Mac, original first line is preserved even if it was changed.
Before submitting your bug report
- [X] I believe this is a bug. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that reports the same bug
- [X] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Apple M1 Max - Sonoma 14.3.1
- Continue: 0.0.34
- IDE: IntelliJ - 2023.3.4
Description
When using the /edit command, the code generated in the Diff window doesn't seem to diff against the original selection, often leaving the original first line followed by the changed first line in the code after you accept the change. It looks like it may have an off-by-one problem where it's leaving the first line that it should be replacing, but deleting the line after the end of the selection.
To reproduce
- Run:
cp ~/.continue/continue_tutorial.py . && idea ./continue_tutorial.py - Select the entirety of
mysterious_function(lines 23-29 - I'm using IdeaVIM, so Shift+V, J to block select lines) - Cmd+J
- /edit rename this function to something more appropriate
- Accept changes
Expected result:
...
"""Step 1: Highlight the function below"""
def bubble_sort(x):
for i in range(len(x)):
for j in range(len(x) - 1):
if x[j] > x[j + 1]:
x[j], x[j + 1] = x[j + 1], x[j]
return x
"""Step 2: Use the keyboard shortcut [⌘ J] to
select the code and toggle the Continue input box"""
Actual result
"""Step 1: Highlight the function below"""
def mysterious_function(x):
def bubble_sort(x):
for i in range(len(x)):
for j in range(len(x) - 1):
if x[j] > x[j + 1]:
x[j], x[j + 1] = x[j + 1], x[j]
return x
XXX (one extra line was deleted here)
"""Step 2: Use the keyboard shortcut [⌘ J] to
select the code and toggle the Continue input box"""
Log output
don't have them.