refactor: simplify URL opening confirmation prompt

This commit is contained in:
Paul Gauthier 2024-11-07 10:26:31 -08:00 committed by Paul Gauthier (aider)
parent c84f2996ec
commit 2cf93ccb54
2 changed files with 3 additions and 1 deletions

View file

@ -829,7 +829,8 @@ class Coder:
urls = list(set(url_pattern.findall(text))) # Use set to remove duplicates
for url in urls:
url = url.rstrip(".',\"")
if self.io.confirm_ask("Open URL for more info about this error?", subject=url):
#ai refactor this into a io.offer_url() function!
if self.io.confirm_ask("Open URL for more info?", subject=url):
webbrowser.open(url)
return urls