mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
fixes #1231
This commit is contained in:
parent
301c4265b7
commit
0dfedecff5
1 changed files with 9 additions and 2 deletions
11
aider/io.py
11
aider/io.py
|
@ -545,5 +545,12 @@ class InputOutput:
|
|||
if not text.endswith("\n"):
|
||||
text += "\n"
|
||||
if self.chat_history_file is not None:
|
||||
with self.chat_history_file.open("a", encoding=self.encoding) as f:
|
||||
f.write(text)
|
||||
try:
|
||||
with self.chat_history_file.open("a", encoding=self.encoding) as f:
|
||||
f.write(text)
|
||||
except PermissionError:
|
||||
self.tool_error(
|
||||
f"Warning: Unable to write to chat history file {self.chat_history_file}."
|
||||
" Permission denied."
|
||||
)
|
||||
self.chat_history_file = None # Disable further attempts to write
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue