diff --git a/aider/analytics.py b/aider/analytics.py index b755ef787..76bf09fb8 100644 --- a/aider/analytics.py +++ b/aider/analytics.py @@ -23,10 +23,10 @@ class Analytics: disable = None logfile = None - def __init__(self, track=False, logfile=None, disable=False): + def __init__(self, enable=False, logfile=None, disable=False): self.logfile = logfile self.disable = disable - if not track or disable: + if not enable or disable: self.mp = None self.ph = None if disable: diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index cd044db43..b3af6a8a4 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -232,7 +232,7 @@ class Coder: total_cost=0.0, analytics=None, ): - self.analytics = analytics if analytics is not None else Analytics(track=False) + self.analytics = analytics if analytics is not None else Analytics(enable=False) self.event = self.analytics.event self.commit_before_message = [] diff --git a/aider/main.py b/aider/main.py index ffdc7be2b..4a67e96a4 100644 --- a/aider/main.py +++ b/aider/main.py @@ -346,7 +346,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F args = parser.parse_args(argv) if args.analytics_disable: - analytics = Analytics(track=False, disable=True) + analytics = Analytics(enable=False, disable=True) print("Analytics have been permanently disabled.") return diff --git a/aider/website/docs/more/analytics.md b/aider/website/docs/more/analytics.md index e6ce14b0a..a6f64c846 100644 --- a/aider/website/docs/more/analytics.md +++ b/aider/website/docs/more/analytics.md @@ -6,7 +6,7 @@ nav_order: 500 # Analytics Aider collects anonymous analytics that are used to help -improve aider. +improve aider's ability to work with LLMs, edit code and complete user requests. **Analytics are currently turned off by default**, but are expected to be turned on by default in a future release. @@ -16,9 +16,14 @@ a future release. No personal information is collected: no user identity, none of your code, prompts or chat messages. -Aider collects information on which models are used and with how many tokens, -which edit formats are used, how often features and commands are used, -information about exceptions, etc. +Aider collects information on: + +- which LLMs are used and with how many tokens, +- which of aider's edit formats are used, +- how often features and commands are used, +- information about exceptions and errors, +- etc + These analytics are associated with an anonymous, randomly generated UUID4 user identifier. @@ -34,6 +39,11 @@ To get a better sense of what type of data is collected, you can review some These are the last 1,000 analytics events from the author's personal use of aider, updated regularly. +Since aider is open source, all the places where aider reports analytics +are visible in the source code. +They can be easily viewed using +[GitHub search](https://github.com/search?q=repo%3Apaul-gauthier%2Faider+%22.event%28%22&type=code). + ## Enabling & disabling analytics You can opt out of analytics forever by running this command one time: @@ -42,7 +52,9 @@ You can opt out of analytics forever by running this command one time: aider --analytics-disable ``` -To enable analytics for a single session, you can run: +To enable analytics for a single session, you can run the command below. +This will *not* do anything if you have permanently disabled analytics with the previous +command. ``` aider --analytics