mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 12:45:00 +00:00
fixes #1231
This commit is contained in:
parent
301c4265b7
commit
0dfedecff5
1 changed files with 9 additions and 2 deletions
|
@ -545,5 +545,12 @@ class InputOutput:
|
||||||
if not text.endswith("\n"):
|
if not text.endswith("\n"):
|
||||||
text += "\n"
|
text += "\n"
|
||||||
if self.chat_history_file is not None:
|
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) as f:
|
||||||
f.write(text)
|
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