mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
Fix the issue with repeated URLs in the check_for_urls
method
This commit is contained in:
parent
a0eadb62c5
commit
3e1ad07069
1 changed files with 1 additions and 1 deletions
|
@ -670,7 +670,7 @@ class Coder:
|
|||
|
||||
def check_for_urls(self, inp):
|
||||
url_pattern = re.compile(r"(https?://[^\s/$.?#].[^\s]*[^\s,.])")
|
||||
urls = url_pattern.findall(inp)
|
||||
urls = list(set(url_pattern.findall(inp))) # Use set to remove duplicates
|
||||
for url in urls:
|
||||
if self.io.confirm_ask(f"Add {url} to the chat?"):
|
||||
inp += "\n\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue