khoj 1.36.6.dev8__py3-none-any.whl → 1.36.7.dev7__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.
Files changed (36) hide show
  1. khoj/database/adapters/__init__.py +14 -0
  2. khoj/interface/compiled/404/index.html +2 -2
  3. khoj/interface/compiled/_next/static/chunks/app/agents/{layout-447b58869479276c.js → layout-64b81f8eeac13427.js} +1 -1
  4. khoj/interface/compiled/_next/static/chunks/app/chat/{layout-4d0b1ba93124fccb.js → layout-9e151fb837f53026.js} +1 -1
  5. khoj/interface/compiled/_next/static/chunks/app/settings/page-c961681e308a334b.js +1 -0
  6. khoj/interface/compiled/_next/static/chunks/{webpack-d605f0467a332031.js → webpack-f813971dd4615afd.js} +1 -1
  7. khoj/interface/compiled/agents/index.html +2 -2
  8. khoj/interface/compiled/agents/index.txt +3 -3
  9. khoj/interface/compiled/automations/index.html +2 -2
  10. khoj/interface/compiled/automations/index.txt +3 -3
  11. khoj/interface/compiled/chat/index.html +2 -2
  12. khoj/interface/compiled/chat/index.txt +3 -3
  13. khoj/interface/compiled/index.html +2 -2
  14. khoj/interface/compiled/index.txt +2 -2
  15. khoj/interface/compiled/search/index.html +2 -2
  16. khoj/interface/compiled/search/index.txt +2 -2
  17. khoj/interface/compiled/settings/index.html +2 -2
  18. khoj/interface/compiled/settings/index.txt +5 -5
  19. khoj/interface/compiled/share/chat/index.html +2 -2
  20. khoj/interface/compiled/share/chat/index.txt +2 -2
  21. khoj/processor/conversation/openai/utils.py +11 -0
  22. khoj/routers/api_content.py +37 -3
  23. {khoj-1.36.6.dev8.dist-info → khoj-1.36.7.dev7.dist-info}/METADATA +1 -1
  24. {khoj-1.36.6.dev8.dist-info → khoj-1.36.7.dev7.dist-info}/RECORD +35 -35
  25. khoj/interface/compiled/_next/static/chunks/app/settings/page-9939a20613b25901.js +0 -1
  26. /khoj/interface/compiled/_next/static/{BY2zqRvbb80d6NZZlApxn → bzWTm19u6qe1y98Xfrqoo}/_buildManifest.js +0 -0
  27. /khoj/interface/compiled/_next/static/{BY2zqRvbb80d6NZZlApxn → bzWTm19u6qe1y98Xfrqoo}/_ssgManifest.js +0 -0
  28. /khoj/interface/compiled/_next/static/chunks/{1915-4b7980a58fb630d6.js → 1915-233ac8a122732d6b.js} +0 -0
  29. /khoj/interface/compiled/_next/static/chunks/{2117-f99825f0a867a42d.js → 2117-ce1f0a4598f5e4fe.js} +0 -0
  30. /khoj/interface/compiled/_next/static/chunks/{4363-ac51bce40b6fc313.js → 4363-9870bda67c2cf031.js} +0 -0
  31. /khoj/interface/compiled/_next/static/chunks/{4447-30959771ff58d99d.js → 4447-6e47461d1100c3cc.js} +0 -0
  32. /khoj/interface/compiled/_next/static/chunks/{8667-adbe6017a66cef10.js → 8667-8136f74e9a086fca.js} +0 -0
  33. /khoj/interface/compiled/_next/static/chunks/{9259-5be50737cfe989bc.js → 9259-fa40e7cf2ca28e04.js} +0 -0
  34. {khoj-1.36.6.dev8.dist-info → khoj-1.36.7.dev7.dist-info}/WHEEL +0 -0
  35. {khoj-1.36.6.dev8.dist-info → khoj-1.36.7.dev7.dist-info}/entry_points.txt +0 -0
  36. {khoj-1.36.6.dev8.dist-info → khoj-1.36.7.dev7.dist-info}/licenses/LICENSE +0 -0
@@ -11,7 +11,7 @@ khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  khoj/database/admin.py,sha256=mpfBHaeRzzGRZwaKcvwlBW8v8Z90RMq0SmxJQXsHmW4,12907
12
12
  khoj/database/apps.py,sha256=pM4tkX5Odw4YW_hLLKK8Nd5kqGddf1en0oMCea44RZw,153
13
13
  khoj/database/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
14
- khoj/database/adapters/__init__.py,sha256=muhwfGbZfDRlp9_GSWJGu9GVNUM_a1J-65U7JlJdqlE,72455
14
+ khoj/database/adapters/__init__.py,sha256=gaxTPlAkM6guzk_LzrjalG2IzPZYeIWvzIs3FQ_CueY,72963
15
15
  khoj/database/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  khoj/database/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  khoj/database/management/commands/change_default_model.py,sha256=6QXJttG58gpU7vZApQEeEPVNAuhjU2xa6_BwJsfz320,4877
@@ -125,25 +125,25 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
125
125
  khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
126
126
  khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
127
127
  khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
128
- khoj/interface/compiled/index.html,sha256=ozrmrECY_k0smEKJQgiehD4Djh00EFjmzMbGSakbytU,53009
129
- khoj/interface/compiled/index.txt,sha256=MmHw-gQJIJyNXDjRotQbOENV5akTCdSjxO96ZjIO_hw,7584
128
+ khoj/interface/compiled/index.html,sha256=cA5HITDKqc1ZubxWQQwFpcci2u1UmIs0-tCOYxpnwmY,53009
129
+ khoj/interface/compiled/index.txt,sha256=WN0qhJqh-qiFWfu1M6amdeYGdLcHoiTlKFrxNdZ2BXM,7584
130
130
  khoj/interface/compiled/khoj.webmanifest,sha256=9wOK2BMS6xH5NKd2eaUgTLg9WepIxB2K2U33KU89LD8,2543
131
131
  khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
132
132
  khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
133
133
  khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
134
134
  khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
135
135
  khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
136
- khoj/interface/compiled/404/index.html,sha256=CTuYiJWyBzYzDYT6U-a3pMgVscXriov67A0fpkcRONE,17063
137
- khoj/interface/compiled/_next/static/BY2zqRvbb80d6NZZlApxn/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
138
- khoj/interface/compiled/_next/static/BY2zqRvbb80d6NZZlApxn/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
136
+ khoj/interface/compiled/404/index.html,sha256=9P9D-fiW1d6dxqa74JgU7nBmherK_ulg4MFdlC7xAlk,17063
137
+ khoj/interface/compiled/_next/static/bzWTm19u6qe1y98Xfrqoo/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
138
+ khoj/interface/compiled/_next/static/bzWTm19u6qe1y98Xfrqoo/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
139
139
  khoj/interface/compiled/_next/static/chunks/0d8bff65.4b1018183a8be7c2.js,sha256=qp6JgPDl-9sVe9u6w1oloumr9QiTjRzcZAm19Ov1Yns,268308
140
140
  khoj/interface/compiled/_next/static/chunks/1199-80c79778c44ad4ec.js,sha256=3btqNHOBc7x2FZVh2IyCUN8uLjRH4eWVfmzdO4KYJqc,216338
141
141
  khoj/interface/compiled/_next/static/chunks/1243.ea2826fb35adb15a.js,sha256=Y6ceAwyTH4HSGDvBRoBB-RVXRCzGGr8NSPcspYF5OM8,182
142
142
  khoj/interface/compiled/_next/static/chunks/133.392ae90c3b2a67f2.js,sha256=IK-mb9ZlF6uJUdU8AuXsppc99tFL8svJvZtKNZGNtcY,411
143
143
  khoj/interface/compiled/_next/static/chunks/1592.b069bdb7aaddd2eb.js,sha256=VUaP2gjX3W9tA9pOH_VIPG_2BIg7Wk1AICrfU5iHgrk,71096
144
- khoj/interface/compiled/_next/static/chunks/1915-4b7980a58fb630d6.js,sha256=qArqL3leavWRcZkX4ZuWgemtKnmV6c-_yrNtMu_8SeY,11277
144
+ khoj/interface/compiled/_next/static/chunks/1915-233ac8a122732d6b.js,sha256=qArqL3leavWRcZkX4ZuWgemtKnmV6c-_yrNtMu_8SeY,11277
145
145
  khoj/interface/compiled/_next/static/chunks/2069.f060659791c0c484.js,sha256=C_oat_BkZcLOHsyJlNN_5I55fB7ee1zkkZ9FT5zOzn4,186
146
- khoj/interface/compiled/_next/static/chunks/2117-f99825f0a867a42d.js,sha256=vLJikd2wJoZNWopR64Y4ccsOU2TNfdkBxVyfrgTHk10,123994
146
+ khoj/interface/compiled/_next/static/chunks/2117-ce1f0a4598f5e4fe.js,sha256=vLJikd2wJoZNWopR64Y4ccsOU2TNfdkBxVyfrgTHk10,123994
147
147
  khoj/interface/compiled/_next/static/chunks/2170.45431769330fa5b7.js,sha256=C7Puu9x18DhdR5Sh8XXvTzPdP_HTK6WhsJDNW-NoB7o,24019
148
148
  khoj/interface/compiled/_next/static/chunks/2327-02e86a50c65e575a.js,sha256=f72kgtwEDLLbY1POl61TVUOso_nwA7LkIHHQQPSVN6c,127346
149
149
  khoj/interface/compiled/_next/static/chunks/2509-79b3ce8040bc0bcf.js,sha256=8TxAAoyq-sz9TuOnk_B1WeqmTh-tBo6XN7c-l-4QJxo,18613
@@ -157,9 +157,9 @@ khoj/interface/compiled/_next/static/chunks/3861-8662fce65c02717d.js,sha256=TuGM
157
157
  khoj/interface/compiled/_next/static/chunks/4299.2aaa569416cfc208.js,sha256=3HJ8OvB9BDJW0-qCBd1eUmChoBAxaCX6R81ftWZ1CHw,21659
158
158
  khoj/interface/compiled/_next/static/chunks/4327.238d15c09a039b8b.js,sha256=mZa4Oyltc9JrokqnalRTjzcvWgX4S3i3REXiHzRYH1o,296536
159
159
  khoj/interface/compiled/_next/static/chunks/4357-73c05a7c905ffc9f.js,sha256=5FPNF2yXaXxgumg4KfPWQQcOrqeF0RnsTTS0jsviAyQ,45294
160
- khoj/interface/compiled/_next/static/chunks/4363-ac51bce40b6fc313.js,sha256=qU1gc45CPBR1YjIs5CFGVLPabPCBiWs72sQMA0A4Hu0,467907
160
+ khoj/interface/compiled/_next/static/chunks/4363-9870bda67c2cf031.js,sha256=qU1gc45CPBR1YjIs5CFGVLPabPCBiWs72sQMA0A4Hu0,467907
161
161
  khoj/interface/compiled/_next/static/chunks/4415.e0c0da5eedae4dd7.js,sha256=DEf8HPEstDFvBflOU0j0ilYHlVJilGcGsLgUx524FZQ,25544
162
- khoj/interface/compiled/_next/static/chunks/4447-30959771ff58d99d.js,sha256=Uw8IrcKmVR3wba-FB9maP9i9l_kAYg59r8PN1T_ipQE,19621
162
+ khoj/interface/compiled/_next/static/chunks/4447-6e47461d1100c3cc.js,sha256=Uw8IrcKmVR3wba-FB9maP9i9l_kAYg59r8PN1T_ipQE,19621
163
163
  khoj/interface/compiled/_next/static/chunks/4610.a1e7f40a759ed2aa.js,sha256=b5JDRPyQv2MsibYoK2TDT76LMAoDTRzFM-fa81mJxow,14102
164
164
  khoj/interface/compiled/_next/static/chunks/4650.41f041da0ad365ad.js,sha256=EZeckNrMc3ZUX_LexPgaeusEq-dGBNEPm7nc5nvb4OM,33902
165
165
  khoj/interface/compiled/_next/static/chunks/4872.5422e8324272ab40.js,sha256=fXqb_gUYEnKRgeI3AJuAG6kKAOlVkVXyndmNkhetCyo,11176
@@ -184,12 +184,12 @@ khoj/interface/compiled/_next/static/chunks/7953.f6fc335a23efb959.js,sha256=8XIn
184
184
  khoj/interface/compiled/_next/static/chunks/8155-ad130153ddcc930f.js,sha256=BSWqUU63y8D2q0Pz-GpIcYOKSmdbg0M93c1oLn5IvzM,1616874
185
185
  khoj/interface/compiled/_next/static/chunks/8254.3145a4fbdcfdca46.js,sha256=sur8InabGfvh1HqNQhwBssc1tCPae_WKQ-efoYU1Q8A,412
186
186
  khoj/interface/compiled/_next/static/chunks/8400.c95e4e79bcd79a56.js,sha256=3SlFozKtF4DYQYPT3hB5M7VEm3e_W71kC19JgADz-3k,19864
187
- khoj/interface/compiled/_next/static/chunks/8667-adbe6017a66cef10.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
187
+ khoj/interface/compiled/_next/static/chunks/8667-8136f74e9a086fca.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
188
188
  khoj/interface/compiled/_next/static/chunks/8673.be44c4d9e4f1d084.js,sha256=jiE4xU-TbkVC4R60SIgxwdo31T9mbdVBVuhP4H60i94,18629
189
189
  khoj/interface/compiled/_next/static/chunks/8698.a088118fef40d302.js,sha256=mrK-3ZahVSF7sZij3l-PyXKxp-ccXU9orykXDc7YzsM,180
190
190
  khoj/interface/compiled/_next/static/chunks/9022.33974a513a281fd2.js,sha256=6NmDzRbI0NyTisUT04sq9M0czUqvlwZoV4E7Onp-55Q,57192
191
191
  khoj/interface/compiled/_next/static/chunks/90542734.fecd4dc1a89ed166.js,sha256=gurZjtKkwAEgw5rTMSeoufe1tvqfUjayaBuAOnrz0Ek,368873
192
- khoj/interface/compiled/_next/static/chunks/9259-5be50737cfe989bc.js,sha256=VPDpPt7r_7xpFB-OxF6mnr2dvKuwFFZltMkpnc98dc8,34824
192
+ khoj/interface/compiled/_next/static/chunks/9259-fa40e7cf2ca28e04.js,sha256=VPDpPt7r_7xpFB-OxF6mnr2dvKuwFFZltMkpnc98dc8,34824
193
193
  khoj/interface/compiled/_next/static/chunks/9334-3047e20b503f086b.js,sha256=_TPWqSCbf86Ig1vIEDRLXzloZujDoxpoEWhRPUf6b5U,29065
194
194
  khoj/interface/compiled/_next/static/chunks/9433.b1b5f5d050c43e3c.js,sha256=kMVC0Gg95UqjfQXpGvi-WUSg_kYp0SN7CTPTHxHxDBk,144858
195
195
  khoj/interface/compiled/_next/static/chunks/94ca1967.1d9b42d929a1ee8c.js,sha256=4NgDGkBrtrBndP5tKblKoLgi9xpn4aDpIRH4kDop9Q0,1174520
@@ -203,20 +203,20 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
203
203
  khoj/interface/compiled/_next/static/chunks/main-98eb5932d6b2e3fa.js,sha256=AawaSgw7Q3CVsGFBX7BuL4bBqqXkJ4DJdGs-2cif97I,111273
204
204
  khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
205
205
  khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
206
- khoj/interface/compiled/_next/static/chunks/webpack-d605f0467a332031.js,sha256=yLi4xd6abKp_dBJFJHQlkT-81YwQxKqaVZpoAuDGywo,4905
206
+ khoj/interface/compiled/_next/static/chunks/webpack-f813971dd4615afd.js,sha256=BxfbXhhHseTjy3CiQjrugsUnQwotUA_ykKLuJlmrXVE,4905
207
207
  khoj/interface/compiled/_next/static/chunks/app/layout-26139159e500852a.js,sha256=Hde2KNhdgq6Ep56YPUN2BNsIF6ZeP_OaPExvRdbHzWY,3983
208
208
  khoj/interface/compiled/_next/static/chunks/app/page-642bd02fc4f16606.js,sha256=HfaYpMMaQb1lvglI28BUdURHyKJatVK9l0BmiGkxzbU,30989
209
209
  khoj/interface/compiled/_next/static/chunks/app/_not-found/page-0ec97c4970898f2d.js,sha256=zElhiTkdu2JqrEvJ8Lrxh4HCyfLmPllBHHWOuDtrVlw,1755
210
- khoj/interface/compiled/_next/static/chunks/app/agents/layout-447b58869479276c.js,sha256=n_axkmaGYYuoGPbMYVcVq8WY5Rs6ekbXDz8lf00viiU,3455
210
+ khoj/interface/compiled/_next/static/chunks/app/agents/layout-64b81f8eeac13427.js,sha256=7NVaT4qQJXeQeOo9B9BlzxnpPoXS6RVCyRbc_FuUW44,3455
211
211
  khoj/interface/compiled/_next/static/chunks/app/agents/page-2f55f9d0da49bf31.js,sha256=YfMfLZm-gCpN-RuY3k6d4MqC-z3OH5JUfboIAEGjKiE,18314
212
212
  khoj/interface/compiled/_next/static/chunks/app/automations/layout-7f5c33a70e46b3af.js,sha256=s2wHeQ-ai9rKyU9EjOGY1Yo51L4ZEkjLtML85BqN3Zc,5143
213
213
  khoj/interface/compiled/_next/static/chunks/app/automations/page-d0a630a2b4ecc41d.js,sha256=y85e8MYfHrQamWV0RifbqbZS1e8ZgNIv4JLBFhjiE40,34831
214
- khoj/interface/compiled/_next/static/chunks/app/chat/layout-4d0b1ba93124fccb.js,sha256=Q6_-NdgL0zZQSea29s9B3jiR4sI6LK5QUUyDMJnr6lc,3455
214
+ khoj/interface/compiled/_next/static/chunks/app/chat/layout-9e151fb837f53026.js,sha256=ujqnyAx3O1ismASoR_VZ13aeYvgJCV4OzM388oXN4vw,3455
215
215
  khoj/interface/compiled/_next/static/chunks/app/chat/page-53ba9f1424043383.js,sha256=9CaQOIUwvdnXCcBQDvk2GFFY-zrPRZo7OqO_-hVAGh0,28278
216
216
  khoj/interface/compiled/_next/static/chunks/app/search/layout-ff081947c70ea9b7.js,sha256=d1Pm-ajEi75UE8Qr9fGFfWmVAUyN5TZOQmbqhxJN9TI,3455
217
217
  khoj/interface/compiled/_next/static/chunks/app/search/page-7c80e369ee1cdfad.js,sha256=AvKcJ5DB0716p6JybfYLuz0HQViORoCaLIhXCiHeOhw,19521
218
218
  khoj/interface/compiled/_next/static/chunks/app/settings/layout-bef0e00bb3873a84.js,sha256=_2tVtyNj1Ko1OEDD6hQdeU1Qb0JUlLTlXANv2N_E2ds,9401
219
- khoj/interface/compiled/_next/static/chunks/app/settings/page-9939a20613b25901.js,sha256=c5til37W97PYMXeofhOpqLamj8LRwGLIAhmR3bCSGyQ,26575
219
+ khoj/interface/compiled/_next/static/chunks/app/settings/page-c961681e308a334b.js,sha256=VghBFxL6n10FU_mEVl7ed7EK9kjqMqEGpzlF6TftYE0,26582
220
220
  khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-94a33aa0eae034fc.js,sha256=XL3LoKIkQTWSZJEcS1SXZYmaLrNUYnPvhH-BqecpQKo,3455
221
221
  khoj/interface/compiled/_next/static/chunks/app/share/chat/page-6253896a84300e9b.js,sha256=9NAZZ-zdpKasxO_vK9gZnDFbBZy_zsvmZifP2ZL2DYU,4826
222
222
  khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js,sha256=UqtikLsCsOWtDUJOW6Tuk9P-bV1V3MhYd3ghrQuEmfs,286
@@ -302,8 +302,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
302
302
  khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
303
303
  khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
304
304
  khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
305
- khoj/interface/compiled/agents/index.html,sha256=XGPQMJ7382gE49SnDGCcLbFpgMoGLCcLOO44tTOtcAc,19256
306
- khoj/interface/compiled/agents/index.txt,sha256=JYoUO0VC8Tvf5tZaaEp9qDdhXb0tb-r8Jkz7xe1nqiU,8706
305
+ khoj/interface/compiled/agents/index.html,sha256=uTk0hKEOP_MGOuWGTIcl4yzCoCI5dQq3jL0WWVXqeO0,19256
306
+ khoj/interface/compiled/agents/index.txt,sha256=py0pYynqjKWzFQ3zP03sXCJwEXweJFwsb0KV6VMH1TM,8706
307
307
  khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
308
308
  khoj/interface/compiled/assets/icons/khoj_lantern.svg,sha256=I_8XP5X84gEOoCRhCRKOQn_GKZrz3SUBXct7WxHvY7c,8767
309
309
  khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png,sha256=xDx0bbD-WMflgg8zck9oPIIuTIvywtuED2k7CjSQS4w,66194
@@ -318,16 +318,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
318
318
  khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
319
319
  khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
320
320
  khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
321
- khoj/interface/compiled/automations/index.html,sha256=gVhyPPp_GF077kvF8l2P_qKVigwuB-udWHN6gV3L_Zc,55923
322
- khoj/interface/compiled/automations/index.txt,sha256=tvRPKvW_NBHg7nu_67r3RXMW7qw1Nq6h-Ii2x-UPuiU,8303
323
- khoj/interface/compiled/chat/index.html,sha256=WO8eAaLzLgnbnv0UTWiuvmbC2XdXz-3RiKxiqAsG09c,56251
324
- khoj/interface/compiled/chat/index.txt,sha256=9ZUfA85qS9Hme2RepuXRCCFlsGavH2dzBnbXmGXW9Tw,9342
325
- khoj/interface/compiled/search/index.html,sha256=1rIbXe0jfZzdX2GRLfD5MbtCdP_kNSJuJEwYZdgKtLg,58343
326
- khoj/interface/compiled/search/index.txt,sha256=eig1uySqsTBl3PuQ0XvwJNgF1wzIul-TdrjNKqMuNCY,8038
327
- khoj/interface/compiled/settings/index.html,sha256=3MzdWs3fU_g7i7zKlBsgyuOYuVR0qyM4EZSR0mDBbDE,55817
328
- khoj/interface/compiled/settings/index.txt,sha256=t4TKdGZdrQza30AEG-mcykjJRPj5fGfGtzm_JjxTStY,9383
329
- khoj/interface/compiled/share/chat/index.html,sha256=ixkBr4-30Os3xFAbwuYdUwGCGIWFwZ-jNHF-03XebAE,56843
330
- khoj/interface/compiled/share/chat/index.txt,sha256=32UVgDQF3dm1Bkm5XVrnU5JAjbfj8vT5lsD2kFAS0I4,9810
321
+ khoj/interface/compiled/automations/index.html,sha256=geDKAg9D_oopYlIZ9BTEJf61HGzz-yGPo3JsUYQcx-8,55923
322
+ khoj/interface/compiled/automations/index.txt,sha256=XyeLdMQ3-w2xOQY-fg6wQj5LoK6vUCoBKgfdpWnd2q8,8303
323
+ khoj/interface/compiled/chat/index.html,sha256=BmPXfkDWqOxUYf5ZAjDJd-3p7EwpopTetL_CgbvyBgs,56251
324
+ khoj/interface/compiled/chat/index.txt,sha256=49h4Xdq2oPFkxIjfTC3E8MAN_GcDkirEfKa4CPnQRSw,9342
325
+ khoj/interface/compiled/search/index.html,sha256=yc-UqFMaNu4UMXaAWjhOrvCzzVlL4Qtgif0iZORnH1o,58343
326
+ khoj/interface/compiled/search/index.txt,sha256=PiNkjFLRFTIEIufP1ZOStfBHbs3CssiZM7jsVNv43Es,8038
327
+ khoj/interface/compiled/settings/index.html,sha256=K9WEZhpb3GABR-us5olsHxaYK54U_3AmKYyrpwnKTOQ,55817
328
+ khoj/interface/compiled/settings/index.txt,sha256=1aU2JMbDq29crQaQ7TQu6L2Uo_9m5-tEjQ7uWWn6sdQ,9383
329
+ khoj/interface/compiled/share/chat/index.html,sha256=tqWYZU1vl-VoAQ8SJ2tijIWjEw6WcQ30ZtGH5rUeZFc,56843
330
+ khoj/interface/compiled/share/chat/index.txt,sha256=T1OgEbaYqNHQl-6LwekVKXjon4L5lZt5a8PKT2I2gQc,9810
331
331
  khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
332
332
  khoj/interface/email/magic_link.html,sha256=372ESbTPKM9acekuZcOIKOw6kBl-KikFg_L9MOHqJkg,2094
333
333
  khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
@@ -393,7 +393,7 @@ khoj/processor/conversation/offline/utils.py,sha256=51McImxl6u1qgRYvMt7uzsgLGSLq
393
393
  khoj/processor/conversation/offline/whisper.py,sha256=DJI-8y8DULO2cQ49m2VOvRyIZ2TxBypc15gM8O3HuMI,470
394
394
  khoj/processor/conversation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
395
395
  khoj/processor/conversation/openai/gpt.py,sha256=FFiMevjK_EiryjsZcYzpYMA-o3sgQpC87x1c6nKek8Y,8515
396
- khoj/processor/conversation/openai/utils.py,sha256=mP_4ScOaeXbvve-Mwi-xf-X3zAGpVJnIGM28Q3Cs7qc,9046
396
+ khoj/processor/conversation/openai/utils.py,sha256=RYWeBFG2m54yV-oIyvTTkHdLdSyAs4Vzba4gFmWOBvY,9728
397
397
  khoj/processor/conversation/openai/whisper.py,sha256=zoEeK1LNCg_tzP4xzYi5vRPzNPGuDGzpkrkG7d1LUn4,447
398
398
  khoj/processor/image/generate.py,sha256=YdyRsZP-jqep8cJlJhp8_KP-ZH5RcllAI-mp-GMks04,8954
399
399
  khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -405,7 +405,7 @@ khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
405
405
  khoj/routers/api.py,sha256=VbB38oU-dnaNpUhZPLlPmdksOH_l6z_F3Lza7NPSN6Q,29113
406
406
  khoj/routers/api_agents.py,sha256=Z0Ska8_KaE1N5Qx8L-Hdp-LctCl7e_yxkadF1d-BYKI,15291
407
407
  khoj/routers/api_chat.py,sha256=wkdhC7QfdRymYiEsJa7kb4zdT-7c-cNmGoM8_O6Q2us,50522
408
- khoj/routers/api_content.py,sha256=Tek-3MqlNpmKvDVEBOK_WWzlOPQJ6HJJSULaBtmGXt8,23280
408
+ khoj/routers/api_content.py,sha256=uLO3eir36rERkhhKU1HOdEv8KTi_z_edT9cHMCZP1W8,24578
409
409
  khoj/routers/api_model.py,sha256=eDYKasFuqwa9msJwgHZ5TEx5sVX91Sc9joefSryNWY4,3718
410
410
  khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
411
411
  khoj/routers/api_subscription.py,sha256=qnbKwA6N1TWK8Aiu1FFLka_JhbPOuwqT262NSHGZDiQ,5569
@@ -436,8 +436,8 @@ khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
436
436
  khoj/utils/rawconfig.py,sha256=wfZTk-Aifb-_q9Yh-NPfh9LlLTioYG-yBqrasgvo4pc,5045
437
437
  khoj/utils/state.py,sha256=axjZhnby8L3bY-N1VVoWgBH1RpFGK6U3_ZeNo1Kt7hs,1679
438
438
  khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
439
- khoj-1.36.6.dev8.dist-info/METADATA,sha256=toegzodccEJzNaF9PdAYvFh8s0Na74JXsIOPC1vjkUA,7744
440
- khoj-1.36.6.dev8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
441
- khoj-1.36.6.dev8.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
442
- khoj-1.36.6.dev8.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
443
- khoj-1.36.6.dev8.dist-info/RECORD,,
439
+ khoj-1.36.7.dev7.dist-info/METADATA,sha256=j06in9p0pzhlvnqCNITKJBpZXZJGi8o3NEHiW7h-hEk,7744
440
+ khoj-1.36.7.dev7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
441
+ khoj-1.36.7.dev7.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
442
+ khoj-1.36.7.dev7.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
443
+ khoj-1.36.7.dev7.dist-info/RECORD,,
@@ -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,31537))},31537:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ei}});var a,n,r=s(57437),i=s(917),o=s.n(i);s(97510);var l=s(2265),c=s(77992),d=s(56937),h=s(7436),m=s(67341),x=s(62869),p=s(26371),u=s(95186),j=s(66070),f=s(84190),g=s(94508);let b=l.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,g.cn)("w-full caption-bottom text-sm",s),...a})})});b.displayName="Table",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,g.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let w=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,g.cn)("[&_tr:last-child]:border-0",s),...a})});w.displayName="TableBody",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,g.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let N=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,g.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});N.displayName="TableRow",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,g.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let y=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,g.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});y.displayName="TableCell",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,g.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var v=s(3894),_=s(81228),k=s(89203),S=s(94018),T=s(13272),C=s(88435),D=s(19841),F=s(37295),E=s(2049),P=s(50525),O=s(5147),A=s(80438),I=s(2452),Y=s(47615),z=s(35099),K=s(22345),R=s(75216),W=s(47020),Z=s(90483),B=s(73925),M=s(54271),U=s(95656),V=s(58717),H=s(87296),L=s(56777),G=s(57466),q=s(97525),J=s(45178),X=s(14308),$=s(34688),Q=s(60729),ee=s(34124),et=s(6512),es=s(37104);let ea=e=>{var t,s;let{items:a,selected:n,callbackFunc:i}=e,[o,c]=(0,l.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)(f.h_,{children:[(0,r.jsx)(f.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(x.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===o))||void 0===t?void 0:t.name," ",(0,r.jsx)(v.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(f.AW,{style:{maxHeight:"200px",overflowY:"auto",minWidth:"var(--radix-dropdown-menu-trigger-width)"},children:(0,r.jsx)(f._x,{value:o,onValueChange:async e=>{c(e),await i(e)},children:a.map(e=>(0,r.jsx)(f.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},en=()=>{let[e,t]=(0,l.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,l.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function er(){let{apiKeys:e,generateAPIKey:t,copyAPIKey:s,deleteAPIKey:a}=en(),[n,i]=(0,l.useState)(new Set),{toast:o}=(0,c.pm)();return(0,r.jsxs)(j.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg dark:bg-muted dark:border-none border-opacity-50 lg:w-2/3",children:[(0,r.jsxs)(j.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)(_.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(x.z,{variant:"secondary",className:"!mt-0",onClick:t,children:[(0,r.jsx)(k.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(j.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)(b,{children:(0,r.jsx)(w,{children:e.map(e=>(0,r.jsxs)(N,{children:[(0,r.jsx)(y,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(y,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary dark:bg-background rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{className:"font-mono text-left w-[50px] md:w-[400px]",children:n.has(e.token)?e.token:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[n.has(e.token)?(0,r.jsx)(S.N,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(t=>{let s=new Set(t);return s.delete(e.token),s})}):(0,r.jsx)(T.b,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(new Set([...n,e.token]))}),(0,r.jsx)(C.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{o({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"}),s(e.token)}}),(0,r.jsx)(D.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),a(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4"})]})}function ei(){let{data:e}=(0,d.h2)(!0),[t,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(void 0),[i,f]=(0,l.useState)(null),[g,b]=(0,l.useState)(void 0),[w,N]=(0,l.useState)(""),[y,v]=(0,l.useState)("verified"),{toast:_}=(0,c.pm)(),k=(0,h.IC)(),S="w-full lg:w-5/12 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none border-opacity-50 dark:bg-muted";(0,l.useEffect)(()=>{var t;s(e),b(null==e?void 0:e.phone_number),v((null==e?void 0:e.is_phone_number_verified)?"verified":(null==e?void 0:e.phone_number)?"otp":"setup"),n(null==e?void 0:e.given_name),f(null!==(t=null==e?void 0:e.notion_token)&&void 0!==t?t:null)},[e]);let T=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(g),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");v("verify")}catch(e){console.error("Error sending OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},C=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(w),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");v("verified"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},D=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");b(void 0),v("setup"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},en=async e=>{try{if(!(await fetch("/api/subscription?operation=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");t&&(t.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,s(t)),_({title:"\uD83D\uDCB3 Subscription",description:(null==t?void 0:t.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),_({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"})}},ei=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&&t){t.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*t.length_of_free_trial);t.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),t.subscription_enabled_trial_at=new Date().toISOString(),s(t),_({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(t.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),_({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},eo=async()=>{if(a)try{if(!(await fetch("/api/user/name?name=".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");t&&(t.given_name=a,s(t)),_({title:"✅ Updated Profile",description:"You name has been updated to ".concat(a)})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},el=e=>async s=>{if(!(null==t?void 0:t.is_active)){_({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=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");_({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(t){console.error("Failed to update ".concat(e," model:"),t),_({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},ec=async()=>{if(i)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok)throw Error("Failed to save Notion API key");t&&(t.notion_token=i,s(t)),_({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ed=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));_({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),_({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eh=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));t&&("computer"===e?t.enabled_content_source.computer=!1:"notion"===e?(t.enabled_content_source.notion=!1,t.notion_token=null,f(t.notion_token)):"github"===e&&(t.enabled_content_source.github=!1),s(t)),"computer"===e?_({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):_({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),_({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return t?(0,r.jsxs)(Q.Hn,{children:[(0,r.jsx)(ee.S,{conversationId:""}),(0,r.jsxs)(Q.kV,{children:[(0,r.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,r.jsx)(Q.vP,{className:"-ml-1"}),(0,r.jsx)(et.Z,{orientation:"vertical",className:"mr-2 h-4"}),k?(0,r.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,r.jsx)(es.VO,{className:"h-auto w-16"})}):(0,r.jsx)("h2",{className:"text-lg",children:"Settings"})]}),(0,r.jsxs)("div",{className:o().page,children:[(0,r.jsx)("title",{children:"Settings"}),(0,r.jsx)("div",{className:o().content,children:(0,r.jsx)("div",{className:"".concat(o().contentBody," mx-10 my-2"),children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(X.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)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(F.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(j.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)(u.I,{type:"text",onChange:e=>n(e.target.value),value:a,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:eo,disabled:a===t.given_name,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(j.Zb,{id:"subscription",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(P.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(j.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===t.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"," ",t.length_of_free_trial," ","day trial of the Khoj Futurist plan. Your trial ends on"," ",t.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===t.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:t.subscription_renewal_date})]})]})||"unsubscribed"===t.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:t.subscription_renewal_date})]})]})||"expired"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),t.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:t.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)(j.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>en("cancel"),children:[(0,r.jsx)(O.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>en("resubscribe"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||t.subscription_enabled_trial_at&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(t.khoj_cloud_subscription_url,"?prefilled_email=").concat(t.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:ei,children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),(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)(j.Zb,{id:"computer",className:S,children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-xl",children:[(0,r.jsx)(I.a,{className:"h-8 w-8 mr-2"}),"Knowledge Base",t.enabled_content_source.computer&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage and search through your digital brain."}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsxs)(x.z,{variant:"outline",size:"sm",title:"Search thorugh files",onClick:()=>window.location.href="/search",children:[(0,r.jsx)(z.Y,{className:"h-5 w-5 inline mr-1"}),"Search"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.computer||"hidden"),onClick:()=>eh("computer"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Clear All"]})]})]}),(0,r.jsxs)(j.Zb,{id:"github",className:"".concat(S," hidden"),children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(R.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(x.z,{variant:"outline",size:"sm",children:t.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(j.Zb,{id:"notion",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(B.F,{className:"h-7 w-7 mr-2"}),"Notion",t.enabled_content_source.notion&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(j.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!t.notion_oauth_url&&(0,r.jsx)(u.I,{onChange:e=>f(e.target.value),value:i||"",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)(j.eW,{className:"flex flex-wrap gap-4",children:[t.notion_oauth_url&&!t.enabled_content_source.notion?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>{window.open(t.notion_oauth_url)},children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):t.enabled_content_source.notion&&i===t.notion_token?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>ed("notion"),children:[(0,r.jsx)(M.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):t.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:ec,disabled:i===t.notion_token,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-1"}),t.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.notion_token||"hidden"),onClick:()=>eh("notion"),children:[(0,r.jsx)(K.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:[t.chat_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(j.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)(ea,{items:t.chat_model_options,selected:t.selected_chat_model_config,callbackFunc:el("chat")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.paint_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(V.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(j.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)(ea,{items:t.paint_model_options,selected:t.selected_paint_model_config,callbackFunc:el("paint")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.voice_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(j.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)(ea,{items:t.voice_model_options,selected:t.selected_voice_model_config,callbackFunc:el("voice")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.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-col flex-wrap gap-8",children:[!t.anonymous_mode&&(0,r.jsx)(er,{}),(0,r.jsxs)(j.Zb,{className:"".concat(S," lg:w-2/3"),children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(L.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===y&&(0,r.jsx)(Y.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==y&&(0,r.jsx)(G.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(j.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)($.Z,{initialValue:g||"",onChangeNumber:b,disabled:"verify"===y,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(o().phoneInput)}}),"verify"===y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(g)}),(0,r.jsx)(p.Zn,{autoFocus:!0,maxLength:6,value:w||"",onChange:N,onComplete:()=>v("verify"),children:(0,r.jsxs)(p.hf,{children:[(0,r.jsx)(p.cY,{index:0}),(0,r.jsx)(p.cY,{index:1}),(0,r.jsx)(p.cY,{index:2}),(0,r.jsx)(p.cY,{index:3}),(0,r.jsx)(p.cY,{index:4}),(0,r.jsx)(p.cY,{index:5})]})})]})]})]}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:["verify"===y&&(0,r.jsx)(x.z,{variant:"outline",onClick:C,children:"Verify"})||(0,r.jsx)(x.z,{variant:"outline",disabled:!g||g===t.phone_number&&"verified"===y||!(0,m.y)(g),onClick:T,children:t.phone_number?g&&(g!==t.phone_number||"verified"!==y)&&(0,m.y)(g)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(J.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(q.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===y&&(0,r.jsxs)(x.z,{variant:"outline",onClick:()=>D(),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]})]})]}):(0,r.jsx)(X.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},77992:function(e,t,s){"use strict";s.d(t,{pm:function(){return m}});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)},o=(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)}}},l=[],c={toasts:[]};function d(e){c=o(c,e),l.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 m(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},917:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN"}}},function(e){e.O(0,[6008,1607,3861,9259,8667,4363,6244,1199,2327,2971,2117,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);