fix(console): print websearch status on its own line (#2340)

The two websearch status messages in koboldcpp.py print with no leading
newline, so they run onto the end of the preceding generation-stats line
(which has no trailing newline), e.g.:

    ...Total:26.31sReturning cached websearch...

Give both the cached-result print and the new-search print a leading
newline so each starts on its own line, matching the approach already
taken elsewhere (adding the missing newline at the offending print
rather than changing the stats line). Fixes #2337.

Co-authored-by: Anai-Guo <antai12232931@anaiguo.com>
This commit is contained in:
Tai An
2026-07-17 19:33:49 -07:00
committed by GitHub
parent a25af27185
commit 3b6d698616
+2 -2
View File
@@ -3206,13 +3206,13 @@ def websearch(query):
return []
query = query[:300] # only search first 300 chars, due to search engine limits
if query==websearch_lastquery:
print("Returning cached websearch...")
print("\nReturning cached websearch...")
return websearch_lastresponse
import difflib
from html.parser import HTMLParser
num_results = 3
searchresults = []
utfprint("Performing new websearch...",1)
utfprint("\nPerforming new websearch...",1)
def fetch_searched_webpage(url, random_agent=False):
from urllib.parse import quote, urlsplit, urlunsplit