mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
cleanup
This commit is contained in:
parent
1808c47d96
commit
0ea52b412f
1 changed files with 3 additions and 7 deletions
10
aider/io.py
10
aider/io.py
|
@ -134,7 +134,7 @@ class InputOutput:
|
||||||
|
|
||||||
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
self.append_chat_history(f"\n# aider chat started at {current_time}\n\n")
|
self.append_chat_history(f"\n# aider chat started at {current_time}\n\n")
|
||||||
|
|
||||||
def read_text(self, filename):
|
def read_text(self, filename):
|
||||||
try:
|
try:
|
||||||
with open(filename, "r", encoding=self.encoding) as f:
|
with open(filename, "r", encoding=self.encoding) as f:
|
||||||
|
@ -144,12 +144,8 @@ class InputOutput:
|
||||||
return
|
return
|
||||||
|
|
||||||
def write_text(self, filename, content):
|
def write_text(self, filename, content):
|
||||||
try:
|
with open(filename, "w", encoding=self.encoding) as f:
|
||||||
with open(filename, "w", encoding=self.encoding) as f:
|
f.write(content)
|
||||||
f.write(content)
|
|
||||||
except (FileNotFoundError, UnicodeError) as e:
|
|
||||||
self.tool_error(f"{filename}: {e}")
|
|
||||||
return
|
|
||||||
|
|
||||||
def get_input(self, root, rel_fnames, addable_rel_fnames, commands):
|
def get_input(self, root, rel_fnames, addable_rel_fnames, commands):
|
||||||
if self.pretty:
|
if self.pretty:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue