mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +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,
|
||||
editingmode=EditingMode.EMACS,
|
||||
fancy_input=True,
|
||||
file_watcher=None,
|
||||
):
|
||||
self.placeholder = None
|
||||
self.never_prompts = set()
|
||||
|
@ -262,6 +263,8 @@ class InputOutput:
|
|||
else:
|
||||
self.console = Console(force_terminal=False, no_color=True) # non-pretty
|
||||
|
||||
self.file_watcher = file_watcher
|
||||
|
||||
def _get_style(self):
|
||||
style_dict = {}
|
||||
if not self.pretty:
|
||||
|
@ -391,8 +394,6 @@ class InputOutput:
|
|||
):
|
||||
self.rule()
|
||||
|
||||
gitignore = [str(Path(root) / ".gitignore")]
|
||||
self.file_watcher = FileWatcher(root, encoding=self.encoding, gitignores=gitignore)
|
||||
self.file_watcher.start()
|
||||
|
||||
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"))
|
||||
if 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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue