diff options
| author | Nate Sesti <sestinj@gmail.com> | 2023-06-27 11:03:44 -0700 |
|---|---|---|
| committer | Nate Sesti <sestinj@gmail.com> | 2023-06-27 11:03:44 -0700 |
| commit | d45ce41f6476a96cd0e4d375f7cd00393865d9cf (patch) | |
| tree | 5ab1963dd0836a1dc86980c16f1c98b4afe40815 /continuedev/src/continuedev/steps | |
| parent | 96483ac8c7603c594766c3a6f6abd279c7f85da4 (diff) | |
| download | sncontinue-d45ce41f6476a96cd0e4d375f7cd00393865d9cf.tar.gz sncontinue-d45ce41f6476a96cd0e4d375f7cd00393865d9cf.tar.bz2 sncontinue-d45ce41f6476a96cd0e4d375f7cd00393865d9cf.zip | |
stop completion early, accept all improvements
Diffstat (limited to 'continuedev/src/continuedev/steps')
| -rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py index ae58cc99..4ec8fe9e 100644 --- a/continuedev/src/continuedev/steps/core/core.py +++ b/continuedev/src/continuedev/steps/core/core.py @@ -323,9 +323,11 @@ class DefaultModelEditCodeStep(Step): current_block_lines.append(line) async for chunk in model_to_use.stream_chat(prompt, with_history=await sdk.get_chat_context(), temperature=0): - # Stop early if it is repeating the file_suffix + # Stop early if it is repeating the file_suffix or the step was deleted if repeating_file_suffix: break + if sdk.current_step_was_deleted(): + return # Accumulate lines chunk_lines = chunk.split("\n") |
