mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
Omit the "No changes are needed" redaction from commit messages with wholefile coders
This commit is contained in:
parent
33cc72a0df
commit
079682b29e
2 changed files with 18 additions and 0 deletions
|
@ -20,6 +20,15 @@ class WholeFileCoder(Coder):
|
|||
else:
|
||||
self.cur_messages += [dict(role="assistant", content=content)]
|
||||
|
||||
def get_context_from_history(self, history):
|
||||
context = ""
|
||||
if history:
|
||||
context += "# Context:\n"
|
||||
for msg in history:
|
||||
if msg["role"] == "user":
|
||||
context += msg["role"].upper() + ": " + msg["content"] + "\n"
|
||||
return context
|
||||
|
||||
def render_incremental_response(self, final):
|
||||
return self.update_files(mode="diff")
|
||||
|
||||
|
|
|
@ -57,6 +57,15 @@ class WholeFileFunctionCoder(Coder):
|
|||
else:
|
||||
self.cur_messages += [dict(role="assistant", content=content)]
|
||||
|
||||
def get_context_from_history(self, history):
|
||||
context = ""
|
||||
if history:
|
||||
context += "# Context:\n"
|
||||
for msg in history:
|
||||
if msg["role"] == "user":
|
||||
context += msg["role"].upper() + ": " + msg["content"] + "\n"
|
||||
return context
|
||||
|
||||
def render_incremental_response(self, final=False):
|
||||
if self.partial_response_content:
|
||||
return self.partial_response_content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue