khoj 1.28.4.dev90__py3-none-any.whl → 1.29.0__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/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/5538-32bd787d106700dc.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{9417-d1db7464a0639806.js → 9417-32c4db52ca42e681.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-ee4f0da14df15091.js → page-4353b1a532795ad1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-da59a2b9ec07da16.js → page-c9f13c865e739607.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-90d3621e1e3f0cb2.js → page-45720e1ed71e3ef5.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-b4f76bc1b35170c4.js → page-ecb8e1c192aa8834.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-4f44549ba3807021.js → page-8e28deacb61f75aa.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-610d33158b233b34.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-178afe8ed85593c4.js → page-30376aa7e9cfa342.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-d1bea816ba11738d.js → webpack-6e43825796b7dfa6.js} +1 -1
- khoj/interface/compiled/_next/static/css/2d097a35da6bfe8d.css +1 -0
- khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css +1 -0
- khoj/interface/compiled/agents/index.html +1 -1
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +1 -1
- khoj/interface/compiled/automations/index.txt +2 -2
- khoj/interface/compiled/chat/index.html +1 -1
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +1 -1
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +2 -2
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/processor/conversation/utils.py +5 -2
- khoj/routers/api_chat.py +7 -2
- khoj/routers/api_subscription.py +2 -1
- khoj/routers/helpers.py +15 -8
- {khoj-1.28.4.dev90.dist-info → khoj-1.29.0.dist-info}/METADATA +1 -1
- {khoj-1.28.4.dev90.dist-info → khoj-1.29.0.dist-info}/RECORD +38 -38
- khoj/interface/compiled/_next/static/chunks/5538-36aa824a75519c5b.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-88dbd5c184dcd1e3.js +0 -1
- khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css +0 -1
- khoj/interface/compiled/_next/static/css/9d45de78fba367c1.css +0 -1
- /khoj/interface/compiled/_next/static/{ihuek7ndseklii6SQK9rT → bM0HVaqXqBW3iL4kXivLq}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{ihuek7ndseklii6SQK9rT → bM0HVaqXqBW3iL4kXivLq}/_ssgManifest.js +0 -0
- {khoj-1.28.4.dev90.dist-info → khoj-1.29.0.dist-info}/WHEEL +0 -0
- {khoj-1.28.4.dev90.dist-info → khoj-1.29.0.dist-info}/entry_points.txt +0 -0
- {khoj-1.28.4.dev90.dist-info → khoj-1.29.0.dist-info}/licenses/LICENSE +0 -0
khoj/routers/api_subscription.py
CHANGED
@@ -94,8 +94,9 @@ async def subscribe(request: Request):
|
|
94
94
|
|
95
95
|
@subscription_router.patch("")
|
96
96
|
@requires(["authenticated"])
|
97
|
-
async def update_subscription(request: Request,
|
97
|
+
async def update_subscription(request: Request, operation: str):
|
98
98
|
# Retrieve the customer's details
|
99
|
+
email = request.user.object.email
|
99
100
|
customers = stripe.Customer.list(email=email).auto_paging_iter()
|
100
101
|
customer = next(customers, None)
|
101
102
|
if customer is None:
|
khoj/routers/helpers.py
CHANGED
@@ -784,13 +784,17 @@ async def generate_excalidraw_diagram(
|
|
784
784
|
if send_status_func:
|
785
785
|
async for event in send_status_func(f"**Diagram to Create:**:\n{better_diagram_description_prompt}"):
|
786
786
|
yield {ChatEvent.STATUS: event}
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
787
|
+
try:
|
788
|
+
excalidraw_diagram_description = await generate_excalidraw_diagram_from_description(
|
789
|
+
q=better_diagram_description_prompt,
|
790
|
+
user=user,
|
791
|
+
agent=agent,
|
792
|
+
tracer=tracer,
|
793
|
+
)
|
794
|
+
except Exception as e:
|
795
|
+
logger.error(f"Error generating Excalidraw diagram for {user.email}: {e}", exc_info=True)
|
796
|
+
yield None, None
|
797
|
+
return
|
794
798
|
|
795
799
|
yield better_diagram_description_prompt, excalidraw_diagram_description
|
796
800
|
|
@@ -876,7 +880,10 @@ async def generate_excalidraw_diagram_from_description(
|
|
876
880
|
query=excalidraw_diagram_generation, user=user, tracer=tracer
|
877
881
|
)
|
878
882
|
raw_response = clean_json(raw_response)
|
879
|
-
|
883
|
+
try:
|
884
|
+
response: Dict[str, str] = json.loads(raw_response)
|
885
|
+
except Exception:
|
886
|
+
raise AssertionError(f"Invalid response for generating Excalidraw diagram: {raw_response}")
|
880
887
|
if not response or not isinstance(response, List) or not isinstance(response[0], Dict):
|
881
888
|
# TODO Some additional validation here that it's a valid Excalidraw diagram
|
882
889
|
raise AssertionError(f"Invalid response for improving diagram description: {response}")
|
@@ -110,15 +110,17 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
|
|
110
110
|
khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
|
111
111
|
khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
|
112
112
|
khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
|
113
|
-
khoj/interface/compiled/index.html,sha256=
|
114
|
-
khoj/interface/compiled/index.txt,sha256=
|
113
|
+
khoj/interface/compiled/index.html,sha256=RLQanO5sszJ_HAxLygr40LiT1YQGtS19rPyUxy8IGnA,12156
|
114
|
+
khoj/interface/compiled/index.txt,sha256=2_2Z3JkLsDDtEnGrxdpSnEQWhLJEAVljuWMF2htYw1Q,5611
|
115
115
|
khoj/interface/compiled/khoj.webmanifest,sha256=lsknYkvEdMbRTOUYKXPM_8krN2gamJmM4u3qj8u9lrU,1682
|
116
116
|
khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
|
117
117
|
khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
|
118
118
|
khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
|
119
119
|
khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
|
120
120
|
khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
|
121
|
-
khoj/interface/compiled/404/index.html,sha256=
|
121
|
+
khoj/interface/compiled/404/index.html,sha256=aXfp_BqrEetYSV3Mdcdq4Fyr9zmypqC5bun_tm2mtJE,12023
|
122
|
+
khoj/interface/compiled/_next/static/bM0HVaqXqBW3iL4kXivLq/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
|
123
|
+
khoj/interface/compiled/_next/static/bM0HVaqXqBW3iL4kXivLq/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
122
124
|
khoj/interface/compiled/_next/static/chunks/1210.132a7e1910006bbb.js,sha256=2dJueIfOg5qlQdanOM9HrgwcfrUXCD57bfd8Iv7iJcU,2104
|
123
125
|
khoj/interface/compiled/_next/static/chunks/1279-f37ee4a388ebf544.js,sha256=U_1WaocOdgJ4HZB8tRx_izzYGD1EZlCohC1uLCffCWc,45582
|
124
126
|
khoj/interface/compiled/_next/static/chunks/1459.690bf20e7d7b7090.js,sha256=z-ruZPxF_Z3ef_WOThd9Ox36AMhxaW3znizVivNnA34,34239
|
@@ -131,14 +133,14 @@ khoj/interface/compiled/_next/static/chunks/3803-d74118a2d0182c52.js,sha256=Elqf
|
|
131
133
|
khoj/interface/compiled/_next/static/chunks/4504-1629487c8bc82203.js,sha256=z6NvJ2KOjYPbMNsYQKyX9PV4DeURUoP6LKoNb4kZXg0,11637
|
132
134
|
khoj/interface/compiled/_next/static/chunks/4602-8eeb4b76385ad159.js,sha256=pz2lEr0JOrMdrddv2R2vej4e9uxpOr5KFX966ClLbOU,29928
|
133
135
|
khoj/interface/compiled/_next/static/chunks/5512-94c7c2bbcf58c19d.js,sha256=ySpWRBlOMbttpBPr-j6_y9FmVrWfeRdardPkVnYAXzw,103730
|
134
|
-
khoj/interface/compiled/_next/static/chunks/5538-
|
136
|
+
khoj/interface/compiled/_next/static/chunks/5538-32bd787d106700dc.js,sha256=aZZKwp3YRs4ff6gzG5PGSlyeCPvrzYB9Rw5dsdfdZpU,34191
|
135
137
|
khoj/interface/compiled/_next/static/chunks/5961-3c104d9736b7902b.js,sha256=qss4GGVTNo_Rp3x8bU1I_l-SZCa-XAoVaxbLYOOcDTU,1089568
|
136
138
|
khoj/interface/compiled/_next/static/chunks/6297-d1c842ed3f714ab0.js,sha256=4nzZ2umR-q6wQ-8L4RSivWXKV_SE1dWoN9qA1I9lCRI,25675
|
137
139
|
khoj/interface/compiled/_next/static/chunks/7023-a5bf5744d19b3bd3.js,sha256=TBJA7dTnI8nymtbljKuZzo2hbStXWR-P8Qkl57k2Tw8,123898
|
138
140
|
khoj/interface/compiled/_next/static/chunks/7883-b1305ec254213afe.js,sha256=dDbERTNiKRIIdC7idybjZq03gnxQtudMawrekye0zH8,241134
|
139
141
|
khoj/interface/compiled/_next/static/chunks/8423-ebfa9bb9e2424ca3.js,sha256=VwlClSlEVvw6VpjDyK5k8J7CegYcJ9VEMUajAyQo3PA,14909
|
140
142
|
khoj/interface/compiled/_next/static/chunks/9001-3b27af6d5f21df44.js,sha256=ran2mMGTO2kiAJebRGMyfyAu4Sdjw-WobS_m6g-qjz8,34223
|
141
|
-
khoj/interface/compiled/_next/static/chunks/9417-
|
143
|
+
khoj/interface/compiled/_next/static/chunks/9417-32c4db52ca42e681.js,sha256=9r3lV-DxmhmQnYjroVbjAXPyX6rvSmhZKfUguE0dENw,15039
|
142
144
|
khoj/interface/compiled/_next/static/chunks/94ca1967.5584df65931cfe83.js,sha256=lxdrZ8h3_IWkTuk6QlzM2Hd9Pvu9_p8h_EI4aveSOgE,1174519
|
143
145
|
khoj/interface/compiled/_next/static/chunks/964ecbae.ea4eab2a3a835ffe.js,sha256=EccPkhdFk6L0NIAVQfWe4kOpRWqhf20PkYecy7R_fyo,1175119
|
144
146
|
khoj/interface/compiled/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js,sha256=wK1TsLdl56xtbQG6HMRDpylzTOYXQaAnnn2xobFnX40,267216
|
@@ -147,34 +149,32 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
|
|
147
149
|
khoj/interface/compiled/_next/static/chunks/main-1ea5c2e0fdef4626.js,sha256=8_u87PGI3PahFbDfGWGvpD-a18J7X7ChUqWIeqxVq7g,111061
|
148
150
|
khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js,sha256=i52E7sWOcSq1G8eYZL3mtTxbUbwRNxcAbSWQ6uWpMsY,475
|
149
151
|
khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
|
150
|
-
khoj/interface/compiled/_next/static/chunks/webpack-
|
152
|
+
khoj/interface/compiled/_next/static/chunks/webpack-6e43825796b7dfa6.js,sha256=uvR23x0pYT9e9VnkjOHjAR1wPezsnDA3SoYFKFTtwm4,4054
|
151
153
|
khoj/interface/compiled/_next/static/chunks/app/layout-86561d2fac35a91a.js,sha256=2EWsyKE2kcC5uDvsOtgG5OP0hHCX8sCph4NqhUU2rCg,442
|
152
|
-
khoj/interface/compiled/_next/static/chunks/app/page-
|
154
|
+
khoj/interface/compiled/_next/static/chunks/app/page-ecb8e1c192aa8834.js,sha256=37-5NzGAsEBxSfvd9BOxTWwAi6c-3Gv101QCqFYtMzo,29633
|
153
155
|
khoj/interface/compiled/_next/static/chunks/app/_not-found/page-07ff4ab42b07845e.js,sha256=3mCUnxfMxyK44eqk21TVBrC6u--WSbvx31fTmQuOvMQ,1755
|
154
156
|
khoj/interface/compiled/_next/static/chunks/app/agents/layout-e9838b642913a071.js,sha256=w3vWDf7m2_VG7q98_KGAWbCO06RI7iqFYsb4nDqGUDw,372
|
155
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/page-
|
157
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/page-4353b1a532795ad1.js,sha256=VYSOSTRUsJQxg-C2ntEbHW5Fwm_a5k1e79bUYlcZBa0,11755
|
156
158
|
khoj/interface/compiled/_next/static/chunks/app/automations/layout-27c28e923c9b1ff0.js,sha256=d2vJ_lVB0pfeFXNUPzHAe1ca5NzdNowHPh___SPqugM,5143
|
157
|
-
khoj/interface/compiled/_next/static/chunks/app/automations/page-
|
159
|
+
khoj/interface/compiled/_next/static/chunks/app/automations/page-c9f13c865e739607.js,sha256=hkZk61Vrde0LIL4KPqnm_u2pd_LPzvt-f6Z0hkq8FCs,35344
|
158
160
|
khoj/interface/compiled/_next/static/chunks/app/chat/layout-b0e7ff4baa3b5265.js,sha256=a-Qv2nHUrCa1gIs4Qo5txnOlhhQessAdcnAhhjaN3ag,374
|
159
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/page-
|
161
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/page-45720e1ed71e3ef5.js,sha256=gPlxB-cSg3pd0yguoe8M44gHzLY4ET-Pbhsok7xtBQw,6632
|
160
162
|
khoj/interface/compiled/_next/static/chunks/app/search/layout-ea6b73fdaf9b24ca.js,sha256=mBgNUjaTBNgIKOpZj722mh1ojg1CNIYRBPiupStSS6s,165
|
161
|
-
khoj/interface/compiled/_next/static/chunks/app/search/page-
|
163
|
+
khoj/interface/compiled/_next/static/chunks/app/search/page-8e28deacb61f75aa.js,sha256=A3klMSdb4sxIAuHZ8NdbYgzc_WXhzIPFACF-D4CRino,6958
|
162
164
|
khoj/interface/compiled/_next/static/chunks/app/settings/layout-254eaaf916449a60.js,sha256=kHAKleDbNFfhNM3e1WLJm3OFw6PDtGcjyj5toO24vps,5347
|
163
|
-
khoj/interface/compiled/_next/static/chunks/app/settings/page-
|
165
|
+
khoj/interface/compiled/_next/static/chunks/app/settings/page-610d33158b233b34.js,sha256=gvcwqYV9CrC5M3KBpyn0b88m8u34brimEEYC0Z8ExiI,32149
|
164
166
|
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-cf7445cf0326bda3.js,sha256=W3axh1K4y-pLSXcXogLl4qLKXr5BZLY1uA7JfSWp5TU,373
|
165
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-
|
167
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-30376aa7e9cfa342.js,sha256=97knuZITimK5C-hRzxFUVwudgQ-jMVN1uNEaN9u75TU,4351
|
166
168
|
khoj/interface/compiled/_next/static/chunks/pages/_app-f870474a17b7f2fd.js,sha256=eqdFPAN_XFyMUzZ9qwFk-_rhMWZrU7lgNVt1foVUANo,286
|
167
169
|
khoj/interface/compiled/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js,sha256=vjERjtMAbVk-19LyPf1Jc-H6TMcrSznSz6brzNqbqf8,253
|
168
170
|
khoj/interface/compiled/_next/static/css/0e9d53dcd7f11342.css,sha256=52_LSJ59Vwm1p2UpcDXEvq99pTjz2sW4EjF5iKf-dzs,2622
|
169
171
|
khoj/interface/compiled/_next/static/css/1f293605f2871853.css,sha256=G2b3Wx4e0DRBWSdNU20ivCChZI5HBzvPYUVVIdTRjLc,26590
|
172
|
+
khoj/interface/compiled/_next/static/css/2d097a35da6bfe8d.css,sha256=Px3pPL_D-UjBJEghSLIchKux1WSch40GQHPv60qZEC8,8449
|
170
173
|
khoj/interface/compiled/_next/static/css/3cf13271869a4aeb.css,sha256=sGjJTeMeN6wbQF4OCPgWYgJmSLLSHyzIH2rSVstWx7k,1857
|
171
|
-
khoj/interface/compiled/_next/static/css/
|
174
|
+
khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css,sha256=BSqRkeb9vBh0phx5GkAlZirTFZintbyggGaUkuOBfaU,914
|
172
175
|
khoj/interface/compiled/_next/static/css/5a400c87d295e68a.css,sha256=ojDUPJ9fJpEo9DzTAsEa-k1cg7Bef-nSTfpszMiqknQ,17711
|
173
176
|
khoj/interface/compiled/_next/static/css/80bd6301fc657983.css,sha256=T7_aQHcWpQBQLKadauHNzjYGw713FtRNTlUqmJjsL6I,1634
|
174
|
-
khoj/interface/compiled/_next/static/css/9d45de78fba367c1.css,sha256=TGW4CbYNGAfDm8sAwMbO2zxxIdxxKJq5fhxVpHgRW0E,8829
|
175
177
|
khoj/interface/compiled/_next/static/css/ed437164d77aa600.css,sha256=l7axYkpTLwbVjhTCUNh8BWdkBom06sG-JrpDX5vSPUU,3056024
|
176
|
-
khoj/interface/compiled/_next/static/ihuek7ndseklii6SQK9rT/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
|
177
|
-
khoj/interface/compiled/_next/static/ihuek7ndseklii6SQK9rT/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
178
178
|
khoj/interface/compiled/_next/static/media/5455839c73f146e7-s.p.woff2,sha256=BUeNjYxyX7Bu76aNlJrZtW3PwYgcH-kp8syFdODZoyc,35788
|
179
179
|
khoj/interface/compiled/_next/static/media/5984b96ba4822821-s.woff2,sha256=RFrf6fMTduuQwEe78qK6_Y_Mnj97HmRDG-VujYxwA90,99368
|
180
180
|
khoj/interface/compiled/_next/static/media/684adc3dde1b03f1-s.woff2,sha256=5loL1Nrr0sWovNVA8BcfMnck7uDntv7wBNd9oxGMaM8,19820
|
@@ -247,8 +247,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
|
|
247
247
|
khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
|
248
248
|
khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
|
249
249
|
khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
|
250
|
-
khoj/interface/compiled/agents/index.html,sha256=
|
251
|
-
khoj/interface/compiled/agents/index.txt,sha256=
|
250
|
+
khoj/interface/compiled/agents/index.html,sha256=XQXhd94G4nxDcTAAroETyx5Qql_07JQ-5ZMQ_uvHwxQ,12966
|
251
|
+
khoj/interface/compiled/agents/index.txt,sha256=rysxI0HT38eiqeVqBfpin17AUBwJqwY0bDEb8IuS3hg,6178
|
252
252
|
khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
|
253
253
|
khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png,sha256=aTxivDb3CYyThkVZWz8A19xl_dNut5DbkXhODWF3A9Q,5640
|
254
254
|
khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png,sha256=xPCMLHiaL7lYOdQLZrKwWE-Qjn5ZaysSZB0ScYv4UZU,12312
|
@@ -259,16 +259,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
|
|
259
259
|
khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
|
260
260
|
khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
|
261
261
|
khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
|
262
|
-
khoj/interface/compiled/automations/index.html,sha256=
|
263
|
-
khoj/interface/compiled/automations/index.txt,sha256=
|
264
|
-
khoj/interface/compiled/chat/index.html,sha256=
|
265
|
-
khoj/interface/compiled/chat/index.txt,sha256=
|
266
|
-
khoj/interface/compiled/search/index.html,sha256=
|
267
|
-
khoj/interface/compiled/search/index.txt,sha256=
|
268
|
-
khoj/interface/compiled/settings/index.html,sha256=
|
269
|
-
khoj/interface/compiled/settings/index.txt,sha256=
|
270
|
-
khoj/interface/compiled/share/chat/index.html,sha256=
|
271
|
-
khoj/interface/compiled/share/chat/index.txt,sha256=
|
262
|
+
khoj/interface/compiled/automations/index.html,sha256=cICIG_acWx4rAK8Ossed9HtwxY1pzVgjxGl_t6BaDCQ,30633
|
263
|
+
khoj/interface/compiled/automations/index.txt,sha256=4Erqs9ruvWtS8naP-7x8hYL6hPV2dukha5eT9_ZNPos,5500
|
264
|
+
khoj/interface/compiled/chat/index.html,sha256=47dAp5sMuHBVb7qzuCVUOr8jou048XB5Y_D_99BGiac,13860
|
265
|
+
khoj/interface/compiled/chat/index.txt,sha256=YGJhQW8wBOaUlp9K1OH4t9fhUdx1PrfAZiXftkVJ2zA,6590
|
266
|
+
khoj/interface/compiled/search/index.html,sha256=HArR_L1XwpS6tN7CSbMY_xNco-cLZeFR3ZqxeGVNtuI,30161
|
267
|
+
khoj/interface/compiled/search/index.txt,sha256=D-fFSz0zuVL-xOdBjYArzn9I54RftibNuJUtx0K97ok,5256
|
268
|
+
khoj/interface/compiled/settings/index.html,sha256=dZKf1S4mZ1yIqSyEnfAnAV2k0K0xml8oaamYy7nilNg,12831
|
269
|
+
khoj/interface/compiled/settings/index.txt,sha256=74s4GpZewUyxUW2HQ-mNJSJqxXCZTiNErloftgXF4Ow,6078
|
270
|
+
khoj/interface/compiled/share/chat/index.html,sha256=P0Z1Lm5_ETIwuQtW6rXmF87X_dff-Q3U2fH-If3hH0w,15157
|
271
|
+
khoj/interface/compiled/share/chat/index.txt,sha256=GE4srhFQVXdzz3srlKZadiU1dlDC_K8N8To0puwfnJk,7387
|
272
272
|
khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
|
273
273
|
khoj/interface/email/magic_link.html,sha256=EoGKQucfPj3xQrWXhSZAzPFOYCHF_ZX94TWCd1XHl1M,941
|
274
274
|
khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
|
@@ -321,7 +321,7 @@ khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
321
321
|
khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
|
322
322
|
khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
323
323
|
khoj/processor/conversation/prompts.py,sha256=jXVxeFYHBP6LBSAmdykYH6in297VTgVdEJ5IDsYlQnI,50319
|
324
|
-
khoj/processor/conversation/utils.py,sha256=
|
324
|
+
khoj/processor/conversation/utils.py,sha256=sp9NjsP6dl1RMlcmX4GGZTD9bIUozXr9OD6gDvxxLV4,27635
|
325
325
|
khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
326
326
|
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=JjKiMY8CYv7kp2gHo7HcB-rMP5kokSutPw6w2OOURd4,8678
|
327
327
|
khoj/processor/conversation/anthropic/utils.py,sha256=6_FnsfLRqjkubkfMVmPTEEBzvMUOAccIz5AHV6B9mU8,6623
|
@@ -345,14 +345,14 @@ khoj/processor/tools/run_code.py,sha256=f8_oXLjBLscnnE9BJorOdFQsegk9wVWb-yUuyPvd
|
|
345
345
|
khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
346
346
|
khoj/routers/api.py,sha256=_AI1pnQMQM75L6WVZSAVfvrk04pLEdLbHA0fkyxnUbo,28489
|
347
347
|
khoj/routers/api_agents.py,sha256=vHPruCjlQxGBdm0lcmymEb9-aAELqbOplqh21WwD0DQ,9699
|
348
|
-
khoj/routers/api_chat.py,sha256=
|
348
|
+
khoj/routers/api_chat.py,sha256=83jqlGex6K3bry9_Pq4Ti8pEGHhENsjtlW4EgWbL-88,48704
|
349
349
|
khoj/routers/api_content.py,sha256=10dw55vesCsuci577OCYgYylWgmIDA45Iax1ZQ8dnGI,20544
|
350
350
|
khoj/routers/api_model.py,sha256=KDsxNwHspC94eTcv6l3ehr773EOvgc670UnZLE1WZ4o,3642
|
351
351
|
khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
|
352
|
-
khoj/routers/api_subscription.py,sha256=
|
352
|
+
khoj/routers/api_subscription.py,sha256=J6xZNZDdOA71vCfethlPfAyfvRBq4HGCBpbsOZ9CWj0,5333
|
353
353
|
khoj/routers/auth.py,sha256=HO54PR-BkWA_iJIktEobUrObcXVYG-00jpnIcEVdR5s,6564
|
354
354
|
khoj/routers/email.py,sha256=SGYNPQvfcvYeHf70F0YqpY0FLMRElF2ZekROXdwGI18,3821
|
355
|
-
khoj/routers/helpers.py,sha256=
|
355
|
+
khoj/routers/helpers.py,sha256=v-dnh2AwuXQNCWGHYLacGnq-8bNSluU2Ym8z7JG4ek0,82672
|
356
356
|
khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
|
357
357
|
khoj/routers/research.py,sha256=e_p2Rj9ypryCdgCb9fhNldzf57gWQN99eDy1aOTk1yU,15675
|
358
358
|
khoj/routers/storage.py,sha256=tJrwhFRVWv0MHv7V7huMc1Diwm-putZSwnZXJ3tqT_c,2338
|
@@ -377,8 +377,8 @@ khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
|
|
377
377
|
khoj/utils/rawconfig.py,sha256=bQ_MGbBzYt6ZUIsHUwZjaHKDLh6GQ7h-sENkv3fyVbQ,5028
|
378
378
|
khoj/utils/state.py,sha256=KtUEIKAZdGGN_Qr58RS1pgcywgSafun8YIXx-YEclAY,1645
|
379
379
|
khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
|
380
|
-
khoj-1.
|
381
|
-
khoj-1.
|
382
|
-
khoj-1.
|
383
|
-
khoj-1.
|
384
|
-
khoj-1.
|
380
|
+
khoj-1.29.0.dist-info/METADATA,sha256=zyvqvvGSSvaCKRfE1YENL9fYutntszn_HJYh6LKuqWA,7087
|
381
|
+
khoj-1.29.0.dist-info/WHEEL,sha256=3U_NnUcV_1B1kPkYaPzN-irRckL5VW_lytn0ytO_kRY,87
|
382
|
+
khoj-1.29.0.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
|
383
|
+
khoj-1.29.0.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
384
|
+
khoj-1.29.0.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5538],{55538:function(e,t,a){"use strict";a.d(t,{Z:function(){return eC}});var n=a(57437),s=a(15238),o=a.n(s),l=a(2265),r=a(34531),c=a.n(r),i=a(14944),d=a(39952),u=a.n(d),h=a(34040);a(7395);var m=a(11961),g=a(26100),f=a(36013),p=a(13304),x=a(12218),v=a(74697),j=a(37440);let w=p.fC,b=p.xz;p.x8;let y=p.h_,C=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(p.aV,{className:(0,j.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s,ref:t})});C.displayName=p.aV.displayName;let N=(0,x.j)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),M=l.forwardRef((e,t)=>{let{side:a="right",className:s,children:o,...l}=e;return(0,n.jsxs)(y,{children:[(0,n.jsx)(C,{}),(0,n.jsxs)(p.VY,{ref:t,className:(0,j.cn)(N({side:a}),s),...l,children:[o,(0,n.jsxs)(p.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,n.jsx)(v.Z,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});M.displayName=p.VY.displayName;let k=e=>{let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,j.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};k.displayName="SheetHeader";let _=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(p.Dx,{ref:t,className:(0,j.cn)("text-lg font-semibold text-foreground",a),...s})});_.displayName=p.Dx.displayName;let R=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(p.dk,{ref:t,className:(0,j.cn)("text-sm text-muted-foreground",a),...s})});R.displayName=p.dk.displayName;var I=a(19573),T=a(11838),E=a.n(T),F=a(89417);let D=new i.Z({html:!0,linkify:!0,typographer:!0});function S(e){let t=(0,F.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?E().sanitize(D.render(t)):E().sanitize(t)}(e),[o,r]=(0,l.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(I.J2,{open:o&&!e.showFullContent,onOpenChange:r,children:[(0,n.jsx)(I.xo,{asChild:!0,children:(0,n.jsxs)(f.Zb,{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words text-balance rounded-lg border-none p-2 bg-muted"),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 ".concat(e.showFullContent?"overflow-x-auto block":"overflow-hidden line-clamp-2"),dangerouslySetInnerHTML:{__html:s}})]})}),(0,n.jsx)(I.yk,{className:"w-[400px] mx-2",children:(0,n.jsxs)(f.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 L(e){var t,a,s,o;let r=(0,F.Le)(".py","!w-4 h-4 text-muted-foreground flex-shrink-0"),c=E().sanitize(e.code),[i,d]=(0,l.useState)(!1),[u,h]=(0,l.useState)(!1),g=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)},p=(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(),g(t)},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),title:"Download file: ".concat(t.filename),children:(0,n.jsx)(m.b,{className:"w-4 h-4",weight:u?"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)(I.J2,{open:i&&!e.showFullContent,onOpenChange:d,children:[(0,n.jsx)(I.xo,{asChild:!0,children:(0,n.jsx)(f.Zb,{onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words text-balance rounded-lg border-none p-2 bg-muted"),children:(0,n.jsxs)("div",{className:"flex flex-col px-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[r,(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:c}),p(e.output_files,!1)]})})}),(0,n.jsx)(I.yk,{className:"w-[400px] mx-2",children:(0,n.jsxs)(f.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:[r,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(s=e.output_files)||void 0===s?void 0:s.length)>0?"artifact":""]})]}),e.output_files.length>0&&p(null===(o=e.output_files)||void 0===o?void 0:o.slice(0,1),!0)||(0,n.jsx)("pre",{className:"text-xs border-t mt-1 pt-1 verflow-hidden line-clamp-10",children:c})]})})]})})}function O(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)(I.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,n.jsx)(I.xo,{asChild:!0,children:(0,n.jsx)(f.Zb,{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words text-balance rounded-lg border-none p-2 bg-muted"),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-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)(I.yk,{className:"w-[400px] mx-2",children:(0,n.jsx)(f.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 B(e){let[t,a]=(0,l.useState)(3);(0,l.useEffect)(()=>{a(e.isMobileWidth?1:3)},[e.isMobileWidth]);let s=e.codeReferenceCardData.slice(0,t),o=e.notesReferenceCardData.slice(0,t-s.length),r=o.length+s.length<t?e.onlineReferenceCardData.slice(0,t-s.length-o.length):[],c=e.notesReferenceCardData.length>0||e.codeReferenceCardData.length>0||e.onlineReferenceCardData.length>0,i=e.notesReferenceCardData.length+e.codeReferenceCardData.length+e.onlineReferenceCardData.length;return 0===i?null:(0,n.jsxs)("div",{className:"pt-0 px-4 pb-4 md:px-6",children:[(0,n.jsxs)("h3",{className:"inline-flex items-center",children:["References",(0,n.jsxs)("p",{className:"text-gray-400 m-2",children:[i," sources"]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[s.map((e,t)=>(0,l.createElement)(L,{showFullContent:!1,...e,key:"code-".concat(t)})),o.map((e,t)=>(0,l.createElement)(S,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r.map((e,t)=>(0,l.createElement)(O,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),c&&(0,n.jsx)(q,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData,codeReferenceCardData:e.codeReferenceCardData})]})]})}function q(e){return e.notesReferenceCardData||e.onlineReferenceCardData?(0,n.jsxs)(w,{children:[(0,n.jsxs)(b,{className:"text-balance w-auto md:w-[200px] justify-start overflow-hidden break-words p-0 bg-transparent border-none text-gray-400 align-middle items-center !m-2 inline-flex",children:["View references",(0,n.jsx)(g.o,{className:"m-1"})]}),(0,n.jsxs)(M,{className:"overflow-y-scroll",children:[(0,n.jsxs)(k,{children:[(0,n.jsx)(_,{children:"References"}),(0,n.jsx)(R,{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)(L,{showFullContent:!0,...e,key:"code-".concat(t)})),e.notesReferenceCardData.map((e,t)=>(0,l.createElement)(S,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,l.createElement)(O,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]}):null}var H=a(9557),A=a(34149),W=a(29386),z=a(31784),U=a(60665),Z=a(96006),V=a(18444),$=a(35304),P=a(8589),G=a(13493),J=a(63205),Q=a(56698),Y=a(32970),K=a(84120),X=a(92880),ee=a(48408),et=a(55362),ea=a(67722),en=a(58485),es=a(58575),eo=a(25800);let el=(0,a(57818).default)(()=>Promise.all([a.e(6555),a.e(7293),a.e(1459),a.e(1210)]).then(a.bind(a,51210)).then(e=>e.default),{loadableGenerated:{webpack:()=>[51210]},ssr:!1});function er(e){return(0,n.jsx)(l.Suspense,{fallback:(0,n.jsx)(en.Z,{}),children:(0,n.jsx)(el,{data:e.data})})}var ec=a(90837),ei=a(69591),ed=a(94880);let eu=new i.Z({html:!0,linkify:!0,typographer:!0});function eh(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(c().feedbackButtons," flex align-middle justify-center items-center"),children:[(0,n.jsx)("button",{title:"Like",className:c().thumbsUpButton,disabled:null!==s,onClick:()=>{eh(t,a,"positive"),o(!0)},children:!0===s?(0,n.jsx)(A.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,n.jsx)(A.V,{alt:"Like Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),(0,n.jsx)("button",{title:"Dislike",className:c().thumbsDownButton,disabled:null!==s,onClick:()=>{eh(t,a,"negative"),o(!1)},children:!1===s?(0,n.jsx)(W.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,n.jsx)(W.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)(z.a,{className:"".concat(s)}):a.includes("generating")?(0,n.jsx)(U.Z,{className:"".concat(s)}):a.includes("data sources")||a.includes("notes")?(0,n.jsx)(Z.g,{className:"".concat(s)}):a.includes("read")?(0,n.jsx)(V.f,{className:"".concat(s)}):a.includes("search")?(0,n.jsx)($.Y,{className:"".concat(s)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,n.jsx)(P.u,{className:"".concat(s)}):a.includes("diagram")?(0,n.jsx)(G.j,{className:"".concat(s)}):a.includes("paint")?(0,n.jsx)(J.Y,{className:"".concat(s)}):a.includes("code")?(0,n.jsx)(Q.E,{className:"".concat(s)}):(0,n.jsx)(z.a,{className:"".concat(s)})}(t?t[1]:"",e.primary?(0,es.oz)(e.agentColor):"text-gray-500"),s=E().sanitize(eu.render(e.message));return s=s.replace(/<h[1-6].*?<\/h[1-6]>/g,""),(0,n.jsxs)("div",{className:"".concat(c().trainOfThoughtElement," break-words items-center ").concat(e.primary?"text-gray-400":"text-gray-300"," ").concat(c().trainOfThought," ").concat(e.primary?c().primary:""),children:[a,(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:s},className:"break-words"})]})}eu.use(u(),{inline:!0,code:!0});let ef=(0,l.forwardRef)((e,t)=>{var a,s;let o,r,i,d,u;let[m,g]=(0,l.useState)(!1),[f,x]=(0,l.useState)(!1),[v,j]=(0,l.useState)(""),[w,b]=(0,l.useState)(""),[y,C]=(0,l.useState)(!1),[N,M]=(0,l.useState)(!1),[k,_]=(0,l.useState)(""),R=(0,l.useRef)(!1),I=(0,l.useRef)(null);async function T(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;C(!0);let a=D(t[0]);for(let e=0;e<t.length&&!R.current;e++){let n=a;e<t.length-1&&(a=D(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}}C(!1),M(!1)}async function D(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)(()=>{R.current=N},[N]),(0,l.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(I.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,eo.Z)(I.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return I.current&&e.observe(I.current,{childList:!0}),()=>e.disconnect()},[I.current]),(0,l.useEffect)(()=>{let t=e.chatMessage.message;e.chatMessage.intent&&"excalidraw"==e.chatMessage.intent.type&&(t=e.chatMessage.intent["inferred-queries"][0],_(e.chatMessage.message)),t=t.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET");let a={"text-to-image":e=>""),"text-to-image2":e=>""),"text-to-image-v3":e=>""),excalidraw:e=>e};if(e.chatMessage.intent){let{type:n,"inferred-queries":s}=e.chatMessage.intent;n in a&&(t=a[n](t)),n.includes("text-to-image")&&(null==s?void 0:s.length)>0&&(t+="\n\n".concat(s[0]))}t=(0,H.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 n=t,s=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 E().sanitize(t)}),a=t.map((e,t)=>".concat(e,")")).join("\n"),o=t.map((e,t)=>'<div class="'.concat(c().imageWrapper,'"><img src="').concat(e,'" alt="uploaded image ').concat(t+1,'" /></div>')).join(""),l='<div class="'.concat(c().imagesContainer,'">').concat(o,"</div>");n="".concat(a,"\n\n").concat(n),s="".concat(l).concat(s)}j(n);let o=eu.render(s);o=o.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),b(E().sanitize(o))},[e.chatMessage.message,e.chatMessage.images,e.chatMessage.intent]),(0,l.useEffect)(()=>{m&&setTimeout(()=>{g(!1)},2e3)},[m]),(0,l.useEffect)(()=>{I.current&&(I.current.querySelectorAll("pre > .hljs").forEach(e=>{if(!e.querySelector("".concat(c().codeCopyButton))){let t=document.createElement("button"),a=(0,n.jsx)(Y.w,{size:24});(0,h.createRoot)(t).render(a),t.className="hljs ".concat(c().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)(K.J,{size:24});(0,h.createRoot)(t).render(s)}),e.prepend(t)}}),(0,eo.Z)(I.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]}))},[w,f,I]);let S=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")},L=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=[c().chatMessageContainer,"shadow-md"]).push(c()[a.by]),a.message||o.push(c().emptyChatMessage),e.customClassName&&o.push(c()["".concat(a.by).concat(e.customClassName)]),o.join(" ")),onMouseLeave:e=>x(!1),onMouseEnter:e=>x(!0),children:[(0,n.jsxs)("div",{className:(s=e.chatMessage,(r=[c().chatMessageWrapper]).push(c()[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)(ec.Vq,{children:[(0,n.jsx)(ec.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,F.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,ei.xq)(e.size),")"]})]})}),(0,n.jsxs)(ec.cZ,{children:[(0,n.jsx)(ec.fK,{children:(0,n.jsx)(p.$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)(ec.Be,{children:(0,n.jsx)(ed.x,{className:"h-72 w-full rounded-md break-words break-all text-wrap",children:e.content})})]})]},t))}),(0,n.jsx)("div",{ref:I,className:c().chatMessage,dangerouslySetInnerHTML:{__html:w}}),k&&(0,n.jsx)(er,{data:k})]}),(0,n.jsx)("div",{className:c().teaserReferencesContainer,children:(0,n.jsx)(B,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:L.notesReferenceCardData,onlineReferenceCardData:L.onlineReferenceCardData,codeReferenceCardData:L.codeReferenceCardData})}),(0,n.jsx)("div",{className:c().chatFooter,children:(f||e.isMobileWidth||e.isLastMessage||y)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{title:(d=(i=new Date(e.chatMessage.created+"Z")).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),u=i.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(d," on ").concat(u)),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(c().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(y?N?(0,n.jsx)(en.l,{iconClassName:"p-0",className:"m-0"}):(0,n.jsx)("button",{title:"Pause Speech",onClick:e=>M(!0),children:(0,n.jsx)(X.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,n.jsx)("button",{title:"Speak",onClick:e=>T(),children:(0,n.jsx)(ee.j,{alt:"Speak Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})})),e.chatMessage.turnId&&(0,n.jsx)("button",{title:"Delete",className:"".concat(c().deleteButton),onClick:()=>S(e.chatMessage),children:(0,n.jsx)(et.r,{alt:"Delete Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})}),(0,n.jsx)("button",{title:"Copy",className:"".concat(c().copyButton),onClick:()=>{navigator.clipboard.writeText(v),g(!0)},children:m?(0,n.jsx)(ea.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,n.jsx)(ea.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}))]})]})})]})});ef.displayName="ChatMessage";var ep=a(84511),ex=a(16288),ev=a(20721),ej=a(19666),ew=a(50495),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)(ej.pn,{children:(0,n.jsxs)(ej.u,{delayDuration:0,children:[(0,n.jsx)(ej.aJ,{asChild:!0,children:(0,n.jsxs)(ew.z,{variant:"ghost",className:"flex items-center justify-center",children:[a,(0,n.jsx)("div",{children:t})]})}),(0,n.jsx)(ej._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)(g.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,n.jsxs)("div",{className:"".concat(a?"":o().trainOfThought+" shadow-sm"),children:[!e.completed&&(0,n.jsx)(en.l,{className:"float-right"}),e.completed&&(a?(0,n.jsx)(ew.z,{className:"w-fit text-left justify-start content-start text-xs",onClick:()=>s(!1),variant:"ghost",size:"sm",children:"What was my train of thought?"}):(0,n.jsxs)(ew.z,{className:"w-fit text-left justify-start content-start text-xs p-0 h-fit",onClick:()=>s(!0),variant:"ghost",size:"sm",children:[(0,n.jsx)(ep.a,{size:16,className:"mr-1"}),"Close"]})),!a&&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,u,h;let[m,g]=(0,l.useState)(null),[f,p]=(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),C=(0,l.useRef)(null),N=(0,l.useRef)(null),[M,k]=(0,l.useState)(null),[_,R]=(0,l.useState)(!1),[I,T]=(0,l.useState)(!0),E=(0,ei.IC)(),D="[data-radix-scroll-area-viewport]";(0,l.useEffect)(()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(D);if(!t)return;let a=()=>{let{scrollTop:e,scrollHeight:a,clientHeight:n}=t;T(a-(e+n)<=50)};return t.addEventListener("scroll",a),()=>t.removeEventListener("scroll",a)},[]),(0,l.useEffect)(()=>{e.incomingMessages&&e.incomingMessages.length>0&&I&&L()},[e.incomingMessages,I]),(0,l.useEffect)(()=>{m&&m.chat&&m.chat.length>0&&f<2&&requestAnimationFrame(()=>{var e;null===(e=C.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"})})},[m,f]),(0,l.useEffect)(()=>{if(!x||_)return;let t=new IntersectionObserver(t=>{t[0].isIntersecting&&x&&(R(!0),function(t){if(!x||_)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=>{if(e.setTitle(a.response.slug),a&&a.response&&a.response.chat&&a.response.chat.length>0){if(p(Math.ceil(a.response.chat.length/10)),a.response.chat.length===(null==m?void 0:m.chat.length)){v(!1),R(!1);return}e.setAgent(a.response.agent),g(a.response),R(!1),0===t?L(!0):S()}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};e.setAgent(a.response.agent),g(t)}v(!1),R(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(f))},{threshold:1});return b.current&&t.observe(b.current),()=>t.disconnect()},[x,f,_]),(0,l.useEffect)(()=>{v(!0),R(!1),p(0),g(null)},[e.conversationId]),(0,l.useEffect)(()=>{if(e.incomingMessages){let t=e.incomingMessages[e.incomingMessages.length-1];t&&!t.completed&&(k(e.incomingMessages.length-1),e.setTitle(t.rawQuery),t.turnId&&w(t.turnId))}},[e.incomingMessages]);let S=()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(D);requestAnimationFrame(()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"}),null==t||t.scrollBy({behavior:"smooth",top:-150})})},L=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(D);requestAnimationFrame(()=>{null==a||a.scrollTo({top:a.scrollHeight,behavior:t?"auto":"smooth"})}),T(!0)},O=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)(ed.x,{className:"h-[73vh] relative",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:_&&(0,n.jsx)(en.l,{className:"opacity-50"})}),m&&m.chat&&m.chat.map((t,a)=>{var s,o,l;return(0,n.jsxs)(n.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)(ef,{ref:a===m.chat.length-2?C:a===m.chat.length-(f-1)*10?N:null,isMobileWidth:E,chatMessage:t,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(l=m.agent)||void 0===l?void 0:l.color,"-500"),isLastMessage:a===m.chat.length-1,onDeleteMessage:O,conversationId:e.conversationId},"".concat(a,"fullHistory"))]})}),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)(ef,{isMobileWidth:E,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:O,conversationId:e.conversationId,turnId:d},"".concat(a,"outgoing")),t.trainOfThought&&(0,n.jsx)(ey,{trainOfThought:t.trainOfThought,lastMessage:a===M,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)(ef,{isMobileWidth:E,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,turnId:d},conversationId:e.conversationId,turnId:d,onDeleteMessage:O,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(r=m.agent)||void 0===r?void 0:r.color,"-500"),isLastMessage:!0},"".concat(a,"incoming"))]},"incomingMessage".concat(a))}),e.pendingMessage&&(0,n.jsx)(ef,{isMobileWidth:E,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:O,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)?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,F.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)(ex.v,{}),description:m&&m.agent&&(null===(u=m.agent)||void 0===u?void 0:u.persona)?null===(h=m.agent)||void 0===h?void 0:h.persona:"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:()=>{L(),T(!0)},children:(0,n.jsx)(ev.K,{size:24})})})]})}):null}},15238:function(e){e.exports={chatHistory:"chatHistory_chatHistory__CoaVT",agentIndicator:"chatHistory_agentIndicator__wOU1f",trainOfThought:"chatHistory_trainOfThought__mMWSR"}},34531: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([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,95982))},95982:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ed}});var a,n,r=s(57437),i=s(55268),l=s.n(i);s(80541);var o=s(2265),c=s(35657),d=s(79306),h=s(69591),u=s(19748),m=s(50495),x=s(66431),p=s(32309),f=s(37440);let j=o.forwardRef((e,t)=>{let{className:s,containerClassName:a,...n}=e;return(0,r.jsx)(x.uZ,{ref:t,containerClassName:(0,f.cn)("flex items-center gap-2 has-[:disabled]:opacity-50",a),className:(0,f.cn)("disabled:cursor-not-allowed",s),...n})});j.displayName="InputOTP";let g=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,f.cn)("flex items-center",s),...a})});g.displayName="InputOTPGroup";let b=o.forwardRef((e,t)=>{let{index:s,className:a,...n}=e,{char:i,hasFakeCaret:l,isActive:c}=o.useContext(x.VM).slots[s];return(0,r.jsxs)("div",{ref:t,className:(0,f.cn)("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",c&&"z-10 ring-2 ring-ring ring-offset-background",a),...n,children:[i,l&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});b.displayName="InputOTPSlot",o.forwardRef((e,t)=>{let{...s}=e;return(0,r.jsx)("div",{ref:t,role:"separator",...s,children:(0,r.jsx)(p.Z,{})})}).displayName="InputOTPSeparator";var y=s(83102),N=s(36013),w=s(46910);let v=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,f.cn)("w-full caption-bottom text-sm",s),...a})})});v.displayName="Table",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,f.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let _=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,f.cn)("[&_tr:last-child]:border-0",s),...a})});_.displayName="TableBody",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,f.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let k=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,f.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});k.displayName="TableRow",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,f.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let S=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,f.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});S.displayName="TableCell",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,f.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var C=s(42491),T=s(9950),D=s(35418),E=s(15340),F=s(84120),P=s(55362),O=s(48252),I=s(60787),A=s(26058),z=s(95616),R=s(11961),Y=s(76782),Z=s(98325),K=s(96917),M=s(10813),W=s(56194),U=s(9476),L=s(43010),B=s(72151),V=s(53876),G=s(90445),H=s(63205),J=s(49806),$=s(67722),q=s(57087),X=s(27082),Q=s(26100),ee=s(48861),et=s(58485),es=s(47947),ea=s(9557),en=s(6780),er=s(70571),ei=s(87138);let el=e=>{let{onClose:t}=e,[s,a]=(0,o.useState)([]),[n,i]=(0,o.useState)([]),[l,c]=(0,o.useState)(""),[d,h]=(0,o.useState)(!1),[u,x]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[j,g]=(0,o.useState)(!1),[b,y]=(0,o.useState)(0),[N,w]=(0,o.useState)([]),v=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(j||y(0),j){let e=setInterval(()=>{y(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[j]),(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/content/computer");if(!e.ok)throw Error("Failed to fetch files");let t=await e.json();Array.isArray(t)?a(t.toSorted()):console.error("Unexpected data format from API")}catch(e){console.error("Error fetching files:",e)}})()},[N]);let _=s.filter(e=>e.toLowerCase().includes(l.toLowerCase())),k=async()=>{let e=n.length>0?n:_;if(0!==e.length)try{if(!(await fetch("/api/content/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})})).ok)throw Error("Failed to delete files");a(t=>t.filter(t=>!e.includes(t))),i([])}catch(e){console.error("Error deleting files:",e)}},S=async e=>{try{if(!(await fetch("/api/content/file?filename=".concat(encodeURIComponent(e)),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to delete file");a(t=>t.filter(t=>t!==e)),i(t=>t.filter(t=>t!==e))}catch(e){console.error("Error deleting file:",e)}};function O(e){(0,ea.ko)(e,x,g,f,w)}return(0,r.jsxs)(C.m5,{open:!0,onOpenChange:t,children:[(0,r.jsx)(en.aR,{open:null!==u||null!=p,children:(0,r.jsxs)(en._T,{children:[(0,r.jsx)(en.fY,{children:(0,r.jsx)(en.f$,{children:"Alert"})}),(0,r.jsx)(en.yT,{children:u||p}),(0,r.jsx)(en.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{x(null),f(null),g(!1)},children:"Close"})]})}),(0,r.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),h(!0)},onDragLeave:function(e){e.preventDefault(),h(!1)},onDrop:function(e){e.preventDefault(),h(!1),e.dataTransfer.files&&O(e.dataTransfer.files)},onClick:function(){v&&v.current&&v.current.click()},children:[(0,r.jsx)("input",{type:"file",multiple:!0,ref:v,style:{display:"none"},onChange:function(e){e.target.files&&O(e.target.files)}}),(0,r.jsxs)("div",{className:"flex-none p-4",children:["Upload files",j&&(0,r.jsx)(er.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:b})]}),(0,r.jsx)("div",{className:"flex-none p-4 bg-secondary border-b ".concat(d?"animate-pulse":""," rounded-lg"),children:(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:d?(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(T.u,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drop files to upload"})]}):(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(D.v,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drag and drop files here"})]})})})]}),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-b",children:(0,r.jsx)(C.sZ,{placeholder:"Find synced files",value:l,onValueChange:c})}),(0,r.jsx)("div",{className:"flex-grow overflow-auto",children:(0,r.jsxs)(C.e8,{children:[(0,r.jsx)(C.rb,{children:0===s.length?(0,r.jsxs)("div",{className:"flex items-center justify-center",children:[(0,r.jsx)(E.C,{className:"h-4 w-4 mr-2",weight:"bold"}),"No files synced"]}):(0,r.jsxs)("div",{children:["Could not find a good match.",(0,r.jsx)(ei.default,{href:"/search",className:"block",children:"Need advanced search? Click here."})]})}),(0,r.jsx)(C.fu,{heading:"Synced files",children:_.map(e=>(0,r.jsx)(C.di,{value:e,onSelect:e=>{i(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,r.jsxs)("div",{className:"flex items-center ".concat(n.includes(e)?"font-semibold":""),children:[n.includes(e)&&(0,r.jsx)(F.J,{className:"h-4 w-4 mr-2"}),(0,r.jsx)("span",{className:"break-all",children:e})]}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>S(e),className:"ml-auto",children:(0,r.jsx)(P.r,{className:"h-4 w-4"})})]})},e))})]})}),(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-t",children:(0,r.jsx)("div",{className:"flex justify-between",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:k,className:"mr-2",children:[(0,r.jsx)(P.r,{className:"h-4 w-4 mr-2"}),n.length>0?"Delete Selected (".concat(n.length,")"):"Delete All"]})})})]})]})},eo=e=>{var t,s;let{items:a,selected:n,callbackFunc:i}=e,[l,c]=(0,o.useState)(null!==(s=null==n?void 0:n.toString())&&void 0!==s?s:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(w.h_,{children:[(0,r.jsx)(w.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(m.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===l))||void 0===t?void 0:t.name," ",(0,r.jsx)(O.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(w.AW,{children:(0,r.jsx)(w._x,{value:l,onValueChange:async e=>{c(e),await i(e)},children:a.map(e=>(0,r.jsx)(w.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},ec=()=>{let[e,t]=(0,o.useState)([]),{toast:s}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),s=await e.json();t(e=>[...e,s])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),s({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&t(t=>t.filter(t=>t.token!==e))}catch(e){console.error("Error deleting API key:",e)}},i=async()=>{try{let e=await fetch("/auth/token"),s=await e.json();(null==s?void 0:s.length)>0&&t(s)}catch(e){console.error("Error listing API keys:",e)}};return(0,o.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function ed(){let[e,t]=(0,o.useState)("Settings"),{apiKeys:s,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:i}=ec(),{userConfig:x}=(0,d.h2)(!0),[p,f]=(0,o.useState)(null),[w,C]=(0,o.useState)(void 0),[F,O]=(0,o.useState)(null),[ea,en]=(0,o.useState)(void 0),[er,ei]=(0,o.useState)(""),[ed,eh]=(0,o.useState)("verified"),[eu,em]=(0,o.useState)(!1),{toast:ex}=(0,c.pm)(),ep=(0,h.IC)(),ef="w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950 border border-opacity-50";(0,o.useEffect)(()=>{var e;f(x),en(null==x?void 0:x.phone_number),eh((null==x?void 0:x.is_phone_number_verified)?"verified":(null==x?void 0:x.phone_number)?"otp":"setup"),C(null==x?void 0:x.given_name),O(null!==(e=null==x?void 0:x.notion_token)&&void 0!==e?e:null)},[x]);let ej=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(ea),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");eh("verify")}catch(e){console.error("Error sending OTP:",e),ex({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},eg=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(er),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");eh("verified"),ex({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),ex({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},eb=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");en(void 0),eh("setup"),ex({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),ex({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},ey=async e=>{try{let t="/api/subscription?email=".concat(null==p?void 0:p.username,"&operation=").concat(e);if(!(await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");p&&(p.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,f(p)),ex({title:"\uD83D\uDCB3 Subscription",description:(null==p?void 0:p.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),ex({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},eN=async()=>{try{let e=await fetch("/api/subscription/trial",{method:"POST"});if(!e.ok)throw Error("Failed to enable free trial");if((await e.json()).trial_enabled&&p){p.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*p.length_of_free_trial);p.subscription_renewal_date=(e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)})(e),p.subscription_enabled_trial_at=new Date().toISOString(),f(p),ex({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(p.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),ex({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},ew=async()=>{if(w)try{if(!(await fetch("/api/user/name?name=".concat(w),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");p&&(p.given_name=w,f(p)),ex({title:"✅ Updated Profile",description:"You name has been updated to ".concat(w)})}catch(e){console.error("Error updating name:",e),ex({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},ev=e=>async t=>{if(!(null==p?void 0:p.is_active)){ex({title:"Model Update",description:"You need to be subscribed to update ".concat(e," models"),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+t,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");ex({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(t){console.error("Failed to update ".concat(e," model:"),t),ex({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},e_=async()=>{if(F)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:F})})).ok)throw Error("Failed to save Notion API key");p&&(p.notion_token=F,f(p)),ex({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),ex({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ek=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));ex({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),ex({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eS=async e=>{try{if(!(await fetch("/api/content/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));p&&("computer"===e?p.enabled_content_source.computer=!1:"notion"===e?(p.enabled_content_source.notion=!1,p.notion_token=null,O(p.notion_token)):"github"===e&&(p.enabled_content_source.github=!1),f(p)),"computer"===e?ex({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):ex({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),ex({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return p?(0,r.jsxs)("div",{className:l().page,children:[(0,r.jsx)("title",{children:e}),(0,r.jsx)("div",{className:l().sidePanel,children:(0,r.jsx)(ee.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:ep})}),(0,r.jsx)("div",{className:l().content,children:(0,r.jsx)("div",{className:"".concat(l().contentBody," mx-10 my-2"),children:(0,r.jsx)(o.Suspense,{fallback:(0,r.jsx)(et.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(I.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(y.I,{type:"text",onChange:e=>C(e.target.value),value:w,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:ew,disabled:w===p.given_name,children:[(0,r.jsx)(A.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(N.Zb,{id:"subscription",className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(z.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(N.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a"," ",p.length_of_free_trial," day trial of the Khoj Futurist plan. Your trial ends on ",p.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"unsubscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"expired"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),p.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>ey("cancel"),children:[(0,r.jsx)(R.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>ey("resubscribe"),children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||p.subscription_enabled_trial_at&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(p.khoj_cloud_subscription_url,"?prefilled_email=").concat(p.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:eN,children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),eu&&(0,r.jsx)(el,{onClose:()=>em(!1)}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(N.Zb,{id:"computer",className:ef,children:[(0,r.jsxs)(N.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(Z.I,{className:"h-8 w-8 mr-2"}),"Files",p.enabled_content_source.computer&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(N.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage your synced files"}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>em(!0),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.computer||"hidden"),onClick:()=>eS("computer"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(N.Zb,{id:"github",className:"".concat(ef," hidden"),children:[(0,r.jsxs)(N.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(U.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(N.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",children:p.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(N.Zb,{id:"notion",className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(B.F,{className:"h-7 w-7 mr-2"}),"Notion",p.enabled_content_source.notion&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(N.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!p.notion_oauth_url&&(0,r.jsx)(y.I,{onChange:e=>O(e.target.value),value:F||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:[p.notion_oauth_url&&!p.enabled_content_source.notion?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>{window.open(p.notion_oauth_url)},children:[(0,r.jsx)(L.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):p.enabled_content_source.notion&&F===p.notion_token?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>ek("notion"),children:[(0,r.jsx)(V.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):p.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:e_,disabled:F===p.notion_token,children:[(0,r.jsx)(A.B,{className:"h-5 w-5 inline mr-1"}),p.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.notion_token||"hidden"),onClick:()=>eS("notion"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[p.chat_model_options.length>0&&(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(G.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(eo,{items:p.chat_model_options,selected:p.selected_chat_model_config,callbackFunc:ev("chat")})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.paint_model_options.length>0&&(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(eo,{items:p.paint_model_options,selected:p.selected_paint_model_config,callbackFunc:ev("paint")})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.voice_model_options.length>0&&(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(T.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(eo,{items:p.voice_model_options,selected:p.selected_voice_model_config,callbackFunc:ev("voice")})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-8",children:[!p.anonymous_mode&&(0,r.jsxs)(N.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950",children:[(0,r.jsxs)(N.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)(J.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(m.z,{variant:"secondary",className:"!mt-0",onClick:a,children:[(0,r.jsx)(D.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Desktop",target:"_blank",children:"Desktop"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Emacs",children:"Emacs"})," ","apps and more."]}),(0,r.jsx)(v,{children:(0,r.jsx)(_,{children:s.map(e=>(0,r.jsxs)(k,{children:[(0,r.jsx)(S,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(S,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{children:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[(0,r.jsx)($.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{ex({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),n(e.token)}}),(0,r.jsx)(P.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{ex({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),i(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4"})]}),(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(q.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===ed&&(0,r.jsx)(K.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==ed&&(0,r.jsx)(E.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(N.aY,{className:"grid gap-4",children:[(0,r.jsxs)("p",{className:"text-gray-400",children:["Connect your number to chat with Khoj on WhatsApp. Learn more about the integration"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/whatsapp",children:"here"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(es.Z,{initialValue:ea||"",onChangeNumber:en,disabled:"verify"===ed,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(l().phoneInput)}}),"verify"===ed&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(ea)}),(0,r.jsx)(j,{autoFocus:!0,maxLength:6,value:er||"",onChange:ei,onComplete:()=>eh("verify"),children:(0,r.jsxs)(g,{children:[(0,r.jsx)(b,{index:0}),(0,r.jsx)(b,{index:1}),(0,r.jsx)(b,{index:2}),(0,r.jsx)(b,{index:3}),(0,r.jsx)(b,{index:4}),(0,r.jsx)(b,{index:5})]})})]})]})]}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:["verify"===ed&&(0,r.jsx)(m.z,{variant:"outline",onClick:eg,children:"Verify"})||(0,r.jsx)(m.z,{variant:"outline",disabled:!ea||ea===p.phone_number&&"verified"===ed||!(0,u.y)(ea),onClick:ej,children:p.phone_number?ea&&(ea!==p.phone_number||"verified"!==ed)&&(0,u.y)(ea)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(Q.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(X.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===ed&&(0,r.jsxs)(m.z,{variant:"outline",onClick:()=>eb(),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]}):(0,r.jsx)(et.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},70571:function(e,t,s){"use strict";s.d(t,{E:function(){return l}});var a=s(57437),n=s(2265),r=s(52431),i=s(37440);let l=n.forwardRef((e,t)=>{let{className:s,value:n,indicatorColor:l,...o}=e;return(0,a.jsx)(r.fC,{ref:t,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",s),...o,children:(0,a.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(l),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});l.displayName=r.fC.displayName},35657:function(e,t,s){"use strict";s.d(t,{pm:function(){return u}});var a=s(2265);let n=0,r=new Map,i=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},l=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},o=[],c={toasts:[]};function d(e){c=l(c,e),o.forEach(e=>{e(c)})}function h(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:s});return d({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function u(){let[e,t]=a.useState(c);return a.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},55268:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN",sidePanel:"settings_sidePanel__osdez"}}},function(e){e.O(0,[4229,9848,9001,3062,7883,1603,2971,7023,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
div.automations_automationsLayout__Atoh_{display:grid;grid-template-columns:1fr 1fr;gap:1rem}div.automations_automationCard__BKidA{display:grid;grid-template-rows:auto 1fr auto}div.automations_pageLayout__OaoYA{max-width:60vw;margin:auto auto 2rem}div.automations_sidePanel__MPciO{position:fixed;height:100%;z-index:1}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}div.automations_sidePanel__MPciO{position:relative;height:100%}}
|
@@ -1 +0,0 @@
|
|
1
|
-
div.agents_titleBar__FzYbY{padding:16px 0;text-align:left}.agents_agentPersonality__o0Ysz p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agents_agentPersonality__o0Ysz{text-align:left;grid-column:span 3;overflow:hidden}div.agents_pageLayout__gR3S3{max-width:60vw;margin:auto auto 2rem}div.agents_sidePanel__wGVGc{position:fixed;height:100%;z-index:1}button.agents_infoButton__NqI7E{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.agents_agentList__XVx4A{display:grid;gap:20px;padding-top:30px;margin-right:auto;grid-auto-flow:row;grid-template-columns:1fr 1fr;margin-left:auto}@media only screen and (max-width:768px){div.agents_agentList__XVx4A{width:100%;padding:0;margin-right:auto;margin-left:auto;grid-template-columns:1fr}div.agents_pageLayout__gR3S3{max-width:90vw}div.agents_sidePanel__wGVGc{position:relative;height:100%}}div.sidePanel_session__R9wgH{padding:.5rem;margin-bottom:.25rem;border-radius:.5rem;cursor:pointer;max-width:14rem;font-size:medium;display:grid;grid-template-columns:minmax(auto,400px) 1fr;gap:0}div.sidePanel_compressed__YBPtM{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__iwfo8,div.sidePanel_session__R9wgH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__R9wgH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__R9wgH a{text-decoration:none}button.sidePanel_button__ihOfG{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__dt9Zw{border-radius:.5rem;padding:8px}div.sidePanel_panel__VZ8ye{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__ZjTHo{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__OjVmG{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__R9wgH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}div.sidePanel_header__d5cGA{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__x0w58{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__k_lal{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList__nKe2n{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(var(--frosted-background-color));z-index:1;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}div.sidePanel_modalSessionsList__nKe2n div.sidePanel_content__Wq20_{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList__nKe2n div.sidePanel_session__R9wgH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__VZ8ye{padding:.25rem;width:100%}div.sidePanel_expanded__ZjTHo{z-index:1}div.sidePanel_singleReference__r9z1n{padding:4px}div.sidePanel_panelWrapper__k_lal{width:100%;padding:0 1rem}div.sidePanel_session__R9wgH.sidePanel_compressed__YBPtM{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__R9wgH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}menu.navMenu_menu__fqlFF a{text-decoration:none;font-size:medium;font-weight:400;padding:0 4px;border-radius:4px;display:flex;justify-self:center;margin:0;align-items:center;gap:4px}a.navMenu_selected__A__aP{background-color:hsl(var(--accent))}div.navMenu_titleBar__HJoio{display:flex;justify-content:space-between;align-content:space-evenly;align-items:start}div.navMenu_titleBar__HJoio menu{padding:0;margin:0;border-radius:.5rem;display:grid;grid-auto-flow:column;gap:32px}div.navMenu_settingsMenuProfile__3npiK img{border-radius:50%;width:32px;height:32px;margin:0}div.navMenu_settingsMenu__X2i2U{padding:0 4px;border-radius:4px;display:flex;justify-self:center;margin:0;align-items:center}div.navMenu_settingsMenuOptions__KWnLv{display:block;grid-auto-flow:row;position:absolute;background-color:var(--background-color);box-shadow:0 8px 16px 0 rgba(0,0,0,.2);top:64px;text-align:left;padding:8px;border-radius:8px}@media screen and (max-width:600px){menu.navMenu_menu__fqlFF span{display:none}div.navMenu_settingsMenuOptions__KWnLv{right:4px}div.navMenu_titleBar__HJoio{padding:8px}}div.chatHistory_chatHistory__CoaVT{display:flex;flex-direction:column;height:100%;margin:auto}div.chatHistory_agentIndicator__wOU1f a{display:flex;text-align:center;align-content:center;align-items:center}div.chatHistory_trainOfThought__mMWSR{border:1px solid var(--border-color);border-radius:16px;padding:8px 16px;margin:12px}div.chatMessage_chatMessageContainer__sAivf{display:flex;flex-direction:column;margin:12px;border-radius:16px;padding:8px 16px 0;word-break:break-word}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:1rem;padding-bottom:1rem;max-width:80vw}div.chatMessage_chatMessageWrapper__u5m8A ol,div.chatMessage_chatMessageWrapper__u5m8A p:not(:last-child),div.chatMessage_chatMessageWrapper__u5m8A ul{margin-bottom:16px}div.chatMessage_chatMessageWrapper__u5m8A a span{display:revert!important}div.chatMessage_khojfullHistory__NPu2l{border-width:1px;padding-left:4px}div.chatMessage_youfullHistory__ioyfH{max-width:100%}div.chatMessage_chatMessageContainer__sAivf.chatMessage_youfullHistory__ioyfH{padding-left:0}div.chatMessage_you__6GUC4{background-color:hsla(var(--secondary));align-self:flex-end;border-radius:16px}div.chatMessage_khoj__cjWON{background-color:transparent;color:hsl(var(--accent-foreground));align-self:flex-start}div.chatMessage_khojChatMessage__BabQz{padding-top:8px;padding-left:16px}div.chatMessage_emptyChatMessage__J9JRn{display:none}div.chatMessage_imagesContainer__HTRjT{display:flex;overflow-x:auto;padding-bottom:8px;margin-bottom:8px}div.chatMessage_imageWrapper__DF92M{flex:0 0 auto;margin-right:8px}div.chatMessage_imageWrapper__DF92M img{width:auto;height:128px;-o-object-fit:cover;object-fit:cover;border-radius:8px}div.chatMessage_chatMessageContainer__sAivf>img{width:auto;height:auto;max-width:100%;max-height:80vh;-o-object-fit:contain;object-fit:contain;display:block;margin-top:.25rem;margin-right:auto}div.chatMessage_chatMessageContainer__sAivf h3 img{width:24px}div.chatMessage_you__6GUC4{color:hsla(var(--secondary-foreground))}div.chatMessage_author__muRtC{font-size:.75rem;color:grey;text-align:right}div.chatMessage_chatFooter__0vR8s{display:flex;justify-content:space-between;min-height:28px}div.chatMessage_chatButtons__Lbk8T{display:flex;justify-content:flex-end;width:-moz-min-content;width:min-content;border:1px solid var(--border-color);border-radius:16px;position:relative;bottom:-12px;background-color:hsla(var(--secondary))}div.chatMessage_chatFooter__0vR8s button{cursor:pointer;color:hsl(var(--muted-foreground));border:none;border-radius:16px;padding:4px;margin-left:4px;margin-right:4px}div.chatMessage_chatFooter__0vR8s button:hover{background-color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv{cursor:pointer;float:right;border-radius:8px}button.chatMessage_codeCopyButton__Y_Ujv:hover{color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv img,button.chatMessage_copyButton__jd7q7 img,div.chatMessage_feedbackButtons___Brdy img{width:24px}div.chatMessage_trainOfThought__mR2Gg strong{font-weight:500}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{font-weight:500;color:hsla(var(--secondary-foreground))}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb p{color:inherit}div.chatMessage_trainOfThoughtElement__le_bC{display:grid;grid-template-columns:auto 1fr;align-items:start}div.chatMessage_trainOfThoughtElement__le_bC ol,div.chatMessage_trainOfThoughtElement__le_bC ul{margin:auto;word-break:break-word}@media screen and (max-width:768px){div.chatMessage_youfullHistory__ioyfH{max-width:90%}}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}.agentCard_agentPersonality__MmRlN p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agentCard_agentPersonality__MmRlN{text-align:left;grid-column:span 3;overflow:hidden}button.agentCard_infoButton__heh_w{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.search_searchLayout__fP3m0{display:grid;grid-template-columns:1fr;gap:1rem;height:100vh}div.search_sidePanel__myfc9{position:fixed;height:100%;z-index:1}@media screen and (max-width:768px){div.search_searchLayout__fP3m0{gap:0}div.search_sidePanel__myfc9{position:relative;height:100%}}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|