mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
chore: add TODO comments for URL handling refactoring
This commit is contained in:
parent
6829b29ef4
commit
b79321da51
1 changed files with 2 additions and 0 deletions
|
@ -1147,6 +1147,7 @@ class Coder:
|
|||
retry_delay *= 2
|
||||
if retry_delay > RETRY_TIMEOUT:
|
||||
# Check for URLs in error message
|
||||
# ai: refactor this into a function
|
||||
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*[^\s,.])")
|
||||
urls = url_pattern.findall(str(err))
|
||||
for url in urls:
|
||||
|
@ -1183,6 +1184,7 @@ class Coder:
|
|||
dict(role="assistant", content=self.multi_response_content, prefix=True)
|
||||
)
|
||||
except Exception as err:
|
||||
#ai also check this err for a url and offer to open it!
|
||||
self.io.tool_error(f"Unexpected error: {err}")
|
||||
lines = traceback.format_exception(type(err), err, err.__traceback__)
|
||||
self.io.tool_error("".join(lines))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue