@@ -124,7 +124,7 @@ async def setup_git(git_root, io):
124124 )
125125 return
126126 elif cwd and await io .confirm_ask (
127- "No git repo found, create one to track aider's changes (recommended)?"
127+ "No git repo found, create one to track aider's changes (recommended)?" , acknowledge = True
128128 ):
129129 git_root = str (cwd .resolve ())
130130 repo = await make_new_repo (git_root , io )
@@ -193,7 +193,8 @@ async def check_gitignore(git_root, io, ask=True):
193193 if ask :
194194 io .tool_output ("You can skip this check with --no-gitignore" )
195195 if not await io .confirm_ask (
196- f"Add { ', ' .join (patterns_to_add )} to .gitignore (recommended)?"
196+ f"Add { ', ' .join (patterns_to_add )} to .gitignore (recommended)?" ,
197+ acknowledge = True ,
197198 ):
198199 return
199200
@@ -717,28 +718,27 @@ def get_io(pretty):
717718 posthog_host = args .analytics_posthog_host ,
718719 posthog_project_api_key = args .analytics_posthog_project_api_key ,
719720 )
720- if args .analytics is not False :
721- if analytics .need_to_ask (args .analytics ):
722- io .tool_output (
723- "Aider respects your privacy and never collects your code, chat messages, keys or"
724- " personal info."
725- )
726- io .tool_output (f"For more info: { urls .analytics } " )
727- disable = not await io .confirm_ask (
728- "Allow collection of anonymous analytics to help improve aider?"
729- )
730-
731- analytics .asked_opt_in = True
732- if disable :
733- analytics .disable (permanently = True )
734- io .tool_output ("Analytics have been permanently disabled." )
735-
736- analytics .save_data ()
737- io .tool_output ()
738-
739- # This is a no-op if the user has opted out
740- analytics .enable ()
741721
722+ # if args.analytics is not False:
723+ # if analytics.need_to_ask(args.analytics):
724+ # io.tool_output(
725+ # "Aider respects your privacy and never collects your code, chat messages, keys or"
726+ # " personal info."
727+ # )
728+ # io.tool_output(f"For more info: {urls.analytics}")
729+ # disable = not await io.confirm_ask(
730+ # "Allow collection of anonymous analytics to help improve aider?"
731+ # )
732+ # analytics.asked_opt_in = True
733+ # if disable:
734+ # analytics.disable(permanently=True)
735+ # io.tool_output("Analytics have been permanently disabled.")
736+ # analytics.save_data()
737+ # io.tool_output()
738+ # # This is a no-op if the user has opted out
739+ # analytics.enable()
740+
741+ analytics .disable (permanently = True )
742742 analytics .event ("launched" )
743743
744744 if args .gui and not return_coder :
@@ -821,11 +821,6 @@ def get_io(pretty):
821821 if args .check_update :
822822 check_version (io , verbose = args .verbose )
823823
824- if args .git :
825- git_root = await setup_git (git_root , io )
826- if args .gitignore :
827- await check_gitignore (git_root , io )
828-
829824 if args .verbose :
830825 show = format_settings (parser , args )
831826 io .tool_output (show )
@@ -1118,6 +1113,11 @@ def get_io(pretty):
11181113 analytics .event ("exit" , reason = "Keyboard interrupt during model warnings" )
11191114 return 1
11201115
1116+ if args .git :
1117+ git_root = await setup_git (git_root , io )
1118+ if args .gitignore :
1119+ await check_gitignore (git_root , io )
1120+
11211121 except UnknownEditFormat as err :
11221122 io .tool_error (str (err ))
11231123 await io .offer_url (urls .edit_formats , "Open documentation about edit formats?" )
0 commit comments