use offer_url

This commit is contained in:
Paul Gauthier 2024-11-07 11:29:05 -08:00
parent a66f31dc87
commit 42aac55b82
2 changed files with 2 additions and 5 deletions

View file

@ -1372,11 +1372,9 @@ class Coder:
res.append("- Use /clear to clear the chat history.")
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])
self.io.tool_error(res)
self.io.offer_url(urls.token_limits)
def lint_edited(self, fnames):
res = ""

View file

@ -1,4 +1,3 @@
# ai
import base64
import os
import webbrowser
@ -488,7 +487,7 @@ class InputOutput:
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.rstrip(".',\"") in self.never_prompts:
if url in self.never_prompts:
return False
if self.confirm_ask(prompt, subject=url, allow_never=True):
webbrowser.open(url)