mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
Remove __init__ from all coders and set edit_format and gpt_prompts like ChatCoder
This commit is contained in:
parent
916021bf10
commit
5fcf454968
6 changed files with 5 additions and 21 deletions
|
@ -9,7 +9,6 @@ from .chat_prompts import ChatPrompts
|
|||
|
||||
class ChatCoder(Coder):
|
||||
edit_format = "chat"
|
||||
|
||||
gpt_prompts = ChatPrompts()
|
||||
|
||||
def get_edits(self, mode="update"):
|
||||
|
|
|
@ -14,10 +14,7 @@ from .editblock_prompts import EditBlockPrompts
|
|||
|
||||
class EditBlockCoder(Coder):
|
||||
edit_format = "diff"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.gpt_prompts = EditBlockPrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
gpt_prompts = EditBlockPrompts()
|
||||
|
||||
def get_edits(self):
|
||||
content = self.partial_response_content
|
||||
|
|
|
@ -5,7 +5,4 @@ from .editblock_fenced_prompts import EditBlockFencedPrompts
|
|||
|
||||
class EditBlockFencedCoder(EditBlockCoder):
|
||||
edit_format = "diff-fenced"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.gpt_prompts = EditBlockFencedPrompts()
|
||||
gpt_prompts = EditBlockFencedPrompts()
|
||||
|
|
|
@ -5,10 +5,7 @@ from .help_prompts import HelpPrompts
|
|||
|
||||
class HelpCoder(Coder):
|
||||
edit_format = "help"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.gpt_prompts = HelpPrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
gpt_prompts = HelpPrompts()
|
||||
|
||||
def get_edits(self, mode="update"):
|
||||
return []
|
||||
|
|
|
@ -45,10 +45,7 @@ other_hunks_applied = (
|
|||
|
||||
class UnifiedDiffCoder(Coder):
|
||||
edit_format = "udiff"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.gpt_prompts = UnifiedDiffPrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
gpt_prompts = UnifiedDiffPrompts()
|
||||
|
||||
def get_edits(self):
|
||||
content = self.partial_response_content
|
||||
|
|
|
@ -9,10 +9,7 @@ from .wholefile_prompts import WholeFilePrompts
|
|||
|
||||
class WholeFileCoder(Coder):
|
||||
edit_format = "whole"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.gpt_prompts = WholeFilePrompts()
|
||||
super().__init__(*args, **kwargs)
|
||||
gpt_prompts = WholeFilePrompts()
|
||||
|
||||
def update_cur_messages(self, edited):
|
||||
if edited:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue