mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
cleanup
This commit is contained in:
parent
ea15aa72fa
commit
993bfa6e4c
2 changed files with 10 additions and 13 deletions
|
@ -553,7 +553,16 @@ class Coder:
|
||||||
return add_rel_files_message
|
return add_rel_files_message
|
||||||
|
|
||||||
def update_cur_messages(self, content, edited):
|
def update_cur_messages(self, content, edited):
|
||||||
self.cur_messages += [dict(role="assistant", content=content)]
|
if self.partial_response_content:
|
||||||
|
self.cur_messages += [dict(role="assistant", content=self.partial_response_content)]
|
||||||
|
if self.partial_response_function_call:
|
||||||
|
self.cur_messages += [
|
||||||
|
dict(
|
||||||
|
role="assistant",
|
||||||
|
content=None,
|
||||||
|
function_call=self.partial_response_function_call,
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
def auto_commit(self):
|
def auto_commit(self):
|
||||||
res = self.commit(history=self.cur_messages, prefix="aider: ")
|
res = self.commit(history=self.cur_messages, prefix="aider: ")
|
||||||
|
|
|
@ -83,18 +83,6 @@ class EditBlockFunctionCoder(Coder):
|
||||||
self.gpt_prompts = EditBlockFunctionPrompts()
|
self.gpt_prompts = EditBlockFunctionPrompts()
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
def update_cur_messages(self, content, edited):
|
|
||||||
if self.partial_response_content:
|
|
||||||
self.cur_messages += [dict(role="assistant", content=self.partial_response_content)]
|
|
||||||
if self.partial_response_function_call:
|
|
||||||
self.cur_messages += [
|
|
||||||
dict(
|
|
||||||
role="assistant",
|
|
||||||
content=None,
|
|
||||||
function_call=self.partial_response_function_call,
|
|
||||||
)
|
|
||||||
]
|
|
||||||
|
|
||||||
def render_incremental_response(self, final=False):
|
def render_incremental_response(self, final=False):
|
||||||
if self.partial_response_content:
|
if self.partial_response_content:
|
||||||
return self.partial_response_content
|
return self.partial_response_content
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue