mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
Merge branch 'main' into watch
This commit is contained in:
commit
d4a88d08e4
21 changed files with 521 additions and 289 deletions
10
aider/io.py
10
aider/io.py
|
@ -1,6 +1,7 @@
|
|||
import base64
|
||||
import os
|
||||
import threading
|
||||
import webbrowser
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
|
@ -532,6 +533,15 @@ class InputOutput:
|
|||
hist = "\n" + content.strip() + "\n\n"
|
||||
self.append_chat_history(hist)
|
||||
|
||||
def offer_url(self, url, prompt="Open URL for more info?"):
|
||||
"""Offer to open a URL in the browser, returns True if opened."""
|
||||
if url in self.never_prompts:
|
||||
return False
|
||||
if self.confirm_ask(prompt, subject=url, allow_never=True):
|
||||
webbrowser.open(url)
|
||||
return True
|
||||
return False
|
||||
|
||||
def confirm_ask(
|
||||
self,
|
||||
question,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue