From b79321da51dd07a1cb6282295a6800f760e85068 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 31 Oct 2024 13:52:22 -0700 Subject: [PATCH] chore: add TODO comments for URL handling refactoring --- aider/coders/base_coder.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index 7754c81f7..35c5be792 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -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))