fix: Change batch editing default to False in architect mode

Changed the default value of `use_batch_editing` from True to False in:
- Command line argument in args.py
- Class attribute and constructor parameter in ArchitectCoder

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Emasoft 2025-05-17 06:04:26 +02:00
parent 41b4724e10
commit 54c8f33293
2 changed files with 15 additions and 2 deletions

View file

@ -178,6 +178,12 @@ def get_parser(default_config_files, git_root):
default=True,
help="Enable/disable automatic acceptance of architect changes (default: True)",
)
group.add_argument(
"--use-batch-editing",
action=argparse.BooleanOptionalAction,
default=False,
help="Enable/disable batch editing for architect mode (default: False)",
)
group.add_argument(
"--weak-model",
metavar="WEAK_MODEL",

View file

@ -7,6 +7,13 @@ class ArchitectCoder(AskCoder):
edit_format = "architect"
gpt_prompts = ArchitectPrompts()
auto_accept_architect = False
use_batch_editing = False
def __init__(self, main_model, io, use_batch_editing=False, auto_accept_architect=None, **kwargs):
super().__init__(main_model, io, **kwargs)
if auto_accept_architect is not None:
self.auto_accept_architect = auto_accept_architect
self.use_batch_editing = use_batch_editing
def reply_completed(self):
content = self.partial_response_content
@ -34,9 +41,9 @@ class ArchitectCoder(AskCoder):
new_kwargs = dict(io=self.io, from_coder=self)
new_kwargs.update(kwargs)
use_batch_editing = False # TODO: add this option to aider cli and to the configuration yaml, andread this setting from there
# Use the instance attribute for use_batch_editing
if use_batch_editing:
if self.use_batch_editing:
# split the architect model response into chunks using natural delimiters (code blocka, newlines, separators, etc.)
chunks = []
chunks = self.split_response_by_natural_delimiters(content)