mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +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):
|
class ChatCoder(Coder):
|
||||||
edit_format = "chat"
|
edit_format = "chat"
|
||||||
|
|
||||||
gpt_prompts = ChatPrompts()
|
gpt_prompts = ChatPrompts()
|
||||||
|
|
||||||
def get_edits(self, mode="update"):
|
def get_edits(self, mode="update"):
|
||||||
|
|
|
@ -14,10 +14,7 @@ from .editblock_prompts import EditBlockPrompts
|
||||||
|
|
||||||
class EditBlockCoder(Coder):
|
class EditBlockCoder(Coder):
|
||||||
edit_format = "diff"
|
edit_format = "diff"
|
||||||
|
gpt_prompts = EditBlockPrompts()
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
self.gpt_prompts = EditBlockPrompts()
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def get_edits(self):
|
def get_edits(self):
|
||||||
content = self.partial_response_content
|
content = self.partial_response_content
|
||||||
|
|
|
@ -5,7 +5,4 @@ from .editblock_fenced_prompts import EditBlockFencedPrompts
|
||||||
|
|
||||||
class EditBlockFencedCoder(EditBlockCoder):
|
class EditBlockFencedCoder(EditBlockCoder):
|
||||||
edit_format = "diff-fenced"
|
edit_format = "diff-fenced"
|
||||||
|
gpt_prompts = EditBlockFencedPrompts()
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
self.gpt_prompts = EditBlockFencedPrompts()
|
|
||||||
|
|
|
@ -5,10 +5,7 @@ from .help_prompts import HelpPrompts
|
||||||
|
|
||||||
class HelpCoder(Coder):
|
class HelpCoder(Coder):
|
||||||
edit_format = "help"
|
edit_format = "help"
|
||||||
|
gpt_prompts = HelpPrompts()
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
self.gpt_prompts = HelpPrompts()
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def get_edits(self, mode="update"):
|
def get_edits(self, mode="update"):
|
||||||
return []
|
return []
|
||||||
|
|
|
@ -45,10 +45,7 @@ other_hunks_applied = (
|
||||||
|
|
||||||
class UnifiedDiffCoder(Coder):
|
class UnifiedDiffCoder(Coder):
|
||||||
edit_format = "udiff"
|
edit_format = "udiff"
|
||||||
|
gpt_prompts = UnifiedDiffPrompts()
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
self.gpt_prompts = UnifiedDiffPrompts()
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def get_edits(self):
|
def get_edits(self):
|
||||||
content = self.partial_response_content
|
content = self.partial_response_content
|
||||||
|
|
|
@ -9,10 +9,7 @@ from .wholefile_prompts import WholeFilePrompts
|
||||||
|
|
||||||
class WholeFileCoder(Coder):
|
class WholeFileCoder(Coder):
|
||||||
edit_format = "whole"
|
edit_format = "whole"
|
||||||
|
gpt_prompts = WholeFilePrompts()
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
self.gpt_prompts = WholeFilePrompts()
|
|
||||||
super().__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
def update_cur_messages(self, edited):
|
def update_cur_messages(self, edited):
|
||||||
if edited:
|
if edited:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue