fix: ignore unicode errors in append_chat_history

This commit is contained in:
Paul Gauthier (aider) 2024-09-23 11:38:51 -07:00
parent d063be23c9
commit 1fe2be4633

View file

@ -626,7 +626,7 @@ class InputOutput:
text += "\n"
if self.chat_history_file is not None:
try:
with self.chat_history_file.open("a", encoding=self.encoding) as f:
with self.chat_history_file.open("a", encoding=self.encoding, errors="ignore") as f:
f.write(text)
except (PermissionError, OSError):
self.tool_error(