diff --git a/aider/main.py b/aider/main.py index 8fc0ab4cd..902b68c39 100644 --- a/aider/main.py +++ b/aider/main.py @@ -607,13 +607,13 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F problem = models.sanity_check_models(io, main_model) if problem: io.tool_output("You can skip this check with --no-show-model-warnings") - io.tool_output() try: if io.confirm_ask( "Open documentation url for more info?", subject=urls.model_warnings ): webbrowser.open(urls.model_warnings) + io.tool_output() except KeyboardInterrupt: return 1 @@ -830,7 +830,11 @@ def check_and_load_imports(io, verbose=False): except Exception as err: io.tool_error(str(err)) io.tool_output("Error loading required imports. Did you install aider properly?") - io.tool_output("https://aider.chat/docs/install/install.html") + if io.confirm_ask( + "Open documentation url for more info?", subject=urls.install_properly + ): + webbrowser.open(urls.install_properly) + sys.exit(1) installs[str(key)] = True @@ -867,6 +871,7 @@ def load_slow_imports(swallow=True): raise e + if __name__ == "__main__": status = main() sys.exit(status) diff --git a/aider/models.py b/aider/models.py index 602d1d05d..b56c28086 100644 --- a/aider/models.py +++ b/aider/models.py @@ -1042,9 +1042,6 @@ def sanity_check_model(io, model): for match in possible_matches: io.tool_output(f"- {match}") - if show: - io.tool_output(f"For more info, see: {urls.model_warnings}") - return show diff --git a/aider/urls.py b/aider/urls.py index 6ccf46012..52ed0ec10 100644 --- a/aider/urls.py +++ b/aider/urls.py @@ -10,3 +10,4 @@ llms = "https://aider.chat/docs/llms.html" large_repos = "https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo" github_issues = "https://github.com/Aider-AI/aider/issues/new" git_index_version = "https://github.com/Aider-AI/aider/issues/211" +install_properly = "https://aider.chat/docs/troubleshooting/imports.html"