mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 04:35:00 +00:00
rename files architect/editor
This commit is contained in:
parent
eb21cf2830
commit
d6cf8377f1
7 changed files with 0 additions and 0 deletions
40
aider/coders/architect_coder.py
Normal file
40
aider/coders/architect_coder.py
Normal file
|
@ -0,0 +1,40 @@
|
|||
from .architect_prompts import ArchitectPrompts
|
||||
from .ask_coder import AskCoder
|
||||
from .base_coder import Coder
|
||||
|
||||
|
||||
class ArchitectCoder(AskCoder):
|
||||
edit_format = "architect"
|
||||
gpt_prompts = ArchitectPrompts()
|
||||
|
||||
def reply_completed(self):
|
||||
content = self.partial_response_content
|
||||
|
||||
if not self.io.confirm_ask("Edit the files?"):
|
||||
return
|
||||
|
||||
kwargs = dict()
|
||||
|
||||
# Use the editor_model from the main_model if it exists, otherwise use the main_model itself
|
||||
editor_model = self.main_model.editor_model or self.main_model
|
||||
|
||||
kwargs["main_model"] = editor_model
|
||||
kwargs["edit_format"] = self.main_model.editor_edit_format
|
||||
kwargs["suggest_shell_commands"] = False
|
||||
kwargs["map_tokens"] = 0
|
||||
kwargs["total_cost"] = self.total_cost
|
||||
kwargs["cache_prompts"] = False
|
||||
kwargs["num_cache_warming_pings"] = 0
|
||||
|
||||
new_kwargs = dict(io=self.io, from_coder=self)
|
||||
new_kwargs.update(kwargs)
|
||||
|
||||
editor_coder = Coder.create(**new_kwargs)
|
||||
editor_coder.cur_messages = []
|
||||
editor_coder.done_messages = []
|
||||
editor_coder.show_announcements()
|
||||
|
||||
editor_coder.run(with_message=content, preproc=False)
|
||||
|
||||
self.move_back_cur_messages("I made those changes to the files.")
|
||||
self.total_cost = editor_coder.total_cost
|
Loading…
Add table
Add a link
Reference in a new issue