khoj 1.41.1.dev97__py3-none-any.whl → 1.41.1.dev142__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- khoj/database/adapters/__init__.py +20 -0
- khoj/database/models/__init__.py +3 -0
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/{2327-aa22697ed9c8d54a.js → 2327-f03b2a77f67b8f8c.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{8515-f305779d95dd5780.js → 5138-81457f7f59956b56.js} +9 -9
- khoj/interface/compiled/_next/static/chunks/5477-b91e9926cfc3095c.js +1 -0
- khoj/interface/compiled/_next/static/chunks/7127-d3199617463d45f0.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-e00fb81dca656a10.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-ceeb9a91edea74ce.js → page-774c78ff0f55a228.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-e3cb78747ab98cc7.js → page-4454891c5007b870.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-7e780dc11eb5e5d3.js → page-5a2559825b4d5def.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-a4053e1bb578b2ce.js → page-f7a0286dfc31ad6b.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/search/{page-8973da2f4c076fe1.js → page-f1a7f278c89e09b6.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-375136dbb400525b.js → page-5d9134d4a97f8834.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-abb6c5f4239ad7be.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-384b54fc953b18f2.js → page-32cd0ceb9ffbd777.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-21f76f7f59582bc7.js → webpack-952bc0d41769db77.js} +1 -1
- khoj/interface/compiled/_next/static/css/{fca983d49c3dd1a3.css → 0db53bacf81896f5.css} +1 -1
- khoj/interface/compiled/_next/static/css/93eeacc43e261162.css +1 -0
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +3 -3
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +4 -4
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/processor/conversation/anthropic/anthropic_chat.py +9 -10
- khoj/processor/conversation/anthropic/utils.py +30 -7
- khoj/processor/conversation/google/gemini_chat.py +10 -10
- khoj/processor/conversation/google/utils.py +20 -12
- khoj/processor/conversation/offline/chat_model.py +2 -7
- khoj/processor/conversation/openai/gpt.py +9 -10
- khoj/processor/conversation/utils.py +177 -53
- khoj/processor/operator/README.md +59 -0
- khoj/processor/operator/{operate_browser.py → __init__.py} +98 -34
- khoj/processor/operator/grounding_agent.py +229 -175
- khoj/processor/operator/grounding_agent_uitars.py +61 -50
- khoj/processor/operator/operator_actions.py +48 -0
- khoj/processor/operator/operator_agent_anthropic.py +298 -90
- khoj/processor/operator/operator_agent_base.py +45 -14
- khoj/processor/operator/operator_agent_binary.py +125 -57
- khoj/processor/operator/operator_agent_openai.py +183 -75
- khoj/processor/operator/operator_environment_base.py +11 -1
- khoj/processor/operator/operator_environment_browser.py +5 -3
- khoj/processor/operator/operator_environment_computer.py +658 -0
- khoj/routers/api_chat.py +125 -43
- khoj/routers/api_model.py +3 -3
- khoj/routers/helpers.py +13 -18
- khoj/routers/research.py +57 -23
- khoj/utils/constants.py +4 -4
- khoj/utils/helpers.py +12 -15
- khoj/utils/rawconfig.py +1 -0
- {khoj-1.41.1.dev97.dist-info → khoj-1.41.1.dev142.dist-info}/METADATA +3 -1
- {khoj-1.41.1.dev97.dist-info → khoj-1.41.1.dev142.dist-info}/RECORD +74 -72
- khoj/interface/compiled/_next/static/chunks/4986-9ddd694756d03aa1.js +0 -1
- khoj/interface/compiled/_next/static/chunks/5477-77ce5c6f468d6c25.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-4e2a134ec26aa606.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-ad4d1792ab1a4108.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/search/layout-c02531d586972d7d.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-e8e5db7830bf3f47.js +0 -1
- khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css +0 -1
- /khoj/interface/compiled/_next/static/{o6zlo73DbD2lS92jWHS8o → 4CIEX6Ko-Qehhb7L-ymZw}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{o6zlo73DbD2lS92jWHS8o → 4CIEX6Ko-Qehhb7L-ymZw}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/chunks/{1915-ab4353eaca76f690.js → 1915-1943ee8a628b893c.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2117-1c18aa2098982bf9.js → 2117-5a41630a2bd2eae8.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{4363-4efaf12abe696251.js → 4363-e6ac2203564d1a3b.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{4447-5d44807c40355b1a.js → 4447-e038b251d626c340.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-adbe6017a66cef10.js → 8667-8136f74e9a086fca.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9259-d8bcd9da9e80c81e.js → 9259-640fdd77408475df.js} +0 -0
- {khoj-1.41.1.dev97.dist-info → khoj-1.41.1.dev142.dist-info}/WHEEL +0 -0
- {khoj-1.41.1.dev97.dist-info → khoj-1.41.1.dev142.dist-info}/entry_points.txt +0 -0
- {khoj-1.41.1.dev97.dist-info → khoj-1.41.1.dev142.dist-info}/licenses/LICENSE +0 -0
khoj/utils/helpers.py
CHANGED
@@ -46,6 +46,7 @@ if TYPE_CHECKING:
|
|
46
46
|
from khoj.utils.models import BaseEncoder
|
47
47
|
from khoj.utils.rawconfig import AppConfig
|
48
48
|
|
49
|
+
logger = logging.getLogger(__name__)
|
49
50
|
|
50
51
|
# Initialize Magika for file type identification
|
51
52
|
magika = Magika()
|
@@ -364,7 +365,7 @@ command_descriptions = {
|
|
364
365
|
ConversationCommand.Summarize: "Get help with a question pertaining to an entire document.",
|
365
366
|
ConversationCommand.Diagram: "Draw a flowchart, diagram, or any other visual representation best expressed with primitives like lines, rectangles, and text.",
|
366
367
|
ConversationCommand.Research: "Do deep research on a topic. This will take longer than usual, but give a more detailed, comprehensive answer.",
|
367
|
-
ConversationCommand.Operator: "Operate and perform tasks using a
|
368
|
+
ConversationCommand.Operator: "Operate and perform tasks using a computer.",
|
368
369
|
}
|
369
370
|
|
370
371
|
command_descriptions_for_agent = {
|
@@ -373,12 +374,12 @@ command_descriptions_for_agent = {
|
|
373
374
|
ConversationCommand.Online: "Agent can search the internet for information.",
|
374
375
|
ConversationCommand.Webpage: "Agent can read suggested web pages for information.",
|
375
376
|
ConversationCommand.Research: "Agent can do deep research on a topic.",
|
376
|
-
ConversationCommand.Code: "Agent can run Python
|
377
|
-
ConversationCommand.Operator: "Agent can operate
|
377
|
+
ConversationCommand.Code: "Agent can run a Python script to parse information, run complex calculations, create documents and charts.",
|
378
|
+
ConversationCommand.Operator: "Agent can operate a computer to complete tasks.",
|
378
379
|
}
|
379
380
|
|
380
|
-
e2b_tool_description = "To run Python
|
381
|
-
terrarium_tool_description = "To run Python
|
381
|
+
e2b_tool_description = "To run a Python script in a E2B sandbox with no network access. Helpful to parse complex information, run calculations, create text documents and create charts with quantitative data. Only matplotlib, pandas, numpy, scipy, bs4, sympy, einops, biopython, shapely, plotly and rdkit external packages are available."
|
382
|
+
terrarium_tool_description = "To run a Python script in a Terrarium, Pyodide sandbox with no network access. Helpful to parse complex information, run complex calculations, create plaintext documents and create charts with quantitative data. Only matplotlib, panda, numpy, scipy, bs4 and sympy external packages are available."
|
382
383
|
|
383
384
|
tool_descriptions_for_llm = {
|
384
385
|
ConversationCommand.Default: "To use a mix of your internal knowledge and the user's personal knowledge, or if you don't entirely understand the query.",
|
@@ -387,7 +388,7 @@ tool_descriptions_for_llm = {
|
|
387
388
|
ConversationCommand.Online: "To search for the latest, up-to-date information from the internet. Note: **Questions about Khoj should always use this data source**",
|
388
389
|
ConversationCommand.Webpage: "To use if the user has directly provided the webpage urls or you are certain of the webpage urls to read.",
|
389
390
|
ConversationCommand.Code: e2b_tool_description if is_e2b_code_sandbox_enabled() else terrarium_tool_description,
|
390
|
-
ConversationCommand.Operator: "To use when you need to operate
|
391
|
+
ConversationCommand.Operator: "To use when you need to operate a computer to complete the task.",
|
391
392
|
}
|
392
393
|
|
393
394
|
tool_description_for_research_llm = {
|
@@ -396,7 +397,7 @@ tool_description_for_research_llm = {
|
|
396
397
|
ConversationCommand.Webpage: "To extract information from webpages. Useful for more detailed research from the internet. Usually used when you know the webpage links to refer to. Share upto {max_webpages_to_read} webpage links and what information to extract from them in your query.",
|
397
398
|
ConversationCommand.Code: e2b_tool_description if is_e2b_code_sandbox_enabled() else terrarium_tool_description,
|
398
399
|
ConversationCommand.Text: "To respond to the user once you've completed your research and have the required information.",
|
399
|
-
ConversationCommand.Operator: "To operate
|
400
|
+
ConversationCommand.Operator: "To operate a computer to complete the task.",
|
400
401
|
}
|
401
402
|
|
402
403
|
mode_descriptions_for_llm = {
|
@@ -493,13 +494,7 @@ def is_promptrace_enabled():
|
|
493
494
|
def is_operator_enabled():
|
494
495
|
"""Check if Khoj can operate GUI applications.
|
495
496
|
Set KHOJ_OPERATOR_ENABLED env var to true and install playwright to enable it."""
|
496
|
-
|
497
|
-
import playwright
|
498
|
-
|
499
|
-
is_playwright_installed = True
|
500
|
-
except ImportError:
|
501
|
-
is_playwright_installed = False
|
502
|
-
return is_env_var_true("KHOJ_OPERATOR_ENABLED") and is_playwright_installed
|
497
|
+
return is_env_var_true("KHOJ_OPERATOR_ENABLED")
|
503
498
|
|
504
499
|
|
505
500
|
def is_valid_url(url: str) -> bool:
|
@@ -686,7 +681,7 @@ def get_chat_usage_metrics(
|
|
686
681
|
"cache_write_tokens": 0,
|
687
682
|
"cost": 0.0,
|
688
683
|
}
|
689
|
-
|
684
|
+
current_usage = {
|
690
685
|
"input_tokens": prev_usage["input_tokens"] + input_tokens,
|
691
686
|
"output_tokens": prev_usage["output_tokens"] + output_tokens,
|
692
687
|
"thought_tokens": prev_usage.get("thought_tokens", 0) + thought_tokens,
|
@@ -703,6 +698,8 @@ def get_chat_usage_metrics(
|
|
703
698
|
prev_cost=prev_usage["cost"],
|
704
699
|
),
|
705
700
|
}
|
701
|
+
logger.debug(f"AI API usage by {model_name}: {current_usage}")
|
702
|
+
return current_usage
|
706
703
|
|
707
704
|
|
708
705
|
class AiApiInfo(NamedTuple):
|
khoj/utils/rawconfig.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: khoj
|
3
|
-
Version: 1.41.1.
|
3
|
+
Version: 1.41.1.dev142
|
4
4
|
Summary: Your Second Brain
|
5
5
|
Project-URL: Homepage, https://khoj.dev
|
6
6
|
Project-URL: Documentation, https://docs.khoj.dev
|
@@ -91,6 +91,7 @@ Requires-Dist: pandas; extra == 'dev'
|
|
91
91
|
Requires-Dist: pgserver==0.1.4; extra == 'dev'
|
92
92
|
Requires-Dist: playwright>=1.49.0; extra == 'dev'
|
93
93
|
Requires-Dist: pre-commit>=3.0.4; extra == 'dev'
|
94
|
+
Requires-Dist: pyautogui==0.9.54; extra == 'dev'
|
94
95
|
Requires-Dist: pytest-asyncio==0.21.1; extra == 'dev'
|
95
96
|
Requires-Dist: pytest-django==4.5.2; extra == 'dev'
|
96
97
|
Requires-Dist: pytest-xdist[psutil]; extra == 'dev'
|
@@ -100,6 +101,7 @@ Requires-Dist: twilio==8.11; extra == 'dev'
|
|
100
101
|
Provides-Extra: local
|
101
102
|
Requires-Dist: pgserver==0.1.4; extra == 'local'
|
102
103
|
Requires-Dist: playwright>=1.49.0; extra == 'local'
|
104
|
+
Requires-Dist: pyautogui==0.9.54; extra == 'local'
|
103
105
|
Provides-Extra: prod
|
104
106
|
Requires-Dist: boto3>=1.34.57; extra == 'prod'
|
105
107
|
Requires-Dist: gunicorn==22.0.0; extra == 'prod'
|
@@ -11,7 +11,7 @@ khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
khoj/database/admin.py,sha256=yX_g1CUpEijnufIgTdefUfiakmd3MB3GSYwKfZo-Cms,13206
|
12
12
|
khoj/database/apps.py,sha256=pM4tkX5Odw4YW_hLLKK8Nd5kqGddf1en0oMCea44RZw,153
|
13
13
|
khoj/database/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
14
|
-
khoj/database/adapters/__init__.py,sha256=
|
14
|
+
khoj/database/adapters/__init__.py,sha256=NgfsAUD9WFR-wCg2AcK4V4FDqnU2tpIHclRP3n3THdg,80006
|
15
15
|
khoj/database/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
khoj/database/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
khoj/database/management/commands/change_default_model.py,sha256=6QXJttG58gpU7vZApQEeEPVNAuhjU2xa6_BwJsfz320,4877
|
@@ -122,30 +122,32 @@ khoj/database/migrations/0087_alter_aimodelapi_api_key.py,sha256=CqZ3iqt3CwiCwkD
|
|
122
122
|
khoj/database/migrations/0088_ratelimitrecord.py,sha256=CxlkfbA8eTO57pv0AvJYfGRp5eOe81iMJgpRoTFGVls,1018
|
123
123
|
khoj/database/migrations/0089_chatmodel_price_tier_and_more.py,sha256=EJ1Yf6MMzhGMwJOS3AECaU6ks4NfRW0utyDa7lreNwQ,1211
|
124
124
|
khoj/database/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
125
|
-
khoj/database/models/__init__.py,sha256=
|
125
|
+
khoj/database/models/__init__.py,sha256=ZLm49V3fDkaGmsMTt1iQvvC6nzOqTX7vBNMCX8zDnN8,31096
|
126
126
|
khoj/interface/compiled/agents.svg,sha256=yFCRwIM-Qawa0C5ggAo3ekb-Q1ElmotBOKIGhtfIQqM,1722
|
127
127
|
khoj/interface/compiled/automation.svg,sha256=o7L2XYwJWRSMvl8h6TBv6Pt28RTRVMHqF04EPY0AFj0,1467
|
128
128
|
khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvtM3A,2424
|
129
129
|
khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
|
130
130
|
khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
|
131
131
|
khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
|
132
|
-
khoj/interface/compiled/index.html,sha256
|
133
|
-
khoj/interface/compiled/index.txt,sha256=
|
132
|
+
khoj/interface/compiled/index.html,sha256=8tliJlfPu-b1LAlw_tOpwTk2XNeniwUTX6HEeL2ctnQ,53043
|
133
|
+
khoj/interface/compiled/index.txt,sha256=J7kI5JOYsbumn0muIYuy_VCKLTl8dLuPro9L0LQ4qGA,7616
|
134
134
|
khoj/interface/compiled/khoj.webmanifest,sha256=9wOK2BMS6xH5NKd2eaUgTLg9WepIxB2K2U33KU89LD8,2543
|
135
135
|
khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
|
136
136
|
khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
|
137
137
|
khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
|
138
138
|
khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
|
139
139
|
khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
|
140
|
-
khoj/interface/compiled/404/index.html,sha256=
|
140
|
+
khoj/interface/compiled/404/index.html,sha256=lcQGF09myxsciAAgf56RF9J2tKjfS2Nk_IU7UYi7VWY,17097
|
141
|
+
khoj/interface/compiled/_next/static/4CIEX6Ko-Qehhb7L-ymZw/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
|
142
|
+
khoj/interface/compiled/_next/static/4CIEX6Ko-Qehhb7L-ymZw/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
141
143
|
khoj/interface/compiled/_next/static/chunks/1243.ea2826fb35adb15a.js,sha256=Y6ceAwyTH4HSGDvBRoBB-RVXRCzGGr8NSPcspYF5OM8,182
|
142
144
|
khoj/interface/compiled/_next/static/chunks/133.392ae90c3b2a67f2.js,sha256=IK-mb9ZlF6uJUdU8AuXsppc99tFL8svJvZtKNZGNtcY,411
|
143
145
|
khoj/interface/compiled/_next/static/chunks/1592.b069bdb7aaddd2eb.js,sha256=VUaP2gjX3W9tA9pOH_VIPG_2BIg7Wk1AICrfU5iHgrk,71096
|
144
|
-
khoj/interface/compiled/_next/static/chunks/1915-
|
146
|
+
khoj/interface/compiled/_next/static/chunks/1915-1943ee8a628b893c.js,sha256=qArqL3leavWRcZkX4ZuWgemtKnmV6c-_yrNtMu_8SeY,11277
|
145
147
|
khoj/interface/compiled/_next/static/chunks/2069.f060659791c0c484.js,sha256=C_oat_BkZcLOHsyJlNN_5I55fB7ee1zkkZ9FT5zOzn4,186
|
146
|
-
khoj/interface/compiled/_next/static/chunks/2117-
|
148
|
+
khoj/interface/compiled/_next/static/chunks/2117-5a41630a2bd2eae8.js,sha256=3KtUs1Aeno0OfsXZ2ymJ0d5HXwO2_Osq2uGIIGiDagI,123994
|
147
149
|
khoj/interface/compiled/_next/static/chunks/2170.45431769330fa5b7.js,sha256=C7Puu9x18DhdR5Sh8XXvTzPdP_HTK6WhsJDNW-NoB7o,24019
|
148
|
-
khoj/interface/compiled/_next/static/chunks/2327-
|
150
|
+
khoj/interface/compiled/_next/static/chunks/2327-f03b2a77f67b8f8c.js,sha256=BHzRbOlxEws0fe7aVtBtUEFbm2GNzgR-K3UoSQspN_Y,127496
|
149
151
|
khoj/interface/compiled/_next/static/chunks/3237.c4754f02f1a388cb.js,sha256=Z5iOEX0mPj-5tuoU4Bq_IjpAlyc4MURKlBoaExsULTk,177
|
150
152
|
khoj/interface/compiled/_next/static/chunks/3305.1fc7297ba154ee95.js,sha256=mfrpv-asuYmBmbqIh1p3UnPMAxg2pKlxE3Rzmth8O6s,37266
|
151
153
|
khoj/interface/compiled/_next/static/chunks/3332.6313db5217bb1b67.js,sha256=4lNF9JhPQdTX2xDojGOvvanM0Y0VScwM3kmF4p0RHFg,3776
|
@@ -154,21 +156,21 @@ khoj/interface/compiled/_next/static/chunks/3460.39c2b9b6a3898384.js,sha256=gehY
|
|
154
156
|
khoj/interface/compiled/_next/static/chunks/4299.2aaa569416cfc208.js,sha256=3HJ8OvB9BDJW0-qCBd1eUmChoBAxaCX6R81ftWZ1CHw,21659
|
155
157
|
khoj/interface/compiled/_next/static/chunks/4327.238d15c09a039b8b.js,sha256=mZa4Oyltc9JrokqnalRTjzcvWgX4S3i3REXiHzRYH1o,296536
|
156
158
|
khoj/interface/compiled/_next/static/chunks/4357-d86d3401f6f6f802.js,sha256=KDM1m01Fz-vcAMfxQfYPO6SEZJVK7z4241JOCEvou6Y,45442
|
157
|
-
khoj/interface/compiled/_next/static/chunks/4363-
|
159
|
+
khoj/interface/compiled/_next/static/chunks/4363-e6ac2203564d1a3b.js,sha256=YFO-i3X2LrX9c4MgYY1kPsoRBaqVUkmfAKI62Rz2BVI,468054
|
158
160
|
khoj/interface/compiled/_next/static/chunks/4415.e0c0da5eedae4dd7.js,sha256=DEf8HPEstDFvBflOU0j0ilYHlVJilGcGsLgUx524FZQ,25544
|
159
|
-
khoj/interface/compiled/_next/static/chunks/4447-
|
161
|
+
khoj/interface/compiled/_next/static/chunks/4447-e038b251d626c340.js,sha256=Uw8IrcKmVR3wba-FB9maP9i9l_kAYg59r8PN1T_ipQE,19621
|
160
162
|
khoj/interface/compiled/_next/static/chunks/4609-33aa487dff03a9fd.js,sha256=1M6QAfVZa2g2Q4jXRdSI1wjrZ4G9yKjINJt8qyTKm1A,24698
|
161
163
|
khoj/interface/compiled/_next/static/chunks/4610.a1e7f40a759ed2aa.js,sha256=b5JDRPyQv2MsibYoK2TDT76LMAoDTRzFM-fa81mJxow,14102
|
162
164
|
khoj/interface/compiled/_next/static/chunks/4650.41f041da0ad365ad.js,sha256=EZeckNrMc3ZUX_LexPgaeusEq-dGBNEPm7nc5nvb4OM,33902
|
163
165
|
khoj/interface/compiled/_next/static/chunks/479.a7e0c9cfc376a695.js,sha256=IMtRORJyc8TGABlltunJ1si_GUwBMK9bCSeyr7RDdw8,7379
|
164
166
|
khoj/interface/compiled/_next/static/chunks/4872.5422e8324272ab40.js,sha256=fXqb_gUYEnKRgeI3AJuAG6kKAOlVkVXyndmNkhetCyo,11176
|
165
|
-
khoj/interface/compiled/_next/static/chunks/4986-9ddd694756d03aa1.js,sha256=mNs1Ry9zKZGv-KKWOics1SSW0x4aOpYJNTm0sl18cL8,36731
|
166
167
|
khoj/interface/compiled/_next/static/chunks/5061.79a660faed0e16a9.js,sha256=EJDyOblv9Po4UPs6ylIKVspSnRQehMXKXuLlW2NVCzo,11215
|
168
|
+
khoj/interface/compiled/_next/static/chunks/5138-81457f7f59956b56.js,sha256=Y-1Qe5v_jvM1QPcP2qdZH5DMBL8rJlMzsbhAKv5mFiA,1629261
|
167
169
|
khoj/interface/compiled/_next/static/chunks/5279.85d537880b8041ae.js,sha256=3VvdW0sZ8Abfq-qXFvBinh3n65XkjWJBUrFMcRMHIXw,3878
|
168
170
|
khoj/interface/compiled/_next/static/chunks/5402.b9460f1b16b57e92.js,sha256=TFB5N1RYbKelRJXW70T4tT0lEjB3u7RS5lItHOfX-TU,24369
|
169
171
|
khoj/interface/compiled/_next/static/chunks/5427-442f34b514b9fc26.js,sha256=QaxSADflROkzhUDs3OPtt8mpaFIc_3UtBjSS8aTWpzE,31914
|
170
172
|
khoj/interface/compiled/_next/static/chunks/5473-921e17a6177f9729.js,sha256=Xl8sKJ3GbVq0N5RD-rvjZxkN0zHQQw5Ix8jltbMwLhc,46052
|
171
|
-
khoj/interface/compiled/_next/static/chunks/5477-
|
173
|
+
khoj/interface/compiled/_next/static/chunks/5477-b91e9926cfc3095c.js,sha256=kxYBij2B8d2jKdR5j0ppma3VGmOoYkQ9dQHVg9-VMvM,14601
|
172
174
|
khoj/interface/compiled/_next/static/chunks/5555.f7cf9795d675de51.js,sha256=uJjZjASQiVGqPR7_Cn3RFZOe9cLnMaOEHYHMyssfyzI,100164
|
173
175
|
khoj/interface/compiled/_next/static/chunks/5621-415bdc6c7b57af11.js,sha256=cvNw0hIbmSGZAp--CTZKvnf4bNjyvAMY5WKsHVNy6cE,24074
|
174
176
|
khoj/interface/compiled/_next/static/chunks/58.f4bd8a3c9d88f5fe.js,sha256=8j1vUdozD7ROLnHcr7k5Z9emrhg2ukJ60e6fRBIymxo,31287
|
@@ -176,6 +178,7 @@ khoj/interface/compiled/_next/static/chunks/5854-745bea90ea77a1c7.js,sha256=ZxxH
|
|
176
178
|
khoj/interface/compiled/_next/static/chunks/5978.ddc72cd73130aadc.js,sha256=G2kFfcVjqIA6Rqf3BdZUU6E1TJTcb0wRaJd4pSgFsY8,178
|
177
179
|
khoj/interface/compiled/_next/static/chunks/6434.7afea9648e238ad5.js,sha256=kx0Emzxp_59WehJjGu7yS7vbgtHZhBKZgyiAg7dC0As,36261
|
178
180
|
khoj/interface/compiled/_next/static/chunks/6663-133d5db72d2d5f24.js,sha256=XIWY3DhytwBlgJNrryOTTcTtmzYJU93_P5kwifLJV9Q,86271
|
181
|
+
khoj/interface/compiled/_next/static/chunks/7127-d3199617463d45f0.js,sha256=pzDG715_JjfRd7uFas0TKdGnkC4CZd-x_LuYS2M5O2U,41801
|
179
182
|
khoj/interface/compiled/_next/static/chunks/7140.4be689873f6a2d1f.js,sha256=-77DqIa_YjhKPwY8UvYjH11SaQpSO6FGa6kOvfnnSY8,76618
|
180
183
|
khoj/interface/compiled/_next/static/chunks/7200-cabc57d26c4b32da.js,sha256=xrBbOYRHGcox-mh5cLLDZd1Mj9Qtqq4oeJlnWVFthAU,11380
|
181
184
|
khoj/interface/compiled/_next/static/chunks/7647-2aa4cf0e69b7a84d.js,sha256=5F507Hwv8Rs_p8b8VHraNOC6SpYcLFtn7gyZHm9IWWc,24433
|
@@ -184,13 +187,12 @@ khoj/interface/compiled/_next/static/chunks/7890.f681eb1d1f83bea2.js,sha256=xd1q
|
|
184
187
|
khoj/interface/compiled/_next/static/chunks/7953.f6fc335a23efb959.js,sha256=8XInVs3uzJAMGBndN2k4BeJNHmgZOembNuoyPe9Z7Oo,412
|
185
188
|
khoj/interface/compiled/_next/static/chunks/8254.3145a4fbdcfdca46.js,sha256=sur8InabGfvh1HqNQhwBssc1tCPae_WKQ-efoYU1Q8A,412
|
186
189
|
khoj/interface/compiled/_next/static/chunks/8400.c95e4e79bcd79a56.js,sha256=3SlFozKtF4DYQYPT3hB5M7VEm3e_W71kC19JgADz-3k,19864
|
187
|
-
khoj/interface/compiled/_next/static/chunks/
|
188
|
-
khoj/interface/compiled/_next/static/chunks/8667-adbe6017a66cef10.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
|
190
|
+
khoj/interface/compiled/_next/static/chunks/8667-8136f74e9a086fca.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
|
189
191
|
khoj/interface/compiled/_next/static/chunks/8673.be44c4d9e4f1d084.js,sha256=jiE4xU-TbkVC4R60SIgxwdo31T9mbdVBVuhP4H60i94,18629
|
190
192
|
khoj/interface/compiled/_next/static/chunks/8698.a088118fef40d302.js,sha256=mrK-3ZahVSF7sZij3l-PyXKxp-ccXU9orykXDc7YzsM,180
|
191
193
|
khoj/interface/compiled/_next/static/chunks/9022.33974a513a281fd2.js,sha256=6NmDzRbI0NyTisUT04sq9M0czUqvlwZoV4E7Onp-55Q,57192
|
192
194
|
khoj/interface/compiled/_next/static/chunks/90542734.9e6e44b1b45b30fe.js,sha256=5Ivye3p3HC-Ekf-bIPdnvmg_JtYLkCqyRPWtciOmuuo,413716
|
193
|
-
khoj/interface/compiled/_next/static/chunks/9259-
|
195
|
+
khoj/interface/compiled/_next/static/chunks/9259-640fdd77408475df.js,sha256=lZJF9qq4_MeSRsHeNPNcxkqh2vhBfag5iAxg6krHA9g,34848
|
194
196
|
khoj/interface/compiled/_next/static/chunks/9334-b22127fe2d39bc60.js,sha256=_TPWqSCbf86Ig1vIEDRLXzloZujDoxpoEWhRPUf6b5U,29065
|
195
197
|
khoj/interface/compiled/_next/static/chunks/9433.b1b5f5d050c43e3c.js,sha256=kMVC0Gg95UqjfQXpGvi-WUSg_kYp0SN7CTPTHxHxDBk,144858
|
196
198
|
khoj/interface/compiled/_next/static/chunks/94ca1967.1b3402358e0e1255.js,sha256=WJXEIy24FD6PNQePg-uahendJMNc03GgnVveitFeshI,1174524
|
@@ -203,32 +205,32 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
|
|
203
205
|
khoj/interface/compiled/_next/static/chunks/main-876327ac335776ab.js,sha256=JkQUmA9vh1B4VVGF5dbZ8Kun0AnIVUbZr5IBK90T4Zs,111290
|
204
206
|
khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
|
205
207
|
khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
|
206
|
-
khoj/interface/compiled/_next/static/chunks/webpack-
|
208
|
+
khoj/interface/compiled/_next/static/chunks/webpack-952bc0d41769db77.js,sha256=nvtu3cdhd-uyUN4kinQpMe0OciWSrSZLXS2A8hVpNwU,4891
|
207
209
|
khoj/interface/compiled/_next/static/chunks/app/layout-baa6e7974e560a7a.js,sha256=7JZS2Pr995Lwu3FeQpAvheLS1Bn5w5HOFsecV2_kyQA,3880
|
208
|
-
khoj/interface/compiled/_next/static/chunks/app/page-
|
210
|
+
khoj/interface/compiled/_next/static/chunks/app/page-f7a0286dfc31ad6b.js,sha256=2IVko37SGOhH4OO1_TL5k8xdulAbDTnJwqVyZjXRfMY,31218
|
209
211
|
khoj/interface/compiled/_next/static/chunks/app/_not-found/page-0ec97c4970898f2d.js,sha256=zElhiTkdu2JqrEvJ8Lrxh4HCyfLmPllBHHWOuDtrVlw,1755
|
210
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/layout-
|
211
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/page-
|
212
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/layout-e00fb81dca656a10.js,sha256=Prg_1BSPDnJDTXEx-Ai9RtlK0nesPWDFIVFFCMuVUiw,180
|
213
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/page-774c78ff0f55a228.js,sha256=lnKW5X-xvNpxPv3-KoHm5P9Dmkrl-9qd88Xfq4ipBL4,18314
|
212
214
|
khoj/interface/compiled/_next/static/chunks/app/automations/layout-7f5c33a70e46b3af.js,sha256=s2wHeQ-ai9rKyU9EjOGY1Yo51L4ZEkjLtML85BqN3Zc,5143
|
213
|
-
khoj/interface/compiled/_next/static/chunks/app/automations/page-
|
214
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/layout-
|
215
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/page-
|
216
|
-
khoj/interface/compiled/_next/static/chunks/app/search/layout-
|
217
|
-
khoj/interface/compiled/_next/static/chunks/app/search/page-
|
215
|
+
khoj/interface/compiled/_next/static/chunks/app/automations/page-4454891c5007b870.js,sha256=PwKLPT0t1y8V_hIBjz3B6YbrjcazTIPNxaevCAgXXUw,34831
|
216
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js,sha256=zKdgnv4zZCkeNWFODWPJKYB3VjkTq4X5LtTCs0sqxaQ,180
|
217
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/page-5a2559825b4d5def.js,sha256=tQPZDHhgXBQNwpdW2ofl8AfEZrE_eImg-gJ2acQxQqM,28640
|
218
|
+
khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js,sha256=Bm4Y73ylR-j9_LdKXVUjgLppZJ6JRdLTUgYAsZCOBkQ,180
|
219
|
+
khoj/interface/compiled/_next/static/chunks/app/search/page-f1a7f278c89e09b6.js,sha256=KnZkmDhLxwikGTsG3voC5ks8LvoO0iRCWQLimf2r2KQ,32714
|
218
220
|
khoj/interface/compiled/_next/static/chunks/app/settings/layout-8a22f370d3eaeed3.js,sha256=dIfmM5C_Al-Zh_uqaJmniSxjXbu3LqPzrEw4SQ7vs0I,6132
|
219
|
-
khoj/interface/compiled/_next/static/chunks/app/settings/page-
|
220
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-
|
221
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-
|
221
|
+
khoj/interface/compiled/_next/static/chunks/app/settings/page-5d9134d4a97f8834.js,sha256=Kn02UECOHZ3VWMJDmsck_e698P-iXOw_4VtDKMNL-oc,27893
|
222
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-abb6c5f4239ad7be.js,sha256=_HdxnZ70IoB5eHZ5e__Z0jt-2ElBo_BsNPboM-2SMLg,180
|
223
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-32cd0ceb9ffbd777.js,sha256=15jie9DbTiv_1n_yAYrR1qGswkzNOJ3F-Ojf8u0xlFo,5563
|
222
224
|
khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js,sha256=UqtikLsCsOWtDUJOW6Tuk9P-bV1V3MhYd3ghrQuEmfs,286
|
223
225
|
khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js,sha256=w_It3VzKT8O1M3CrJ_hZHsaU7M7dq3EAaVG8KvJ-fhU,253
|
226
|
+
khoj/interface/compiled/_next/static/css/0db53bacf81896f5.css,sha256=7Kq40hXKsqTnQEz4otvA49gEDms7a0XAFCB0rwrnXQo,30547
|
224
227
|
khoj/interface/compiled/_next/static/css/37a73b87f02df402.css,sha256=hp0vlekKu0K2eITR5YIqFmLHQPqV3JETFnRd_-Uh0mk,165
|
225
228
|
khoj/interface/compiled/_next/static/css/76c658ee459140a9.css,sha256=7tI24VB66ZUsAPUxRdQhboopun0AXLUnF64uv9RkC08,1833
|
226
229
|
khoj/interface/compiled/_next/static/css/7889a30fe9c83846.css,sha256=IUkZhkx4GpYOIhN-EJw9T1DqGMO3Wa3mNpUwaOBuZoY,7204
|
230
|
+
khoj/interface/compiled/_next/static/css/93eeacc43e261162.css,sha256=rbrg1ppryE0iLWmJexa3Qibtrb6gegftRjKIIMpnR2s,9736
|
227
231
|
khoj/interface/compiled/_next/static/css/9c223d337a984468.css,sha256=F5o-qiwJl16uCWiDADWkkIIk5PNxKjvHz5068EptHps,3075687
|
228
232
|
khoj/interface/compiled/_next/static/css/e4eb883b5265d372.css,sha256=6LaW-lQ_ZpgOJNWYwU1Q1egXZ1aqJDEuRj66oRCIU_E,17748
|
229
233
|
khoj/interface/compiled/_next/static/css/ea5485b3f3859a5a.css,sha256=tn6qi2xSLTWhtzDUE8UlC8iipH9QGV6A9oGj1ap-Sk4,1659
|
230
|
-
khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css,sha256=mLPRnYpBFaVhTMJ3CFou5_lrwLJs2mhBlAjNY2lrRYs,6354
|
231
|
-
khoj/interface/compiled/_next/static/css/fca983d49c3dd1a3.css,sha256=3F1qPtz6PQG-gIpo8h3rAfxreAc2Uvxy8F_G2e78EsM,30452
|
232
234
|
khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2,sha256=IzKBwB_bpSGvO7C9aRv29Js-jAbZPRDI-D-P4H2P918,14508
|
233
235
|
khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2,sha256=QjuuSKmViymmy-itXLB1UbSARxFNHWuMiPpCrYqClFI,22728
|
234
236
|
khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2,sha256=VH1XkI87HdFVhsurH5D5ekEjG_ZORTVBVg6xz7p87C8,16704
|
@@ -306,10 +308,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
|
|
306
308
|
khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
|
307
309
|
khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
|
308
310
|
khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
|
309
|
-
khoj/interface/compiled/
|
310
|
-
khoj/interface/compiled/
|
311
|
-
khoj/interface/compiled/agents/index.html,sha256=6tEJFSimhgj07VbF8wMtGtCxEON0zwEqlT67-7KVtUE,16224
|
312
|
-
khoj/interface/compiled/agents/index.txt,sha256=PCzz5t75w1JJJ6MNIlBH7zr1ZA0gndvi3Ik9rFaSKlQ,7220
|
311
|
+
khoj/interface/compiled/agents/index.html,sha256=ei74wVdN5-r3fRGCtaeP7VsrF7Iza0TdeqwHP6GTjfM,16224
|
312
|
+
khoj/interface/compiled/agents/index.txt,sha256=Hw5O64_ZoqeWWRj4fTG09uYuWvheZW5QMeTKm_2MJLw,7220
|
313
313
|
khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
|
314
314
|
khoj/interface/compiled/assets/icons/khoj_lantern.svg,sha256=I_8XP5X84gEOoCRhCRKOQn_GKZrz3SUBXct7WxHvY7c,8767
|
315
315
|
khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png,sha256=xDx0bbD-WMflgg8zck9oPIIuTIvywtuED2k7CjSQS4w,66194
|
@@ -324,16 +324,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
|
|
324
324
|
khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
|
325
325
|
khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
|
326
326
|
khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
|
327
|
-
khoj/interface/compiled/automations/index.html,sha256=
|
328
|
-
khoj/interface/compiled/automations/index.txt,sha256=
|
329
|
-
khoj/interface/compiled/chat/index.html,sha256=
|
330
|
-
khoj/interface/compiled/chat/index.txt,sha256=
|
331
|
-
khoj/interface/compiled/search/index.html,sha256=
|
332
|
-
khoj/interface/compiled/search/index.txt,sha256
|
333
|
-
khoj/interface/compiled/settings/index.html,sha256=
|
334
|
-
khoj/interface/compiled/settings/index.txt,sha256=
|
335
|
-
khoj/interface/compiled/share/chat/index.html,sha256=
|
336
|
-
khoj/interface/compiled/share/chat/index.txt,sha256=
|
327
|
+
khoj/interface/compiled/automations/index.html,sha256=D8tad_mi57Cj-bRKtxfEyzMNo2DJC8kaCB2KwxMyZiQ,54094
|
328
|
+
khoj/interface/compiled/automations/index.txt,sha256=1T0fVv3RaBlWwnOPwC1E1D_7cZDTUt8FlmO0yMpXkmg,7449
|
329
|
+
khoj/interface/compiled/chat/index.html,sha256=aQ9OWQVLR2o4nG_ZZKVGnz-Qrb5iurm-Yv-gjPGbQvU,53222
|
330
|
+
khoj/interface/compiled/chat/index.txt,sha256=VB0Zka5JbgVWBHZErKQe5MfJ6gUoN-XA7OH_gvqRmWQ,7858
|
331
|
+
khoj/interface/compiled/search/index.html,sha256=k6j9nJC8DUvBTw2ai0zIIPdAty5p-urFGuHw48TY_JI,55304
|
332
|
+
khoj/interface/compiled/search/index.txt,sha256=-oZMRAXzFPHIukbgzMvGZEjKVMlRnSY0SRSQADndTfM,6567
|
333
|
+
khoj/interface/compiled/settings/index.html,sha256=F2zCGmQ1r9NTLlcNT6B_QisdirKMsHUVtFWyauOkEHk,52743
|
334
|
+
khoj/interface/compiled/settings/index.txt,sha256=wUTJE8wD5vgBXQHpnC6bdROW23MnwWK2y_QZ4io3PSA,7703
|
335
|
+
khoj/interface/compiled/share/chat/index.html,sha256=9bOmVZZ5F3S1g9Y7B0lpwdywQOEn460yo7T0CWqjVgo,53802
|
336
|
+
khoj/interface/compiled/share/chat/index.txt,sha256=v_1kmedJMsdy2miOAKPC1_fD1aCF1u9HlITGojBgDAA,8320
|
337
337
|
khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
|
338
338
|
khoj/interface/email/magic_link.html,sha256=372ESbTPKM9acekuZcOIKOw6kBl-KikFg_L9MOHqJkg,2094
|
339
339
|
khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
|
@@ -386,32 +386,34 @@ khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
386
386
|
khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
|
387
387
|
khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
388
388
|
khoj/processor/conversation/prompts.py,sha256=78EVB1f3E9O5DQ0t2vnrvJHik_8BOdJHZVL9Vd1A3G8,57907
|
389
|
-
khoj/processor/conversation/utils.py,sha256=
|
389
|
+
khoj/processor/conversation/utils.py,sha256=lau8WzCJnsiVjCRvjSbkfw3mZTlBEW634l3NRdJ9ukA,43830
|
390
390
|
khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
391
|
-
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256
|
392
|
-
khoj/processor/conversation/anthropic/utils.py,sha256=
|
391
|
+
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=-7PhLw_2YLu29CMCBSBR62q6Z55mQGqNjOaO8Stn5lw,9689
|
392
|
+
khoj/processor/conversation/anthropic/utils.py,sha256=i5wji-n4DIEyJCbF3lUTesfVbPYEUuMN9C8Puh0SKm0,12765
|
393
393
|
khoj/processor/conversation/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
394
|
-
khoj/processor/conversation/google/gemini_chat.py,sha256=
|
395
|
-
khoj/processor/conversation/google/utils.py,sha256=
|
394
|
+
khoj/processor/conversation/google/gemini_chat.py,sha256=hk7ZwtjFtxKtyIhHI3AKbVl7hbp6NEwlTBl1BZQzePs,10239
|
395
|
+
khoj/processor/conversation/google/utils.py,sha256=FmK09N4zp0uGv2AVdHnJBzKKb9kr6wG1cJOelI9zraY,16269
|
396
396
|
khoj/processor/conversation/offline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
397
|
-
khoj/processor/conversation/offline/chat_model.py,sha256
|
397
|
+
khoj/processor/conversation/offline/chat_model.py,sha256=-HsulPLJ-aFXrOIU4gJUvMMwiee6Xs1AHgZwSaFee0o,13413
|
398
398
|
khoj/processor/conversation/offline/utils.py,sha256=51McImxl6u1qgRYvMt7uzsgLGSLq5SMFy74ymlNjIcc,3033
|
399
399
|
khoj/processor/conversation/offline/whisper.py,sha256=DJI-8y8DULO2cQ49m2VOvRyIZ2TxBypc15gM8O3HuMI,470
|
400
400
|
khoj/processor/conversation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
401
|
-
khoj/processor/conversation/openai/gpt.py,sha256=
|
401
|
+
khoj/processor/conversation/openai/gpt.py,sha256=xLXOc2CRqCQTL-lZJgqFNWKw2igdVwroCO5Jh_84FyE,11266
|
402
402
|
khoj/processor/conversation/openai/utils.py,sha256=Q8QrFdTD34QSdJRiLTdhvqeZfmpgM_F7L6R2DMB8DZQ,25419
|
403
403
|
khoj/processor/conversation/openai/whisper.py,sha256=zoEeK1LNCg_tzP4xzYi5vRPzNPGuDGzpkrkG7d1LUn4,447
|
404
404
|
khoj/processor/image/generate.py,sha256=FAIIsr8TIHxWxK-INNK4jJOOswBxQFyi_G4tI8NNEI8,10571
|
405
|
-
khoj/processor/operator/
|
406
|
-
khoj/processor/operator/
|
407
|
-
khoj/processor/operator/
|
408
|
-
khoj/processor/operator/
|
409
|
-
khoj/processor/operator/
|
410
|
-
khoj/processor/operator/
|
411
|
-
khoj/processor/operator/
|
412
|
-
khoj/processor/operator/
|
413
|
-
khoj/processor/operator/
|
414
|
-
khoj/processor/operator/
|
405
|
+
khoj/processor/operator/README.md,sha256=pTjGiWKdsBr_M-hrXS3_evDsX0oVUzdmLyntEK8xS94,2170
|
406
|
+
khoj/processor/operator/__init__.py,sha256=kefTXc_0U8ZaDxSekU53Ia5tWGb535pETm7dOt-nK5w,10190
|
407
|
+
khoj/processor/operator/grounding_agent.py,sha256=uxLFpLQH63g5_jhuI8HFsIl6roxh0VseiT-46n5vbLQ,18911
|
408
|
+
khoj/processor/operator/grounding_agent_uitars.py,sha256=Ujdug_Z2_r1tZmy5kBtHbZcqOp0jSH-7ZnYo1fVdcDQ,42261
|
409
|
+
khoj/processor/operator/operator_actions.py,sha256=eJHxs6idstIbGzzRPHsveuJxl5jH9dHvBhOxuAqjg7M,4268
|
410
|
+
khoj/processor/operator/operator_agent_anthropic.py,sha256=cSGztfwssAxGyEZcPRhqQrmI1hMRfAGW4qyrpXLSfZA,31556
|
411
|
+
khoj/processor/operator/operator_agent_base.py,sha256=k2iq2VyJ59bNqRd_PKuFaxO3Q09nTdi4_TutNs2VtRo,4490
|
412
|
+
khoj/processor/operator/operator_agent_binary.py,sha256=k4cTXUHpWAP1WyJihG21oPICsFMmNFN-uR2kHFhGgKU,19892
|
413
|
+
khoj/processor/operator/operator_agent_openai.py,sha256=lGBX5MTLO1WpDFBSivIqb71Hpdhrbc5orwBdttJDk3A,23687
|
414
|
+
khoj/processor/operator/operator_environment_base.py,sha256=nHvn8lB-h6bY-v7rOEp_VZcn3aooy_v9YJbVas2CfXg,1045
|
415
|
+
khoj/processor/operator/operator_environment_browser.py,sha256=4SmLIRVECI53hplGEqBLrkwQJfNtESum637vnS3tGeA,17896
|
416
|
+
khoj/processor/operator/operator_environment_computer.py,sha256=exzXsb6YQdvQpr11jzH8MgA7yZbLwslhOl8jf6X94lU,31591
|
415
417
|
khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
416
418
|
khoj/processor/speech/text_to_speech.py,sha256=Q7sapi5Hv6woXOumtrGqR0t6izZrFBkWXFOGrHM6dJ4,1929
|
417
419
|
khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -420,16 +422,16 @@ khoj/processor/tools/run_code.py,sha256=rDGX615hhEeRP-e0BSOGKX3jkzDUnk8jD1uy5aoc
|
|
420
422
|
khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
421
423
|
khoj/routers/api.py,sha256=xF108KeC0F9rIspB_M8skZUvDb2ecobFCPgZ5H-Lo6o,29414
|
422
424
|
khoj/routers/api_agents.py,sha256=aEJJnQe1yogSkKO6W3Q8Ukl-xHMnqIAx3jB4M-kGNdY,17043
|
423
|
-
khoj/routers/api_chat.py,sha256=
|
425
|
+
khoj/routers/api_chat.py,sha256=_DcIlJibRKKwT3rGWIXn5uKkRpgLeeCK58WNFVcMmTs,62460
|
424
426
|
khoj/routers/api_content.py,sha256=uLO3eir36rERkhhKU1HOdEv8KTi_z_edT9cHMCZP1W8,24578
|
425
|
-
khoj/routers/api_model.py,sha256=
|
427
|
+
khoj/routers/api_model.py,sha256=YxWeCYb32g6h7lixcFeQiMrgdFOxFKnbcgRq0SE5MoQ,5254
|
426
428
|
khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
|
427
429
|
khoj/routers/api_subscription.py,sha256=qnbKwA6N1TWK8Aiu1FFLka_JhbPOuwqT262NSHGZDiQ,5569
|
428
430
|
khoj/routers/auth.py,sha256=jk2lqAS_650lQsoaOFTlZd9W_LL8HbN5zhHTZza_lqs,11258
|
429
431
|
khoj/routers/email.py,sha256=wvr6_fpk0RuKcTPC6suI8JDZPLYzJ9hAhz_G41yZytc,3923
|
430
|
-
khoj/routers/helpers.py,sha256=
|
432
|
+
khoj/routers/helpers.py,sha256=TvNHhf-Nagfv3CBzE5Sq2STxVFVya7n1rS3u5ZpzWd8,97008
|
431
433
|
khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
|
432
|
-
khoj/routers/research.py,sha256=
|
434
|
+
khoj/routers/research.py,sha256=etdYsSqqJpPhYvaYF4WAzvpbObShi4RBetQaM8at1Ps,23717
|
433
435
|
khoj/routers/storage.py,sha256=lao0DvsF49QleZvOdjKM98RU2cGfCJDBb7WeoI7Rr3I,2172
|
434
436
|
khoj/routers/twilio.py,sha256=MLsuCm4--ETvr3sLxbF0CL_ehlg_l2rKBSLR2Qh2Xls,1081
|
435
437
|
khoj/routers/web_client.py,sha256=_vyfDaHZZjNoI2LwGNQFRiFmGLkNcgYJe7dOr3mrxH8,4386
|
@@ -443,17 +445,17 @@ khoj/search_type/text_search.py,sha256=PZzJVCXpeBM795SIqiAKXAxgnCp1NIRiVikm040r1
|
|
443
445
|
khoj/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
444
446
|
khoj/utils/cli.py,sha256=fI1XQYMtJzLGOKQZQ5XxFOrC8sGjK3Alnteg5U62rWI,3882
|
445
447
|
khoj/utils/config.py,sha256=aiOkH0je8A30DAGYTHMRePrgJonFv_i07_7CdhhhcdA,1805
|
446
|
-
khoj/utils/constants.py,sha256=
|
448
|
+
khoj/utils/constants.py,sha256=hh4C7At_N0da3P0Dn2OJXKpbdpeZGfY5M1FFuDRI7qg,4226
|
447
449
|
khoj/utils/fs_syncer.py,sha256=5nqwAZqRk3Nwhkwd8y4IomTPZQmW32GwAqyMzal5KyY,9996
|
448
|
-
khoj/utils/helpers.py,sha256=
|
450
|
+
khoj/utils/helpers.py,sha256=dCydju71IdFEFE64ehovo2BnSKg_rTiL1uNFaTkF8hU,31647
|
449
451
|
khoj/utils/initialization.py,sha256=5eULsvGQv_Kp9bMfrHP8T_QFPjurIFyfq3-rVMWiGa4,15066
|
450
452
|
khoj/utils/jsonl.py,sha256=0Ac_COqr8sLCXntzZtquxuCEVRM2c3yKeDRGhgOBRpQ,1192
|
451
453
|
khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
|
452
|
-
khoj/utils/rawconfig.py,sha256=
|
454
|
+
khoj/utils/rawconfig.py,sha256=ASl_h3Ivaa_4lD4kCA0uZsMRgSYCjrgGUPm-Hw1jkLk,5083
|
453
455
|
khoj/utils/state.py,sha256=s_GFWOqRzpEDx0eCPStuzBTK2VEw-qgRpH0aiEdGnDo,1791
|
454
456
|
khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
|
455
|
-
khoj-1.41.1.
|
456
|
-
khoj-1.41.1.
|
457
|
-
khoj-1.41.1.
|
458
|
-
khoj-1.41.1.
|
459
|
-
khoj-1.41.1.
|
457
|
+
khoj-1.41.1.dev142.dist-info/METADATA,sha256=RpoBJW03y-MlLGwAk57Kq5AacW-OPN_Rs-p9VxnVEMc,9169
|
458
|
+
khoj-1.41.1.dev142.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
459
|
+
khoj-1.41.1.dev142.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
|
460
|
+
khoj-1.41.1.dev142.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
461
|
+
khoj-1.41.1.dev142.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4986],{74986:function(e,t,a){"use strict";a.d(t,{Z:function(){return eC}});var n=a(57437),s=a(42501),o=a.n(s),l=a(2265),r=a(48614),c=a(99597),i=a(91499),d=a.n(i),h=a(19983),u=a(13506),m=a.n(u),g=a(34040);a(2446);var p=a(5147),f=a(86018),x=a(38525),v=a(45178),j=a(66070),w=a(69304),b=a(57054),y=a(18848),C=a(42225),M=a(27648);let N=new h.Z({html:!0,linkify:!0,typographer:!0});function k(e){let t=(0,C.Le)(e.title||".txt","w-6 h-6 text-muted-foreground inline-flex mr-2"),a=e.title.split("/").pop()||e.title,s=function(e){let t=["org","md","markdown"].includes(e.title.split(".").pop()||"")?e.content.split("\n").slice(1).join("\n"):e.content;return e.showFullContent?y.Z.sanitize(N.render(t)):y.Z.sanitize(t)}(e),[o,r]=(0,l.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(b.J2,{open:o&&!e.showFullContent,onOpenChange:r,children:[(0,n.jsx)(b.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),className:"".concat(e.showFullContent?"w-auto bg-muted":"w-auto"," overflow-hidden break-words text-balance rounded-lg border-none p-2 shadow-none"),children:e.showFullContent?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("h3",{className:"".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground}"),children:[t,e.showFullContent?e.title:a]}),(0,n.jsx)("p",{className:"text-sm overflow-x-auto block",dangerouslySetInnerHTML:{__html:s}})]}):(0,n.jsx)(E,{type:"notes"},"".concat(e.title))})}),(0,n.jsx)(b.yk,{className:"w-[400px] mx-2",children:(0,n.jsxs)(j.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none p-2",children:[(0,n.jsxs)("h3",{className:"line-clamp-2 text-muted-foreground}",children:[t,e.title]}),(0,n.jsx)("p",{className:"border-t mt-1 pt-1 text-sm overflow-hidden line-clamp-5",dangerouslySetInnerHTML:{__html:s}})]})})]})})}function _(e){var t,a,s,o,r,c;let i=(0,C.Le)(".py","!w-4 h-4 text-muted-foreground flex-shrink-0"),d=y.Z.sanitize(e.code),[h,u]=(0,l.useState)(!1),[m,g]=(0,l.useState)(!1),f=e=>{let t="text/plain",a=e.b64_data;e.filename.match(/\.(png|jpg|jpeg|webp)$/)?(t="image/".concat(e.filename.split(".").pop()),a=atob(e.b64_data)):e.filename.endsWith(".json")?t="application/json":e.filename.endsWith(".csv")&&(t="text/csv");let n=new ArrayBuffer(a.length),s=new Uint8Array(n);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);let o=new Blob([n],{type:t}),l=URL.createObjectURL(o),r=document.createElement("a");r.href=l,r.download=e.filename,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l)},x=(t,a)=>(null==t?void 0:t.length)==0?null:(0,n.jsx)("div",{className:"".concat(a||e.showFullContent?"border-t mt-1 pt-1":void 0),children:t.slice(0,e.showFullContent?void 0:1).map((t,s)=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("h4",{className:"text-sm text-muted-foreground flex items-center",children:[(0,n.jsx)("span",{className:"overflow-hidden mr-2 font-bold ".concat(e.showFullContent?void 0:"line-clamp-1"),children:t.filename}),(0,n.jsx)("button",{className:"".concat(a?"hidden":void 0),onClick:e=>{e.preventDefault(),f(t)},onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),title:"Download file: ".concat(t.filename),children:(0,n.jsx)(p.b,{className:"w-4 h-4",weight:m?"fill":"regular"})})]}),t.filename.match(/\.(txt|org|md|csv|json)$/)?(0,n.jsx)("pre",{className:"".concat(e.showFullContent?"block":"line-clamp-2"," text-sm mt-1 p-1 bg-background rounded overflow-x-auto"),children:t.b64_data}):t.filename.match(/\.(png|jpg|jpeg|webp)$/)?(0,n.jsx)("img",{src:"data:image/".concat(t.filename.split(".").pop(),";base64,").concat(t.b64_data),alt:t.filename,className:"mt-1 max-h-32 rounded"}):null]},"".concat(t.filename,"-").concat(s)))});return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(b.J2,{open:h&&!e.showFullContent,onOpenChange:u,children:[(0,n.jsx)(b.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:"".concat(e.showFullContent?"w-auto bg-muted":"w-auto"," overflow-hidden break-words text-balance rounded-lg border-none p-2 shadow-none"),children:e.showFullContent?(0,n.jsxs)("div",{className:"flex flex-col px-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[i,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(t=e.output_files)||void 0===t?void 0:t.length)>0?"artifacts":""]})]}),(0,n.jsx)("pre",{className:"text-xs pb-2 ".concat(e.showFullContent?"block overflow-x-auto":(null===(a=e.output_files)||void 0===a?void 0:a.length)>0?"hidden":"overflow-hidden line-clamp-3"),children:d}),(null===(s=e.output_files)||void 0===s?void 0:s.length)>0&&x(e.output_files,!1)]}):(0,n.jsx)(E,{type:"code"},"code-".concat(e.code))})}),(0,n.jsx)(b.yk,{className:"w-[400px] mx-2",children:(0,n.jsxs)(j.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none p-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[i,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(o=e.output_files)||void 0===o?void 0:o.length)>0?"artifact":""]})]}),(null===(r=e.output_files)||void 0===r?void 0:r.length)>0&&x(null===(c=e.output_files)||void 0===c?void 0:c.slice(0,1),!0)||(0,n.jsx)("pre",{className:"text-xs border-t mt-1 pt-1 overflow-hidden line-clamp-10",children:d})]})})]})})}function R(e){let[t,a]=(0,l.useState)(!1);if(!e.link||e.link.split(" ").length>1)return null;let s="https://www.google.com/s2/favicons?domain=globe",o="unknown";try{o=new URL(e.link).hostname,s="https://www.google.com/s2/favicons?domain=".concat(o)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(b.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,n.jsx)(b.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},className:"".concat(e.showFullContent?"w-auto bg-muted":"w-auto"," overflow-hidden break-words text-balance rounded-lg border-none p-2 shadow-none"),children:e.showFullContent?(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)(M.default,{href:e.link,children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("img",{src:s,alt:"",className:"!w-4 h-4 flex-shrink-0"}),(0,n.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:o})]})}),(0,n.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," font-bold"),children:e.title}),(0,n.jsx)("p",{className:"overflow-hidden text-sm ".concat(e.showFullContent?"block":"line-clamp-2"),children:e.description})]}):(0,n.jsx)(E,{type:"online",link:e.link},e.title)})}),(0,n.jsx)(b.yk,{className:"w-[400px] mx-2",children:(0,n.jsx)(j.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none",children:(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline px-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("img",{src:s,alt:"",className:"!w-4 h-4 flex-shrink-0"}),(0,n.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," text-muted-foreground flex-grow"),children:o})]}),(0,n.jsx)("h3",{className:"border-t mt-1 pt-1 overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," font-bold"),children:e.title}),(0,n.jsx)("p",{className:"overflow-hidden text-sm ".concat(e.showFullContent?"block":"line-clamp-5"),children:e.description})]})})})})]})})}function E(e){let t="",a="unknown";if(e.link)try{a=new URL(e.link).hostname,t="https://www.google.com/s2/favicons?domain=".concat(a)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}let s=null,o="!w-4 !h-4 text-muted-foreground inline-flex mr-2 rounded-lg";switch(e.type){case"code":s=(0,n.jsx)(f.E,{className:"".concat(o)});break;case"online":s=(0,n.jsx)("img",{src:t,alt:"",className:"".concat(o)});break;case"notes":s=(0,n.jsx)(x.j,{className:"".concat(o)});break;default:s=null}return s?(0,n.jsx)("div",{className:"flex items-center gap-2",children:s}):null}function I(e){let t=e.notesReferenceCardData.length>0||e.codeReferenceCardData.length>0||e.onlineReferenceCardData.length>0,a=e.notesReferenceCardData.length+e.codeReferenceCardData.length+e.onlineReferenceCardData.length;return 0===a?null:(0,n.jsx)("div",{className:"pt-0 px-4 pb-4",children:(0,n.jsxs)("h3",{className:"inline-flex items-center",children:[(0,n.jsxs)("div",{className:"text-gray-400 m-2",children:[a," sources"]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2 w-auto m-2",children:t&&(0,n.jsx)(S,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData,codeReferenceCardData:e.codeReferenceCardData,isMobileWidth:e.isMobileWidth})})]})})}function S(e){let[t,a]=(0,l.useState)(3);if((0,l.useEffect)(()=>{a(e.isMobileWidth?3:5)},[e.isMobileWidth]),!e.notesReferenceCardData&&!e.onlineReferenceCardData)return null;let s=e.codeReferenceCardData.slice(0,t),o=e.notesReferenceCardData.slice(0,t-s.length),r=o.length+s.length<t?e.onlineReferenceCardData.filter(e=>e.link).slice(0,t-s.length-o.length):[];return(0,n.jsxs)(w.yo,{children:[(0,n.jsxs)(w.aM,{className:"text-balance w-auto justify-start overflow-hidden break-words p-0 bg-transparent border-none text-gray-400 align-middle items-center m-0 inline-flex",children:[s.map((e,t)=>(0,l.createElement)(_,{showFullContent:!1,...e,key:"code-".concat(t)})),o.map((e,t)=>(0,l.createElement)(k,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r.map((e,t)=>(0,l.createElement)(R,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),(0,n.jsx)(v.o,{className:"m-0"})]}),(0,n.jsxs)(w.ue,{className:"overflow-y-scroll",children:[(0,n.jsxs)(w.Tu,{children:[(0,n.jsx)(w.bC,{children:"References"}),(0,n.jsx)(w.Ei,{children:"View all references for this response"})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[e.codeReferenceCardData.map((e,t)=>(0,l.createElement)(_,{showFullContent:!0,...e,key:"code-".concat(t)})),e.notesReferenceCardData.map((e,t)=>(0,l.createElement)(k,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,l.createElement)(R,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]})}var F=a(59199),T=a(62467),L=a(93893),D=a(2452),O=a(22105),B=a(52938),U=a(68950),A=a(63329),q=a(35099),z=a(46561),Z=a(33758),H=a(58717),W=a(33511),P=a(51059),G=a(38513),J=a(46732),$=a(47924),Q=a(19841),V=a(88435),K=a(14308),Y=a(84671),X=a(36663);let ee=(0,a(30166).default)(()=>Promise.all([a.e(6555),a.e(7293),a.e(4609),a.e(479)]).then(a.bind(a,60479)).then(e=>e.default),{loadableGenerated:{webpack:()=>[60479]},ssr:!1});function et(e){return(0,n.jsx)(l.Suspense,{fallback:(0,n.jsx)(K.Z,{}),children:(0,n.jsx)(ee,{data:e.data})})}var ea=a(26110),en=a(49027),es=a(7436),eo=a(19378),el=a(50656),er=a(75419),ec=a(41648),ei=a(62869),ed=e=>{let{chart:t}=e,[a,s]=(0,l.useState)(null),[o]=(0,l.useState)("mermaid-chart-".concat(Math.random().toString(12).substring(7))),r=(0,l.useRef)(null);(0,l.useEffect)(()=>{el.Z.initialize({startOnLoad:!1}),el.Z.parseError=e=>{let t;console.error("Mermaid errors:",e);try{t="string"==typeof e?JSON.parse(e):e}catch(a){t=(null==e?void 0:e.toString())||"Unknown error"}console.log("Mermaid error message:",t),"element is null"!==t.str?s("Something went wrong while rendering the diagram. Please try again later or downvote the message if the issue persists."):s(null)},el.Z.contentLoaded()},[]);let c=async()=>{if(r.current)try{var e;let t=r.current.querySelector("svg");if(!t)throw Error("No SVG found");let[,,a,n]=(null===(e=t.getAttribute("viewBox"))||void 0===e?void 0:e.split(" ").map(Number))||[0,0,0,0],s=document.createElement("canvas");s.width=2*a,s.height=2*n;let o=s.getContext("2d");if(!o)throw Error("Failed to get canvas context");let l=new XMLSerializer().serializeToString(t),c=new Blob([l],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(c),d=new Image;d.src=i,await new Promise((e,t)=>{d.onload=()=>{o.scale(2,2),o.drawImage(d,0,0,a,n),s.toBlob(a=>{if(!a){t(Error("Failed to create blob"));return}let n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download="mermaid-diagram-".concat(Date.now(),".png"),s.click(),URL.revokeObjectURL(n),URL.revokeObjectURL(i),e(!0)},"image/png")},d.onerror=()=>t(Error("Failed to load SVG"))})}catch(e){console.error("Error exporting diagram:",e),s("Failed to export diagram")}};return(0,l.useEffect)(()=>{r.current&&(r.current.removeAttribute("data-processed"),el.Z.run({nodes:[r.current]}).then(()=>{s(null)}).catch(e=>{let t;try{t="string"==typeof e?JSON.parse(e):e}catch(a){t=(null==e?void 0:e.toString())||"Unknown error"}console.log("Mermaid error message:",t),"element is null"!==t.str?s("Something went wrong while rendering the diagram. Please try again later or downvote the message if the issue persists."):s(null)}))},[t]),(0,n.jsxs)("div",{children:[a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 bg-red-100 border border-red-500 rounded-md p-1 mt-3 text-red-900 text-sm",children:[(0,n.jsx)(er.k,{className:"w-12 h-12"}),(0,n.jsx)("span",{children:a})]}),(0,n.jsx)("code",{className:"block bg-secondary text-secondary-foreground p-4 mt-3 rounded-lg font-mono text-sm whitespace-pre-wrap overflow-x-auto max-h-[400px] border border-gray-200",children:t})]}):(0,n.jsx)("div",{id:o,ref:r,className:"mermaid",style:{width:"auto",height:"auto",boxSizing:"border-box",overflow:"auto"},children:t}),!a&&(0,n.jsxs)(ei.z,{onClick:c,variant:"secondary",className:"mt-3",children:[(0,n.jsx)(ec.U,{className:"w-5 h-5"}),"Export as PNG"]})]})};let eh=new h.Z({html:!0,linkify:!0,typographer:!0});function eu(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function em(e){let{uquery:t,kquery:a}=e,[s,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{null!==s&&setTimeout(()=>{o(null)},2e3)},[s]),(0,n.jsxs)("div",{className:"".concat(d().feedbackButtons," flex align-middle justify-center items-center"),children:[(0,n.jsx)("button",{title:"Like",className:d().thumbsUpButton,disabled:null!==s,onClick:()=>{eu(t,a,"positive"),o(!0)},children:!0===s?(0,n.jsx)(T.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,n.jsx)(T.V,{alt:"Like Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),(0,n.jsx)("button",{title:"Dislike",className:d().thumbsDownButton,disabled:null!==s,onClick:()=>{eu(t,a,"negative"),o(!1)},children:!1===s?(0,n.jsx)(L.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,n.jsx)(L.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function eg(e){let t=e.message.match(/\*\*(.*)\*\*/),a=function(e,t){let a=e.toLowerCase(),s="inline mt-1 mr-2 ".concat(t," h-4 w-4");return a.includes("understanding")?(0,n.jsx)(D.a,{className:"".concat(s)}):a.includes("generating")?(0,n.jsx)(O.Z,{className:"".concat(s)}):a.includes("tools")?(0,n.jsx)(B.v,{className:"".concat(s)}):a.includes("notes")?(0,n.jsx)(U.g,{className:"".concat(s)}):a.includes("read")?(0,n.jsx)(A.f,{className:"".concat(s)}):a.includes("search")?(0,n.jsx)(q.Y,{className:"".concat(s)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,n.jsx)(z.u,{className:"".concat(s)}):a.includes("diagram")?(0,n.jsx)(Z.j,{className:"".concat(s)}):a.includes("paint")?(0,n.jsx)(H.Y,{className:"".concat(s)}):a.includes("code")?(0,n.jsx)(f.E,{className:"".concat(s)}):a.includes("operating")?(0,n.jsx)(W.A,{className:"".concat(s)}):(0,n.jsx)(D.a,{className:"".concat(s)})}(t?t[1]:"",e.primary?(0,Y.oz)(e.agentColor):"text-gray-500"),s=e.message,o=null;try{let e=s.match(/\{.*("action": "screenshot"|"type": "screenshot"|"image": "data:image\/.*").*\}/);if(e){o=JSON.parse(e[0]);let t='<img src="'.concat(o.image,'" alt="State of environment" class="max-w-full" />');s=s.replace(":\n**Action**: ".concat(e[0]),"\n\n- ".concat(o.text,"\n").concat(t))}}catch(e){console.error("Failed to parse screenshot data",e)}let l=y.Z.sanitize(eh.render(s));return l=l.replace(/<h[1-6].*?<\/h[1-6]>/g,""),(0,n.jsxs)("div",{className:"".concat(d().trainOfThoughtElement," break-words items-center ").concat(e.primary?"text-gray-400":"text-gray-300"," ").concat(d().trainOfThought," ").concat(e.primary?d().primary:""),children:[a,(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:l},className:"break-words"})]})}eh.use(m(),{inline:!0,code:!0});let ep=(0,l.forwardRef)((e,t)=>{var a,s;let o,r,c,i,h;let[u,m]=(0,l.useState)(!1),[p,f]=(0,l.useState)(!1),[x,v]=(0,l.useState)(""),[j,w]=(0,l.useState)(""),[b,M]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[_,R]=(0,l.useState)(""),[E,S]=(0,l.useState)(""),T=(0,l.useRef)(!1),L=(0,l.useRef)(null);async function D(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;M(!0);let a=O(t[0]);for(let e=0;e<t.length&&!T.current;e++){let n=a;e<t.length-1&&(a=O(t[e+1]));try{let e=await n,t=URL.createObjectURL(e);await function(e){return new Promise((t,a)=>{let n=new Audio(e);n.onended=t,n.onerror=a,n.play()})}(t)}catch(e){console.error("Error:",e);break}}M(!1),k(!1)}async function O(e){let t=await fetch("/api/chat/speech?text=".concat(encodeURIComponent(e)),{method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("Network response was not ok");return await t.blob()}(0,l.useEffect)(()=>{T.current=N},[N]),(0,l.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(L.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,X.Z)(L.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return L.current&&e.observe(L.current,{childList:!0}),()=>e.disconnect()},[L.current]),(0,l.useEffect)(()=>{let t=e.chatMessage.message;e.chatMessage.excalidrawDiagram&&R(e.chatMessage.excalidrawDiagram),e.chatMessage.mermaidjsDiagram&&S(e.chatMessage.mermaidjsDiagram),t=t.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),t=(0,F.AQ)(t,e.chatMessage.codeContext),e.chatMessage.codeContext&&Object.entries(e.chatMessage.codeContext).forEach(e=>{var a;let[n,s]=e;null===(a=s.results.output_files)||void 0===a||a.forEach(e=>{(e.filename.endsWith(".png")||e.filename.endsWith(".jpg"))&&!t.includes(")&&(t+="\n\n.concat(e.b64_data,")"))})});let a=t,n=t;if(e.chatMessage.images&&e.chatMessage.images.length>0){let t=e.chatMessage.images.map(e=>{let t=e.startsWith("data%3Aimage")?decodeURIComponent(e):e;return y.Z.sanitize(t)}),s=t.map((e,t)=>".concat(e,")")).join("\n"),o=t.map((e,t)=>'<div class="'.concat(d().imageWrapper,'"><img src="').concat(e,'" alt="uploaded image ').concat(t+1,'" /></div>')).join(""),l='<div class="'.concat(d().imagesContainer,'">').concat(o,"</div>");a="".concat(s,"\n\n").concat(a),n="".concat(l).concat(n)}v(a);let s=eh.render(n);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),w(y.Z.sanitize(s))},[e.chatMessage.message,e.chatMessage.images,e.chatMessage.intent]),(0,l.useEffect)(()=>{u&&setTimeout(()=>{m(!1)},2e3)},[u]),(0,l.useEffect)(()=>{L.current&&(L.current.querySelectorAll("pre > .hljs").forEach(e=>{if(!e.querySelector("".concat(d().codeCopyButton))){let t=document.createElement("button"),a=(0,n.jsx)(P.w,{size:24});(0,g.createRoot)(t).render(a),t.className="hljs ".concat(d().codeCopyButton),t.addEventListener("click",()=>{let a=e.textContent||"";a=(a=(a=a.replace(/^\$+/,"")).replace(/^Copy/,"")).trim(),navigator.clipboard.writeText(a);let s=(0,n.jsx)(G.J,{size:24});(0,g.createRoot)(t).render(s)}),e.prepend(t)}}),(0,X.Z)(L.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]}))},[j,p,L]);let B=async t=>{let a=t.turnId||e.turnId;(await fetch("/api/chat/conversation/message",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:e.conversationId,turn_id:a})})).ok?e.onDeleteMessage(a):console.error("Failed to delete message")},U=function(e,t,a){let n=[],s=[],o=[];if(a)for(let[e,t]of Object.entries(a))t.results&&o.push({code:t.code,output:t.results.std_out,output_files:t.results.output_files,error:t.results.std_err});if(t){let e=[];for(let[a,n]of Object.entries(t)){if(n.answerBox&&e.push({title:n.answerBox.title,description:n.answerBox.answer,link:n.answerBox.source}),n.knowledgeGraph&&e.push({title:n.knowledgeGraph.title,description:n.knowledgeGraph.description,link:n.knowledgeGraph.descriptionLink}),n.webpages){if(n.webpages instanceof Array){let t=n.webpages.map(e=>({title:e.query,description:e.snippet,link:e.link}));e.push(...t)}else{let t=n.webpages;e.push({title:t.query,description:t.snippet,link:t.link})}}if(n.organic){let t=n.organic.map(e=>({title:e.title,description:e.snippet,link:e.link}));e.push(...t)}}n.push(...e)}if(e){let t=e.map(e=>e.compiled?{title:e.file,content:e.compiled}:{title:e.split("\n")[0],content:e.split("\n").slice(1).join("\n")});s.push(...t)}return{notesReferenceCardData:s,onlineReferenceCardData:n,codeReferenceCardData:o}}(e.chatMessage.context,e.chatMessage.onlineContext,e.chatMessage.codeContext);return(0,n.jsxs)("div",{ref:t,className:(a=e.chatMessage,o=[d().chatMessageContainer],"khoj"===a.by&&o.push("shadow-md"),o.push(d()[a.by]),a.message||o.push(d().emptyChatMessage),e.customClassName&&o.push(d()["".concat(a.by).concat(e.customClassName)]),o.join(" ")),onMouseLeave:e=>f(!1),onMouseEnter:e=>f(!0),children:[(0,n.jsxs)("div",{className:(s=e.chatMessage,(r=[d().chatMessageWrapper]).push(d()[s.by]),"khoj"===s.by&&r.push("border-l-4 border-opacity-50 ".concat("border-l-"+e.borderLeftColor)),r.join(" ")),children:[e.chatMessage.queryFiles&&e.chatMessage.queryFiles.length>0&&(0,n.jsx)("div",{className:"flex flex-wrap flex-col mb-2 max-w-full",children:e.chatMessage.queryFiles.map((e,t)=>(0,n.jsxs)(ea.Vq,{children:[(0,n.jsx)(ea.hg,{asChild:!0,children:(0,n.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer bg-gray-500 bg-opacity-25 rounded-lg p-2 w-full ",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,C.Le)(e.file_type)}),(0,n.jsx)("span",{className:"truncate flex-1 min-w-0 max-w-[200px]",children:e.name}),e.size&&(0,n.jsxs)("span",{className:"text-gray-400 flex-shrink-0",children:["(",(0,es.xq)(e.size),")"]})]})}),(0,n.jsxs)(ea.cZ,{children:[(0,n.jsx)(ea.fK,{children:(0,n.jsx)(en.$N,{children:(0,n.jsx)("div",{className:"truncate min-w-0 break-words break-all text-wrap max-w-full whitespace-normal",children:e.name})})}),(0,n.jsx)(ea.Be,{children:(0,n.jsx)(eo.x,{className:"h-72 w-full rounded-md break-words break-all text-wrap",children:e.content})})]})]},t))}),(0,n.jsx)("div",{ref:L,className:d().chatMessage,dangerouslySetInnerHTML:{__html:j}}),_&&(0,n.jsx)(et,{data:_}),E&&(0,n.jsx)(ed,{chart:E})]}),(0,n.jsx)("div",{className:d().teaserReferencesContainer,children:(0,n.jsx)(I,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:U.notesReferenceCardData,onlineReferenceCardData:U.onlineReferenceCardData,codeReferenceCardData:U.codeReferenceCardData})}),(0,n.jsx)("div",{className:d().chatFooter,children:(p||e.isMobileWidth||e.isLastMessage||b)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{title:(i=(c=new Date(e.chatMessage.created+"Z")).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),h=c.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(i," on ").concat(h)),className:"text-gray-400 relative top-0 left-4",children:function(e){e.endsWith("Z")||(e+="Z");let t=new Date(e),a=new Date().getTime()-t.getTime();return a<6e4?"Just now":a<36e5?"".concat(Math.round(a/6e4),"m ago"):a<864e5?"".concat(Math.round(a/36e5),"h ago"):"".concat(Math.round(a/864e5),"d ago")}(e.chatMessage.created)}),(0,n.jsxs)("div",{className:"".concat(d().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(b?N?(0,n.jsx)(K.l,{iconClassName:"p-0",className:"m-0"}):(0,n.jsx)("button",{title:"Pause Speech",onClick:e=>k(!0),children:(0,n.jsx)(J.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,n.jsx)("button",{title:"Speak",onClick:e=>D(),children:(0,n.jsx)($.j,{alt:"Speak Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})})),e.chatMessage.turnId&&(0,n.jsx)("button",{title:"Delete",className:"".concat(d().deleteButton),onClick:()=>B(e.chatMessage),children:(0,n.jsx)(Q.r,{alt:"Delete Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})}),(0,n.jsx)("button",{title:"Copy",className:"".concat(d().copyButton),onClick:()=>{navigator.clipboard.writeText(x),m(!0)},children:u?(0,n.jsx)(V.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,n.jsx)(V.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,n.jsx)(em,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,n.jsx)(em,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});ep.displayName="ChatMessage";var ef=a(3894),ex=a(20461),ev=a(77168),ej=a(15483),ew=a(81103),eb=e=>{let{name:t,avatar:a,link:s,description:o}=e;return(0,n.jsx)("div",{className:"relative group flex",children:(0,n.jsx)(ew.pn,{children:(0,n.jsxs)(ew.u,{delayDuration:0,children:[(0,n.jsx)(ew.aJ,{asChild:!0,children:(0,n.jsxs)(ei.z,{variant:"ghost",className:"flex items-center justify-center",children:[a,(0,n.jsx)("div",{children:t})]})}),(0,n.jsx)(ew._v,{children:(0,n.jsxs)("div",{className:"w-80 h-30",children:[(0,n.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",className:"mt-1 ml-2 block no-underline",children:(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[a,(0,n.jsxs)("div",{className:"mr-2 mt-1 flex justify-center items-center text-sm font-semibold text-gray-800",children:[t,(0,n.jsx)(v.o,{weight:"bold",className:"ml-1"})]})]})}),o&&(0,n.jsx)("p",{className:"mt-2 ml-6 text-sm text-gray-600 line-clamp-2",children:o||"A Khoj agent"})]})})]})})})};function ey(e){let t=e.trainOfThought.length-1,[a,s]=(0,l.useState)(e.completed);return(0,l.useEffect)(()=>{e.completed&&s(!0)},[e.completed]),(0,n.jsxs)("div",{className:"".concat(a?"":o().trainOfThought+" border"," rounded-lg"),children:[!e.completed&&(0,n.jsx)(K.l,{className:"float-right"}),e.completed&&(a?(0,n.jsxs)(ei.z,{className:"w-fit text-left justify-start content-start text-xs",onClick:()=>s(!1),variant:"ghost",size:"sm",children:["Thought Process ",(0,n.jsx)(ef.p,{size:16,className:"ml-1"})]}):(0,n.jsxs)(ei.z,{className:"w-fit text-left justify-start content-start text-xs p-0 h-fit",onClick:()=>s(!0),variant:"ghost",size:"sm",children:["Close ",(0,n.jsx)(ex.U,{size:16,className:"ml-1"})]})),(0,n.jsx)(r.M,{initial:!1,children:!a&&(0,n.jsx)(c.E.div,{initial:"closed",animate:"open",exit:"closed",variants:{open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeIn"}}},children:e.trainOfThought.map((a,s)=>(0,n.jsx)(eg,{message:a,primary:s===t&&e.lastMessage&&!e.completed,agentColor:e.agentColor},"train-".concat(s)))})})]},e.keyId)}function eC(e){var t,a,s,r,c,i,d,h,u;let[m,g]=(0,l.useState)(null),[p,f]=(0,l.useState)(0),[x,v]=(0,l.useState)(!0),[j,w]=(0,l.useState)(null),b=(0,l.useRef)(null),y=(0,l.useRef)(null),M=(0,l.useRef)(null),N=(0,l.useRef)(null),[k,_]=(0,l.useState)(null),[R,E]=(0,l.useState)(!1),[I,S]=(0,l.useState)(!0),F=(0,es.IC)(),T="[data-radix-scroll-area-viewport]",L=localStorage.getItem("message");(0,l.useEffect)(()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(T);if(!t)return;let a=()=>{let{scrollTop:e,scrollHeight:a,clientHeight:n}=t;S(a-(e+n)<=50)};return t.addEventListener("scroll",a),()=>t.removeEventListener("scroll",a)},[]),(0,l.useEffect)(()=>{e.incomingMessages&&e.incomingMessages.length>0&&I&&O()},[e.incomingMessages,I]),(0,l.useEffect)(()=>{m&&m.chat&&m.chat.length>0&&p<2&&requestAnimationFrame(()=>{var e;null===(e=M.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"})})},[m,p]),(0,l.useEffect)(()=>{if(!x||R)return;let t=new IntersectionObserver(t=>{t[0].isIntersecting&&x&&(E(!0),function(t){if(!x||R)return;let a=(t+1)*10,n="";if(e.conversationId)n="/api/chat/history?client=web&conversation_id=".concat(encodeURIComponent(e.conversationId),"&n=").concat(a);else{if(!e.publicConversationSlug)return;n="/api/chat/share/history?client=web&public_conversation_slug=".concat(e.publicConversationSlug,"&n=").concat(a)}fetch(n).then(e=>e.json()).then(a=>{var n;if(e.setTitle(a.response.slug),e.setIsOwner&&e.setIsOwner(null==a?void 0:null===(n=a.response)||void 0===n?void 0:n.is_owner),a&&a.response&&a.response.chat&&a.response.chat.length>0){if(f(Math.ceil(a.response.chat.length/10)),a.response.chat.length===(null==m?void 0:m.chat.length)){v(!1),E(!1);return}e.setAgent(a.response.agent),g(a.response),E(!1),0===t?O(!0):D()}else{if(a.response.agent&&a.response.conversation_id){let t={chat:[],agent:a.response.agent,conversation_id:a.response.conversation_id,slug:a.response.slug,is_owner:a.response.is_owner};e.setAgent(a.response.agent),g(t),e.setIsChatSideBarOpen&&!L&&e.setIsChatSideBarOpen(!0)}v(!1),E(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(p))},{threshold:1});return b.current&&t.observe(b.current),()=>t.disconnect()},[x,p,R]),(0,l.useEffect)(()=>{v(!0),E(!1),f(0),g(null)},[e.conversationId]),(0,l.useEffect)(()=>{if(e.incomingMessages){let t=e.incomingMessages[e.incomingMessages.length-1];t&&!t.completed&&(_(e.incomingMessages.length-1),e.setTitle(t.rawQuery),t.turnId&&w(t.turnId))}},[e.incomingMessages]);let D=()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(T);requestAnimationFrame(()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"}),null==t||t.scrollBy({behavior:"smooth",top:-150})})},O=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=null===(e=y.current)||void 0===e?void 0:e.querySelector(T);requestAnimationFrame(()=>{null==a||a.scrollTo({top:a.scrollHeight,behavior:t?"auto":"smooth"})}),S(!0)},B=t=>{t&&(g(e=>e&&t?{...e,chat:e.chat.filter(e=>e.turnId!==t)}:e),e.incomingMessages&&e.setIncomingMessages&&e.setIncomingMessages(e.incomingMessages.filter(e=>e.turnId!==t)))};return e.conversationId||e.publicConversationSlug?(0,n.jsx)(eo.x,{className:"\n h-[calc(100svh-theme(spacing.44))]\n sm:h-[calc(100svh-theme(spacing.44))]\n md:h-[calc(100svh-theme(spacing.44))]\n lg:h-[calc(100svh-theme(spacing.72))]\n ",ref:y,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"".concat(o().chatHistory," ").concat(e.customClassName),children:[(0,n.jsx)("div",{ref:b,style:{height:"1px"},children:R&&(0,n.jsx)(K.l,{className:"opacity-50"})}),m&&m.chat&&m.chat.map((t,a)=>{var s,o,r;return(0,n.jsxs)(l.Fragment,{children:[t.trainOfThought&&"khoj"===t.by&&(0,n.jsx)(ey,{trainOfThought:null===(s=t.trainOfThought)||void 0===s?void 0:s.map(e=>e.data),lastMessage:!1,agentColor:(null==m?void 0:null===(o=m.agent)||void 0===o?void 0:o.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:!0},"".concat(a,"trainOfThought")),(0,n.jsx)(ep,{ref:a===m.chat.length-2?M:a===m.chat.length-(p-1)*10?N:null,isMobileWidth:F,chatMessage:t,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(r=m.agent)||void 0===r?void 0:r.color,"-500"),isLastMessage:a===m.chat.length-1,onDeleteMessage:B,conversationId:e.conversationId},"".concat(a,"fullHistory"))]},"chatMessage-".concat(a))}),e.incomingMessages&&e.incomingMessages.map((t,a)=>{var s,o,r,c,i;let d=null!==(i=null!==(c=t.turnId)&&void 0!==c?c:j)&&void 0!==i?i:void 0;return(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(ep,{isMobileWidth:F,chatMessage:{message:t.rawQuery,context:[],onlineContext:{},codeContext:{},created:t.timestamp,by:"you",automationId:"",images:t.images,conversationId:e.conversationId,turnId:d,queryFiles:t.queryFiles},customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(s=m.agent)||void 0===s?void 0:s.color,"-500"),onDeleteMessage:B,conversationId:e.conversationId,turnId:d},"".concat(a,"outgoing")),t.trainOfThought&&(0,n.jsx)(ey,{trainOfThought:t.trainOfThought,lastMessage:a===k,agentColor:(null==m?void 0:null===(o=m.agent)||void 0===o?void 0:o.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:t.completed},"".concat(a,"trainOfThought")),(0,n.jsx)(ep,{isMobileWidth:F,chatMessage:{message:t.rawResponse,context:t.context,onlineContext:t.onlineContext,codeContext:t.codeContext,created:t.timestamp,by:"khoj",automationId:"",rawQuery:t.rawQuery,intent:{type:t.intentType||"",query:t.rawQuery,"memory-type":"","inferred-queries":t.inferredQueries||[]},conversationId:e.conversationId,images:t.generatedImages,queryFiles:t.generatedFiles,mermaidjsDiagram:t.generatedMermaidjsDiagram,turnId:d},conversationId:e.conversationId,turnId:d,onDeleteMessage:B,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(r=m.agent)||void 0===r?void 0:r.color,"-500"),isLastMessage:a===e.incomingMessages.length-1},"".concat(a,"incoming"))]},"incomingMessage".concat(a))}),e.pendingMessage&&(0,n.jsx)(ep,{isMobileWidth:F,chatMessage:{message:e.pendingMessage,context:[],onlineContext:{},codeContext:{},created:new Date().getTime().toString(),by:"you",automationId:"",conversationId:e.conversationId,turnId:void 0},conversationId:e.conversationId,onDeleteMessage:B,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(t=m.agent)||void 0===t?void 0:t.color,"-500"),isLastMessage:!0},"pendingMessage-".concat(e.pendingMessage.length)),m&&(0,n.jsx)("div",{className:"".concat(o().agentIndicator," pb-4"),children:(0,n.jsx)("div",{className:"relative group mx-2 cursor-pointer",children:(0,n.jsx)(eb,{name:m&&m.agent&&(null===(r=m.agent)||void 0===r?void 0:r.name)?m.agent.is_hidden?"Khoj":null===(c=m.agent)||void 0===c?void 0:c.name:"Agent",link:m&&m.agent&&(null===(i=m.agent)||void 0===i?void 0:i.slug)?"/agents?agent=".concat(null===(d=m.agent)||void 0===d?void 0:d.slug):"/agents",avatar:(0,C.TI)(null===(a=m.agent)||void 0===a?void 0:a.icon,null===(s=m.agent)||void 0===s?void 0:s.color)||(0,n.jsx)(ev.v,{}),description:m&&m.agent?(null===(h=m.agent)||void 0===h?void 0:h.persona)?null===(u=m.agent)||void 0===u?void 0:u.persona:"You can set a persona for your agent in the Chat Options side panel.":"Your agent is no longer available. You will be reset to the default agent."})})})]}),(0,n.jsx)("div",{className:"".concat(e.customClassName," fixed bottom-[20%] z-10"),children:!I&&(0,n.jsx)("button",{title:"Scroll to bottom",className:"absolute bottom-0 right-0 bg-white dark:bg-[hsl(var(--background))] text-neutral-500 dark:text-white p-2 rounded-full shadow-xl",onClick:()=>{O(),S(!0)},children:(0,n.jsx)(ej.K,{size:24})})})]})}):null}},42501:function(e){e.exports={chatHistory:"chatHistory_chatHistory__CoaVT",agentIndicator:"chatHistory_agentIndicator__wOU1f",trainOfThought:"chatHistory_trainOfThought__mMWSR"}},91499:function(e){e.exports={chatMessageContainer:"chatMessage_chatMessageContainer__sAivf",chatMessageWrapper:"chatMessage_chatMessageWrapper__u5m8A",khojfullHistory:"chatMessage_khojfullHistory__NPu2l",youfullHistory:"chatMessage_youfullHistory__ioyfH",you:"chatMessage_you__6GUC4",khoj:"chatMessage_khoj__cjWON",khojChatMessage:"chatMessage_khojChatMessage__BabQz",emptyChatMessage:"chatMessage_emptyChatMessage__J9JRn",imagesContainer:"chatMessage_imagesContainer__HTRjT",imageWrapper:"chatMessage_imageWrapper__DF92M",author:"chatMessage_author__muRtC",chatFooter:"chatMessage_chatFooter__0vR8s",chatButtons:"chatMessage_chatButtons__Lbk8T",codeCopyButton:"chatMessage_codeCopyButton__Y_Ujv",feedbackButtons:"chatMessage_feedbackButtons___Brdy",copyButton:"chatMessage_copyButton__jd7q7",trainOfThought:"chatMessage_trainOfThought__mR2Gg",primary:"chatMessage_primary__WYPEb",trainOfThoughtElement:"chatMessage_trainOfThoughtElement__le_bC"}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5477],{5477:function(e,t,a){"use strict";a.d(t,{$:function(){return r},a:function(){return O}});var s,r,n=a(57437),l=a(26442),o=a.n(l),i=a(2265),c=a(18848);a(2446);var d=a(12144),u=a(10107),h=a(19715),f=a(35849),g=a(4203),x=a(51549),m=a(62340),p=a(23518),j=a(37099),b=a(62869),v=a(32759),w=a(57054),y=a(27312),N=a(76818),k=a(81103),C=a(84671),E=a(39535),D=a(14308),S=a(42225),M=a(59199),R=a(7436),T=a(26110),z=a(19378);(s=r||(r={})).MESSAGE="message",s.FILE="file",s.RESEARCH="research";let O=(0,i.forwardRef)((e,t)=>{let[a,s]=(0,i.useState)(""),r=(0,i.useRef)(null),l=(0,i.useRef)(null),O=(0,i.useRef)(null),[A,I]=(0,i.useState)(null),[L,_]=(0,i.useState)(null),[P,F]=(0,i.useState)(!1),[W,U]=(0,i.useState)(null),[$,H]=(0,i.useState)(!1),[J,B]=(0,i.useState)(!1),[K,Y]=(0,i.useState)([]),[Z,X]=(0,i.useState)([]),[q,G]=(0,i.useState)(null),[V,Q]=(0,i.useState)([]),[ee,et]=(0,i.useState)(!1),[ea,es]=(0,i.useState)(null),[er,en]=(0,i.useState)(0),[el,eo]=(0,i.useState)(!1),[ei,ec]=(0,i.useState)(!1),[ed,eu]=(0,i.useState)(e.isResearchModeEnabled||!1);function eh(){if(J&&(B(!1),Y([]),Z.forEach(t=>e.sendImage(t))),!a.trim())return;if(!e.isLoggedIn){U("Hey there, you need to be signed in to send messages to Khoj AI"),H(!0);return}let t=a.trim(),r=e.chatOptionsData&&Object.keys(e.chatOptionsData).some(e=>t.startsWith("/".concat(e)));ed&&!r&&(t="/research ".concat(t)),e.sendMessage(t),G(null),Q([]),s("")}function ef(a){var s,r;if(!e.isLoggedIn){U("Please login to chat with your files"),H(!0);return}let n=["jpg","jpeg","png","webp"],l=[];for(let e=0;e<a.length;e++){let t=a[e],s=t.name.split(".").pop();n.includes(s||"")&&l.push(c.Z.sanitize(URL.createObjectURL(t)))}l.length>0&&(B(!0),Y(e=>[...e,...l]),null==t||null===(r=t.current)||void 0===r||r.focus());let o=Array.from(a).filter(e=>!n.includes(e.name.split(".").pop()||"")),i=o?Array.from(o).concat(Array.from(q||[])):Array.from(q||[]);if(i.length>0){for(let e=0;e<i.length;e++)if(i[e].size>10485760){I("File ".concat(i[e].name," is too large. Please upload files smaller than 10 MB."));return}let t=new DataTransfer;i.forEach(e=>t.items.add(e)),eg(t.files).then(a=>{e.setUploadedFiles(a),G(t.files),Q(a)})}null==t||null===(s=t.current)||void 0===s||s.focus()}async function eg(e){let t=await (0,M.M1)(e);F(!0);try{let e=await fetch("/api/content/convert",{method:"POST",body:t});if(F(!1),!e.ok)throw Error("HTTP error! status: ".concat(e.status));return await e.json()}catch(e){return _("Error converting files. "+e+". Please try again, or contact team@khoj.dev if the issue persists."),console.error("Error converting files:",e),[]}}async function ex(){try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e,{mimeType:"audio/webm"}),a=[];t.ondataavailable=async e=>{a.push(e.data);let t=new Blob(a,{type:"audio/webm"}),r=new FormData;r.append("file",t);try{let e=await fetch("/api/transcribe",{method:"POST",body:r});if(!e.ok)throw Error("Network response was not ok");let t=await e.json();s(t.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},t.start(1500),t.onstop=async()=>{let e=new Blob(a,{type:"audio/webm"}),r=new FormData;r.append("file",e);try{let e=await fetch("/api/transcribe",{method:"POST",body:r});if(!e.ok)throw Error("Network response was not ok");let a=await e.json();t.stream.getTracks().forEach(e=>e.stop()),es(null),s(a.text.trim())}catch(e){console.error("Error sending audio to server:",e)}},es(t)}catch(e){console.error("Error getting microphone",e)}}return(0,i.useEffect)(()=>{if(P||en(0),P){let e=setInterval(()=>{en(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[P]),(0,i.useEffect)(()=>{var a;void 0!==e.prefillMessage&&(s(e.prefillMessage),null==t||null===(a=t.current)||void 0===a||a.focus())},[e.prefillMessage]),(0,i.useEffect)(()=>{var a,s,r;"message"===e.focus?null==t||null===(a=t.current)||void 0===a||a.focus():"file"===e.focus?null===(s=l.current)||void 0===s||s.focus():"research"===e.focus&&(null===(r=O.current)||void 0===r||r.focus())},[e.focus]),(0,i.useEffect)(()=>{async function e(){K.length>0&&X(await Promise.all(K.map(async e=>{let t=await fetch(e),a=await t.blob();return new Promise(e=>{let t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(a)})}))),F(!1)}F(!0),e()},[K]),(0,i.useEffect)(()=>{e.isResearchModeEnabled&&eu(e.isResearchModeEnabled)},[e.isResearchModeEnabled]),(0,i.useEffect)(()=>{!ee&&ea&&ea.stop(),ee&&!ea&&ex()},[ee,ea]),(0,i.useEffect)(()=>{(null==t?void 0:t.current)&&(t.current.style.height="auto",t.current.style.height=Math.max(t.current.scrollHeight-24,64)+"px",a.startsWith("/")&&1===a.split(" ").length?ec(!0):ec(!1))},[a]),(0,n.jsxs)(n.Fragment,{children:[$&&W&&(0,n.jsx)(E.Z,{onOpenChange:H,isMobileWidth:e.isMobileWidth}),P&&(0,n.jsx)(j.aR,{open:P,children:(0,n.jsxs)(j._T,{children:[(0,n.jsx)(j.fY,{children:(0,n.jsx)(j.f$,{children:"Uploading data. Please wait."})}),(0,n.jsx)(j.yT,{children:(0,n.jsx)(v.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:er})}),(0,n.jsx)(j.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>F(!1),children:"Dismiss"})]})}),A&&(0,n.jsx)(j.aR,{open:null!==A,children:(0,n.jsxs)(j._T,{children:[(0,n.jsx)(j.fY,{children:(0,n.jsx)(j.f$,{children:"Data Upload Warning"})}),(0,n.jsx)(j.yT,{children:A}),(0,n.jsx)(j.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>I(null),children:"Close"})]})}),L&&(0,n.jsx)(j.aR,{open:null!==L,children:(0,n.jsxs)(j._T,{children:[(0,n.jsxs)(j.fY,{children:[(0,n.jsx)(j.f$,{children:"Oh no!"}),(0,n.jsx)(j.yT,{children:"Something went wrong while uploading your data"})]}),(0,n.jsx)(j.yT,{children:L}),(0,n.jsx)(j.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>_(null),children:"Close"})]})}),ei&&(0,n.jsx)("div",{className:"flex justify-center text-center",children:(0,n.jsxs)(w.J2,{open:ei,onOpenChange:ec,children:[(0,n.jsx)(y.xo,{className:"flex justify-center text-center"}),(0,n.jsx)(w.yk,{onOpenAutoFocus:e=>e.preventDefault(),className:"".concat(e.isMobileWidth?"w-[100vw]":"w-full"," rounded-md"),side:"bottom",align:"center",sideOffset:e.conversationId?0:80,alignOffset:0,children:(0,n.jsxs)(p.mY,{className:"max-w-full",children:[(0,n.jsx)(p.sZ,{placeholder:"Type a command or search...",value:a,className:"hidden"}),(0,n.jsxs)(p.e8,{children:[(0,n.jsx)(p.rb,{children:"No matching commands."}),(0,n.jsx)(p.fu,{heading:"Agent Tools",children:e.chatOptionsData&&Object.entries(e.chatOptionsData).map(e=>{let[t,a]=e;return(0,n.jsx)(p.di,{className:"text-md",onSelect:()=>{s("/".concat(t," "))},children:(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-1",children:[(0,n.jsxs)("div",{className:"font-bold flex items-center",children:[(0,S.vH)(t,"h-4 w-4 mr-2"),"/",t]}),(0,n.jsx)("div",{children:a})]})},t)})}),(0,n.jsx)(p.zz,{})]})]})})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto",children:[J&&K.map((e,t)=>(0,n.jsxs)("div",{className:"relative flex-shrink-0 pb-3 pt-2 group",children:[(0,n.jsx)("img",{src:e,alt:"img-".concat(t),className:"w-auto h-16 object-cover rounded-xl"}),(0,n.jsx)(b.z,{variant:"ghost",size:"icon",className:"absolute -top-0 -right-2 h-5 w-5 rounded-full bg-neutral-200 dark:bg-neutral-600 hover:bg-neutral-300 dark:hover:bg-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{Y(e=>e.filter((e,a)=>a!==t)),X(e=>e.filter((e,a)=>a!==t)),1===K.length&&B(!1)},children:(0,n.jsx)(d.X,{className:"h-3 w-3"})})]},t)),V&&Array.from(V).map((t,a)=>(0,n.jsxs)(T.Vq,{children:[(0,n.jsx)(T.hg,{asChild:!0,children:(0,n.jsxs)("div",{className:"relative flex-shrink-0 p-2 group",children:[(0,n.jsx)("div",{className:"w-auto h-16 object-cover rounded-xl ".concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," bg-opacity-15"),children:(0,n.jsxs)("div",{className:"flex p-2 flex-col justify-start items-start h-full",children:[(0,n.jsx)("span",{className:"text-sm font-bold text-neutral-500 dark:text-neutral-400 text-ellipsis truncate max-w-[200px] break-words",children:t.name}),(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[(0,S.Le)(t.file_type),(0,n.jsx)("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:(0,R.xq)(t.size)})]})]})}),(0,n.jsx)(b.z,{variant:"ghost",size:"icon",className:"absolute -top-0 -right-2 h-5 w-5 rounded-full bg-neutral-200 dark:bg-neutral-600 hover:bg-neutral-300 dark:hover:bg-neutral-500 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{G(a=>{let s=t.name;if(!a)return null;let r=Array.from(a).filter(e=>e.name!==s),n=new DataTransfer;r.forEach(e=>n.items.add(e));let l=V.filter(e=>e.name!==s);return e.setUploadedFiles(l),Q(l),n.files})},children:(0,n.jsx)(d.X,{className:"h-3 w-3"})})]},a)}),(0,n.jsxs)(T.cZ,{children:[(0,n.jsx)(T.fK,{children:(0,n.jsx)(T.$N,{children:t.name})}),(0,n.jsx)(T.Be,{children:(0,n.jsx)(z.x,{className:"h-72 w-full rounded-md",children:t.content})})]})]},a))]}),(0,n.jsxs)("div",{className:"".concat(o().actualInputArea," justify-between dark:bg-neutral-700 relative ").concat(el&&"animate-pulse"),onDragOver:function(e){e.preventDefault(),eo(!0)},onDragLeave:function(e){e.preventDefault(),eo(!1)},onDrop:function(e){e.preventDefault(),eo(!1),e.dataTransfer.files&&ef(e.dataTransfer.files)},children:[(0,n.jsx)("input",{type:"file",accept:".pdf,.doc,.docx,.txt,.md,.org,.jpg,.jpeg,.png,.webp,.py,.tsx,.js,.json,.html,.css,.ipynb",multiple:!0,ref:r,onChange:function(e){e.target.files&&ef(e.target.files)},style:{display:"none"}}),(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:(0,n.jsx)(b.z,{variant:"ghost",className:"!bg-none p-0 m-2 h-auto text-3xl rounded-full text-gray-300 hover:text-gray-500",disabled:e.sendDisabled||!e.isLoggedIn,onClick:function(){r.current&&r.current.click()},ref:l,children:(0,n.jsx)(u.p,{className:"w-8 h-8"})})}),(0,n.jsx)(k._v,{children:"Attach a PDF, plain text file, or image"})]})})}),(0,n.jsx)("div",{className:"flex-grow flex flex-col w-full gap-1.5 relative",children:(0,n.jsx)(N.g,{ref:t,className:"border-none focus:border-none\n focus:outline-none focus-visible:ring-transparent\n w-full h-16 min-h-16 max-h-[128px] md:py-4 rounded-lg resize-none dark:bg-neutral-700\n ".concat(e.isMobileWidth?"text-md":"text-lg"),placeholder:"Type / to see a list of commands",id:"message",autoFocus:!0,value:a,onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||e.isMobileWidth||e.sendDisabled||(B(!1),Y([]),t.preventDefault(),eh())},onChange:e=>s(e.target.value),disabled:ee})}),(0,n.jsxs)("div",{className:"flex items-end pb-2",children:[ee?(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:(0,n.jsx)(b.z,{variant:"default",className:"".concat(!ee&&"hidden"," ").concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{et(!ee)},disabled:e.sendDisabled||!e.isLoggedIn,children:(0,n.jsx)(h.d,{weight:"fill",className:"w-6 h-6"})})}),(0,n.jsx)(k._v,{children:"Click to stop recording and transcribe your voice."})]})}):ea?(0,n.jsx)(D.l,{}):(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:e.sendDisabled?(0,n.jsx)(b.z,{variant:"default",className:"".concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),onClick:()=>{e.setTriggeredAbort(!0)},children:(0,n.jsx)(h.d,{weight:"fill",className:"w-6 h-6"})}):(0,n.jsx)(b.z,{variant:"default",className:"".concat(!a||ee||"hidden"," ").concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),disabled:e.sendDisabled||!e.isLoggedIn,onClick:()=>{s("Listening..."),et(!ee)},children:(0,n.jsx)(f.P,{weight:"fill",className:"w-6 h-6"})})}),(0,n.jsx)(k._v,{children:e.sendDisabled?"Click here to stop the streaming.":"Click to transcribe your message with voice."})]})}),(0,n.jsx)(b.z,{className:"".concat((!a||ee||e.sendDisabled)&&"hidden"," ").concat(e.agentColor?(0,C.tp)(e.agentColor):"bg-orange-300 hover:bg-orange-500"," rounded-full p-1 m-2 h-auto text-3xl transition transform md:hover:-translate-y-1"),disabled:e.sendDisabled||!e.isLoggedIn,onClick:eh,children:(0,n.jsx)(g.a,{className:"w-6 h-6",weight:"bold"})})]})]}),(0,n.jsx)(k.pn,{children:(0,n.jsxs)(k.u,{children:[(0,n.jsx)(k.aJ,{asChild:!0,children:(0,n.jsxs)(b.z,{variant:"ghost",className:"float-right justify-center gap-1 flex items-center p-1.5 mr-2 h-fit",disabled:e.sendDisabled||!e.isLoggedIn,ref:O,onClick:()=>{var e;eu(!ed),null==t||null===(e=t.current)||void 0===e||e.focus()},children:[(0,n.jsx)("span",{className:"text-muted-foreground text-sm",children:"Research Mode"}),ed?(0,n.jsx)(x.W,{weight:"fill",className:"w-6 h-6 inline-block ".concat(e.agentColor?(0,C.oz)(e.agentColor):(0,C.oz)("orange")," rounded-full")}):(0,n.jsx)(m.$,{weight:"fill",className:"w-6 h-6 inline-block ".concat((0,C.oz)("gray")," rounded-full")})]})}),(0,n.jsx)(k._v,{className:"text-xs",children:"Research Mode allows you to get more deeply researched, detailed responses. Response times may be longer."})]})})]})]})});O.displayName="ChatInputArea"},32759:function(e,t,a){"use strict";a.d(t,{E:function(){return o}});var s=a(57437),r=a(2265),n=a(60610),l=a(94508);let o=r.forwardRef((e,t)=>{let{className:a,value:r,indicatorColor:o,...i}=e;return(0,s.jsx)(n.fC,{ref:t,className:(0,l.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",a),...i,children:(0,s.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(o),style:{transform:"translateX(-".concat(100-(r||0),"%)")}})})});o.displayName=n.fC.displayName},76818:function(e,t,a){"use strict";a.d(t,{g:function(){return l}});var s=a(57437),r=a(2265),n=a(94508);let l=r.forwardRef((e,t)=>{let{className:a,...r}=e;return(0,s.jsx)("textarea",{className:(0,n.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...r})});l.displayName="Textarea"},26442:function(e){e.exports={actualInputArea:"chatInputArea_actualInputArea__Ha6cN"}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8459,3317,7138,244],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3317,8459,7138,244],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[244,8459,3317,7138],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,8459,3317,244],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|