mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
refactor: move FileWatcher initialization to main.py
This commit is contained in:
parent
920917a47e
commit
2f78b6f7f3
2 changed files with 4 additions and 3 deletions
|
@ -198,6 +198,7 @@ class InputOutput:
|
||||||
llm_history_file=None,
|
llm_history_file=None,
|
||||||
editingmode=EditingMode.EMACS,
|
editingmode=EditingMode.EMACS,
|
||||||
fancy_input=True,
|
fancy_input=True,
|
||||||
|
file_watcher=None,
|
||||||
):
|
):
|
||||||
self.placeholder = None
|
self.placeholder = None
|
||||||
self.never_prompts = set()
|
self.never_prompts = set()
|
||||||
|
@ -262,6 +263,8 @@ class InputOutput:
|
||||||
else:
|
else:
|
||||||
self.console = Console(force_terminal=False, no_color=True) # non-pretty
|
self.console = Console(force_terminal=False, no_color=True) # non-pretty
|
||||||
|
|
||||||
|
self.file_watcher = file_watcher
|
||||||
|
|
||||||
def _get_style(self):
|
def _get_style(self):
|
||||||
style_dict = {}
|
style_dict = {}
|
||||||
if not self.pretty:
|
if not self.pretty:
|
||||||
|
@ -391,8 +394,6 @@ class InputOutput:
|
||||||
):
|
):
|
||||||
self.rule()
|
self.rule()
|
||||||
|
|
||||||
gitignore = [str(Path(root) / ".gitignore")]
|
|
||||||
self.file_watcher = FileWatcher(root, encoding=self.encoding, gitignores=gitignore)
|
|
||||||
self.file_watcher.start()
|
self.file_watcher.start()
|
||||||
|
|
||||||
rel_fnames = list(rel_fnames)
|
rel_fnames = list(rel_fnames)
|
||||||
|
|
|
@ -800,7 +800,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
ignores.append(str(Path(git_root) / ".gitignore"))
|
ignores.append(str(Path(git_root) / ".gitignore"))
|
||||||
if args.aiderignore:
|
if args.aiderignore:
|
||||||
ignores.append(args.aiderignore)
|
ignores.append(args.aiderignore)
|
||||||
io.file_watcher = FileWatcher(coder.root, encoding=io.encoding, gitignores=ignores)
|
FileWatcher(coder, encoding=io.encoding, gitignores=ignores)
|
||||||
|
|
||||||
coder.show_announcements()
|
coder.show_announcements()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue