mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
wip: Changed file path handling and edited file tracking in Coder class.
This commit is contained in:
parent
c725a830b8
commit
28584b5705
1 changed files with 5 additions and 4 deletions
|
@ -349,8 +349,10 @@ class Coder:
|
||||||
|
|
||||||
path = path.strip()
|
path = path.strip()
|
||||||
|
|
||||||
if path not in self.fnames:
|
full_path = os.path.join(self.root, path)
|
||||||
if not Path(path).exists():
|
|
||||||
|
if full_path not in self.fnames:
|
||||||
|
if not Path(full_path).exists():
|
||||||
question = f"[red]Allow creation of new file {path}?"
|
question = f"[red]Allow creation of new file {path}?"
|
||||||
else:
|
else:
|
||||||
question = (
|
question = (
|
||||||
|
@ -362,8 +364,7 @@ class Coder:
|
||||||
|
|
||||||
self.fnames.add(path)
|
self.fnames.add(path)
|
||||||
|
|
||||||
full_path = os.path.join(self.root, path)
|
edited.add(path)
|
||||||
edited.add(full_path)
|
|
||||||
if utils.do_replace(full_path, original, updated):
|
if utils.do_replace(full_path, original, updated):
|
||||||
self.console.print(f"[red]Applied edit to {path}")
|
self.console.print(f"[red]Applied edit to {path}")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue