mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
use offer_url
This commit is contained in:
parent
a66f31dc87
commit
42aac55b82
2 changed files with 2 additions and 5 deletions
|
@ -1372,11 +1372,9 @@ class Coder:
|
||||||
res.append("- Use /clear to clear the chat history.")
|
res.append("- Use /clear to clear the chat history.")
|
||||||
res.append("- Break your code into smaller source files.")
|
res.append("- Break your code into smaller source files.")
|
||||||
|
|
||||||
res.append("")
|
|
||||||
res.append(f"For more info: {urls.token_limits}")
|
|
||||||
|
|
||||||
res = "".join([line + "\n" for line in res])
|
res = "".join([line + "\n" for line in res])
|
||||||
self.io.tool_error(res)
|
self.io.tool_error(res)
|
||||||
|
self.io.offer_url(urls.token_limits)
|
||||||
|
|
||||||
def lint_edited(self, fnames):
|
def lint_edited(self, fnames):
|
||||||
res = ""
|
res = ""
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# ai
|
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
@ -488,7 +487,7 @@ class InputOutput:
|
||||||
|
|
||||||
def offer_url(self, url, prompt="Open URL for more info?"):
|
def offer_url(self, url, prompt="Open URL for more info?"):
|
||||||
"""Offer to open a URL in the browser, returns True if opened."""
|
"""Offer to open a URL in the browser, returns True if opened."""
|
||||||
if url.rstrip(".',\"") in self.never_prompts:
|
if url in self.never_prompts:
|
||||||
return False
|
return False
|
||||||
if self.confirm_ask(prompt, subject=url, allow_never=True):
|
if self.confirm_ask(prompt, subject=url, allow_never=True):
|
||||||
webbrowser.open(url)
|
webbrowser.open(url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue