diff options
Diffstat (limited to 'continuedev')
| -rw-r--r-- | continuedev/src/continuedev/steps/core/core.py | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/continuedev/src/continuedev/steps/core/core.py b/continuedev/src/continuedev/steps/core/core.py index 4afc36e8..98600f8b 100644 --- a/continuedev/src/continuedev/steps/core/core.py +++ b/continuedev/src/continuedev/steps/core/core.py @@ -220,13 +220,13 @@ class DefaultModelEditCodeStep(Step):                  if total_tokens < MAX_TOKENS_FOR_MODEL[model_to_use.name]:                      break -            if total_tokens > MAX_TOKENS_FOR_MODEL[model_to_use.name]: -                while cur_start_line < max_start_line: -                    cur_start_line += 1 -                    total_tokens -= model_to_use.count_tokens( -                        full_file_contents_lst[cur_end_line]) -                    if total_tokens < MAX_TOKENS_FOR_MODEL[model_to_use.name]: -                        break +        if total_tokens > MAX_TOKENS_FOR_MODEL[model_to_use.name]: +            while cur_start_line < max_start_line: +                cur_start_line += 1 +                total_tokens -= model_to_use.count_tokens( +                    full_file_contents_lst[cur_start_line]) +                if total_tokens < MAX_TOKENS_FOR_MODEL[model_to_use.name]: +                    break          # Now use the found start/end lines to get the prefix and suffix strings          file_prefix = "\n".join( | 
