feat: add browser URL launch with user confirmation prompt

This commit is contained in:
Paul Gauthier (aider) 2024-10-30 11:42:46 -07:00
parent 763724ed4e
commit fe3dbba1d9

View file

@ -367,7 +367,8 @@ def sanity_check_repo(repo, io):
io.tool_output("You may be able to convert your repo: git update-index --index-version=2")
io.tool_output("Or run aider --no-git to proceed without using git.")
#ai ask if the user wants to open the url!
io.tool_output(urls.git_index_version)
if io.confirm_ask("Open documentation url for more info?", subject=urls.git_index_version):
webbrowser.open(urls.git_index_version)
return False
io.tool_error("Unable to read git repository, it may be corrupt?")