From 89bc3b6b16d6b2b7e6285785026960426d1d2840 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 9 Dec 2024 10:31:57 -0800 Subject: [PATCH] feat: add analytics event hooks to file watcher --- aider/main.py | 1 + aider/watch.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/aider/main.py b/aider/main.py index d14b1b6cd..68899112b 100644 --- a/aider/main.py +++ b/aider/main.py @@ -858,6 +858,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F ignores.append(args.aiderignore) if args.watch_files: + # AI pass analytics in file_watcher = FileWatcher(coder, gitignores=ignores, verbose=args.verbose) coder.file_watcher = file_watcher diff --git a/aider/watch.py b/aider/watch.py index 7ae4d06ba..b7ff01335 100644 --- a/aider/watch.py +++ b/aider/watch.py @@ -171,6 +171,7 @@ class FileWatcher: if fname in self.coder.abs_fnames: continue + # AI: fire an event() self.coder.abs_fnames.add(fname) rel_fname = self.coder.get_rel_fname(fname) self.io.tool_output(f"Added {rel_fname} to the chat") @@ -179,6 +180,7 @@ class FileWatcher: if not has_bangs: return "" + # fire a different event. AI! self.io.tool_output("Processing your request...") res = """