diff --git a/aider/coders/__init__.py b/aider/coders/__init__.py index 21e2fad5b..f7a9f9ad4 100644 --- a/aider/coders/__init__.py +++ b/aider/coders/__init__.py @@ -8,7 +8,7 @@ from .editor_whole_coder import EditorWholeFileCoder from .help_coder import HelpCoder from .udiff_coder import UnifiedDiffCoder from .wholefile_coder import WholeFileCoder -from .iterate_coder import IterateCoder +from .batch_coder import BatchCoder # from .single_wholefile_func_coder import SingleWholeFileFunctionCoder __all__ = [ @@ -17,7 +17,7 @@ __all__ = [ Coder, EditBlockCoder, EditBlockFencedCoder, - IterateCoder, + BatchCoder, WholeFileCoder, UnifiedDiffCoder, # SingleWholeFileFunctionCoder, diff --git a/aider/coders/iterate_coder.py b/aider/coders/batch_coder.py similarity index 99% rename from aider/coders/iterate_coder.py rename to aider/coders/batch_coder.py index b55d0718a..c7a0bcbc0 100644 --- a/aider/coders/iterate_coder.py +++ b/aider/coders/batch_coder.py @@ -4,10 +4,10 @@ import copy from aider.coders.base_coder import Coder from aider.coders.base_prompts import CoderPrompts """Perform a coding task on multiple files in batches that fit the context and outpot token limits, without sending them all at once.""" -class IterateCoder(Coder): +class BatchCoder(Coder): coder : Coder = None original_kwargs: dict = None - edit_format = "iterate" + edit_format = "batch" def __init__(self, main_model, io, **kwargs): super().__init__(main_model, io,**kwargs) diff --git a/aider/commands.py b/aider/commands.py index b303644f3..546541f81 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -1064,9 +1064,9 @@ class Commands: map_mul_no_files=map_mul_no_files, show_announcements=False, ) - def cmd_iterate(self, args): + def cmd_batch(self, args): """Iteratively perform the change on files in batches that fit to context and output limits""" - return self._generic_chat_command(args, "iterate") + return self._generic_chat_command(args, "batch") def cmd_ask(self, args): """Ask questions about the code base without editing any files. If no prompt provided, switches to ask mode.""" # noqa return self._generic_chat_command(args, "ask") diff --git a/tests/basic/test_iterate.py b/tests/basic/test_batch.py similarity index 93% rename from tests/basic/test_iterate.py rename to tests/basic/test_batch.py index 07e514811..8d7fa7531 100644 --- a/tests/basic/test_iterate.py +++ b/tests/basic/test_batch.py @@ -9,7 +9,7 @@ from aider.repo import GitRepo from aider.utils import GitTemporaryDirectory -class TestIterateCoder(unittest.TestCase): +class TestBatchCoder(unittest.TestCase): def setUp(self): self.GPT35 = Model("gpt-3.5-turbo") self.io = InputOutput(yes=True) @@ -25,15 +25,15 @@ class TestIterateCoder(unittest.TestCase): main_model=self.GPT35, io=self.io, fnames=self.files, - edit_format='iterate' + edit_format='batch' ) def tearDown(self): # self.webbrowser_patcher.stop() return """Tests that: - - Every request retains the chat history until the /iterate command but not the history of other iterations. - - Added files and history until the /iterate is unmodified. + - Every request retains the chat history until the /batch command but not the history of other iterations. + - Added files and history until the /batch is unmodified. - Every file is processed(even if a single file that'll be sent with the request exceeds the limits.) and no duplicate processing """ def test_iterate_resets_history_and_processes_all_files(self):