mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
refactor: improve documentation URL handling and error messages
This commit is contained in:
parent
e9beb1336c
commit
7e574bc214
3 changed files with 8 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue