khoj 1.42.9.dev26__py3-none-any.whl → 1.42.10.dev2__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 (58) hide show
  1. khoj/database/adapters/__init__.py +0 -20
  2. khoj/database/models/__init__.py +0 -1
  3. khoj/interface/compiled/404/index.html +2 -2
  4. khoj/interface/compiled/_next/static/chunks/app/chat/page-4c6b873a4a5c7d2f.js +1 -0
  5. khoj/interface/compiled/agents/index.html +2 -2
  6. khoj/interface/compiled/agents/index.txt +2 -2
  7. khoj/interface/compiled/automations/index.html +2 -2
  8. khoj/interface/compiled/automations/index.txt +3 -3
  9. khoj/interface/compiled/chat/index.html +2 -2
  10. khoj/interface/compiled/chat/index.txt +2 -2
  11. khoj/interface/compiled/index.html +2 -2
  12. khoj/interface/compiled/index.txt +2 -2
  13. khoj/interface/compiled/search/index.html +2 -2
  14. khoj/interface/compiled/search/index.txt +2 -2
  15. khoj/interface/compiled/settings/index.html +2 -2
  16. khoj/interface/compiled/settings/index.txt +4 -4
  17. khoj/interface/compiled/share/chat/index.html +2 -2
  18. khoj/interface/compiled/share/chat/index.txt +2 -2
  19. khoj/processor/content/markdown/markdown_to_entries.py +9 -38
  20. khoj/processor/content/org_mode/org_to_entries.py +2 -18
  21. khoj/processor/content/org_mode/orgnode.py +16 -18
  22. khoj/processor/content/text_to_entries.py +0 -30
  23. khoj/processor/conversation/anthropic/anthropic_chat.py +2 -11
  24. khoj/processor/conversation/anthropic/utils.py +103 -90
  25. khoj/processor/conversation/google/gemini_chat.py +1 -4
  26. khoj/processor/conversation/google/utils.py +18 -80
  27. khoj/processor/conversation/offline/chat_model.py +3 -3
  28. khoj/processor/conversation/openai/gpt.py +38 -13
  29. khoj/processor/conversation/openai/utils.py +12 -113
  30. khoj/processor/conversation/prompts.py +35 -17
  31. khoj/processor/conversation/utils.py +58 -129
  32. khoj/processor/operator/grounding_agent.py +1 -1
  33. khoj/processor/operator/operator_agent_binary.py +3 -4
  34. khoj/processor/tools/online_search.py +0 -18
  35. khoj/processor/tools/run_code.py +1 -1
  36. khoj/routers/api_chat.py +1 -1
  37. khoj/routers/api_content.py +6 -6
  38. khoj/routers/helpers.py +27 -297
  39. khoj/routers/research.py +155 -169
  40. khoj/search_type/text_search.py +0 -2
  41. khoj/utils/helpers.py +8 -284
  42. khoj/utils/initialization.py +2 -0
  43. khoj/utils/rawconfig.py +0 -11
  44. {khoj-1.42.9.dev26.dist-info → khoj-1.42.10.dev2.dist-info}/METADATA +1 -1
  45. {khoj-1.42.9.dev26.dist-info → khoj-1.42.10.dev2.dist-info}/RECORD +57 -57
  46. khoj/interface/compiled/_next/static/chunks/app/chat/page-76fc915800aa90f4.js +0 -1
  47. /khoj/interface/compiled/_next/static/chunks/{1327-3b1a41af530fa8ee.js → 1327-1a9107b9a2a04a98.js} +0 -0
  48. /khoj/interface/compiled/_next/static/chunks/{1915-fbfe167c84ad60c5.js → 1915-5c6508f6ebb62a30.js} +0 -0
  49. /khoj/interface/compiled/_next/static/chunks/{2117-e78b6902ad6f75ec.js → 2117-080746c8e170c81a.js} +0 -0
  50. /khoj/interface/compiled/_next/static/chunks/{2939-4d4084c5b888b960.js → 2939-4af3fd24b8ffc9ad.js} +0 -0
  51. /khoj/interface/compiled/_next/static/chunks/{4447-d6cf93724d57e34b.js → 4447-cd95608f8e93e711.js} +0 -0
  52. /khoj/interface/compiled/_next/static/chunks/{8667-4b7790573b08c50d.js → 8667-50b03a89e82e0ba7.js} +0 -0
  53. /khoj/interface/compiled/_next/static/chunks/{webpack-70e0762712341826.js → webpack-92ce8aaf95718ec4.js} +0 -0
  54. /khoj/interface/compiled/_next/static/{IYGyer2N7GdUJ7QHFghtY → cuzJcS32_a4L4a6gCZ63y}/_buildManifest.js +0 -0
  55. /khoj/interface/compiled/_next/static/{IYGyer2N7GdUJ7QHFghtY → cuzJcS32_a4L4a6gCZ63y}/_ssgManifest.js +0 -0
  56. {khoj-1.42.9.dev26.dist-info → khoj-1.42.10.dev2.dist-info}/WHEEL +0 -0
  57. {khoj-1.42.9.dev26.dist-info → khoj-1.42.10.dev2.dist-info}/entry_points.txt +0 -0
  58. {khoj-1.42.9.dev26.dist-info → khoj-1.42.10.dev2.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=CfIAnwxV_HfbnhyjVqk9wtrz8hHnStFu-7ap82x6lYU,13256
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=XeI7QD33KAoZ165b4jpepKxhEG6QCaZ4_UEH52zJdX4,83025
14
+ khoj/database/adapters/__init__.py,sha256=-Gc69dY8D2XNzEWm3subPl093sbJKv2QMRAlsBURT-c,82117
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
@@ -124,42 +124,40 @@ khoj/database/migrations/0089_chatmodel_price_tier_and_more.py,sha256=EJ1Yf6MMzh
124
124
  khoj/database/migrations/0090_alter_khojuser_uuid.py,sha256=2h9v-DiuqFuZKpAyWYwueqZkBHvxZbm-_guRjNaZzxg,3802
125
125
  khoj/database/migrations/0091_chatmodel_friendly_name_and_more.py,sha256=e-2DQhyW9kMxMg7ItGSyCKE5GQFI0ZSuyfD8CdfVa0k,1758
126
126
  khoj/database/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
- khoj/database/models/__init__.py,sha256=euYYDcpdGKtZhU99BSlGNiyzdKWaFWJaAw-GeKvO5r8,31293
127
+ khoj/database/models/__init__.py,sha256=9XxpiKZFPgJFM0DCqUgAq30r-2fj0I5al6fyNRtY6V4,31280
128
128
  khoj/interface/compiled/agents.svg,sha256=yFCRwIM-Qawa0C5ggAo3ekb-Q1ElmotBOKIGhtfIQqM,1722
129
129
  khoj/interface/compiled/automation.svg,sha256=o7L2XYwJWRSMvl8h6TBv6Pt28RTRVMHqF04EPY0AFj0,1467
130
130
  khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvtM3A,2424
131
131
  khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
132
132
  khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
133
133
  khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
134
- khoj/interface/compiled/index.html,sha256=llwju23GPl4Uak3_R_Dh-Qy4KbzWXYyGAyJlnc60h04,53040
135
- khoj/interface/compiled/index.txt,sha256=0apXc-6wYWMVpVi0PGB9ygnMKzyQ09HUJcne9YznNEM,7614
134
+ khoj/interface/compiled/index.html,sha256=I5swzJApcZ3bRKGQvGbG5M7p_wIgKiaS9OQRTxWi4Yc,53040
135
+ khoj/interface/compiled/index.txt,sha256=IeVbhENwqVNkXX_Q9Zh7zjWr7nlzPMxOM1ELpAR1ULA,7614
136
136
  khoj/interface/compiled/khoj.webmanifest,sha256=9wOK2BMS6xH5NKd2eaUgTLg9WepIxB2K2U33KU89LD8,2543
137
137
  khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
138
138
  khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
139
139
  khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
140
140
  khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
141
141
  khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
142
- khoj/interface/compiled/404/index.html,sha256=NwwpjBbzNIV37RrT7frRTdF1yo-r9ogo1eLzonbmGJc,17097
143
- khoj/interface/compiled/_next/static/IYGyer2N7GdUJ7QHFghtY/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
144
- khoj/interface/compiled/_next/static/IYGyer2N7GdUJ7QHFghtY/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
142
+ khoj/interface/compiled/404/index.html,sha256=WuATsIw_Jm22fw2ou7uAasyQXILiCDx3Yl4FrQjOE6k,17097
145
143
  khoj/interface/compiled/_next/static/chunks/1191.b547ec13349b4aed.js,sha256=3qtdOft2SSaGT0qhyPunEraJEZUxIqDV4q3ULnFantg,10913
146
- khoj/interface/compiled/_next/static/chunks/1327-3b1a41af530fa8ee.js,sha256=7NmSOycXRGHpTN98sMAirnWN8ZUL971FsQpWmOs4Fxs,442974
144
+ khoj/interface/compiled/_next/static/chunks/1327-1a9107b9a2a04a98.js,sha256=7NmSOycXRGHpTN98sMAirnWN8ZUL971FsQpWmOs4Fxs,442974
147
145
  khoj/interface/compiled/_next/static/chunks/1588.f0558a0bdffc4761.js,sha256=ZSpLe7ui7FG7AvK00JHPg1YjYz8R9l1Obzu1mYHpzjo,89845
148
- khoj/interface/compiled/_next/static/chunks/1915-fbfe167c84ad60c5.js,sha256=qP_naVeN_Vqu4o2bOYGBoDEYCFVDphWwLqa_3_WeYjU,11294
146
+ khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js,sha256=qP_naVeN_Vqu4o2bOYGBoDEYCFVDphWwLqa_3_WeYjU,11294
149
147
  khoj/interface/compiled/_next/static/chunks/1918.925cb4a35518d258.js,sha256=WWqQcBDm9KEZUpj0P9p-iiVxoVjnM4PGtAyQXGAZ4yo,6088
150
- khoj/interface/compiled/_next/static/chunks/2117-e78b6902ad6f75ec.js,sha256=yOBtQrL5NRMjI60r4pmZRRTHZv8_xwZm4DQp-RI8H9M,123994
148
+ khoj/interface/compiled/_next/static/chunks/2117-080746c8e170c81a.js,sha256=yOBtQrL5NRMjI60r4pmZRRTHZv8_xwZm4DQp-RI8H9M,123994
151
149
  khoj/interface/compiled/_next/static/chunks/2242.9a07e19f1a3a8b16.js,sha256=gE2wenv7eMCWo8FlC8uOffniVrbcSyi2BfpoDygPJbQ,6535
152
150
  khoj/interface/compiled/_next/static/chunks/2327-ea623ca2d22f78e9.js,sha256=Cwaj5_kmqMRmZH2CdtZG5T5dvdyBL8fL2HrpY4jfLCI,127516
153
151
  khoj/interface/compiled/_next/static/chunks/2612.bcf5a623b3da209e.js,sha256=_odabGQTNjtpFLdU6FmDdC9zZQkYKJOs8_8QVgMJmEI,76988
154
152
  khoj/interface/compiled/_next/static/chunks/2849.dc00ae5ba7219cfc.js,sha256=cVUiYRj2GweNQ4unKpJIhdr_xO5s2hRy3UWK-81rZW8,182
155
- khoj/interface/compiled/_next/static/chunks/2939-4d4084c5b888b960.js,sha256=8BI0oAQSZQj37UZX_igaTvuTgW0nGvVtvyG9G9byr_k,35749
153
+ khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js,sha256=8BI0oAQSZQj37UZX_igaTvuTgW0nGvVtvyG9G9byr_k,35749
156
154
  khoj/interface/compiled/_next/static/chunks/303.fe76de943e930fbd.js,sha256=gvkmkEYSLe4Iy-8Ti4Ty_OYjkHyrIpgUnfuoQSX577g,178
157
155
  khoj/interface/compiled/_next/static/chunks/3265.924139c4146ee344.js,sha256=O0nwy9HzDY8Df66o72--Lw9RguS5Mh4ExT-uBxdRUbA,636
158
156
  khoj/interface/compiled/_next/static/chunks/3489.c523fe96a2eee74f.js,sha256=s2F6I_29rsqcu-8229-nssfws7vZO7cuQJYqehK7tbk,21715
159
157
  khoj/interface/compiled/_next/static/chunks/3592-b2a2444b0ec7b119.js,sha256=ADfFNp0QHqmz0sHmTSpE-hWnh09AxVVzZb6zcx_ATmg,42200
160
158
  khoj/interface/compiled/_next/static/chunks/3595-ac8e81e04ecb89cb.js,sha256=43eYa6m0ZuFnnBOPTa6S-T0WeLftHEZDlkMe4b7fmIA,21564
161
159
  khoj/interface/compiled/_next/static/chunks/4327.8d2a1b8f1ea78208.js,sha256=VKeC1Y6778Nlt-spX9W9dL8Ex-d2N5AEj53AOVUXGWE,322147
162
- khoj/interface/compiled/_next/static/chunks/4447-d6cf93724d57e34b.js,sha256=PUldPCrWRAgi5rxqTzWS1boopyuyAQpzzBg-p4TQnNw,19716
160
+ khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js,sha256=PUldPCrWRAgi5rxqTzWS1boopyuyAQpzzBg-p4TQnNw,19716
163
161
  khoj/interface/compiled/_next/static/chunks/4533.586e74b45a2bde25.js,sha256=eDHOyGa-CuCVeyXtnx3YWmjvlpWveAj6Mu-bMlm3OJg,25567
164
162
  khoj/interface/compiled/_next/static/chunks/4551.82ce1476b5516bc2.js,sha256=G1EoTZRkMLtwYqsLCyQ9iA_9nvi8oj7_t3qboNWtdfY,71097
165
163
  khoj/interface/compiled/_next/static/chunks/4609-33aa487dff03a9fd.js,sha256=1M6QAfVZa2g2Q4jXRdSI1wjrZ4G9yKjINJt8qyTKm1A,24698
@@ -185,7 +183,7 @@ khoj/interface/compiled/_next/static/chunks/7760.35649cc21d9585bd.js,sha256=MJ9q
185
183
  khoj/interface/compiled/_next/static/chunks/83.48e2db193a940052.js,sha256=j8X0kemaNExxw4lDZCgkev1HeK37NM_kE6p73WuHjs8,175
186
184
  khoj/interface/compiled/_next/static/chunks/8427.844694e06133fb51.js,sha256=U388feyx6dj6PZblInnwOgAKlPg1f2Vp-oCFhh2SiXY,186
187
185
  khoj/interface/compiled/_next/static/chunks/8665.4db7e6b2e8933497.js,sha256=HovLNJSM0SJRkjLNg0cim_NDnGiVPbUrEQG8YQkGA2Y,45791
188
- khoj/interface/compiled/_next/static/chunks/8667-4b7790573b08c50d.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
186
+ khoj/interface/compiled/_next/static/chunks/8667-50b03a89e82e0ba7.js,sha256=kyiAVJTylsiOPFTb63uZn_pMlk4pYhDYt_N7xL76PTM,7214
189
187
  khoj/interface/compiled/_next/static/chunks/8694.2bd9c2f65d8c5847.js,sha256=JKqMqrtPf1LK-SmVgLk_F8EjAC6IGKl4lnfWU6q4JXA,33661
190
188
  khoj/interface/compiled/_next/static/chunks/872.caf84cc1a39ae59f.js,sha256=xdPZDnCGiugQ4JwV1FzzYyBEvuXQLOqSw_cMbOJKjtw,11253
191
189
  khoj/interface/compiled/_next/static/chunks/8888.ebe0e552b59e7fed.js,sha256=c5icsYFTx7epn588gtjfP9lKKMdINc07w1P7t56ac8E,3775
@@ -209,7 +207,7 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
209
207
  khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js,sha256=bqnztujKItXfFBzQlaBmDZyfJpQt_M93CXOuchJfpD0,471
210
208
  khoj/interface/compiled/_next/static/chunks/main-fc8e0fefa2ef3d8c.js,sha256=t9FZIByh6V52m41LQ2yyAReF1CAuY7gLMBuWBeKCX2g,116793
211
209
  khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js,sha256=CXPB1kyIrcjjyVBBDLWLKI9yEY1ZZbeASUON648vloM,112594
212
- khoj/interface/compiled/_next/static/chunks/webpack-70e0762712341826.js,sha256=OR5QpxV2GcJopVw_IAqTpdrNoeLdfTDIcCbLAhWuvwk,4939
210
+ khoj/interface/compiled/_next/static/chunks/webpack-92ce8aaf95718ec4.js,sha256=OR5QpxV2GcJopVw_IAqTpdrNoeLdfTDIcCbLAhWuvwk,4939
213
211
  khoj/interface/compiled/_next/static/chunks/app/layout-a0c5495d6c582cea.js,sha256=7JZS2Pr995Lwu3FeQpAvheLS1Bn5w5HOFsecV2_kyQA,3880
214
212
  khoj/interface/compiled/_next/static/chunks/app/page-a19a597629e87fb8.js,sha256=lfXNkiSiwMKG1q3y0S3MUUsvQNznDHtfpwVKtx38gLk,29930
215
213
  khoj/interface/compiled/_next/static/chunks/app/_not-found/page-84f94d15b2da4eac.js,sha256=zElhiTkdu2JqrEvJ8Lrxh4HCyfLmPllBHHWOuDtrVlw,1755
@@ -218,7 +216,7 @@ khoj/interface/compiled/_next/static/chunks/app/agents/page-5db6ad18da10d353.js,
218
216
  khoj/interface/compiled/_next/static/chunks/app/automations/layout-63603d2cb33279f7.js,sha256=4OX_fcTQdNVs6HxDdJVWdadMVC_gM86Tkqo2TjBA4gw,5143
219
217
  khoj/interface/compiled/_next/static/chunks/app/automations/page-6271e2e31c7571d1.js,sha256=vOD3YLeKBh_M6ZLtlW4m4fbi2YJf5qyo60251kIMtX8,34829
220
218
  khoj/interface/compiled/_next/static/chunks/app/chat/layout-ad4d1792ab1a4108.js,sha256=g815zvSZenVssWcOYjyqAOPDjTCa359nqspXeIsXQ5A,180
221
- khoj/interface/compiled/_next/static/chunks/app/chat/page-76fc915800aa90f4.js,sha256=Zdn9ZvCk7vA1eaSnNAAAtvix-KjXJWggDv5VDJrpxsE,29133
219
+ khoj/interface/compiled/_next/static/chunks/app/chat/page-4c6b873a4a5c7d2f.js,sha256=79mdQG1RGXudQlVkV4i0WBBn_EIrB94MDu8O-Jd35Qg,29167
222
220
  khoj/interface/compiled/_next/static/chunks/app/search/layout-f5881c7ae3ba0795.js,sha256=Bm4Y73ylR-j9_LdKXVUjgLppZJ6JRdLTUgYAsZCOBkQ,180
223
221
  khoj/interface/compiled/_next/static/chunks/app/search/page-fa366ac14b228688.js,sha256=vdwyjWiRZD2Q6pe2-5K0nZzK7JCGf9tSK1JqbL73X6w,30929
224
222
  khoj/interface/compiled/_next/static/chunks/app/settings/layout-f88cedfe9ad4df7c.js,sha256=aFBEgUCsKnoeyULmh7g-DmaznQ0ztcq6y2pj4bSMCIY,6132
@@ -235,6 +233,8 @@ khoj/interface/compiled/_next/static/css/7889a30fe9c83846.css,sha256=IUkZhkx4GpY
235
233
  khoj/interface/compiled/_next/static/css/93eeacc43e261162.css,sha256=rbrg1ppryE0iLWmJexa3Qibtrb6gegftRjKIIMpnR2s,9736
236
234
  khoj/interface/compiled/_next/static/css/db7d90554f3ab82b.css,sha256=A3ZAf0StEG3sr_LxAIizczSTYRe1NbtNUpfslvmkqgk,17713
237
235
  khoj/interface/compiled/_next/static/css/ea5485b3f3859a5a.css,sha256=tn6qi2xSLTWhtzDUE8UlC8iipH9QGV6A9oGj1ap-Sk4,1659
236
+ khoj/interface/compiled/_next/static/cuzJcS32_a4L4a6gCZ63y/_buildManifest.js,sha256=f2_nYnw25hHWQJ-39Lf5OH1u6kgdbOInyfplqgjvAV4,224
237
+ khoj/interface/compiled/_next/static/cuzJcS32_a4L4a6gCZ63y/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
238
238
  khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2,sha256=IzKBwB_bpSGvO7C9aRv29Js-jAbZPRDI-D-P4H2P918,14508
239
239
  khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2,sha256=QjuuSKmViymmy-itXLB1UbSARxFNHWuMiPpCrYqClFI,22728
240
240
  khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2,sha256=VH1XkI87HdFVhsurH5D5ekEjG_ZORTVBVg6xz7p87C8,16704
@@ -312,8 +312,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
312
312
  khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
313
313
  khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
314
314
  khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
315
- khoj/interface/compiled/agents/index.html,sha256=V0ORh6qW2DDfsI1bJSR0SRGzAhzu-_4uHcyJC0EMSEg,16221
316
- khoj/interface/compiled/agents/index.txt,sha256=2Fj5KumiNL_Jk_H_I5roAFGmYlkdjCyxDSzggfdnPsY,7218
315
+ khoj/interface/compiled/agents/index.html,sha256=EV1p_-c_j6IcBMkd6en3LS4dVqcuotzv561sXc92_6E,16221
316
+ khoj/interface/compiled/agents/index.txt,sha256=ZhXs3HROb7ho95YrGRiwKVJCZBsAaVfkPj1FZlHro3Y,7218
317
317
  khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
318
318
  khoj/interface/compiled/assets/icons/khoj_lantern.svg,sha256=I_8XP5X84gEOoCRhCRKOQn_GKZrz3SUBXct7WxHvY7c,8767
319
319
  khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png,sha256=xDx0bbD-WMflgg8zck9oPIIuTIvywtuED2k7CjSQS4w,66194
@@ -328,16 +328,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
328
328
  khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
329
329
  khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
330
330
  khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
331
- khoj/interface/compiled/automations/index.html,sha256=DJ3t6X5cqZA_hQ4WeRHc4hmIHoBzTJYWzM11GDNN2A0,54091
332
- khoj/interface/compiled/automations/index.txt,sha256=JOpaPqgL7VK2FAaSn2o2Njt66PHVqsDYTvZHTBfKUSg,7447
333
- khoj/interface/compiled/chat/index.html,sha256=izvLMhlRMuPRGW1hdnwh2EEti8SXl4HZl8RHj9ASUGA,53222
334
- khoj/interface/compiled/chat/index.txt,sha256=C889jPfIay6GqWSJLaoJ6_vPjYrFr9nQhn0kD_04X1g,7858
335
- khoj/interface/compiled/search/index.html,sha256=p1A0DjrbLStWoG7yTJuxC-8MmeTaUjwpSt-qHc7cWqI,55301
336
- khoj/interface/compiled/search/index.txt,sha256=GO032banF_xMVaO2qk6AM9UEJ30ddP4REkkDRu3cM6c,6565
337
- khoj/interface/compiled/settings/index.html,sha256=a6pO1TqQ3H6G9lKZv6XnRcZBEI-HmfBQG8WydTFqnYs,52740
338
- khoj/interface/compiled/settings/index.txt,sha256=6hs0n3ok1aM1bpPOWeZl98oEMxVZNrSDCJ7htnughGU,7701
339
- khoj/interface/compiled/share/chat/index.html,sha256=-TXttN7uZFBps7pnAuu6uiPvOKeUCJwr2XtgGgjIDkM,53802
340
- khoj/interface/compiled/share/chat/index.txt,sha256=5s2zBgvPwwE9ROEGbyD9n5G3OZctjM6i1OoZKOiUqa0,8320
331
+ khoj/interface/compiled/automations/index.html,sha256=VkvKcktv7azLpTpM2I1UwIwIfPjYBloLuG_yZ_ODgj4,54091
332
+ khoj/interface/compiled/automations/index.txt,sha256=2YZAdbcwC0eMVtASu0jVmt30DfdtqFoE4Vf6tFIu4Ag,7447
333
+ khoj/interface/compiled/chat/index.html,sha256=Dp-vOrIBqQ1P-fbDXIRD8l_N5W9ChoB9js5XlDk1uRE,53222
334
+ khoj/interface/compiled/chat/index.txt,sha256=edOmgAbJ7w0vwsXQYTgOmzM8PKGla6AA4pAWyWG6f-I,7858
335
+ khoj/interface/compiled/search/index.html,sha256=1NlH0Fd8irKriiKO4C85q_eavPZV6PJ_2dYO-tw2dCU,55301
336
+ khoj/interface/compiled/search/index.txt,sha256=r3K_FHNXUiSiLsmbAoUDQfLR7t0rijYZGzRso0Qs5v4,6565
337
+ khoj/interface/compiled/settings/index.html,sha256=5a5t_9js_78CbxMskL_u7PIEZ0-cDodejDNG87CyQxw,52740
338
+ khoj/interface/compiled/settings/index.txt,sha256=p198KRPSYdDY1uTGDB1sqF6ufa8_Z_ey-JvslNCMI6Q,7701
339
+ khoj/interface/compiled/share/chat/index.html,sha256=k8c-P2QsbMDqFCxkzQ6PUgWi1ZLRC9L6axzQ4cMtGQw,53802
340
+ khoj/interface/compiled/share/chat/index.txt,sha256=G0xsUyXTYnvBM5cfYW5BAu4dIkrvzRYDTXUx4Gl8F0o,8320
341
341
  khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
342
342
  khoj/interface/email/magic_link.html,sha256=372ESbTPKM9acekuZcOIKOw6kBl-KikFg_L9MOHqJkg,2094
343
343
  khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
@@ -371,7 +371,7 @@ khoj/migrations/migrate_version.py,sha256=6CTsLuxiLnFVF8A7CjsIz3PcnJd8fAOZeIx6tT
371
371
  khoj/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
372
372
  khoj/processor/embeddings.py,sha256=-znB8-oL9mGGQLAJdOL9OPNs4Zq9HnMIAQbAMRi38lo,6636
373
373
  khoj/processor/content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
- khoj/processor/content/text_to_entries.py,sha256=6kt0AdVe6h371uHAKMgxTBil4nooi5qf1yo9N-0ZvwU,16562
374
+ khoj/processor/content/text_to_entries.py,sha256=bCaKyFkXVqOZAsNytzL81bArrmPyRnircl3uJ3q4svs,14746
375
375
  khoj/processor/content/docx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
376
376
  khoj/processor/content/docx/docx_to_entries.py,sha256=OiO_Q1EudlOGqUpWCV9BseSjWZjrR4plk63a6ZPeC-4,4566
377
377
  khoj/processor/content/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -379,41 +379,41 @@ khoj/processor/content/github/github_to_entries.py,sha256=UhYiS9H66Hnuj-OBmV3n05
379
379
  khoj/processor/content/images/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
380
380
  khoj/processor/content/images/image_to_entries.py,sha256=4CrS5cXRlMQ87N4lZC3q85VIh57afpGjvlvwBHqtEQs,5125
381
381
  khoj/processor/content/markdown/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
382
- khoj/processor/content/markdown/markdown_to_entries.py,sha256=IM7vBoYf_LZ2xcZZ0LvLJ9e9K7ioHCqhfWijAnQfQRc,8592
382
+ khoj/processor/content/markdown/markdown_to_entries.py,sha256=nyTc_Wehi5U65H_gWkq4NpMm4fjdIprjNrX4tKVpRxU,7109
383
383
  khoj/processor/content/notion/notion_to_entries.py,sha256=hC8u826szKgrtsc2ibdr7EqmBo7OQQ1a2oCKGsejVVk,9839
384
384
  khoj/processor/content/org_mode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
385
- khoj/processor/content/org_mode/org_to_entries.py,sha256=Wfx5sBIMsiub8SMj9BkZYzoVKInfU7A0zrn0ArsR5Nc,11013
386
- khoj/processor/content/org_mode/orgnode.py,sha256=xZ8L3YFLWEidhnyOgaPbsYboaL86BHiSSGy5BWIeNcc,18699
385
+ khoj/processor/content/org_mode/org_to_entries.py,sha256=ASjGlUDpLpdcV00Yi_UiET3WLekuFTO6hWQY9ZQ6mw8,10222
386
+ khoj/processor/content/org_mode/orgnode.py,sha256=DlHZICxbCRxqGxA_osYf1faxslxpSuIqbHco8oxAKKM,18478
387
387
  khoj/processor/content/pdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
388
388
  khoj/processor/content/pdf/pdf_to_entries.py,sha256=GQUvab61okhV9_DK0g2MCrMq8wKpM208EbXvsaTAkzs,4995
389
389
  khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
390
390
  khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
391
391
  khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
- khoj/processor/conversation/prompts.py,sha256=F0MVg81Tr7L4W7ubx_UJ-D4PqgGCElTg8KLpQjdPuIk,54207
393
- khoj/processor/conversation/utils.py,sha256=F8w1I6YGmlXIvOXrTy3-Hp1vDTBdeFG9orAh7ZGFnL0,48441
392
+ khoj/processor/conversation/prompts.py,sha256=XkLuA8npw4gdfXQqBJqn-13uJd1xoGtnzOsnobFrw5g,54523
393
+ khoj/processor/conversation/utils.py,sha256=niMWTIjnoeGejnndNf8Mv0P4WyYtW5MlILUXdjA7gbQ,44613
394
394
  khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
395
- khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=6IG-YlpFx86EgW3PdGuv4xGMRzvHx4xVUcQMqkKn4vs,5358
396
- khoj/processor/conversation/anthropic/utils.py,sha256=kka2nAhqUBn9BNz25x_RbpkiqznWw_u26UdEASgF6BY,16210
395
+ khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=7QnT5no46slRahe3UlCEmPMVb7LrIcth0pkjVneaq0g,5290
396
+ khoj/processor/conversation/anthropic/utils.py,sha256=1-hwqMSVgQ5295LhcjKxMmDjDsAKLJC8YCh-D03wEMA,16765
397
397
  khoj/processor/conversation/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
398
- khoj/processor/conversation/google/gemini_chat.py,sha256=L0zKFsU9KwedugmSHRmkD9ZPmzRdQIXHH2o7d-NsWYU,5729
399
- khoj/processor/conversation/google/utils.py,sha256=gjHwcww_eu_v-6v_fo9UtIyfjgFL37bHno_oBYQfGRo,19556
398
+ khoj/processor/conversation/google/gemini_chat.py,sha256=L8a4NYstCGQlax_HHaeaqlu_qs6pITeCX7sD5BDeEC0,5659
399
+ khoj/processor/conversation/google/utils.py,sha256=FTZC7hSyWzIvUv2et0DRfEys0KIniK2MATsUCLYrojY,16967
400
400
  khoj/processor/conversation/offline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
401
- khoj/processor/conversation/offline/chat_model.py,sha256=zsb6HJhfHJ5l6cegq0A6k7YAeYIo3CTLhjaD-jW556g,8597
401
+ khoj/processor/conversation/offline/chat_model.py,sha256=lD2sIGEKBuF9AZSyU2UUHAZHeTyE6v1B2-qUoVoSiXg,8579
402
402
  khoj/processor/conversation/offline/utils.py,sha256=51McImxl6u1qgRYvMt7uzsgLGSLq5SMFy74ymlNjIcc,3033
403
403
  khoj/processor/conversation/offline/whisper.py,sha256=DJI-8y8DULO2cQ49m2VOvRyIZ2TxBypc15gM8O3HuMI,470
404
404
  khoj/processor/conversation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
405
- khoj/processor/conversation/openai/gpt.py,sha256=w-VeVoI8xTyS1n36y0sbI2TPP6v-LFriFx9xyfgnt7g,6096
406
- khoj/processor/conversation/openai/utils.py,sha256=JWRg0P59DfS8QYhKY0U4WGEuEcLVLzzLdBQsnVhOWtI,33718
405
+ khoj/processor/conversation/openai/gpt.py,sha256=_i0greQTSxLL5wOCqBot6cIPtdhtBL_y8fZsn8lRmYc,7174
406
+ khoj/processor/conversation/openai/utils.py,sha256=S1dexjFSA1-Pf8-_F1UvBJi7M7GyyIsShDZQf6qwvOI,29409
407
407
  khoj/processor/conversation/openai/whisper.py,sha256=zoEeK1LNCg_tzP4xzYi5vRPzNPGuDGzpkrkG7d1LUn4,447
408
408
  khoj/processor/image/generate.py,sha256=bF80fjsHKkU2f2ADiXJei8-ViqcT0EHaM0wH78KPUC8,12199
409
409
  khoj/processor/operator/README.md,sha256=QaV00W1IB7i8ZrvhNkpjmFMVDtORFt-OASieRQGE_UE,2308
410
410
  khoj/processor/operator/__init__.py,sha256=ZdB1LfYBGiKC7Zrd97jRkMuGfCDJpyb2uwHY9zk8ap4,10198
411
- khoj/processor/operator/grounding_agent.py,sha256=eyWCaIHg12Ak2SbCl7aiiFSoDZ88-AlrqQElRDdDXDE,18917
411
+ khoj/processor/operator/grounding_agent.py,sha256=uxLFpLQH63g5_jhuI8HFsIl6roxh0VseiT-46n5vbLQ,18911
412
412
  khoj/processor/operator/grounding_agent_uitars.py,sha256=Ujdug_Z2_r1tZmy5kBtHbZcqOp0jSH-7ZnYo1fVdcDQ,42261
413
413
  khoj/processor/operator/operator_actions.py,sha256=eJHxs6idstIbGzzRPHsveuJxl5jH9dHvBhOxuAqjg7M,4268
414
414
  khoj/processor/operator/operator_agent_anthropic.py,sha256=qLxT53pGIdCH8xzkxhSmnSMT5LTOlm68MFnQSGMkdm4,31556
415
415
  khoj/processor/operator/operator_agent_base.py,sha256=k2iq2VyJ59bNqRd_PKuFaxO3Q09nTdi4_TutNs2VtRo,4490
416
- khoj/processor/operator/operator_agent_binary.py,sha256=3Qv2xdKUFcymqGhCajYDtjezBfGPdSnT3FNJN-cCGI8,19956
416
+ khoj/processor/operator/operator_agent_binary.py,sha256=u8uRgsr5XGpj1IXomZX3t7iAKGmKxXBnNAFYCF-J0co,19901
417
417
  khoj/processor/operator/operator_agent_openai.py,sha256=lGBX5MTLO1WpDFBSivIqb71Hpdhrbc5orwBdttJDk3A,23687
418
418
  khoj/processor/operator/operator_environment_base.py,sha256=nHvn8lB-h6bY-v7rOEp_VZcn3aooy_v9YJbVas2CfXg,1045
419
419
  khoj/processor/operator/operator_environment_browser.py,sha256=4SmLIRVECI53hplGEqBLrkwQJfNtESum637vnS3tGeA,17896
@@ -421,22 +421,22 @@ khoj/processor/operator/operator_environment_computer.py,sha256=bqpnSqQEElRjqzzx
421
421
  khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
422
422
  khoj/processor/speech/text_to_speech.py,sha256=Q7sapi5Hv6woXOumtrGqR0t6izZrFBkWXFOGrHM6dJ4,1929
423
423
  khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
424
- khoj/processor/tools/online_search.py,sha256=5NyV1FzZmlXx_-cz0_samN7tKOnTcbFp-lALvcfQArA,25419
425
- khoj/processor/tools/run_code.py,sha256=cyuCz61FYPWChuDwxoZHih-kAuC3J4GbL92dV4pOh6Q,12518
424
+ khoj/processor/tools/online_search.py,sha256=Sl6lsYUZ68xAWwJ6ZwqP_nhJFCkyz9Ku1aLY33RtHTE,25023
425
+ khoj/processor/tools/run_code.py,sha256=flVlRT1AMCg8xnAEY03nzoU9pjrKzm_gmkJe228bIoE,12513
426
426
  khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
427
427
  khoj/routers/api.py,sha256=BFiKwdYjkR-4aHBumM7Hu4XdN2RvQ0Z9V4_2Wd8aPiM,8633
428
428
  khoj/routers/api_agents.py,sha256=QcognyY9FwClgOZw21BF9K7IX16i2070kRoM7c_bKn8,17264
429
429
  khoj/routers/api_automation.py,sha256=SwQGsVcZmtf8g3w8Xz220YhTIT6D4mLwUp_YCYLpbCY,9389
430
- khoj/routers/api_chat.py,sha256=sR1c4rQt0WTxbhqn5vlWb4vc4tIxMEHLKSV344VtbmU,58902
431
- khoj/routers/api_content.py,sha256=uLO3eir36rERkhhKU1HOdEv8KTi_z_edT9cHMCZP1W8,24578
430
+ khoj/routers/api_chat.py,sha256=8W7WcuDNduQh9Qs-OYvsK2a-XTrUy-C7RQj0FnjimXc,58906
431
+ khoj/routers/api_content.py,sha256=GFChoWm4nYdilhzB1ElbJjaJJRfLn8XtkKmLnZOUHrU,24580
432
432
  khoj/routers/api_model.py,sha256=hjIgOQqva4YVv1osQK8p-317_oSKsv1mHbAYFQICxnM,5273
433
433
  khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
434
434
  khoj/routers/api_subscription.py,sha256=_Z3gwW5348qrF7sF9rqwkeG291KX5olr9Fd_-ri9faE,6480
435
435
  khoj/routers/auth.py,sha256=jk2lqAS_650lQsoaOFTlZd9W_LL8HbN5zhHTZza_lqs,11258
436
436
  khoj/routers/email.py,sha256=wvr6_fpk0RuKcTPC6suI8JDZPLYzJ9hAhz_G41yZytc,3923
437
- khoj/routers/helpers.py,sha256=Sr22Bb9EF93yVoraXE7cWLzXBvLQ6a86DVdIoL5Dx4s,116246
437
+ khoj/routers/helpers.py,sha256=lyWH6M6X3OxorGaAU6t7YRph0iiwg1dH4qiX9SfbuhM,106138
438
438
  khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
439
- khoj/routers/research.py,sha256=GPQJhqpAdmPtcN2gtxzVbDPVQqPg9DqeWPIYF8CZf3s,24197
439
+ khoj/routers/research.py,sha256=r01gvB-vwEe-q1bNalTdj0oTo5GI-1KG8HtFlTWODls,22873
440
440
  khoj/routers/storage.py,sha256=lao0DvsF49QleZvOdjKM98RU2cGfCJDBb7WeoI7Rr3I,2172
441
441
  khoj/routers/twilio.py,sha256=MLsuCm4--ETvr3sLxbF0CL_ehlg_l2rKBSLR2Qh2Xls,1081
442
442
  khoj/routers/web_client.py,sha256=_vyfDaHZZjNoI2LwGNQFRiFmGLkNcgYJe7dOr3mrxH8,4386
@@ -446,21 +446,21 @@ khoj/search_filter/date_filter.py,sha256=7MCXyeDy9TGG81IesLrgV7vnTUDXWe8xj8NeeES
446
446
  khoj/search_filter/file_filter.py,sha256=H47C8yoVMiSub8VWu8wHerlIq-PffFnB08Nm2OJyBE8,1146
447
447
  khoj/search_filter/word_filter.py,sha256=5Yx95aSiqGke9kEIbp8T-Ak4dS9cTd3VxI1SaJoK1wY,1005
448
448
  khoj/search_type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
449
- khoj/search_type/text_search.py,sha256=CNfKD2grjD9BU2qoA82YVQXC1CTit32tc7_Q8vrYC1M,9621
449
+ khoj/search_type/text_search.py,sha256=UEzT_NsHDrtVvbPthNtoCECawKMt68S891QYvVoM63c,9527
450
450
  khoj/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
451
451
  khoj/utils/cli.py,sha256=fI1XQYMtJzLGOKQZQ5XxFOrC8sGjK3Alnteg5U62rWI,3882
452
452
  khoj/utils/config.py,sha256=aiOkH0je8A30DAGYTHMRePrgJonFv_i07_7CdhhhcdA,1805
453
453
  khoj/utils/constants.py,sha256=4pIq5yimBR-uFwqrukwjlFvfr8Ir190x4rCkysn-sbE,4244
454
454
  khoj/utils/fs_syncer.py,sha256=5nqwAZqRk3Nwhkwd8y4IomTPZQmW32GwAqyMzal5KyY,9996
455
- khoj/utils/helpers.py,sha256=uDTZPZLAUrkdwImHb5HqP0JgC1vOk3T5-XXrciCpgMw,42918
456
- khoj/utils/initialization.py,sha256=5eULsvGQv_Kp9bMfrHP8T_QFPjurIFyfq3-rVMWiGa4,15066
455
+ khoj/utils/helpers.py,sha256=h-H3ioGB5PIYLBr-SmUjmNBIkN5-YDXsoK5B1DvI3i4,32005
456
+ khoj/utils/initialization.py,sha256=_KslgIsoo-1A_ZuouHH3WDbV-TpqBSaID_0b-1xXE0U,15169
457
457
  khoj/utils/jsonl.py,sha256=0Ac_COqr8sLCXntzZtquxuCEVRM2c3yKeDRGhgOBRpQ,1192
458
458
  khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
459
- khoj/utils/rawconfig.py,sha256=U8tOr7FPPzn0h-oyK_8Wqlp2ZrnxpFp44iifcTbltqs,5444
459
+ khoj/utils/rawconfig.py,sha256=ASl_h3Ivaa_4lD4kCA0uZsMRgSYCjrgGUPm-Hw1jkLk,5083
460
460
  khoj/utils/state.py,sha256=s_GFWOqRzpEDx0eCPStuzBTK2VEw-qgRpH0aiEdGnDo,1791
461
461
  khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
462
- khoj-1.42.9.dev26.dist-info/METADATA,sha256=N6INUqQwUvoZp8VvBOxdx3tX8swHsHjxxx6PRmtNLE8,8974
463
- khoj-1.42.9.dev26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
464
- khoj-1.42.9.dev26.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
465
- khoj-1.42.9.dev26.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
466
- khoj-1.42.9.dev26.dist-info/RECORD,,
462
+ khoj-1.42.10.dev2.dist-info/METADATA,sha256=bnsPqt0nFYxK2SBuaWlnPFaCMnLCugesas-tXoBdDq0,8974
463
+ khoj-1.42.10.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
464
+ khoj-1.42.10.dev2.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
465
+ khoj-1.42.10.dev2.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
466
+ khoj-1.42.10.dev2.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,s,t){Promise.resolve().then(t.bind(t,42780))},42780:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return er}});var a=t(57437),n=t(63136),i=t.n(n),l=t(2265),o=t(27127),r=t(99376),d=t(14308),c=t(59199);t(2446);var u=t(7436),h=t(5477),m=t(56937),x=t(55287),f=t(60729),p=t(34124),g=t(6512),j=t(37104),v=t(62869),y=t(91890),N=t(68772),b=t(79603),w=t(23594),_=t(34153),S=t(43551),C=t(32046),O=t(5223),k=t(76818),I=t(75256),M=t(24148),E=t(94508),T=t(23518),z=t(57054),B=t(16605);let R=B.fC,L=B.xz,F=l.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:i=4,...l}=e;return(0,a.jsx)(B.VY,{ref:s,align:n,sideOffset:i,className:(0,E.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})});F.displayName=B.VY.displayName;var A=t(93022);function P(e){var s;let{...t}=e,[n,i]=l.useState(!1),[o,r]=(0,l.useState)(void 0),[d,c]=(0,l.useState)(void 0),{data:h,error:x,isLoading:f}=(0,m.h2)(!0),[p,g]=(0,l.useState)([]),j=(0,u.IC)();return((0,l.useEffect)(()=>{if(!f&&h){if(g(h.chat_model_options),t.initialModel)c(h.chat_model_options.find(e=>e.name===t.initialModel));else{let e=h.chat_model_options.find(e=>e.id===h.selected_chat_model_config);!e&&h.chat_model_options.length>0?c(h.chat_model_options[0]):c(e)}}},[h,t.initialModel,f]),(0,l.useEffect)(()=>{d&&h&&t.onSelect(d)},[d,h,t.onSelect]),f)?(0,a.jsx)(A.O,{className:"w-full h-10"}):x?(0,a.jsx)("div",{className:"text-sm text-error",children:x.message}):(0,a.jsx)("div",{className:"grid gap-2 w-[250px]",children:(0,a.jsxs)(z.J2,{open:n,onOpenChange:i,...t,children:[(0,a.jsx)(z.xo,{asChild:!0,children:(0,a.jsxs)(v.z,{variant:"outline",role:"combobox","aria-expanded":n,"aria-label":"Select a model",className:"w-full justify-between text-left",disabled:null!==(s=t.disabled)&&void 0!==s&&s,children:[(0,a.jsx)("p",{className:"truncate",children:d?d.name.substring(0,20):"Select a model..."}),(0,a.jsx)(I.K,{className:"opacity-50"})]})}),(0,a.jsx)(z.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(Z,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)},isActive:t.isActive},e.id))},"models")]})})}):(0,a.jsxs)(R,{children:[(0,a.jsx)(F,{side:"left",align:"start",forceMount:!0,className:"min-h-[280px]",children:(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("h4",{className:"font-medium leading-none",children:null==o?void 0:o.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==o?void 0:o.description}),(null==o?void 0:o.strengths)?(0,a.jsxs)("div",{className:"mt-4 grid gap-2",children:[(0,a.jsx)("h5",{className:"text-sm font-medium leading-none",children:"Strengths"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:o.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{}),(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(Z,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)},isActive:t.isActive},e.id))},"models")]})})]})]})})]})})}function Z(e){let{model:s,isSelected:t,onSelect:n,onPeek:i,isActive:o}=e,r=l.useRef(null);return(0,u.Iy)(r,e=>{e.forEach(e=>{var t;"attributes"===e.type&&"aria-selected"===e.attributeName&&(null===(t=r.current)||void 0===t?void 0:t.getAttribute("aria-selected"))==="true"&&i(s)})}),(0,a.jsxs)(T.di,{onSelect:n,ref:r,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",disabled:!o&&"free"!==s.tier,children:[s.name," ","standard"===s.tier&&(0,a.jsx)("span",{className:"text-green-500 ml-2",children:"(Futurist)"}),(0,a.jsx)(M.J,{className:(0,E.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var J=t(17200),W=t(2602),D=t(69304),K=t(42225),U=t(26815),V=t(9270),G=t(30401);let H=l.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(V.fC,{ref:s,className:(0,E.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-secondary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-500 data-[state=checked]:text-primary-foreground",t),...n,children:(0,a.jsx)(V.z$,{className:(0,E.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(G.Z,{className:"h-4 w-4"})})})});H.displayName=V.fC.displayName;var Q=t(81103),q=t(61312),Y=t(26110),$=t(53647),X=t(84671),ee=t(95186),es=t(27648),et=t(14368);let ea=e=>fetch(e).then(e=>e.json());function en(e){let{...s}=e;return s.isMobileWidth?(0,a.jsx)(D.yo,{open:s.isOpen,onOpenChange:s.onOpenChange,children:(0,a.jsx)(D.ue,{className:"w-[300px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:(0,a.jsx)(el,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(el,{...s})})}function ei(e){let s=(0,K.BI)(),t=X.xF,[n,i]=(0,l.useState)(!1),[o,r]=(0,l.useState)(),[d,c]=(0,l.useState)(),[u,h]=(0,l.useState)(),[m,x]=(0,l.useState)(!1),[f,p]=(0,l.useState)(),[g,j]=(0,l.useState)(!1),[y,S]=(0,l.useState)();return(0,l.useEffect)(()=>{o&&d&&u?j(!0):j(!1)},[o,d,u]),(0,a.jsxs)(Y.Vq,{children:[(0,a.jsx)(Y.hg,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"secondary",children:"Create Agent"})}),(0,a.jsxs)(Y.cZ,{children:[(0,a.jsxs)(Y.fK,{children:[m&&f?(0,a.jsxs)(Y.$N,{children:["Created ",o]}):(0,a.jsx)(Y.$N,{children:"Create a New Agent"}),(0,a.jsx)(Y.GG,{}),(0,a.jsx)(Y.Be,{children:"If these settings have been helpful, create a dedicated agent you can re-use across conversations."})]}),(0,a.jsx)("div",{className:"py-4",children:m&&f?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 py-8",children:[(0,a.jsx)(et.E.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,a.jsx)(N.f,{className:"w-16 h-16 text-green-500",weight:"fill"})}),(0,a.jsx)(et.E.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-center text-lg font-medium text-accent-foreground",children:"Created successfully!"}),(0,a.jsx)(et.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},children:(0,a.jsx)(es.default,{href:"/agents?agent=".concat(f),children:(0,a.jsx)(v.z,{variant:"secondary",className:"mt-2",children:"Manage Agent"})})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U._,{htmlFor:"agent_name",children:"Name"}),(0,a.jsx)(ee.I,{id:"agent_name",className:"w-full p-2 border mt-4 border-slate-500 rounded-lg",disabled:n,value:o,onChange:e=>r(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:h,defaultValue:u,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Color"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:t.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(b.C,{className:"w-6 h-6 mr-2 ".concat((0,X.oz)(e)),weight:"fill"}),e]})},e))})]})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:c,defaultValue:d,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Icon"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:s.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,K.TI)(e,null!=u?u:"gray","w-6","h-6"),e]})},e))})]})})]})]})}),(0,a.jsxs)(Y.cN,{children:[y&&(0,a.jsx)("div",{className:"text-red-500 text-sm",children:y}),!m&&(0,a.jsxs)(v.z,{type:"submit",onClick:()=>void(!n&&(i(!0),fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o,icon:d,color:u,persona:e.customPrompt,chat_model:e.selectedModel,input_tools:e.inputTools,output_modes:e.outputModes,privacy_level:"private"})}).then(e=>e.json()).then(e=>{if(console.log("Success:",e),"detail"in e){S("Error creating agent: ".concat(e.detail)),i(!1);return}x(!0),p(e.slug),i(!1)}).catch(e=>{console.error("Error:",e),S("Error creating agent: ".concat(e)),i(!1)}))),disabled:n||!g,children:[n?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(_.R,{}),"Create"]}),(0,a.jsx)(Y.GG,{})]})]})]})}function el(e){var s,t,n,i,o;let{...r}=e,[d,c]=(0,l.useState)(!1),{data:u,error:h}=(0,J.ZP)("/api/agents/options",ea),{data:p,isLoading:g,error:j}=(0,J.ZP)("/api/agents/conversation?conversation_id=".concat(r.conversationId),ea),{data:y,error:N,isLoading:b}=(0,m.GW)(),[_,I]=(0,l.useState)(),[M,E]=(0,l.useState)(),[T,B]=(0,l.useState)(),[R,L]=(0,l.useState)(),[F,A]=(0,l.useState)(!1),[Z,D]=(0,l.useState)(!p||(null==p?void 0:null===(s=p.slug)||void 0===s?void 0:s.toLowerCase())==="khoj"),[V,G]=(0,l.useState)(),[Y,$]=(0,l.useState)(),[X,ee]=(0,l.useState)(!1),es=null!==(t=null==y?void 0:y.is_active)&&void 0!==t&&t;function et(){if(p){var e,s;B(p.input_tools),G(p.input_tools),(void 0===p.input_tools||0===p.input_tools.length)&&G((null==u?void 0:u.input_tools)?Object.keys(u.input_tools):[]),L(p.output_modes),$(p.output_modes),(void 0===p.output_modes||0===p.output_modes.length)&&$((null==u?void 0:u.output_modes)?Object.keys(u.output_modes):[]),((null===(e=p.name)||void 0===e?void 0:e.toLowerCase())==="khoj"||!0===p.is_hidden)&&c(!0),(null===(s=p.slug)||void 0===s?void 0:s.toLowerCase())==="khoj"?(E(void 0),I(void 0),D(!0)):(D(!1),I(p.persona),E(p.chat_model))}}function en(e,s){return s.includes(e)?s.filter(s=>s!==e):[...s,e]}return(0,l.useEffect)(()=>{et(),A(!1)},[p]),(0,l.useEffect)(()=>{var e,s;if(!p||g)return;let t=!!M&&M!==p.chat_model,a=!!_&&_!==p.persona,n=JSON.stringify((null==T?void 0:T.sort())||[])!==JSON.stringify(null===(e=p.input_tools)||void 0===e?void 0:e.sort()),i=JSON.stringify((null==R?void 0:R.sort())||[])!==JSON.stringify(null===(s=p.output_modes)||void 0===s?void 0:s.sort());A(t||a||n||i)},[M,_,T,R,p,g]),(0,a.jsxs)(f.DD,{collapsible:"none",className:"ml-auto opacity-30 rounded-lg p-2 transition-all transform duration-300 ease-in-out\n ".concat(r.isOpen?"translate-x-0 opacity-100 w-[300px] relative":"translate-x-full opacity-100 w-0 p-0 m-0","\n "),variant:"floating",children:[(0,a.jsxs)(f.TZ,{children:[(0,a.jsx)(f.$l,{children:p&&!d?(0,a.jsx)("div",{className:"flex items-center relative text-sm",children:(0,a.jsxs)("a",{className:"text-lg font-bold flex flex-row items-center",href:"/agents?agent=".concat(p.slug),children:[(0,K.TI)(p.icon,p.color),p.name]})}):(0,a.jsx)("div",{className:"flex items-center relative text-sm justify-between",children:(0,a.jsx)("p",{children:"Chat Options"})})}),(0,a.jsx)(f.Hz,{className:"border-b last:border-none",children:(0,a.jsx)(f.Ks,{className:"gap-0",children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&p.has_files?(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:(0,a.jsx)(S.J,{})}),(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:"Using custom knowledge base"})]})},"agent_knowledge"):null})})},"knowledge"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Instructions"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(k.g,{className:"w-full h-32 resize-none hover:resize-y",value:_||"",onChange:e=>{I(e.target.value)},readOnly:!d,disabled:!d})})})]})},"instructions"),!g&&p&&(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!es&&(0,a.jsx)("a",{href:"/settings",className:"hover:font-bold text-accent-foreground m-2 bg-accent bg-opacity-10 p-1 rounded-lg",children:"Upgrade"})]}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(P,{disabled:!d,onSelect:e=>{E(e.name)},initialModel:Z?void 0:null==p?void 0:p.chat_model,isActive:r.isActive})},"model")})]})},"model"),(0,a.jsx)(z.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(z.xo,{children:["Tools",(0,a.jsx)(C._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(z.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(n=null==u?void 0:u.input_tools)&&void 0!==n?n:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(Q.u,{children:[(0,a.jsx)(Q.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(U._,{htmlFor:s,className:"flex items-center gap-2 text-accent-foreground p-1 cursor-pointer",children:[(0,K.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(H,{id:s,className:"".concat(d?"cursor-pointer":""),checked:(null!=V?V:[]).includes(s),onCheckedChange:()=>{let e=en(s,null!=V?V:[]);B(e),G(e)},disabled:!d,children:s})]})},s),(0,a.jsx)(q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)}),Object.entries(null!==(i=null==u?void 0:u.output_modes)&&void 0!==i?i:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(Q.u,{children:[(0,a.jsx)(Q.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(U._,{htmlFor:s,className:"flex items-center gap-2 p-1 rounded-lg cursor-pointer",children:[(0,K.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(H,{id:s,className:"".concat(d?"cursor-pointer":""),checked:(null!=Y?Y:[]).includes(s),onCheckedChange:()=>{let e=en(s,null!=Y?Y:[]);L(e),$(e)},disabled:!d,children:s})]})},s),(0,a.jsx)(q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)})]})})})]})}),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Files"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(x.J_,{conversationId:r.conversationId,uploadedFiles:[],isMobileWidth:null!==(o=r.isMobileWidth)&&void 0!==o&&o})},"files-conversation")})]})},"files")]}),r.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&!d&&p.is_creator?(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"ghost",onClick:()=>window.location.href="/agents?agent=".concat(null==p?void 0:p.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[!F&&d&&_&&!Z&&M&&(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(ei,{customPrompt:_,selectedModel:M,inputTools:null!=V?V:[],outputModes:null!=Y?Y:[]})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(et(),A(!1)),variant:"ghost",disabled:!d||!F,children:"Reset"})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsxs)(v.z,{className:"w-full ".concat(F?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(F){if(!Z&&(null==p?void 0:p.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";Z&&(e="POST");let s={persona:_,chat_model:M,input_tools:T,output_modes:R,...Z?{}:{slug:null==p?void 0:p.slug}};ee(!0),fetch(Z?"/api/agents/hidden?conversation_id=".concat(r.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{ee(!1),e.json()}).then(e=>{(0,W.j)("/api/agents/conversation?conversation_id=".concat(r.conversationId)),A(!1)}).catch(e=>{console.error("Error:",e),ee(!1)})}})(),disabled:!d||!F||X,children:[X?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(O.Z,{}),X?"Saving":"Save"]})})})]})})},"actions")]})}function eo(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,l.useState)(""),[d,c]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[p,g]=(0,l.useState)(!1),j=(0,l.useRef)(null),v=e.setQueryToProcess,y=e.onConversationIdChange,N=e.isMobileWidth?"w-full":"w-4/6";if((0,l.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,l.useEffect)(()=>{let s=localStorage.getItem("images");if(s){let t=JSON.parse(s);c(t);let a=t.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let t=localStorage.getItem("message");t&&(m(!0),v(t),t.trim().startsWith("/research")&&g(!0));let a=localStorage.getItem("uploadedFiles");if(a){let s=a?JSON.parse(a):[],t=[];for(let e of s)t.push({name:e.name,file_type:e.file_type,content:e.content,size:e.size});localStorage.removeItem("uploadedFiles"),e.setUploadedFiles(t)}},[v,e.setImages,s]),(0,l.useEffect)(()=>{t&&(m(!0),v(t))},[t,v]),(0,l.useEffect)(()=>{s&&(null==y||y(s))},[s,y]),(0,l.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(m(!1),c([]),e.setUploadedFiles(void 0)):n("")},[e.streamedMessages]),!s){window.location.href="/";return}return(0,a.jsxs)("div",{className:"flex flex-row h-full w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:i().chatBodyFull,children:(0,a.jsx)(o.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:u?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:N,setIsChatSideBarOpen:e.setIsChatSideBarOpen,onRetryMessage:e.onRetryMessage})}),(0,a.jsx)("div",{className:"".concat(i().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(N," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:e.isParentProcessing||!1,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:p,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)(en,{conversationId:s,isActive:e.isActive,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})]})}function er(){let e="Khoj AI - Chat",[s,t]=(0,l.useState)(null),[n,o]=(0,l.useState)(!0),[r,h]=(0,l.useState)(e),[N,b]=(0,l.useState)(null),[w,_]=(0,l.useState)([]),[S,C]=(0,l.useState)(""),[O,k]=(0,l.useState)(!1),[I,M]=(0,l.useState)(void 0),[E,T]=(0,l.useState)([]),[z,B]=(0,l.useState)(null),[R,L]=(0,l.useState)(!1),[F,A]=(0,l.useState)(!1),{locationData:P,locationDataError:Z,locationDataLoading:J}=(0,u.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:W,error:D,isLoading:K}=(0,m.GW)(),U=(0,u.IC)(),[V,G]=(0,l.useState)(!1);async function H(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let s=e.body.getReader(),t=new TextDecoder,a="␃\uD83D\uDD1A␗",n="",i=[],l={},o={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),k(!1),T([]),N&&(0,c.tQ)(N,h);break}for(n+=t.decode(d,{stream:!0});-1!==(e=n.indexOf(a));){let s=n.slice(0,e);if(n=n.slice(e+a.length),s){let e=w.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:i,onlineContext:l,codeContext:o}=(0,c.VK)(s,e,i,l,o)),_([...w])}}}}async function Q(){if(localStorage.removeItem("message"),!S||!N){k(!1);return}let e={q:S,conversation_id:N,stream:!0,interrupt:F,...P&&{city:P.city,region:P.region,country:P.country,country_code:P.countryCode,timezone:P.timezone},...E.length>0&&{images:E},...I&&{files:I}};A(!1);let s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==z?void 0:z.signal});try{await H(s)}catch(i){let e;try{e=await s.json()}catch(s){e={streamError:"Error reading API error response stream. Expected JSON response."}}console.error(e);let t=w.find(e=>!e.completed);if(!t)return;let a=i.message,n=i.name;a.includes("Error in input stream")?t.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.streamError?t.rawResponse="Umm, not sure what just happened but I lost my train of thought. Could you try again or ask my developers to look into this if the issue persists? They can be contacted at the Khoj Github, Discord or team@khoj.dev.":429===s.status?"detail"in e?t.rawResponse="".concat(e.detail):t.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":"AbortError"===n?t.rawResponse="I've stopped processing this message. If you'd like to continue, please send the message again.":t.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),t.completed=!0,_([...w]),C(""),k(!1)}}return(0,l.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,u.EK)()},[]),(0,l.useEffect)(()=>{R&&(null==z||z.abort(),function(){let e=w.find(e=>!e.completed);e&&(e.completed=!0,_([...w]),k(!1))}(),A(!0),L(!1))},[R]),(0,l.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:I};_(s=>[...s,e]),k(!0),B(new AbortController)}},[S]),(0,l.useEffect)(()=>{O&&!J&&Q()},[O,J]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)(p.S,{conversationId:N||""}),(0,a.jsxs)(f.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,a.jsx)(f.vP,{className:"-ml-1"}),(0,a.jsx)(g.Z,{orientation:"vertical",className:"mr-2 h-4"}),N&&(0,a.jsx)("div",{className:"".concat(i().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:U?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(j.VO,{className:"h-auto w-16"})}):r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:r}),(0,a.jsx)(x.En,{conversationId:N,setTitle:h,sizing:"md"})]})}),(0,a.jsx)("div",{className:"flex justify-end items-start gap-2 text-sm ml-auto",children:(0,a.jsx)(v.z,{variant:"ghost",size:"icon",className:"h-12 w-12 data-[state=open]:bg-accent",onClick:()=>G(!V),children:(0,a.jsx)(y.T,{className:"w-6 h-6"})})})]}),(0,a.jsxs)("div",{className:"".concat(i().main," ").concat(i().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(r&&r!==e?": ".concat(r):"")}),(0,a.jsx)("div",{className:i().chatBox,children:(0,a.jsx)("div",{className:i().chatBoxBody,children:(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(eo,{isLoggedIn:!!W,streamedMessages:w,setStreamedMessages:_,chatOptionsData:s,setTitle:h,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:U,onConversationIdChange:e=>{b(e)},setImages:T,setTriggeredAbort:L,isChatSideBarOpen:V,setIsChatSideBarOpen:G,isActive:null==W?void 0:W.is_active,isParentProcessing:O,onRetryMessage:(e,s)=>{if(!e){console.warn("No query provided for retry");return}s&&(_(e=>e.filter(e=>e.turnId!==s)),fetch("/api/chat/conversation/message",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:N,turn_id:s})}).catch(e=>{console.error("Failed to delete message for retry:",e)})),C(e)}})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),i=t(6394),l=t(90535),o=t(94508);let r=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.f,{ref:s,className:(0,o.cn)(r(),t),...n})});d.displayName=i.f.displayName},53647:function(e,s,t){"use strict";t.d(s,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var a=t(57437),n=t(2265),i=t(56873),l=t(40875),o=t(22135),r=t(30401),d=t(94508);let c=i.fC;i.ZA;let u=i.B4,h=n.forwardRef((e,s)=>{let{className:t,children:n,...o}=e;return(0,a.jsxs)(i.xz,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[n,(0,a.jsx)(i.JO,{asChild:!0,children:(0,a.jsx)(l.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=i.xz.displayName;let m=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.u_,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})});m.displayName=i.u_.displayName;let x=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.$G,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})})});x.displayName=i.$G.displayName;let f=n.forwardRef((e,s)=>{let{className:t,children:n,position:l="popper",...o}=e;return(0,a.jsx)(i.h_,{children:(0,a.jsxs)(i.VY,{ref:s,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:l,...o,children:[(0,a.jsx)(m,{}),(0,a.jsx)(i.l_,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,a.jsx)(x,{})]})})});f.displayName=i.VY.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.__,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n})}).displayName=i.__.displayName;let p=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,a.jsxs)(i.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(i.wU,{children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(i.eT,{children:n})]})});p.displayName=i.ck.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",t),...n})}).displayName=i.Z0.displayName},63136:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq"}}},function(e){e.O(0,[8255,4173,3954,1860,2939,7200,8667,1327,4447,3592,5639,9568,2327,5477,7127,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);