mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: Update update_cur_messages
method in WholeFileCoder
class
This commit is contained in:
parent
e0bab8505a
commit
100e0b9856
1 changed files with 1 additions and 8 deletions
|
@ -9,17 +9,10 @@ from .wholefile_prompts import WholeFilePrompts
|
||||||
|
|
||||||
class WholeFileCoder(Coder):
|
class WholeFileCoder(Coder):
|
||||||
"""A coder that operates on entire files for code modifications."""
|
"""A coder that operates on entire files for code modifications."""
|
||||||
|
|
||||||
edit_format = "whole"
|
edit_format = "whole"
|
||||||
gpt_prompts = WholeFilePrompts()
|
gpt_prompts = WholeFilePrompts()
|
||||||
|
|
||||||
def update_cur_messages(self, edited):
|
|
||||||
if edited:
|
|
||||||
self.cur_messages += [
|
|
||||||
dict(role="assistant", content=self.gpt_prompts.redacted_edit_message)
|
|
||||||
]
|
|
||||||
else:
|
|
||||||
self.cur_messages += [dict(role="assistant", content=self.partial_response_content)]
|
|
||||||
|
|
||||||
def render_incremental_response(self, final):
|
def render_incremental_response(self, final):
|
||||||
try:
|
try:
|
||||||
return self.get_edits(mode="diff")
|
return self.get_edits(mode="diff")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue