mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
Refactor show_messages function to accept an optional title parameter and remove unused code.
This commit is contained in:
parent
10e38e1fe9
commit
7e6ea0660d
2 changed files with 5 additions and 5 deletions
|
@ -186,12 +186,11 @@ def do_replace(fname, before_text, after_text, dry_run=False):
|
|||
return True
|
||||
|
||||
|
||||
def show_messages(messages, title):
|
||||
print(title.upper(), "*" * 50)
|
||||
def show_messages(messages, title=None):
|
||||
if title:
|
||||
print(title.upper(), "*" * 50)
|
||||
|
||||
for msg in messages:
|
||||
print()
|
||||
print("-" * 50)
|
||||
role = msg["role"].upper()
|
||||
content = msg["content"].splitlines()
|
||||
for line in content:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue