mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
Merge branch 'main' into swe-bench
This commit is contained in:
commit
fb76895eb1
8 changed files with 2245 additions and 5 deletions
|
@ -618,6 +618,20 @@ class Coder:
|
|||
return self.commands.run(inp)
|
||||
|
||||
self.check_for_file_mentions(inp)
|
||||
inp = self.check_for_urls(inp)
|
||||
|
||||
return inp
|
||||
|
||||
def check_for_urls(self, inp):
|
||||
url_pattern = re.compile(
|
||||
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
|
||||
)
|
||||
urls = url_pattern.findall(inp)
|
||||
for url in urls:
|
||||
if self.io.confirm_ask(f"Add {url} to the chat?"):
|
||||
inp += "\n\n"
|
||||
inp += self.commands.cmd_web(url)
|
||||
|
||||
return inp
|
||||
|
||||
def keyboard_interrupt(self):
|
||||
|
|
|
@ -69,8 +69,8 @@ class Commands:
|
|||
self.scraper = Scraper(print_error=self.io.tool_error)
|
||||
|
||||
content = self.scraper.scrape(url) or ""
|
||||
if content:
|
||||
self.io.tool_output(content)
|
||||
# if content:
|
||||
# self.io.tool_output(content)
|
||||
|
||||
instructions = self.scraper.get_playwright_instructions()
|
||||
if instructions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue