aider: Capitalize the "ASSISTANT" role when logging to the LLM history file.

# Aider chat conversation:

USER: When logging to llm history file, capitalize the ASSISTANT role.

ASSISTANT: To capitalize the "ASSISTANT" role when logging to the LLM history file, we need to modify the `send_new_user_message` method in `aider/coders/base_coder.py`.

Here is the *SEARCH/REPLACE* block:

aider/coders/base_coder.py
```python
<<<<<<< SEARCH
        with open('.aider.llm.history', 'a') as log_file:
            log_file.write(f"LLM RESPONSE {timestamp}\n")
            log_file.write(format_content("assistant", content) + "\n")
=======
        with open('.aider.llm.history', 'a') as log_file:
            log_file.write(f"LLM RESPONSE {timestamp}\n")
            log_file.write(format_content("ASSISTANT", content) + "\n")
>>>>>>> REPLACE
```
This commit is contained in:
Daniel Vainsencher 2024-05-29 17:19:32 -04:00
parent 2bd5daf2ad
commit 8896909e19

View file

@ -834,7 +834,7 @@ class Coder:
timestamp = datetime.datetime.now().isoformat(timespec='seconds')
with open('.aider.llm.history', 'a') as log_file:
log_file.write(f"LLM RESPONSE {timestamp}\n")
log_file.write(format_content("assistant", content) + "\n")
log_file.write(format_content("ASSISTANT", content) + "\n")
if interrupted:
content += "\n^C KeyboardInterrupt"