khoj 1.35.3.dev6__py3-none-any.whl → 1.35.4.dev1__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/4986-4de8a920c7fcbbc6.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-7e18b67e737c7ddd.js → page-fe28a8b1b3648a55.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-e1e5c04c6d1a3b82.js → page-f9741f52969fb8f7.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-6e4297193657b39b.js → page-1fdcaad519ca7b90.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-71b4596245f4b71d.js → page-62fd13b0a48494ac.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-3813b25193b1c9e3.js → page-c45f35cc3c12416e.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-9a2c880a5750f2d4.js → page-f478749e6154f7e0.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6d7831aace573049.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-0276dcbd88d8d132.js → page-37328118de6cbefe.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-2c5a3f89bde64271.js → webpack-f4562fb8c56245c5.js} +1 -1
- khoj/interface/compiled/_next/static/css/{eff89937927ce00a.css → 1b7f52b8da3a37bd.css} +1 -1
- khoj/interface/compiled/_next/static/css/37a73b87f02df402.css +1 -0
- khoj/interface/compiled/_next/static/css/d7448372b4f1e3b8.css +25 -0
- khoj/interface/compiled/_next/static/css/d8518f90b895a246.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 +3 -3
- 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 +3 -3
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +4 -4
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/processor/conversation/openai/utils.py +4 -0
- khoj/processor/conversation/utils.py +1 -0
- khoj/utils/constants.py +1 -0
- {khoj-1.35.3.dev6.dist-info → khoj-1.35.4.dev1.dist-info}/METADATA +1 -1
- {khoj-1.35.3.dev6.dist-info → khoj-1.35.4.dev1.dist-info}/RECORD +45 -45
- khoj/interface/compiled/_next/static/chunks/4986-8bade861ddaea499.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-8b91b8adb4f04450.js +0 -1
- khoj/interface/compiled/_next/static/css/9b0283970f411554.css +0 -25
- khoj/interface/compiled/_next/static/css/bb7ea98028b368f3.css +0 -1
- khoj/interface/compiled/_next/static/css/d6f22b1f76448451.css +0 -1
- /khoj/interface/compiled/_next/static/chunks/{182-8cd8b17d40e6e989.js → 182-f1c48a203dc91e0e.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{1915-605f698f2573cfd4.js → 1915-d3c36ad6ce697ce7.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2117-2a54a27661a71b65.js → 2117-b8fc8005fb5af70b.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-d3e5bc726e4ff4e3.js → 8667-b6bf63c72b2d76eb.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9259-27d1ff42af9a43e0.js → 9259-1172dbaca0515237.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9665-1ab5c8c667b74dca.js → 9665-391df1e5c51c960a.js} +0 -0
- /khoj/interface/compiled/_next/static/{2FoUbALRr6wGPUsd6nnMv → ltlFhW848iOaVGtlI55WG}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{2FoUbALRr6wGPUsd6nnMv → ltlFhW848iOaVGtlI55WG}/_ssgManifest.js +0 -0
- {khoj-1.35.3.dev6.dist-info → khoj-1.35.4.dev1.dist-info}/WHEEL +0 -0
- {khoj-1.35.3.dev6.dist-info → khoj-1.35.4.dev1.dist-info}/entry_points.txt +0 -0
- {khoj-1.35.3.dev6.dist-info → khoj-1.35.4.dev1.dist-info}/licenses/LICENSE +0 -0
@@ -120,26 +120,24 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
|
|
120
120
|
khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
|
121
121
|
khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
|
122
122
|
khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
|
123
|
-
khoj/interface/compiled/index.html,sha256=
|
124
|
-
khoj/interface/compiled/index.txt,sha256=
|
123
|
+
khoj/interface/compiled/index.html,sha256=pDpxh6SYs4vf952myHiSyRwKLgOam97DES6JzHytt8Y,49294
|
124
|
+
khoj/interface/compiled/index.txt,sha256=u9qUX94dQxI0j9vpjwo_UtPeaOQt5dZGJrVDbExV4sQ,6792
|
125
125
|
khoj/interface/compiled/khoj.webmanifest,sha256=9wOK2BMS6xH5NKd2eaUgTLg9WepIxB2K2U33KU89LD8,2543
|
126
126
|
khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
|
127
127
|
khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
|
128
128
|
khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
|
129
129
|
khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
|
130
130
|
khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
|
131
|
-
khoj/interface/compiled/404/index.html,sha256=
|
132
|
-
khoj/interface/compiled/_next/static/2FoUbALRr6wGPUsd6nnMv/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
|
133
|
-
khoj/interface/compiled/_next/static/2FoUbALRr6wGPUsd6nnMv/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
131
|
+
khoj/interface/compiled/404/index.html,sha256=ZuBWpziwjl5TuIxiKQYYgh6VSjBhKv0JMX0_iqZOnmI,15705
|
134
132
|
khoj/interface/compiled/_next/static/chunks/0d8bff65.4b1018183a8be7c2.js,sha256=qp6JgPDl-9sVe9u6w1oloumr9QiTjRzcZAm19Ov1Yns,268308
|
135
133
|
khoj/interface/compiled/_next/static/chunks/1199-3461ffb259e6d98b.js,sha256=3btqNHOBc7x2FZVh2IyCUN8uLjRH4eWVfmzdO4KYJqc,216338
|
136
134
|
khoj/interface/compiled/_next/static/chunks/1243.ea2826fb35adb15a.js,sha256=Y6ceAwyTH4HSGDvBRoBB-RVXRCzGGr8NSPcspYF5OM8,182
|
137
135
|
khoj/interface/compiled/_next/static/chunks/133.392ae90c3b2a67f2.js,sha256=IK-mb9ZlF6uJUdU8AuXsppc99tFL8svJvZtKNZGNtcY,411
|
138
136
|
khoj/interface/compiled/_next/static/chunks/1592.b069bdb7aaddd2eb.js,sha256=VUaP2gjX3W9tA9pOH_VIPG_2BIg7Wk1AICrfU5iHgrk,71096
|
139
|
-
khoj/interface/compiled/_next/static/chunks/182-
|
140
|
-
khoj/interface/compiled/_next/static/chunks/1915-
|
137
|
+
khoj/interface/compiled/_next/static/chunks/182-f1c48a203dc91e0e.js,sha256=JRaMKdCDyIPYNIJkRYwiBj5I4h8JG8uj4I7Mxv9qiNA,469751
|
138
|
+
khoj/interface/compiled/_next/static/chunks/1915-d3c36ad6ce697ce7.js,sha256=qArqL3leavWRcZkX4ZuWgemtKnmV6c-_yrNtMu_8SeY,11277
|
141
139
|
khoj/interface/compiled/_next/static/chunks/2069.f060659791c0c484.js,sha256=C_oat_BkZcLOHsyJlNN_5I55fB7ee1zkkZ9FT5zOzn4,186
|
142
|
-
khoj/interface/compiled/_next/static/chunks/2117-
|
140
|
+
khoj/interface/compiled/_next/static/chunks/2117-b8fc8005fb5af70b.js,sha256=vLJikd2wJoZNWopR64Y4ccsOU2TNfdkBxVyfrgTHk10,123994
|
143
141
|
khoj/interface/compiled/_next/static/chunks/2170.45431769330fa5b7.js,sha256=C7Puu9x18DhdR5Sh8XXvTzPdP_HTK6WhsJDNW-NoB7o,24019
|
144
142
|
khoj/interface/compiled/_next/static/chunks/2327-3b7d77ac1d1c86a2.js,sha256=3LEJDaavu51Cxb81CRkMFMYOZg40IutU6gLTDKT2Tjw,125547
|
145
143
|
khoj/interface/compiled/_next/static/chunks/2509-299ad8b73ce407dd.js,sha256=8TxAAoyq-sz9TuOnk_B1WeqmTh-tBo6XN7c-l-4QJxo,18613
|
@@ -156,7 +154,7 @@ khoj/interface/compiled/_next/static/chunks/4415.e0c0da5eedae4dd7.js,sha256=DEf8
|
|
156
154
|
khoj/interface/compiled/_next/static/chunks/4610.196691887afb7fea.js,sha256=YztgMQx24P3fpNHTPBIcNUhMuP4ycmJjakV0r0whNCQ,14102
|
157
155
|
khoj/interface/compiled/_next/static/chunks/4650.41f041da0ad365ad.js,sha256=EZeckNrMc3ZUX_LexPgaeusEq-dGBNEPm7nc5nvb4OM,33902
|
158
156
|
khoj/interface/compiled/_next/static/chunks/4872.5422e8324272ab40.js,sha256=fXqb_gUYEnKRgeI3AJuAG6kKAOlVkVXyndmNkhetCyo,11176
|
159
|
-
khoj/interface/compiled/_next/static/chunks/4986-
|
157
|
+
khoj/interface/compiled/_next/static/chunks/4986-4de8a920c7fcbbc6.js,sha256=8znCUQQBkIPlZ4nyb3ddD9MKaDvRso_8CjscNWLqU3I,34572
|
160
158
|
khoj/interface/compiled/_next/static/chunks/5061.79a660faed0e16a9.js,sha256=EJDyOblv9Po4UPs6ylIKVspSnRQehMXKXuLlW2NVCzo,11215
|
161
159
|
khoj/interface/compiled/_next/static/chunks/5279.85d537880b8041ae.js,sha256=3VvdW0sZ8Abfq-qXFvBinh3n65XkjWJBUrFMcRMHIXw,3878
|
162
160
|
khoj/interface/compiled/_next/static/chunks/5402.b9460f1b16b57e92.js,sha256=TFB5N1RYbKelRJXW70T4tT0lEjB3u7RS5lItHOfX-TU,24369
|
@@ -176,17 +174,17 @@ khoj/interface/compiled/_next/static/chunks/7890.f681eb1d1f83bea2.js,sha256=xd1q
|
|
176
174
|
khoj/interface/compiled/_next/static/chunks/7953.f6fc335a23efb959.js,sha256=8XInVs3uzJAMGBndN2k4BeJNHmgZOembNuoyPe9Z7Oo,412
|
177
175
|
khoj/interface/compiled/_next/static/chunks/8254.3145a4fbdcfdca46.js,sha256=sur8InabGfvh1HqNQhwBssc1tCPae_WKQ-efoYU1Q8A,412
|
178
176
|
khoj/interface/compiled/_next/static/chunks/8400.c95e4e79bcd79a56.js,sha256=3SlFozKtF4DYQYPT3hB5M7VEm3e_W71kC19JgADz-3k,19864
|
179
|
-
khoj/interface/compiled/_next/static/chunks/8667-
|
177
|
+
khoj/interface/compiled/_next/static/chunks/8667-b6bf63c72b2d76eb.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
|
180
178
|
khoj/interface/compiled/_next/static/chunks/8673.be44c4d9e4f1d084.js,sha256=jiE4xU-TbkVC4R60SIgxwdo31T9mbdVBVuhP4H60i94,18629
|
181
179
|
khoj/interface/compiled/_next/static/chunks/8698.a088118fef40d302.js,sha256=mrK-3ZahVSF7sZij3l-PyXKxp-ccXU9orykXDc7YzsM,180
|
182
180
|
khoj/interface/compiled/_next/static/chunks/9022.33974a513a281fd2.js,sha256=6NmDzRbI0NyTisUT04sq9M0czUqvlwZoV4E7Onp-55Q,57192
|
183
181
|
khoj/interface/compiled/_next/static/chunks/90542734.fecd4dc1a89ed166.js,sha256=gurZjtKkwAEgw5rTMSeoufe1tvqfUjayaBuAOnrz0Ek,368873
|
184
|
-
khoj/interface/compiled/_next/static/chunks/9259-
|
182
|
+
khoj/interface/compiled/_next/static/chunks/9259-1172dbaca0515237.js,sha256=VPDpPt7r_7xpFB-OxF6mnr2dvKuwFFZltMkpnc98dc8,34824
|
185
183
|
khoj/interface/compiled/_next/static/chunks/9433.b1b5f5d050c43e3c.js,sha256=kMVC0Gg95UqjfQXpGvi-WUSg_kYp0SN7CTPTHxHxDBk,144858
|
186
184
|
khoj/interface/compiled/_next/static/chunks/94ca1967.1d9b42d929a1ee8c.js,sha256=4NgDGkBrtrBndP5tKblKoLgi9xpn4aDpIRH4kDop9Q0,1174520
|
187
185
|
khoj/interface/compiled/_next/static/chunks/9597.83583248dfbf6e73.js,sha256=CndAkafBFeXVlIIlItX7fkn5pQSFPUUULHUZUSnolSM,2121
|
188
186
|
khoj/interface/compiled/_next/static/chunks/964ecbae.51d6faf8801d15e6.js,sha256=c2w-Bc3Ru91uRlwy-IZZs8tMBZF84I7YvVGwG3gofhI,1175120
|
189
|
-
khoj/interface/compiled/_next/static/chunks/9665-
|
187
|
+
khoj/interface/compiled/_next/static/chunks/9665-391df1e5c51c960a.js,sha256=sVVdXfK3a6QbJk91E0uJm36r6jrjlRZiKNrjOizrEuA,105531
|
190
188
|
khoj/interface/compiled/_next/static/chunks/9822.34f293973c4e9b04.js,sha256=ACAvAnTrCQ8S3ZG6_E9553CU_IkV1o1_WMxM0QB0_eE,625
|
191
189
|
khoj/interface/compiled/_next/static/chunks/d3ac728e-953b1c3bad7316d7.js,sha256=tFfLIjQYovPQdirafRUiH8LETkTaViLMwHHxP2w8Iig,268405
|
192
190
|
khoj/interface/compiled/_next/static/chunks/ebbfb5c1-a73c51b6a41a5ff6.js,sha256=KWCCB4d3hTJ2OVXDThrHLjlbcgsckoG9UpBKRvbHPIk,83853
|
@@ -195,32 +193,34 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
|
|
195
193
|
khoj/interface/compiled/_next/static/chunks/main-98eb5932d6b2e3fa.js,sha256=AawaSgw7Q3CVsGFBX7BuL4bBqqXkJ4DJdGs-2cif97I,111273
|
196
194
|
khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
|
197
195
|
khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
|
198
|
-
khoj/interface/compiled/_next/static/chunks/webpack-
|
196
|
+
khoj/interface/compiled/_next/static/chunks/webpack-f4562fb8c56245c5.js,sha256=pP9sL1MiG6KcriDPnBZwl4kAVU2Lkd9X8Emo3uO_-AI,4905
|
199
197
|
khoj/interface/compiled/_next/static/chunks/app/layout-30e7fda7262713ce.js,sha256=U_kFR0Vycl8EfeY4NGizdPrucrgy5QnWZ4jqkkLJD20,712
|
200
|
-
khoj/interface/compiled/_next/static/chunks/app/page-
|
198
|
+
khoj/interface/compiled/_next/static/chunks/app/page-62fd13b0a48494ac.js,sha256=wJZVYNwX79UcwmcrR-cpb4R83v6osem5sLAlrxxfiVU,28058
|
201
199
|
khoj/interface/compiled/_next/static/chunks/app/_not-found/page-a834eddae3e235df.js,sha256=zElhiTkdu2JqrEvJ8Lrxh4HCyfLmPllBHHWOuDtrVlw,1755
|
202
200
|
khoj/interface/compiled/_next/static/chunks/app/agents/layout-15f370555e7dedaa.js,sha256=HyWLl_jg1y9awTHVQ3I5uYfSIgZA41LKYBAotZdvdtg,176
|
203
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/page-
|
201
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/page-fe28a8b1b3648a55.js,sha256=XGl98LrsBSL8_X6k-rcbMr-2wCDa8iZqKkSFncqmMUI,20706
|
204
202
|
khoj/interface/compiled/_next/static/chunks/app/automations/layout-0adc73dba7a04c11.js,sha256=0AMQ5ehL1tKHylKptt6MeQG-1lUCthfJ7WD1awlPafI,5147
|
205
|
-
khoj/interface/compiled/_next/static/chunks/app/automations/page-
|
203
|
+
khoj/interface/compiled/_next/static/chunks/app/automations/page-f9741f52969fb8f7.js,sha256=ZdI1p78mfR3laJaEunxnvf2RbsWWKr4K9YIMMsWRos8,34820
|
206
204
|
khoj/interface/compiled/_next/static/chunks/app/chat/layout-1c197d42e7acec53.js,sha256=lNlYBG7x90w6s7yhPG_Bby1lBeahu66UZI7eB3uWqWs,176
|
207
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/page-
|
205
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/page-1fdcaad519ca7b90.js,sha256=OiidwwXa9GiKIl6xXch5uzCPL0USU2rUba9p0Fo2ObM,7867
|
208
206
|
khoj/interface/compiled/_next/static/chunks/app/search/layout-acc9eb43c9962ee1.js,sha256=jxmuJHPXPPCHOUvSb2BLAo87UU__grS1QIrc3ONm6IM,5147
|
209
|
-
khoj/interface/compiled/_next/static/chunks/app/search/page-
|
207
|
+
khoj/interface/compiled/_next/static/chunks/app/search/page-c45f35cc3c12416e.js,sha256=Xj_0bjE6-EI0THTDvvbGT-afcEs8tfcMuNvBjbnrtxo,19515
|
210
208
|
khoj/interface/compiled/_next/static/chunks/app/settings/layout-d09d6510a45cd4bd.js,sha256=dIfmM5C_Al-Zh_uqaJmniSxjXbu3LqPzrEw4SQ7vs0I,6132
|
211
|
-
khoj/interface/compiled/_next/static/chunks/app/settings/page-
|
212
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-
|
213
|
-
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-
|
209
|
+
khoj/interface/compiled/_next/static/chunks/app/settings/page-f478749e6154f7e0.js,sha256=Orjhenk_0Wb7eBt5Solb0mq5MAiEkhlGr9j7toHljP0,26575
|
210
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6d7831aace573049.js,sha256=WyXYIOLDJakG6NDuv1Tvcwt-QiCR-0H-SRBI7rZiaaM,176
|
211
|
+
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-37328118de6cbefe.js,sha256=A6Tg7_VpBuLhCeNabQCvzr6D7PxW8m-KGSUlQ5Mj8io,4709
|
214
212
|
khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js,sha256=UqtikLsCsOWtDUJOW6Tuk9P-bV1V3MhYd3ghrQuEmfs,286
|
215
213
|
khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js,sha256=w_It3VzKT8O1M3CrJ_hZHsaU7M7dq3EAaVG8KvJ-fhU,253
|
216
214
|
khoj/interface/compiled/_next/static/css/089de1d8526b96e9.css,sha256=sjpmNlk7H2uKEYK9_DFccNq9J8V9uR799cS0yT-E7EI,4041
|
215
|
+
khoj/interface/compiled/_next/static/css/1b7f52b8da3a37bd.css,sha256=6rvUcPizcDIEWSVDBLLlC7oskuU_9q4mC-fPcJWENBw,30556
|
216
|
+
khoj/interface/compiled/_next/static/css/37a73b87f02df402.css,sha256=hp0vlekKu0K2eITR5YIqFmLHQPqV3JETFnRd_-Uh0mk,165
|
217
217
|
khoj/interface/compiled/_next/static/css/4e4e6a4a1c920d06.css,sha256=v52KOOFVYsJajTXsn7R2-B8ZU1dDPdmyN5J2a1d2dwk,1696
|
218
|
-
khoj/interface/compiled/_next/static/css/
|
219
|
-
khoj/interface/compiled/_next/static/css/
|
220
|
-
khoj/interface/compiled/_next/static/css/d6f22b1f76448451.css,sha256=nM-XgVlRAbKrJVNrA1ihSNvy_HVG56KH5BdnVK0B3ig,3106
|
218
|
+
khoj/interface/compiled/_next/static/css/d7448372b4f1e3b8.css,sha256=yQReokFtv7iD5FKw5rV6bZOMgyOIk-vONWFX_rbSRbY,3073599
|
219
|
+
khoj/interface/compiled/_next/static/css/d8518f90b895a246.css,sha256=pQMTg2IaEpC2QAAGo1Q7br2Qeb2b-EugbQok8WF6ZMI,6354
|
221
220
|
khoj/interface/compiled/_next/static/css/df4b47a2d0d85eae.css,sha256=EsBNJADFxaffgFa5iSYHPswGl9RAN9UdK3jD3d_W9Hs,1736
|
222
221
|
khoj/interface/compiled/_next/static/css/e4eb883b5265d372.css,sha256=6LaW-lQ_ZpgOJNWYwU1Q1egXZ1aqJDEuRj66oRCIU_E,17748
|
223
|
-
khoj/interface/compiled/_next/static/
|
222
|
+
khoj/interface/compiled/_next/static/ltlFhW848iOaVGtlI55WG/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
|
223
|
+
khoj/interface/compiled/_next/static/ltlFhW848iOaVGtlI55WG/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
224
224
|
khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2,sha256=IzKBwB_bpSGvO7C9aRv29Js-jAbZPRDI-D-P4H2P918,14508
|
225
225
|
khoj/interface/compiled/_next/static/media/6f22fce21a7c433c-s.woff2,sha256=T773llrgKNUxGlJzhaH0DUs2rcuRHU7bQpf0DTC4sSU,21812
|
226
226
|
khoj/interface/compiled/_next/static/media/77c207b095007c34-s.p.woff2,sha256=vk9tBKB084h1U8mxwJ5WNHDz_pdUVqE_xb9-ILVhKXY,168144
|
@@ -294,8 +294,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
|
|
294
294
|
khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
|
295
295
|
khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
|
296
296
|
khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
|
297
|
-
khoj/interface/compiled/agents/index.html,sha256=
|
298
|
-
khoj/interface/compiled/agents/index.txt,sha256=
|
297
|
+
khoj/interface/compiled/agents/index.html,sha256=QOibkNC2hAUwNrlKw6peF2nigGwBfLtoa7giF3-fBfI,16633
|
298
|
+
khoj/interface/compiled/agents/index.txt,sha256=gxoF9hxeEI29I6-VrdLy8inOjqaWO2wbsgF_ywK4WjI,7344
|
299
299
|
khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
|
300
300
|
khoj/interface/compiled/assets/icons/khoj_lantern.svg,sha256=I_8XP5X84gEOoCRhCRKOQn_GKZrz3SUBXct7WxHvY7c,8767
|
301
301
|
khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png,sha256=xDx0bbD-WMflgg8zck9oPIIuTIvywtuED2k7CjSQS4w,66194
|
@@ -310,16 +310,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
|
|
310
310
|
khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
|
311
311
|
khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
|
312
312
|
khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
|
313
|
-
khoj/interface/compiled/automations/index.html,sha256=
|
314
|
-
khoj/interface/compiled/automations/index.txt,sha256=
|
315
|
-
khoj/interface/compiled/chat/index.html,sha256=
|
316
|
-
khoj/interface/compiled/chat/index.txt,sha256=
|
317
|
-
khoj/interface/compiled/search/index.html,sha256=
|
318
|
-
khoj/interface/compiled/search/index.txt,sha256=
|
319
|
-
khoj/interface/compiled/settings/index.html,sha256=
|
320
|
-
khoj/interface/compiled/settings/index.txt,sha256=
|
321
|
-
khoj/interface/compiled/share/chat/index.html,sha256=
|
322
|
-
khoj/interface/compiled/share/chat/index.txt,sha256=
|
313
|
+
khoj/interface/compiled/automations/index.html,sha256=fP35NoWuKVQJNaMjYSU-ychNegX9rhGBJ2uVjfsM9Rk,52209
|
314
|
+
khoj/interface/compiled/automations/index.txt,sha256=ms4-dm_AMtym5cJv1forad0iW_QV0Jdaqhv1Ah0OGDk,7511
|
315
|
+
khoj/interface/compiled/chat/index.html,sha256=UhuIrR0T4Rdi_ItLJyYajgq48moDB66tevt5M3ZbR4o,51331
|
316
|
+
khoj/interface/compiled/chat/index.txt,sha256=3bGsYzhziKRaM4cqb_4KMRSwZHImY3BThRsG76tvikE,7934
|
317
|
+
khoj/interface/compiled/search/index.html,sha256=30QR1FkXwjop3-SHKHadb2RizrI9jtofdITBRYt6oKA,54332
|
318
|
+
khoj/interface/compiled/search/index.txt,sha256=69Vn7-V0IfDLgU8dUBDkh3Jp8sH4g-q9BJQzS0VCkYI,6926
|
319
|
+
khoj/interface/compiled/settings/index.html,sha256=4R1X5Cny6vSOhFbOjotE042h8bwd7UsZ3LNuPHcPeQk,50982
|
320
|
+
khoj/interface/compiled/settings/index.txt,sha256=amPiOSvsi49VY4bLvP5YdkLtrUooxoXw5C6mogC8e8o,7827
|
321
|
+
khoj/interface/compiled/share/chat/index.html,sha256=2kenbGe6LvoTNhq91RjkAjJ886saRmMWm7M3Igl4DWE,52171
|
322
|
+
khoj/interface/compiled/share/chat/index.txt,sha256=dHxGxvz9azDxu9EssVUuUd4HCuTElLXzlwpF1zRoFpU,8492
|
323
323
|
khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
|
324
324
|
khoj/interface/email/magic_link.html,sha256=372ESbTPKM9acekuZcOIKOw6kBl-KikFg_L9MOHqJkg,2094
|
325
325
|
khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
|
@@ -372,7 +372,7 @@ khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
372
372
|
khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
|
373
373
|
khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
374
374
|
khoj/processor/conversation/prompts.py,sha256=BP5hdWv70Zxh8mqIT9UShsi8wT78J_wRlPFZfOd_m0U,55550
|
375
|
-
khoj/processor/conversation/utils.py,sha256=
|
375
|
+
khoj/processor/conversation/utils.py,sha256=v8OfwjTi0dyGdA4eSwf9BgeCquhLM3gvB72T7wWCBJY,33012
|
376
376
|
khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
377
377
|
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=2jLTh-5WiGcsm1b5pla9UDjeTrPFfck2TOPPex5MN4c,8962
|
378
378
|
khoj/processor/conversation/anthropic/utils.py,sha256=En5uBBsxDBWb6QTs5g8nH_f2FVBX1uYK40i13fDRAhc,7327
|
@@ -385,7 +385,7 @@ khoj/processor/conversation/offline/utils.py,sha256=51McImxl6u1qgRYvMt7uzsgLGSLq
|
|
385
385
|
khoj/processor/conversation/offline/whisper.py,sha256=DJI-8y8DULO2cQ49m2VOvRyIZ2TxBypc15gM8O3HuMI,470
|
386
386
|
khoj/processor/conversation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
387
387
|
khoj/processor/conversation/openai/gpt.py,sha256=FFiMevjK_EiryjsZcYzpYMA-o3sgQpC87x1c6nKek8Y,8515
|
388
|
-
khoj/processor/conversation/openai/utils.py,sha256=
|
388
|
+
khoj/processor/conversation/openai/utils.py,sha256=mP_4ScOaeXbvve-Mwi-xf-X3zAGpVJnIGM28Q3Cs7qc,9046
|
389
389
|
khoj/processor/conversation/openai/whisper.py,sha256=zoEeK1LNCg_tzP4xzYi5vRPzNPGuDGzpkrkG7d1LUn4,447
|
390
390
|
khoj/processor/image/generate.py,sha256=YdyRsZP-jqep8cJlJhp8_KP-ZH5RcllAI-mp-GMks04,8954
|
391
391
|
khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -419,7 +419,7 @@ khoj/search_type/text_search.py,sha256=PZzJVCXpeBM795SIqiAKXAxgnCp1NIRiVikm040r1
|
|
419
419
|
khoj/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
420
420
|
khoj/utils/cli.py,sha256=IIZ2qH0v7Jmqw3JRH1K5EMp9TRze6en3GYsASnglMEM,3916
|
421
421
|
khoj/utils/config.py,sha256=aiOkH0je8A30DAGYTHMRePrgJonFv_i07_7CdhhhcdA,1805
|
422
|
-
khoj/utils/constants.py,sha256=
|
422
|
+
khoj/utils/constants.py,sha256=HN66YgIAx7Kho3hn0JUDkTjLvUirnPbOrlAlYNVlBBI,2188
|
423
423
|
khoj/utils/fs_syncer.py,sha256=5nqwAZqRk3Nwhkwd8y4IomTPZQmW32GwAqyMzal5KyY,9996
|
424
424
|
khoj/utils/helpers.py,sha256=EU5xfsrtpOOEZjY-suqxoP_rtIoNHyd3dgRr9pbq-fY,23984
|
425
425
|
khoj/utils/initialization.py,sha256=taKNGDWWI7Pmbff8MvMrKFd0ilvcBzcIN8V6W1nqrf8,13552
|
@@ -428,8 +428,8 @@ khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
|
|
428
428
|
khoj/utils/rawconfig.py,sha256=wfZTk-Aifb-_q9Yh-NPfh9LlLTioYG-yBqrasgvo4pc,5045
|
429
429
|
khoj/utils/state.py,sha256=axjZhnby8L3bY-N1VVoWgBH1RpFGK6U3_ZeNo1Kt7hs,1679
|
430
430
|
khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
|
431
|
-
khoj-1.35.
|
432
|
-
khoj-1.35.
|
433
|
-
khoj-1.35.
|
434
|
-
khoj-1.35.
|
435
|
-
khoj-1.35.
|
431
|
+
khoj-1.35.4.dev1.dist-info/METADATA,sha256=4NQqec_OT12LRAQPbDX3ii_S3DWQk64H1SiGE-LeQoA,7744
|
432
|
+
khoj-1.35.4.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
433
|
+
khoj-1.35.4.dev1.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
|
434
|
+
khoj-1.35.4.dev1.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
435
|
+
khoj-1.35.4.dev1.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4986],{74986:function(e,t,a){"use strict";a.d(t,{Z:function(){return ep}});var n=a(57437),s=a(42501),o=a.n(s),l=a(2265),r=a(91499),c=a.n(r),i=a(19983),d=a(13506),h=a.n(d),u=a(34040);a(2446);var m=a(5147),g=a(45178),f=a(66070),p=a(69304),x=a(57054),v=a(18848),j=a(42225);let w=new i.Z({html:!0,linkify:!0,typographer:!0});function b(e){let t=(0,j.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?v.Z.sanitize(w.render(t)):v.Z.sanitize(t)}(e),[o,r]=(0,l.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(x.J2,{open:o&&!e.showFullContent,onOpenChange:r,children:[(0,n.jsx)(x.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)(x.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 y(e){var t,a,s,o,r,c;let i=(0,j.Le)(".py","!w-4 h-4 text-muted-foreground flex-shrink-0"),d=v.Z.sanitize(e.code),[h,u]=(0,l.useState)(!1),[g,p]=(0,l.useState)(!1),w=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)},b=(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(),w(t)},onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),title:"Download file: ".concat(t.filename),children:(0,n.jsx)(m.b,{className:"w-4 h-4",weight:g?"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)(x.J2,{open:h&&!e.showFullContent,onOpenChange:u,children:[(0,n.jsx)(x.xo,{asChild:!0,children:(0,n.jsx)(f.Zb,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!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:[i,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(t=e.output_files)||void 0===t?void 0:t.length)>0?"artifacts":""]})]}),(0,n.jsx)("pre",{className:"text-xs pb-2 ".concat(e.showFullContent?"block overflow-x-auto":(null===(a=e.output_files)||void 0===a?void 0:a.length)>0?"hidden":"overflow-hidden line-clamp-3"),children:d}),(null===(s=e.output_files)||void 0===s?void 0:s.length)>0&&b(e.output_files,!1)]})})}),(0,n.jsx)(x.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:[i,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(o=e.output_files)||void 0===o?void 0:o.length)>0?"artifact":""]})]}),(null===(r=e.output_files)||void 0===r?void 0:r.length)>0&&b(null===(c=e.output_files)||void 0===c?void 0:c.slice(0,1),!0)||(0,n.jsx)("pre",{className:"text-xs border-t mt-1 pt-1 verflow-hidden line-clamp-10",children:d})]})})]})})}function C(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)(x.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,n.jsx)(x.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)(x.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 M(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)(y,{showFullContent:!1,...e,key:"code-".concat(t)})),o.map((e,t)=>(0,l.createElement)(b,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r.map((e,t)=>(0,l.createElement)(C,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),c&&(0,n.jsx)(N,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData,codeReferenceCardData:e.codeReferenceCardData})]})]})}function N(e){return e.notesReferenceCardData||e.onlineReferenceCardData?(0,n.jsxs)(p.yo,{children:[(0,n.jsxs)(p.aM,{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)(p.ue,{className:"overflow-y-scroll",children:[(0,n.jsxs)(p.Tu,{children:[(0,n.jsx)(p.bC,{children:"References"}),(0,n.jsx)(p.Ei,{children:"View all references for this response"})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[e.codeReferenceCardData.map((e,t)=>(0,l.createElement)(y,{showFullContent:!0,...e,key:"code-".concat(t)})),e.notesReferenceCardData.map((e,t)=>(0,l.createElement)(b,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,l.createElement)(C,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]}):null}var k=a(59199),_=a(62467),R=a(93893),E=a(2452),S=a(22105),I=a(52938),T=a(68950),L=a(63329),F=a(35099),D=a(46561),O=a(33758),B=a(58717),q=a(86018),U=a(51059),A=a(38513),Z=a(46732),z=a(47924),H=a(19841),W=a(88435),P=a(14308),G=a(84671),$=a(36663);let J=(0,a(30166).default)(()=>Promise.all([a.e(6555),a.e(7293),a.e(3727),a.e(9597)]).then(a.bind(a,99597)).then(e=>e.default),{loadableGenerated:{webpack:()=>[99597]},ssr:!1});function V(e){return(0,n.jsx)(l.Suspense,{fallback:(0,n.jsx)(P.Z,{}),children:(0,n.jsx)(J,{data:e.data})})}var Q=a(26110),K=a(49027),Y=a(7436),X=a(19378),ee=a(50656),et=a(75419),ea=a(41648),en=a(62869),es=e=>{let{chart:t}=e,[a,s]=(0,l.useState)(null),[o]=(0,l.useState)("mermaid-chart-".concat(Math.random().toString(12).substring(7))),r=(0,l.useRef)(null);(0,l.useEffect)(()=>{ee.Z.initialize({startOnLoad:!1}),ee.Z.parseError=e=>{let t;console.error("Mermaid errors:",e);try{t="string"==typeof e?JSON.parse(e):e}catch(a){t=(null==e?void 0:e.toString())||"Unknown error"}console.log("Mermaid error message:",t),"element is null"!==t.str?s("Something went wrong while rendering the diagram. Please try again later or downvote the message if the issue persists."):s(null)},ee.Z.contentLoaded()},[]);let c=async()=>{if(r.current)try{var e;let t=r.current.querySelector("svg");if(!t)throw Error("No SVG found");let[,,a,n]=(null===(e=t.getAttribute("viewBox"))||void 0===e?void 0:e.split(" ").map(Number))||[0,0,0,0],s=document.createElement("canvas");s.width=2*a,s.height=2*n;let o=s.getContext("2d");if(!o)throw Error("Failed to get canvas context");let l=new XMLSerializer().serializeToString(t),c=new Blob([l],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(c),d=new Image;d.src=i,await new Promise((e,t)=>{d.onload=()=>{o.scale(2,2),o.drawImage(d,0,0,a,n),s.toBlob(a=>{if(!a){t(Error("Failed to create blob"));return}let n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download="mermaid-diagram-".concat(Date.now(),".png"),s.click(),URL.revokeObjectURL(n),URL.revokeObjectURL(i),e(!0)},"image/png")},d.onerror=()=>t(Error("Failed to load SVG"))})}catch(e){console.error("Error exporting diagram:",e),s("Failed to export diagram")}};return(0,l.useEffect)(()=>{r.current&&(r.current.removeAttribute("data-processed"),ee.Z.run({nodes:[r.current]}).then(()=>{s(null)}).catch(e=>{let t;try{t="string"==typeof e?JSON.parse(e):e}catch(a){t=(null==e?void 0:e.toString())||"Unknown error"}console.log("Mermaid error message:",t),"element is null"!==t.str?s("Something went wrong while rendering the diagram. Please try again later or downvote the message if the issue persists."):s(null)}))},[t]),(0,n.jsxs)("div",{children:[a?(0,n.jsxs)("div",{className:"flex items-center gap-2 bg-red-100 border border-red-500 rounded-md p-3 mt-3 text-red-900 text-sm",children:[(0,n.jsx)(et.k,{className:"w-12 h-12"}),(0,n.jsxs)("span",{children:["Error rendering diagram: ",a]})]}):(0,n.jsx)("div",{id:o,ref:r,className:"mermaid",style:{width:"auto",height:"auto",boxSizing:"border-box",overflow:"auto"},children:t}),!a&&(0,n.jsxs)(en.z,{onClick:c,variant:"secondary",className:"mt-3",children:[(0,n.jsx)(ea.U,{className:"w-5 h-5"}),"Export as PNG"]})]})};let eo=new i.Z({html:!0,linkify:!0,typographer:!0});function el(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function er(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:()=>{el(t,a,"positive"),o(!0)},children:!0===s?(0,n.jsx)(_.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,n.jsx)(_.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:()=>{el(t,a,"negative"),o(!1)},children:!1===s?(0,n.jsx)(R.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,n.jsx)(R.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function ec(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)(E.a,{className:"".concat(s)}):a.includes("generating")?(0,n.jsx)(S.Z,{className:"".concat(s)}):a.includes("tools")?(0,n.jsx)(I.v,{className:"".concat(s)}):a.includes("notes")?(0,n.jsx)(T.g,{className:"".concat(s)}):a.includes("read")?(0,n.jsx)(L.f,{className:"".concat(s)}):a.includes("search")?(0,n.jsx)(F.Y,{className:"".concat(s)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,n.jsx)(D.u,{className:"".concat(s)}):a.includes("diagram")?(0,n.jsx)(O.j,{className:"".concat(s)}):a.includes("paint")?(0,n.jsx)(B.Y,{className:"".concat(s)}):a.includes("code")?(0,n.jsx)(q.E,{className:"".concat(s)}):(0,n.jsx)(E.a,{className:"".concat(s)})}(t?t[1]:"",e.primary?(0,G.oz)(e.agentColor):"text-gray-500"),s=v.Z.sanitize(eo.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"})]})}eo.use(h(),{inline:!0,code:!0});let ei=(0,l.forwardRef)((e,t)=>{var a,s;let o,r,i,d,h;let[m,g]=(0,l.useState)(!1),[f,p]=(0,l.useState)(!1),[x,w]=(0,l.useState)(""),[b,y]=(0,l.useState)(""),[C,N]=(0,l.useState)(!1),[_,R]=(0,l.useState)(!1),[E,S]=(0,l.useState)(""),[I,T]=(0,l.useState)(""),L=(0,l.useRef)(!1),F=(0,l.useRef)(null);async function D(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;N(!0);let a=O(t[0]);for(let e=0;e<t.length&&!L.current;e++){let n=a;e<t.length-1&&(a=O(t[e+1]));try{let e=await n,t=URL.createObjectURL(e);await function(e){return new Promise((t,a)=>{let n=new Audio(e);n.onended=t,n.onerror=a,n.play()})}(t)}catch(e){console.error("Error:",e);break}}N(!1),R(!1)}async function O(e){let t=await fetch("/api/chat/speech?text=".concat(encodeURIComponent(e)),{method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("Network response was not ok");return await t.blob()}(0,l.useEffect)(()=>{L.current=_},[_]),(0,l.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(F.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,$.Z)(F.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return F.current&&e.observe(F.current,{childList:!0}),()=>e.disconnect()},[F.current]),(0,l.useEffect)(()=>{let t=e.chatMessage.message;e.chatMessage.excalidrawDiagram&&S(e.chatMessage.excalidrawDiagram),e.chatMessage.mermaidjsDiagram&&T(e.chatMessage.mermaidjsDiagram),t=t.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),t=(0,k.AQ)(t,e.chatMessage.codeContext),e.chatMessage.codeContext&&Object.entries(e.chatMessage.codeContext).forEach(e=>{var a;let[n,s]=e;null===(a=s.results.output_files)||void 0===a||a.forEach(e=>{(e.filename.endsWith(".png")||e.filename.endsWith(".jpg"))&&!t.includes(")&&(t+="\n\n.concat(e.b64_data,")"))})});let a=t,n=t;if(e.chatMessage.images&&e.chatMessage.images.length>0){let t=e.chatMessage.images.map(e=>{let t=e.startsWith("data%3Aimage")?decodeURIComponent(e):e;return v.Z.sanitize(t)}),s=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>");a="".concat(s,"\n\n").concat(a),n="".concat(l).concat(n)}w(a);let s=eo.render(n);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),y(v.Z.sanitize(s))},[e.chatMessage.message,e.chatMessage.images,e.chatMessage.intent]),(0,l.useEffect)(()=>{m&&setTimeout(()=>{g(!1)},2e3)},[m]),(0,l.useEffect)(()=>{F.current&&(F.current.querySelectorAll("pre > .hljs").forEach(e=>{if(!e.querySelector("".concat(c().codeCopyButton))){let t=document.createElement("button"),a=(0,n.jsx)(U.w,{size:24});(0,u.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)(A.J,{size:24});(0,u.createRoot)(t).render(s)}),e.prepend(t)}}),(0,$.Z)(F.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]}))},[b,f,F]);let B=async t=>{let a=t.turnId||e.turnId;(await fetch("/api/chat/conversation/message",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:e.conversationId,turn_id:a})})).ok?e.onDeleteMessage(a):console.error("Failed to delete message")},q=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=>p(!1),onMouseEnter:e=>p(!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)(Q.Vq,{children:[(0,n.jsx)(Q.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,j.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,Y.xq)(e.size),")"]})]})}),(0,n.jsxs)(Q.cZ,{children:[(0,n.jsx)(Q.fK,{children:(0,n.jsx)(K.$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)(Q.Be,{children:(0,n.jsx)(X.x,{className:"h-72 w-full rounded-md break-words break-all text-wrap",children:e.content})})]})]},t))}),(0,n.jsx)("div",{ref:F,className:c().chatMessage,dangerouslySetInnerHTML:{__html:b}}),E&&(0,n.jsx)(V,{data:E}),I&&(0,n.jsx)(es,{chart:I})]}),(0,n.jsx)("div",{className:c().teaserReferencesContainer,children:(0,n.jsx)(M,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:q.notesReferenceCardData,onlineReferenceCardData:q.onlineReferenceCardData,codeReferenceCardData:q.codeReferenceCardData})}),(0,n.jsx)("div",{className:c().chatFooter,children:(f||e.isMobileWidth||e.isLastMessage||C)&&(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(),h=i.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(d," on ").concat(h)),className:"text-gray-400 relative top-0 left-4",children:function(e){e.endsWith("Z")||(e+="Z");let t=new Date(e),a=new Date().getTime()-t.getTime();return a<6e4?"Just now":a<36e5?"".concat(Math.round(a/6e4),"m ago"):a<864e5?"".concat(Math.round(a/36e5),"h ago"):"".concat(Math.round(a/864e5),"d ago")}(e.chatMessage.created)}),(0,n.jsxs)("div",{className:"".concat(c().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(C?_?(0,n.jsx)(P.l,{iconClassName:"p-0",className:"m-0"}):(0,n.jsx)("button",{title:"Pause Speech",onClick:e=>R(!0),children:(0,n.jsx)(Z.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,n.jsx)("button",{title:"Speak",onClick:e=>D(),children:(0,n.jsx)(z.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:()=>B(e.chatMessage),children:(0,n.jsx)(H.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(x),g(!0)},children:m?(0,n.jsx)(W.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,n.jsx)(W.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,n.jsx)(er,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,n.jsx)(er,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});ei.displayName="ChatMessage";var ed=a(4243),eh=a(77168),eu=a(15483),em=a(81103),eg=e=>{let{name:t,avatar:a,link:s,description:o}=e;return(0,n.jsx)("div",{className:"relative group flex",children:(0,n.jsx)(em.pn,{children:(0,n.jsxs)(em.u,{delayDuration:0,children:[(0,n.jsx)(em.aJ,{asChild:!0,children:(0,n.jsxs)(en.z,{variant:"ghost",className:"flex items-center justify-center",children:[a,(0,n.jsx)("div",{children:t})]})}),(0,n.jsx)(em._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 ef(e){let t=e.trainOfThought.length-1,[a,s]=(0,l.useState)(e.completed);return(0,l.useEffect)(()=>{e.completed&&s(!0)},[e.completed]),(0,n.jsxs)("div",{className:"".concat(a?"":o().trainOfThought+" shadow-sm"),children:[!e.completed&&(0,n.jsx)(P.l,{className:"float-right"}),e.completed&&(a?(0,n.jsx)(en.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)(en.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)(ed.a,{size:16,className:"mr-1"}),"Close"]})),!a&&e.trainOfThought.map((a,s)=>(0,n.jsx)(ec,{message:a,primary:s===t&&e.lastMessage&&!e.completed,agentColor:e.agentColor},"train-".concat(s)))]},e.keyId)}function ep(e){var t,a,s,r,c,i,d,h,u;let[m,g]=(0,l.useState)(null),[f,p]=(0,l.useState)(0),[x,v]=(0,l.useState)(!0),[w,b]=(0,l.useState)(null),y=(0,l.useRef)(null),C=(0,l.useRef)(null),M=(0,l.useRef)(null),N=(0,l.useRef)(null),[k,_]=(0,l.useState)(null),[R,E]=(0,l.useState)(!1),[S,I]=(0,l.useState)(!0),T=(0,Y.IC)(),L="[data-radix-scroll-area-viewport]";(0,l.useEffect)(()=>{var e;let t=null===(e=C.current)||void 0===e?void 0:e.querySelector(L);if(!t)return;let a=()=>{let{scrollTop:e,scrollHeight:a,clientHeight:n}=t;I(a-(e+n)<=50)};return t.addEventListener("scroll",a),()=>t.removeEventListener("scroll",a)},[]),(0,l.useEffect)(()=>{e.incomingMessages&&e.incomingMessages.length>0&&S&&D()},[e.incomingMessages,S]),(0,l.useEffect)(()=>{m&&m.chat&&m.chat.length>0&&f<2&&requestAnimationFrame(()=>{var e;null===(e=M.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"})})},[m,f]),(0,l.useEffect)(()=>{if(!x||R)return;let t=new IntersectionObserver(t=>{t[0].isIntersecting&&x&&(E(!0),function(t){if(!x||R)return;let a=(t+1)*10,n="";if(e.conversationId)n="/api/chat/history?client=web&conversation_id=".concat(encodeURIComponent(e.conversationId),"&n=").concat(a);else{if(!e.publicConversationSlug)return;n="/api/chat/share/history?client=web&public_conversation_slug=".concat(e.publicConversationSlug,"&n=").concat(a)}fetch(n).then(e=>e.json()).then(a=>{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),E(!1);return}e.setAgent(a.response.agent),g(a.response),E(!1),0===t?D(!0):F()}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),E(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(f))},{threshold:1});return y.current&&t.observe(y.current),()=>t.disconnect()},[x,f,R]),(0,l.useEffect)(()=>{v(!0),E(!1),p(0),g(null)},[e.conversationId]),(0,l.useEffect)(()=>{if(e.incomingMessages){let t=e.incomingMessages[e.incomingMessages.length-1];t&&!t.completed&&(_(e.incomingMessages.length-1),e.setTitle(t.rawQuery),t.turnId&&b(t.turnId))}},[e.incomingMessages]);let F=()=>{var e;let t=null===(e=C.current)||void 0===e?void 0:e.querySelector(L);requestAnimationFrame(()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"}),null==t||t.scrollBy({behavior:"smooth",top:-150})})},D=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=null===(e=C.current)||void 0===e?void 0:e.querySelector(L);requestAnimationFrame(()=>{null==a||a.scrollTo({top:a.scrollHeight,behavior:t?"auto":"smooth"})}),I(!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)(X.x,{className:"h-[73vh] relative",ref:C,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"".concat(o().chatHistory," ").concat(e.customClassName),children:[(0,n.jsx)("div",{ref:y,style:{height:"1px"},children:R&&(0,n.jsx)(P.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)(ef,{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)(ei,{ref:a===m.chat.length-2?M:a===m.chat.length-(f-1)*10?N:null,isMobileWidth:T,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:w)&&void 0!==i?i:void 0;return(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(ei,{isMobileWidth:T,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)(ef,{trainOfThought:t.trainOfThought,lastMessage:a===k,agentColor:(null==m?void 0:null===(o=m.agent)||void 0===o?void 0:o.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:t.completed},"".concat(a,"trainOfThought")),(0,n.jsx)(ei,{isMobileWidth:T,chatMessage:{message:t.rawResponse,context:t.context,onlineContext:t.onlineContext,codeContext:t.codeContext,created:t.timestamp,by:"khoj",automationId:"",rawQuery:t.rawQuery,intent:{type:t.intentType||"",query:t.rawQuery,"memory-type":"","inferred-queries":t.inferredQueries||[]},conversationId:e.conversationId,images:t.generatedImages,queryFiles:t.generatedFiles,mermaidjsDiagram:t.generatedMermaidjsDiagram,turnId:d},conversationId:e.conversationId,turnId:d,onDeleteMessage: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)(ei,{isMobileWidth:T,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)(eg,{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,j.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)(eh.v,{}),description:m&&m.agent&&(null===(h=m.agent)||void 0===h?void 0:h.persona)?null===(u=m.agent)||void 0===u?void 0:u.persona:"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:!S&&(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:()=>{D(),I(!0)},children:(0,n.jsx)(eu.K,{size:24})})})]})}):null}},42501:function(e){e.exports={chatHistory:"chatHistory_chatHistory__CoaVT",agentIndicator:"chatHistory_agentIndicator__wOU1f",trainOfThought:"chatHistory_trainOfThought__mMWSR"}},91499:function(e){e.exports={chatMessageContainer:"chatMessage_chatMessageContainer__sAivf",chatMessageWrapper:"chatMessage_chatMessageWrapper__u5m8A",khojfullHistory:"chatMessage_khojfullHistory__NPu2l",youfullHistory:"chatMessage_youfullHistory__ioyfH",you:"chatMessage_you__6GUC4",khoj:"chatMessage_khoj__cjWON",khojChatMessage:"chatMessage_khojChatMessage__BabQz",emptyChatMessage:"chatMessage_emptyChatMessage__J9JRn",imagesContainer:"chatMessage_imagesContainer__HTRjT",imageWrapper:"chatMessage_imageWrapper__DF92M",author:"chatMessage_author__muRtC",chatFooter:"chatMessage_chatFooter__0vR8s",chatButtons:"chatMessage_chatButtons__Lbk8T",codeCopyButton:"chatMessage_codeCopyButton__Y_Ujv",feedbackButtons:"chatMessage_feedbackButtons___Brdy",copyButton:"chatMessage_copyButton__jd7q7",trainOfThought:"chatMessage_trainOfThought__mR2Gg",primary:"chatMessage_primary__WYPEb",trainOfThoughtElement:"chatMessage_trainOfThoughtElement__le_bC"}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,3317,8459],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|