mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
WIP: Added file creation and loading messages
This commit is contained in:
parent
d279f9751f
commit
d03a209ed0
1 changed files with 14 additions and 7 deletions
21
coder.py
21
coder.py
|
@ -53,18 +53,25 @@ class Coder:
|
||||||
else:
|
else:
|
||||||
self.main_model = "gpt-3.5-turbo"
|
self.main_model = "gpt-3.5-turbo"
|
||||||
|
|
||||||
for fname in files:
|
|
||||||
self.fnames[fname] = Path(fname).stat().st_mtime
|
|
||||||
|
|
||||||
self.check_for_local_edits(True)
|
|
||||||
|
|
||||||
self.pretty = pretty
|
|
||||||
|
|
||||||
if pretty:
|
if pretty:
|
||||||
self.console = Console()
|
self.console = Console()
|
||||||
else:
|
else:
|
||||||
self.console = Console(force_terminal=True, no_color=True)
|
self.console = Console(force_terminal=True, no_color=True)
|
||||||
|
|
||||||
|
for fname in files:
|
||||||
|
fname = Path(fname)
|
||||||
|
if not fname.exists():
|
||||||
|
self.console.print(f'[red]Creating {fname}')
|
||||||
|
fname.touch()
|
||||||
|
else:
|
||||||
|
self.console.print(f'[red]Loading {fname}')
|
||||||
|
|
||||||
|
self.fnames[str(fname)] = fname.stat().st_mtime
|
||||||
|
|
||||||
|
self.check_for_local_edits(True)
|
||||||
|
|
||||||
|
self.pretty = pretty
|
||||||
|
|
||||||
def quoted_file(self, fname):
|
def quoted_file(self, fname):
|
||||||
prompt = "\n"
|
prompt = "\n"
|
||||||
prompt += fname
|
prompt += fname
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue