mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Improve web browsing train of thought status text shown on web app
This commit is contained in:
@@ -316,7 +316,7 @@ function chooseIconFromHeader(header: string, iconColor: string) {
|
|||||||
return <Folder className={`${classNames}`} />;
|
return <Folder className={`${classNames}`} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compareHeader.includes("read")) {
|
if (compareHeader.includes("browsing")) {
|
||||||
return <Book className={`${classNames}`} />;
|
return <Book className={`${classNames}`} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ async def search_online(
|
|||||||
|
|
||||||
if send_status_func:
|
if send_status_func:
|
||||||
subqueries_str = "\n- " + "\n- ".join(subqueries)
|
subqueries_str = "\n- " + "\n- ".join(subqueries)
|
||||||
async for event in send_status_func(f"**Searching the Internet for**: {subqueries_str}"):
|
async for event in send_status_func(f"**Searching the web for**: {subqueries_str}"):
|
||||||
yield {ChatEvent.STATUS: event}
|
yield {ChatEvent.STATUS: event}
|
||||||
|
|
||||||
response_dict = {}
|
response_dict = {}
|
||||||
@@ -169,7 +169,7 @@ async def search_online(
|
|||||||
logger.info(f"Reading web pages at: {webpages.keys()}")
|
logger.info(f"Reading web pages at: {webpages.keys()}")
|
||||||
if send_status_func:
|
if send_status_func:
|
||||||
webpage_links_str = "\n- " + "\n- ".join(webpages.keys())
|
webpage_links_str = "\n- " + "\n- ".join(webpages.keys())
|
||||||
async for event in send_status_func(f"**Reading web pages**: {webpage_links_str}"):
|
async for event in send_status_func(f"**Browsing**: {webpage_links_str}"):
|
||||||
yield {ChatEvent.STATUS: event}
|
yield {ChatEvent.STATUS: event}
|
||||||
tasks = [
|
tasks = [
|
||||||
read_webpage_and_extract_content(
|
read_webpage_and_extract_content(
|
||||||
@@ -486,7 +486,7 @@ async def read_webpages_content(
|
|||||||
logger.info(f"Reading web pages at: {urls}")
|
logger.info(f"Reading web pages at: {urls}")
|
||||||
if send_status_func:
|
if send_status_func:
|
||||||
webpage_links_str = "\n- " + "\n- ".join(list(urls))
|
webpage_links_str = "\n- " + "\n- ".join(list(urls))
|
||||||
async for event in send_status_func(f"**Reading web pages**: {webpage_links_str}"):
|
async for event in send_status_func(f"**Browsing**: {webpage_links_str}"):
|
||||||
yield {ChatEvent.STATUS: event}
|
yield {ChatEvent.STATUS: event}
|
||||||
tasks = [read_webpage_and_extract_content({query}, url, user=user, agent=agent, tracer=tracer) for url in urls]
|
tasks = [read_webpage_and_extract_content({query}, url, user=user, agent=agent, tracer=tracer) for url in urls]
|
||||||
results = await asyncio.gather(*tasks)
|
results = await asyncio.gather(*tasks)
|
||||||
|
|||||||
Reference in New Issue
Block a user