diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-06-30 00:09:52 -0700 | 
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-06-30 00:09:52 -0700 | 
| commit | 9427f07d6c60749205922d0f4cab5de73dec438b (patch) | |
| tree | 99e246769416f0de2380ea2c5d34a09c4995c0cc /continuedev/src | |
| parent | d47c4cafb856ffe2efd7d08ceddc8ceda475a8c6 (diff) | |
| download | sncontinue-9427f07d6c60749205922d0f4cab5de73dec438b.tar.gz sncontinue-9427f07d6c60749205922d0f4cab5de73dec438b.tar.bz2 sncontinue-9427f07d6c60749205922d0f4cab5de73dec438b.zip  | |
require python >=3.7, off-by-one err in streaming
Diffstat (limited to 'continuedev/src')
| -rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py index 46c6a615..dfc7d309 100644 --- a/continuedev/src/continuedev/steps/core/core.py +++ b/continuedev/src/continuedev/steps/core/core.py @@ -331,7 +331,7 @@ class DefaultModelEditCodeStep(Step):                  # So here we will strip all matching lines from the end of current_block_lines                  lines_stripped = []                  index_of_last_line_in_block = first_valid_match[0] -                while len(current_block_lines) > 0 and current_block_lines[-1] == original_lines_below_previous_blocks[index_of_last_line_in_block]: +                while len(current_block_lines) > 0 and current_block_lines[-1] == original_lines_below_previous_blocks[index_of_last_line_in_block - 1]:                      lines_stripped.append(current_block_lines.pop())                      index_of_last_line_in_block -= 1 @@ -340,7 +340,7 @@ class DefaultModelEditCodeStep(Step):                  await sdk.ide.showSuggestion(FileEdit(                      filepath=rif.filepath,                      range=Range.from_shorthand( -                        current_block_start, 0, current_block_start + index_of_last_line_in_block, 0), +                        current_block_start + 1, 0, current_block_start + index_of_last_line_in_block, 0),                      replacement=replacement                  ))                  if replacement == "": @@ -462,7 +462,7 @@ class DefaultModelEditCodeStep(Step):              await sdk.ide.showSuggestion(FileEdit(                  filepath=rif.filepath,                  range=Range.from_shorthand( -                    current_block_start, 0, current_block_start + len(original_lines_below_previous_blocks), 0), +                    current_block_start + 1, 0, current_block_start + len(original_lines_below_previous_blocks), 0),                  replacement="\n".join(current_block_lines)              ))  | 
