khoj 1.20.4.dev13__py3-none-any.whl → 1.20.5.dev17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- khoj/configure.py +6 -32
- khoj/database/adapters/__init__.py +76 -28
- khoj/database/admin.py +15 -3
- khoj/database/migrations/0056_searchmodelconfig_cross_encoder_model_config.py +17 -0
- khoj/database/migrations/0057_remove_serverchatsettings_default_model_and_more.py +51 -0
- khoj/database/models/__init__.py +7 -4
- khoj/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/{9178-5a1fa2b9023249af.js → 9178-b9ab3fa2e9be8287.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-8c9b92236d4daf4b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/settings/page-ddcd51147d18c694.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{webpack-c6008e79c8ef349d.js → webpack-9953d80989df2d20.js} +1 -1
- khoj/interface/compiled/agents/index.html +1 -1
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +1 -1
- khoj/interface/compiled/automations/index.txt +1 -1
- khoj/interface/compiled/chat/index.html +1 -1
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/factchecker/index.html +1 -1
- khoj/interface/compiled/factchecker/index.txt +2 -2
- khoj/interface/compiled/index.html +1 -1
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +2 -2
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/processor/conversation/anthropic/anthropic_chat.py +6 -2
- khoj/processor/conversation/offline/chat_model.py +15 -3
- khoj/processor/conversation/openai/gpt.py +6 -3
- khoj/processor/conversation/openai/utils.py +1 -1
- khoj/processor/conversation/prompts.py +20 -0
- khoj/processor/embeddings.py +3 -1
- khoj/processor/tools/online_search.py +19 -8
- khoj/routers/api.py +3 -1
- khoj/routers/api_chat.py +21 -9
- khoj/routers/helpers.py +38 -14
- khoj/search_filter/file_filter.py +5 -2
- {khoj-1.20.4.dev13.dist-info → khoj-1.20.5.dev17.dist-info}/METADATA +1 -1
- {khoj-1.20.4.dev13.dist-info → khoj-1.20.5.dev17.dist-info}/RECORD +49 -47
- khoj/interface/compiled/_next/static/chunks/app/chat/page-51ab7c4b766ff344.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-e83f6fa32691ca64.js +0 -1
- /khoj/interface/compiled/_next/static/{EuaXDNeXisAc9H0EHd10x → QSaUkpIwMzbLQnDFgPg3j}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{EuaXDNeXisAc9H0EHd10x → QSaUkpIwMzbLQnDFgPg3j}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8423-132ea64eac83fd43.js → 8423-898d821eaab634af.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9417-2e54c6fd056982d8.js → 9417-5d14ac74aaab2c66.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/app/agents/{page-922694b75f1fb67b.js → page-989a824c640bc532.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/app/{page-ef4e7248d37fae41.js → page-851860583273ab5d.js} +0 -0
- {khoj-1.20.4.dev13.dist-info → khoj-1.20.5.dev17.dist-info}/WHEEL +0 -0
- {khoj-1.20.4.dev13.dist-info → khoj-1.20.5.dev17.dist-info}/entry_points.txt +0 -0
- {khoj-1.20.4.dev13.dist-info → khoj-1.20.5.dev17.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
khoj/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
khoj/configure.py,sha256=
|
|
2
|
+
khoj/configure.py,sha256=C5xSS_1ptxgfRfabQ0zZoFteASIS4mCFMvdkdCMVvSs,17019
|
|
3
3
|
khoj/main.py,sha256=58Rssq2H5AM69dA2UyGHye3vPAMp5RRS6xLcGkB_G_w,8147
|
|
4
4
|
khoj/manage.py,sha256=njo6uLxGaMamTPesHjFEOIBJbpIUrz39e1V59zKj544,664
|
|
5
5
|
khoj/app/README.md,sha256=PSQjKCdpU2hgszLVF8yEhV7TWhbEEb-1aYLTRuuAsKI,2832
|
|
@@ -8,10 +8,10 @@ khoj/app/asgi.py,sha256=soh3C1xazlgHt_bDgKzrfzo2TKXbNYJsckcXNEgTip8,388
|
|
|
8
8
|
khoj/app/settings.py,sha256=M6sQUu_AdeKl3eruecBaifRBhYOBIait0KA2NPizcBM,6198
|
|
9
9
|
khoj/app/urls.py,sha256=7ECnusoAPAfbO_H_b5FUzYGvnb4LLdWaRDyKNvYuBvg,869
|
|
10
10
|
khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
khoj/database/admin.py,sha256=
|
|
11
|
+
khoj/database/admin.py,sha256=bYF13peHgHpugd9bkEwYzO1r-r5l9JIDjCQbdmK3tT8,9166
|
|
12
12
|
khoj/database/apps.py,sha256=pM4tkX5Odw4YW_hLLKK8Nd5kqGddf1en0oMCea44RZw,153
|
|
13
13
|
khoj/database/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
14
|
-
khoj/database/adapters/__init__.py,sha256=
|
|
14
|
+
khoj/database/adapters/__init__.py,sha256=1cBuozhTjwoVynfidoBf8KzA7X68gvjRnEufEc7y650,52651
|
|
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_generated_images_url.py,sha256=w52FwRlyOL4YRpp9O6jJUjSIuGLxVhaS2w1D7gtQgOE,2644
|
|
@@ -80,25 +80,27 @@ khoj/database/migrations/0052_alter_searchmodelconfig_bi_encoder_docs_encode_con
|
|
|
80
80
|
khoj/database/migrations/0053_agent_style_color_agent_style_icon.py,sha256=j30FqSaRJYiDXlFdip7Nslw3OZZWkymQbcV4yie1hbk,2054
|
|
81
81
|
khoj/database/migrations/0054_alter_agent_style_color.py,sha256=f6RnyvEMR0-Y4R2CtNWfVYHxI_y_nADnD-7o_FoISb4,1151
|
|
82
82
|
khoj/database/migrations/0055_alter_agent_style_icon.py,sha256=0lkxmyDmOW_3CsnLl8iEsCI6qHi2YS9wfdFfDMNbZ4k,1218
|
|
83
|
+
khoj/database/migrations/0056_searchmodelconfig_cross_encoder_model_config.py,sha256=RuR5lyAp6T_bRg2gxhOGS4dfXOWBBEQ3bAvKf4ru5Gw,430
|
|
84
|
+
khoj/database/migrations/0057_remove_serverchatsettings_default_model_and_more.py,sha256=q00paabxofoeWe3FXVLE901KwEn9Q3bRMW2TtAbmtUE,1608
|
|
83
85
|
khoj/database/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
|
-
khoj/database/models/__init__.py,sha256=
|
|
86
|
+
khoj/database/models/__init__.py,sha256=HC25ln3PL1DtjcAoPaTsOcWpb9Ley1zvBGuJwkgVbpM,19085
|
|
85
87
|
khoj/interface/compiled/agents.svg,sha256=yFCRwIM-Qawa0C5ggAo3ekb-Q1ElmotBOKIGhtfIQqM,1722
|
|
86
88
|
khoj/interface/compiled/automation.svg,sha256=o7L2XYwJWRSMvl8h6TBv6Pt28RTRVMHqF04EPY0AFj0,1467
|
|
87
89
|
khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvtM3A,2424
|
|
88
90
|
khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
|
|
89
91
|
khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
|
|
90
92
|
khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
|
|
91
|
-
khoj/interface/compiled/index.html,sha256=
|
|
92
|
-
khoj/interface/compiled/index.txt,sha256=
|
|
93
|
+
khoj/interface/compiled/index.html,sha256=NdkTC0T-FDvuDOakogl12tu6C84LJ4Dz7Gh7D6FFlm4,11912
|
|
94
|
+
khoj/interface/compiled/index.txt,sha256=oCkAATeojogPQaVvkIa8vTlumEhDsNeT6srUQOaMKLU,5515
|
|
93
95
|
khoj/interface/compiled/khoj.webmanifest,sha256=lsknYkvEdMbRTOUYKXPM_8krN2gamJmM4u3qj8u9lrU,1682
|
|
94
96
|
khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
|
|
95
97
|
khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
|
|
96
98
|
khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
|
|
97
99
|
khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
|
|
98
100
|
khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
|
|
99
|
-
khoj/interface/compiled/404/index.html,sha256=
|
|
100
|
-
khoj/interface/compiled/_next/static/
|
|
101
|
-
khoj/interface/compiled/_next/static/
|
|
101
|
+
khoj/interface/compiled/404/index.html,sha256=QepkvMZWGESIfujGGsokG-_B92YCTWEVhut4wWR4XY0,11947
|
|
102
|
+
khoj/interface/compiled/_next/static/QSaUkpIwMzbLQnDFgPg3j/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
|
|
103
|
+
khoj/interface/compiled/_next/static/QSaUkpIwMzbLQnDFgPg3j/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
|
102
104
|
khoj/interface/compiled/_next/static/chunks/1603-fb2d80ae73990df3.js,sha256=CCbOXifiixbhMf7lgTG96225tP1Pou72Wb0Zh6KC1Rs,71007
|
|
103
105
|
khoj/interface/compiled/_next/static/chunks/2614-7cf01576d4457a75.js,sha256=aUjhjyxNPrZr4bLKzGkGgHH8K4J6g9dfiRjabnmvSDc,1104737
|
|
104
106
|
khoj/interface/compiled/_next/static/chunks/3062-a42d847c919a9ea4.js,sha256=9UDsx_sY4b4x6jjR_A0AymC9rjBCoCcEpGR4U-0Ej3g,256170
|
|
@@ -109,11 +111,11 @@ khoj/interface/compiled/_next/static/chunks/6648-ff677e51f1b2bcf1.js,sha256=9bJl
|
|
|
109
111
|
khoj/interface/compiled/_next/static/chunks/7023-52c1be60135eb057.js,sha256=CI8R2DdZNEt3nACmiXUG1NnKhnal1ImzXglW-xDuxcI,123657
|
|
110
112
|
khoj/interface/compiled/_next/static/chunks/7071-b4711cecca6619a8.js,sha256=z-KSur3LbIFPg_90wN0EMhV0et9cJVfG_MR9POVmdCQ,7801
|
|
111
113
|
khoj/interface/compiled/_next/static/chunks/743-1a64254447cda71f.js,sha256=YH4bEkjmttcOGzAzXKaDCJ-C68jk2qy1cQJP2ljjoAA,100834
|
|
112
|
-
khoj/interface/compiled/_next/static/chunks/8423-
|
|
114
|
+
khoj/interface/compiled/_next/static/chunks/8423-898d821eaab634af.js,sha256=W8aFQibnAqcbhPYoD_WzHKoMwaWt3jXdan7n_LoY4t4,10327
|
|
113
115
|
khoj/interface/compiled/_next/static/chunks/9001-acbca3e19b1a5ddf.js,sha256=M2hBSe8WTnjEmUlOiOgt_zDJtv3sc4ghnubhkZyMvVA,35460
|
|
114
116
|
khoj/interface/compiled/_next/static/chunks/9162-4a6d0d0dc5e27618.js,sha256=2csnvP4rJcL4oZlBAEkzeSxBJy4gwYxzAnqzeWbe9fw,149225
|
|
115
|
-
khoj/interface/compiled/_next/static/chunks/9178-
|
|
116
|
-
khoj/interface/compiled/_next/static/chunks/9417-
|
|
117
|
+
khoj/interface/compiled/_next/static/chunks/9178-b9ab3fa2e9be8287.js,sha256=oPlzSM8_yBFdp0iNTO1OAeHniR48SsjjZGsTlheBUVQ,17593
|
|
118
|
+
khoj/interface/compiled/_next/static/chunks/9417-5d14ac74aaab2c66.js,sha256=FZ8xOLMdzrlVmwtcyuQSy8bBwd8_UZ1hH3FlL4DwXpA,17252
|
|
117
119
|
khoj/interface/compiled/_next/static/chunks/9693-91b03052c5cabded.js,sha256=htVs3WyaR5jF7tXL_VBwqtPcQ53T3s9jWRazqz7DU-c,28957
|
|
118
120
|
khoj/interface/compiled/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js,sha256=wK1TsLdl56xtbQG6HMRDpylzTOYXQaAnnn2xobFnX40,267216
|
|
119
121
|
khoj/interface/compiled/_next/static/chunks/fd9d1056-2b978342deb60015.js,sha256=2lquiZSfbI-gX4j4TW4JSMLL_D5ShqwydgWpFyXrTy8,172834
|
|
@@ -121,22 +123,22 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
|
|
|
121
123
|
khoj/interface/compiled/_next/static/chunks/main-175c164f5e0f026c.js,sha256=hlUnjERudON4V4kUKprrFz1e9JRtSp4A9i7vnM-1bzA,110324
|
|
122
124
|
khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js,sha256=i52E7sWOcSq1G8eYZL3mtTxbUbwRNxcAbSWQ6uWpMsY,475
|
|
123
125
|
khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
|
|
124
|
-
khoj/interface/compiled/_next/static/chunks/webpack-
|
|
126
|
+
khoj/interface/compiled/_next/static/chunks/webpack-9953d80989df2d20.js,sha256=q5HW1s5tBDHSX4l8Q_2R6b49Mil2ThSfK48iYKZ2ghI,3721
|
|
125
127
|
khoj/interface/compiled/_next/static/chunks/app/layout-f3e40d346da53112.js,sha256=nekGSUVbvB81OfqGgJa2UoDmbxPhNwFwtc4o11O_1jI,442
|
|
126
|
-
khoj/interface/compiled/_next/static/chunks/app/page-
|
|
128
|
+
khoj/interface/compiled/_next/static/chunks/app/page-851860583273ab5d.js,sha256=Ocjky2Cm-ctmhs1r4oSRBYyMfkotM0ErcWVTVCGei6Y,28601
|
|
127
129
|
khoj/interface/compiled/_next/static/chunks/app/_not-found/page-07ff4ab42b07845e.js,sha256=3mCUnxfMxyK44eqk21TVBrC6u--WSbvx31fTmQuOvMQ,1755
|
|
128
130
|
khoj/interface/compiled/_next/static/chunks/app/agents/layout-e71c8e913cccf792.js,sha256=VyIMrkvntFObMzXF-elNtngJ8mBdjg8XrOGfboJ2f_4,372
|
|
129
|
-
khoj/interface/compiled/_next/static/chunks/app/agents/page-
|
|
131
|
+
khoj/interface/compiled/_next/static/chunks/app/agents/page-989a824c640bc532.js,sha256=3jU-Yi9AqZMAvWyGhiVjy9SofvHSUHSUV65CbBpu3Rc,18086
|
|
130
132
|
khoj/interface/compiled/_next/static/chunks/app/automations/layout-27c28e923c9b1ff0.js,sha256=d2vJ_lVB0pfeFXNUPzHAe1ca5NzdNowHPh___SPqugM,5143
|
|
131
133
|
khoj/interface/compiled/_next/static/chunks/app/automations/page-d7972645ccb80df1.js,sha256=elAjqbgd_xrq2ABcEECldivUA3OCN4AxXZiNvOGmT9s,33990
|
|
132
134
|
khoj/interface/compiled/_next/static/chunks/app/chat/layout-8102549127db3067.js,sha256=YIoA3fqOBt8nKWw5iQAwA_avg2t1Q5Afn65IA5PBOz4,374
|
|
133
|
-
khoj/interface/compiled/_next/static/chunks/app/chat/page-
|
|
135
|
+
khoj/interface/compiled/_next/static/chunks/app/chat/page-8c9b92236d4daf4b.js,sha256=UVAJVtwJgWWakr7uIeSm45qPUEzznZPpHSKpocZ0-E4,10334
|
|
134
136
|
khoj/interface/compiled/_next/static/chunks/app/factchecker/layout-7b30c541c05fb904.js,sha256=yub2AuBKHKSCqrHRFnkZv9JXLmLJLOB99iiaD3DtZQM,170
|
|
135
137
|
khoj/interface/compiled/_next/static/chunks/app/factchecker/page-60be5e3295e2c0bc.js,sha256=cN2wWLvSbGkzahP9s8RQskobNoS2Hu4jCSIizV_lHds,13987
|
|
136
138
|
khoj/interface/compiled/_next/static/chunks/app/search/layout-3720f1362310bebb.js,sha256=Smpa4MQaw5ItashtspsDKsOvRa6sOXH_lv4jIfWIbNI,170
|
|
137
139
|
khoj/interface/compiled/_next/static/chunks/app/search/page-dcd385f03255ef36.js,sha256=Q-lnlHhL_GX0hGenIMnEX4W8jjUErEms0N96Dtyv9Dg,6953
|
|
138
140
|
khoj/interface/compiled/_next/static/chunks/app/settings/layout-6f9314b0d7a26046.js,sha256=ikl3vCXnp81sa24uPSuRbgvgDtpHGWfhxEs4OAOYXIM,5347
|
|
139
|
-
khoj/interface/compiled/_next/static/chunks/app/settings/page-
|
|
141
|
+
khoj/interface/compiled/_next/static/chunks/app/settings/page-ddcd51147d18c694.js,sha256=b3AdfCsPZkOLeMT1hpZnu0Z5GUd1mOISPNU3tIJLNhU,31894
|
|
140
142
|
khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-39f03f9e32399f0f.js,sha256=ClS8wrj6HOsRL4VX8DMiqX_MlQDsi_3CA-AQt4m7vuA,373
|
|
141
143
|
khoj/interface/compiled/_next/static/chunks/app/share/chat/page-699b364dc6fbf139.js,sha256=O6iOKdiyqchmlABUse3WokkisoHsn8ZRWMFZ_nqNXP0,10146
|
|
142
144
|
khoj/interface/compiled/_next/static/chunks/pages/_app-f870474a17b7f2fd.js,sha256=eqdFPAN_XFyMUzZ9qwFk-_rhMWZrU7lgNVt1foVUANo,286
|
|
@@ -222,8 +224,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
|
|
|
222
224
|
khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
|
|
223
225
|
khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
|
|
224
226
|
khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
|
|
225
|
-
khoj/interface/compiled/agents/index.html,sha256=
|
|
226
|
-
khoj/interface/compiled/agents/index.txt,sha256=
|
|
227
|
+
khoj/interface/compiled/agents/index.html,sha256=ZJ8L4q7jPaxiEJOTL0poAExDT6Lkj6FexaQk2b1O8GY,12391
|
|
228
|
+
khoj/interface/compiled/agents/index.txt,sha256=WGkvB1vZPhApfJ6Yaqlld5-vUYm-TSoOgq_FoIK7cLY,5942
|
|
227
229
|
khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
|
|
228
230
|
khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png,sha256=aTxivDb3CYyThkVZWz8A19xl_dNut5DbkXhODWF3A9Q,5640
|
|
229
231
|
khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png,sha256=xPCMLHiaL7lYOdQLZrKwWE-Qjn5ZaysSZB0ScYv4UZU,12312
|
|
@@ -234,18 +236,18 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
|
|
|
234
236
|
khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
|
|
235
237
|
khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
|
|
236
238
|
khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
|
|
237
|
-
khoj/interface/compiled/automations/index.html,sha256=
|
|
238
|
-
khoj/interface/compiled/automations/index.txt,sha256=
|
|
239
|
-
khoj/interface/compiled/chat/index.html,sha256=
|
|
240
|
-
khoj/interface/compiled/chat/index.txt,sha256=
|
|
241
|
-
khoj/interface/compiled/factchecker/index.html,sha256=
|
|
242
|
-
khoj/interface/compiled/factchecker/index.txt,sha256=
|
|
243
|
-
khoj/interface/compiled/search/index.html,sha256=
|
|
244
|
-
khoj/interface/compiled/search/index.txt,sha256=
|
|
245
|
-
khoj/interface/compiled/settings/index.html,sha256=
|
|
246
|
-
khoj/interface/compiled/settings/index.txt,sha256
|
|
247
|
-
khoj/interface/compiled/share/chat/index.html,sha256=
|
|
248
|
-
khoj/interface/compiled/share/chat/index.txt,sha256=
|
|
239
|
+
khoj/interface/compiled/automations/index.html,sha256=BTrFbPIEYe6HCzlqMN_RGcPLi9gDFx3nxxK-RrSMY1U,30808
|
|
240
|
+
khoj/interface/compiled/automations/index.txt,sha256=Z1HkFXOjsa98dXXIJTepGfIzPwNdeLdK07nbSvTkkGY,5580
|
|
241
|
+
khoj/interface/compiled/chat/index.html,sha256=bv5d3kZ2H9db2XRN87PXltFdWwrEAJMMPY1I1YuCGeo,13566
|
|
242
|
+
khoj/interface/compiled/chat/index.txt,sha256=_YAzCYImumYvOlJ7g7LEL4-y6Sz2oLtf_XEhs1FlRwk,6421
|
|
243
|
+
khoj/interface/compiled/factchecker/index.html,sha256=tlzwvPWkJaOagLkxfXzYtXTH2zRhlVT_AMuQkAND8Qk,29839
|
|
244
|
+
khoj/interface/compiled/factchecker/index.txt,sha256=bSshj3AA8ANXq9bQfo5K4qgfIbAMfQIiHWaZ5JtFakA,5735
|
|
245
|
+
khoj/interface/compiled/search/index.html,sha256=L1Zem1QHeKYqFTZ8lxTcuny4oF-81_lXhtEOvZferOY,30154
|
|
246
|
+
khoj/interface/compiled/search/index.txt,sha256=cL3yy1Guv3P37_y9BmYWyD69Z1C3VDlujAq_LcvcJqo,5249
|
|
247
|
+
khoj/interface/compiled/settings/index.html,sha256=XnqYIT_80CD1BSyE2GWP-kWe_jprYdU9ywfnTGC7WhM,12827
|
|
248
|
+
khoj/interface/compiled/settings/index.txt,sha256=-CzIQKwnTX_LbWE0aICC-wF5wmr-a3zCG_q96NRqz7E,6073
|
|
249
|
+
khoj/interface/compiled/share/chat/index.html,sha256=K8304ga1udcGU08dhV7zPGsJi-q5UXzGOSEh4sxSB7Q,14896
|
|
250
|
+
khoj/interface/compiled/share/chat/index.txt,sha256=xHEcsDZIeqdrxfJA2qYCFV-WhMwF3W48JOKBf19cW2Y,7239
|
|
249
251
|
khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
|
|
250
252
|
khoj/interface/email/magic_link.html,sha256=jXY_2hD3o15Ns5UDzbjLT8FHBnZiS7jo38YkYXIS-4w,947
|
|
251
253
|
khoj/interface/email/task.html,sha256=yXywzC-5P4nXbhqvgCmwcCpTRbD5eWuDXMpgYSotztM,3311
|
|
@@ -276,7 +278,7 @@ khoj/migrations/migrate_processor_config_openai.py,sha256=FfeUU2JPQMtlr1iYoc4Cer
|
|
|
276
278
|
khoj/migrations/migrate_server_pg.py,sha256=b6ULFFBEF__W10YpgF28deKoOzGqDbdvyL4nBdj3eNU,5015
|
|
277
279
|
khoj/migrations/migrate_version.py,sha256=6CTsLuxiLnFVF8A7CjsIz3PcnJd8fAOZeIx6tTu6Vgg,569
|
|
278
280
|
khoj/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
279
|
-
khoj/processor/embeddings.py,sha256=
|
|
281
|
+
khoj/processor/embeddings.py,sha256=MUUNvv_2zDmm5auOhEyU_uAcl6wvdrUsTvpT7UbSMQ8,5262
|
|
280
282
|
khoj/processor/content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
281
283
|
khoj/processor/content/text_to_entries.py,sha256=Oa4Ny8c5S1_IGCmjCtUI45hX1fPTRwxXhHg1lHFqHy8,14537
|
|
282
284
|
khoj/processor/content/docx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -296,33 +298,33 @@ khoj/processor/content/pdf/pdf_to_entries.py,sha256=OE90osFchohih3RYvDmZepbtzWoG
|
|
|
296
298
|
khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
297
299
|
khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=97i7Cm0DTY7jW4iqKOT_oVc2ooa_XhQ8iImsljp1Kek,4994
|
|
298
300
|
khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
299
|
-
khoj/processor/conversation/prompts.py,sha256=
|
|
301
|
+
khoj/processor/conversation/prompts.py,sha256=TGMniRnekGkJ2h6k2eCMqrUR5CE8AW8hixMUyKrZY4I,33527
|
|
300
302
|
khoj/processor/conversation/utils.py,sha256=_uWu1nxcY-Cv2ip-TBdyqepUkMYhijvzjnproumvzXk,10586
|
|
301
303
|
khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
302
|
-
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=
|
|
304
|
+
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=fOT75wfC4r53M_tGDL6T7kvnRekZbdVM3jvvl3ohH9w,8108
|
|
303
305
|
khoj/processor/conversation/anthropic/utils.py,sha256=uc9d_gIk4Ux2NRlkw3FP9L9KeLRoUI7nC_qb2Qp6d_4,3253
|
|
304
306
|
khoj/processor/conversation/offline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
305
|
-
khoj/processor/conversation/offline/chat_model.py,sha256=
|
|
307
|
+
khoj/processor/conversation/offline/chat_model.py,sha256=twkCgnPGvPYxwvp1EWrS4F6k0zG6kigVfmqmfYrO26M,9741
|
|
306
308
|
khoj/processor/conversation/offline/utils.py,sha256=n2T3vwAIZnSe9-UN1VORLPrLEUcamXXE9isL2ie-9R8,3033
|
|
307
309
|
khoj/processor/conversation/offline/whisper.py,sha256=DJI-8y8DULO2cQ49m2VOvRyIZ2TxBypc15gM8O3HuMI,470
|
|
308
310
|
khoj/processor/conversation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
309
|
-
khoj/processor/conversation/openai/gpt.py,sha256=
|
|
310
|
-
khoj/processor/conversation/openai/utils.py,sha256=
|
|
311
|
+
khoj/processor/conversation/openai/gpt.py,sha256=KHkTVo8cpEhTc01HDSwQfQSoI81nmx14A-nYep50_do,7312
|
|
312
|
+
khoj/processor/conversation/openai/utils.py,sha256=ozEsdrfm12yoi7XqXIgzF3QpKz2LSkXJ_Q9tn5hV4TQ,4131
|
|
311
313
|
khoj/processor/conversation/openai/whisper.py,sha256=RuwDtxSJrVWYdZz4aVnk0XiMQy9w8W9lFcVfE0hMiFY,432
|
|
312
314
|
khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
313
315
|
khoj/processor/speech/text_to_speech.py,sha256=Q7sapi5Hv6woXOumtrGqR0t6izZrFBkWXFOGrHM6dJ4,1929
|
|
314
316
|
khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
315
|
-
khoj/processor/tools/online_search.py,sha256=
|
|
317
|
+
khoj/processor/tools/online_search.py,sha256=G7W_g4ZmdyMhsxREpPAnaXt5OA0N4QoKdQBZp-qTdR0,9895
|
|
316
318
|
khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
317
|
-
khoj/routers/api.py,sha256=
|
|
319
|
+
khoj/routers/api.py,sha256=I-mQ6FSXw99yIRGMNDB_YQbqN82YE69WImnKjdeRvpM,25619
|
|
318
320
|
khoj/routers/api_agents.py,sha256=ks8QzjmZiio6j1QGi6xFtDmVxd9lvC6LPB-WcDPnF8o,1525
|
|
319
|
-
khoj/routers/api_chat.py,sha256=
|
|
321
|
+
khoj/routers/api_chat.py,sha256=4cbb7rgY50lXnNKbDYZMM6Kj5uF1B6Tf3EuBm4xTAtM,35943
|
|
320
322
|
khoj/routers/api_content.py,sha256=OfY05ggRmg0FuVWzodBfV_5Gc6UbGCfchiIk8eqKA2o,17387
|
|
321
323
|
khoj/routers/api_model.py,sha256=5m7JWwgd9jILiLivRu7NEyY2E-tUkqoEkGg6j6uM1g0,4646
|
|
322
324
|
khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
|
|
323
325
|
khoj/routers/auth.py,sha256=pCOLSRihJWcn097DRPxLjPdlejsjHJFRs9jHIzLujZU,6247
|
|
324
326
|
khoj/routers/email.py,sha256=jA4jDTrYHUpY7mFHL4himeRlTBLRQmQKHqC91Dw1Zu0,3730
|
|
325
|
-
khoj/routers/helpers.py,sha256=
|
|
327
|
+
khoj/routers/helpers.py,sha256=n_OEREg-hDRFqcRZkcXN4L56GdlAuo6J2VfNfvevS-A,63828
|
|
326
328
|
khoj/routers/notion.py,sha256=0iG_DPVjg8n_LBWGHA8M6eHnJJDL-isARSEHTYStz6c,2809
|
|
327
329
|
khoj/routers/storage.py,sha256=9ZfBsr_omxdFV-Lcj6p30xTQcF_7wwCZ9XFJukzjITE,1429
|
|
328
330
|
khoj/routers/subscription.py,sha256=qEyV7m7mrY6MGtaij8W3v61tpzX2a7ydm2B-E8h_R-M,4285
|
|
@@ -331,7 +333,7 @@ khoj/routers/web_client.py,sha256=-bmzl6yCLgYxCnyIOYS0DePNZtcC5z2k0lk-EmbK2pg,47
|
|
|
331
333
|
khoj/search_filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
332
334
|
khoj/search_filter/base_filter.py,sha256=BzoZA_wAUg_eZ5vhaaipwVTSG0ZMxWCHxHsZrzo4KS0,358
|
|
333
335
|
khoj/search_filter/date_filter.py,sha256=4VL63kDVqYKFOzkCeV6R8Z8lxFaAbbn_z_RWaWQNDWY,10103
|
|
334
|
-
khoj/search_filter/file_filter.py,sha256=
|
|
336
|
+
khoj/search_filter/file_filter.py,sha256=tHYW-ibaENf_jrJ88kiO_xhrPZb6FQLtngG9ISTB6h8,1168
|
|
335
337
|
khoj/search_filter/word_filter.py,sha256=5Yx95aSiqGke9kEIbp8T-Ak4dS9cTd3VxI1SaJoK1wY,1005
|
|
336
338
|
khoj/search_type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
337
339
|
khoj/search_type/text_search.py,sha256=AEDBbkjMwDieDiz6_Bdaoq0cywIova1Uz6V1O-XRldQ,8939
|
|
@@ -347,8 +349,8 @@ khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
|
|
|
347
349
|
khoj/utils/rawconfig.py,sha256=luk7Vb_ODuoTdMd_IG-yVXGoyoU-RktyapBG5D1N_VI,3985
|
|
348
350
|
khoj/utils/state.py,sha256=x4GTewP1YhOA6c_32N4wOjnV-3AA3xG_qbY1-wC2Uxc,1559
|
|
349
351
|
khoj/utils/yaml.py,sha256=H0mfw0ZvBFUvFmCQn8pWkfxdmIebsrSykza7D8Wv6wQ,1430
|
|
350
|
-
khoj-1.20.
|
|
351
|
-
khoj-1.20.
|
|
352
|
-
khoj-1.20.
|
|
353
|
-
khoj-1.20.
|
|
354
|
-
khoj-1.20.
|
|
352
|
+
khoj-1.20.5.dev17.dist-info/METADATA,sha256=v_34k0g28aYri85PXurT7HsheW2MyY0Fv_UBPlvvM6Y,6876
|
|
353
|
+
khoj-1.20.5.dev17.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
354
|
+
khoj-1.20.5.dev17.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
|
|
355
|
+
khoj-1.20.5.dev17.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
|
356
|
+
khoj-1.20.5.dev17.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,t,s){Promise.resolve().then(s.bind(s,38874))},38874:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return x}});var n=s(57437),a=s(65104),o=s.n(a),c=s(2265),i=s(48861),r=s(82697),l=s(16463),d=s(58485),u=s(9557);s(7395);var h=s(69591),g=s(38423),m=s(79306);function f(e){let t=(0,l.useSearchParams)().get("conversationId"),[s,a]=(0,c.useState)(""),[i,d]=(0,c.useState)(!1),[u,h]=(0,c.useState)(null),m=e.setQueryToProcess,f=e.onConversationIdChange;if((0,c.useEffect)(()=>{let e=localStorage.getItem("message");e&&(d(!0),m(e))},[m]),(0,c.useEffect)(()=>{s&&(d(!0),m(s))},[s,m]),(0,c.useEffect)(()=>{t&&(null==f||f(t))},[t,f]),(0,c.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?d(!1):a("")},[e.streamedMessages]),!t){window.location.href="/";return}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:o().chatBodyFull,children:(0,n.jsx)(r.Z,{conversationId:t,setTitle:e.setTitle,setAgent:h,pendingMessage:i?s:"",incomingMessages:e.streamedMessages})}),(0,n.jsx)("div",{className:"".concat(o().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-t-2xl rounded-b-none md:rounded-xl"),children:(0,n.jsx)(g.Z,{agentColor:null==u?void 0:u.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>a(e),sendDisabled:i,chatOptionsData:e.chatOptionsData,conversationId:t,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]})}function x(){let e="Khoj AI - Chat",[t,s]=(0,c.useState)(null),[a,r]=(0,c.useState)(!0),[l,g]=(0,c.useState)(e),[x,p]=(0,c.useState)(null),[v,_]=(0,c.useState)([]),[y,j]=(0,c.useState)(""),[b,w]=(0,c.useState)(!1),[M,C]=(0,c.useState)([]),S=(0,h.k6)(),I=(0,m.G)(),N=(0,h.IC)();async function B(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,n="␃\uD83D\uDD1A␗",a="",o=[],c={};for(;;){let e;let{done:i,value:r}=await t.read();if(i){j(""),w(!1);break}for(a+=s.decode(r,{stream:!0});-1!==(e=a.indexOf(n));){let t=a.slice(0,e);if(a=a.slice(e+n.length),t){let e=v.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:o,onlineContext:c}=(0,u.VK)(t,e,o,c)),_([...v])}}}}async function T(){if(localStorage.removeItem("message"),!y||!x)return;let e="/api/chat?q=".concat(encodeURIComponent(y),"&conversation_id=").concat(x,"&stream=true&client=web");S&&(e+="®ion=".concat(S.region,"&country=").concat(S.country,"&city=").concat(S.city,"&timezone=").concat(S.timezone));let t=await fetch(e);try{await B(t)}catch(e){console.log(e)}}return((0,c.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{r(!1),e&&s(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,c.useEffect)(()=>{if(y){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:y||""};_(t=>[...t,e]),w(!0)}},[y]),(0,c.useEffect)(()=>{b&&T()},[b]),a)?(0,n.jsx)(d.Z,{}):(0,n.jsxs)("div",{className:"".concat(o().main," ").concat(o().chatLayout),children:[(0,n.jsx)("title",{children:"".concat(e).concat(l&&l!==e?": ".concat(l):"")}),(0,n.jsx)("div",{children:(0,n.jsx)(i.Z,{conversationId:x,uploadedFiles:M,isMobileWidth:N})}),(0,n.jsx)("div",{className:o().chatBox,children:(0,n.jsxs)("div",{className:o().chatBoxBody,children:[!N&&(0,n.jsx)("div",{className:"text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mr-8",children:l&&(0,n.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden pt-6",children:l})}),(0,n.jsx)(c.Suspense,{fallback:(0,n.jsx)(d.Z,{}),children:(0,n.jsx)(f,{isLoggedIn:null!==I,streamedMessages:v,chatOptionsData:t,setTitle:g,setQueryToProcess:j,setUploadedFiles:C,isMobileWidth:N,onConversationIdChange:e=>{p(e)}})})]})})]})}},82697:function(e,t,s){"use strict";s.d(t,{Z:function(){return p}});var n=s(57437),a=s(15238),o=s.n(a),c=s(2265),i=s(89178),r=s(94880),l=s(58485),d=s(16288),u=s(26100),h=s(19666),g=s(50495),m=e=>{let{name:t,avatar:s,link:a,description:o}=e;return(0,n.jsx)("div",{className:"relative group flex",children:(0,n.jsx)(h.pn,{children:(0,n.jsxs)(h.u,{children:[(0,n.jsx)(h.aJ,{asChild:!0,children:(0,n.jsxs)(g.z,{variant:"ghost",className:"flex items-center justify-center",children:[s,(0,n.jsx)("div",{children:t})]})}),(0,n.jsx)(h._v,{children:(0,n.jsxs)("div",{className:"w-80 h-30",children:[(0,n.jsx)("a",{href:a,target:"_blank",rel:"noreferrer",className:"mt-1 ml-2 block no-underline",children:(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[s,(0,n.jsxs)("div",{className:"mr-2 mt-1 flex justify-center items-center text-sm font-semibold text-gray-800",children:[t,(0,n.jsx)(u.o,{weight:"bold",className:"ml-1"})]})]})}),o&&(0,n.jsx)("p",{className:"mt-2 ml-6 text-sm text-gray-600 line-clamp-2",children:o||"A Khoj agent"})]})})]})})})},f=s(89417),x=s(69591);function p(e){let[t,s]=(0,c.useState)(null),[a,u]=(0,c.useState)(0),[h,g]=(0,c.useState)(!0),p=(0,c.useRef)(null),v=(0,c.useRef)(null),_=(0,c.useRef)(null),[y,j]=(0,c.useState)(null),[b,w]=(0,c.useState)(!1),M=(0,x.IC)();(0,c.useEffect)(()=>{a<2&&((null==t?void 0:t.chat.length)||setTimeout(()=>{C()},500))},[t,a]),(0,c.useEffect)(()=>{if(!h||b)return;let n=new IntersectionObserver(n=>{n[0].isIntersecting&&h&&(w(!0),function(n){if(!h||b)return;let a=n+1,o="";if(e.conversationId)o="/api/chat/history?client=web&conversation_id=".concat(e.conversationId,"&n=").concat(10*a);else{if(!e.publicConversationSlug)return;o="/api/chat/share/history?client=web&public_conversation_slug=".concat(e.publicConversationSlug,"&n=").concat(10*a)}fetch(o).then(e=>e.json()).then(a=>{if(e.setTitle(a.response.slug),a&&a.response&&a.response.chat&&a.response.chat.length>0){if(a.response.chat.length===(null==t?void 0:t.chat.length)){g(!1),w(!1);return}e.setAgent(a.response.agent),s(a.response),n<2&&C(),w(!1)}else{if(a.response.agent&&a.response.conversation_id){let t={chat:[],agent:a.response.agent,conversation_id:a.response.conversation_id,slug:a.response.slug};e.setAgent(a.response.agent),s(t)}g(!1),w(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(a),u(e=>e+1))},{threshold:1});return _.current&&n.observe(_.current),()=>n.disconnect()},[h,a,b]),(0,c.useEffect)(()=>{g(!0),w(!1),u(0),s(null)},[e.conversationId]),(0,c.useEffect)(()=>{if(e.incomingMessages){let t=e.incomingMessages[e.incomingMessages.length-1];t&&!t.completed&&j(e.incomingMessages.length-1)}S()&&C()},[e.incomingMessages]);let C=()=>{v.current&&v.current.scrollIntoView(!1)},S=()=>{if(!v.current)return!1;let{scrollTop:e,scrollHeight:t,clientHeight:s}=v.current;return e+s>=t-25};return e.conversationId||e.publicConversationSlug?(0,n.jsx)(r.x,{className:"h-[80vh]",children:(0,n.jsx)("div",{ref:p,children:(0,n.jsxs)("div",{className:o().chatHistory,ref:v,children:[(0,n.jsx)("div",{ref:_,style:{height:"1px"},children:b&&(0,n.jsx)(l.l,{message:"Loading Conversation",className:"opacity-50"})}),t&&t.chat&&t.chat.map((e,s)=>(0,n.jsx)(i.Z,{isMobileWidth:M,chatMessage:e,customClassName:"fullHistory",borderLeftColor:"".concat(null==t?void 0:t.agent.color,"-500"),isLastMessage:s===t.chat.length-1},"".concat(s,"fullHistory"))),e.incomingMessages&&e.incomingMessages.map((e,s)=>(0,n.jsxs)(c.Fragment,{children:[(0,n.jsx)(i.Z,{isMobileWidth:M,chatMessage:{message:e.rawQuery,context:[],onlineContext:{},created:e.timestamp,by:"you",automationId:""},customClassName:"fullHistory",borderLeftColor:"".concat(null==t?void 0:t.agent.color,"-500")},"".concat(s,"outgoing")),e.trainOfThought&&function(e,t,s,a){let c=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=e.length-1;return(0,n.jsxs)("div",{className:"".concat(o().trainOfThought," shadow-sm"),children:[!c&&(0,n.jsx)(l.l,{className:"float-right"}),e.map((e,a)=>(0,n.jsx)(i.H,{message:e,primary:a===r&&t&&!c,agentColor:s},"train-".concat(a)))]},a)}(e.trainOfThought,s===y,(null==t?void 0:t.agent.color)||"orange","".concat(s,"trainOfThought"),e.completed),(0,n.jsx)(i.Z,{isMobileWidth:M,chatMessage:{message:e.rawResponse,context:e.context,onlineContext:e.onlineContext,created:e.timestamp,by:"khoj",automationId:"",rawQuery:e.rawQuery},customClassName:"fullHistory",borderLeftColor:"".concat(null==t?void 0:t.agent.color,"-500"),isLastMessage:!0},"".concat(s,"incoming"))]},"incomingMessage".concat(s))),e.pendingMessage&&(0,n.jsx)(i.Z,{isMobileWidth:M,chatMessage:{message:e.pendingMessage,context:[],onlineContext:{},created:new Date().getTime().toString(),by:"you",automationId:""},customClassName:"fullHistory",borderLeftColor:"".concat(null==t?void 0:t.agent.color,"-500"),isLastMessage:!0},"pendingMessage-".concat(e.pendingMessage.length)),t&&(0,n.jsx)("div",{className:"".concat(o().agentIndicator," pb-4"),children:(0,n.jsx)("div",{className:"relative group mx-2 cursor-pointer",children:(0,n.jsx)(m,{name:t&&t.agent&&t.agent.name?t.agent.name:"Agent",link:t&&t.agent&&t.agent.slug?"/agents?agent=".concat(t.agent.slug):"/agents",avatar:(0,f.T)(t.agent.icon,t.agent.color)||(0,n.jsx)(d.v,{}),description:t&&t.agent&&t.agent.persona?t.agent.persona:""})})})]})})}):null}},16463:function(e,t,s){"use strict";var n=s(71169);s.o(n,"useSearchParams")&&s.d(t,{useSearchParams:function(){return n.useSearchParams}})},65104: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"}},15238:function(e){e.exports={chatHistory:"chatHistory_chatHistory__CoaVT",chatLayout:"chatHistory_chatLayout__ABli_",agentIndicator:"chatHistory_agentIndicator__wOU1f",trainOfThought:"chatHistory_trainOfThought__mMWSR"}}},function(e){e.O(0,[7812,647,929,3954,9001,3062,743,7071,2614,9693,1603,9417,9178,8423,2971,7023,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,s,t){Promise.resolve().then(t.bind(t,95982))},95982:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return eh}});var a,n,r=t(57437),l=t(55268),i=t.n(l);t(80541);var o=t(2265),c=t(35657),d=t(79306),h=t(69591),u=t(19748),m=t(50495),x=t(66431),p=t(32309),f=t(37440);let j=o.forwardRef((e,s)=>{let{className:t,containerClassName:a,...n}=e;return(0,r.jsx)(x.uZ,{ref:s,containerClassName:(0,f.cn)("flex items-center gap-2 has-[:disabled]:opacity-50",a),className:(0,f.cn)("disabled:cursor-not-allowed",t),...n})});j.displayName="InputOTP";let g=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{ref:s,className:(0,f.cn)("flex items-center",t),...a})});g.displayName="InputOTPGroup";let b=o.forwardRef((e,s)=>{let{index:t,className:a,...n}=e,{char:l,hasFakeCaret:i,isActive:c}=o.useContext(x.VM).slots[t];return(0,r.jsxs)("div",{ref:s,className:(0,f.cn)("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",c&&"z-10 ring-2 ring-ring ring-offset-background",a),...n,children:[l,i&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});b.displayName="InputOTPSlot",o.forwardRef((e,s)=>{let{...t}=e;return(0,r.jsx)("div",{ref:s,role:"separator",...t,children:(0,r.jsx)(p.Z,{})})}).displayName="InputOTPSeparator";var N=t(83102),y=t(36013),w=t(46910);let v=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:s,className:(0,f.cn)("w-full caption-bottom text-sm",t),...a})})});v.displayName="Table",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("thead",{ref:s,className:(0,f.cn)("[&_tr]:border-b",t),...a})}).displayName="TableHeader";let _=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("tbody",{ref:s,className:(0,f.cn)("[&_tr:last-child]:border-0",t),...a})});_.displayName="TableBody",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("tfoot",{ref:s,className:(0,f.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...a})}).displayName="TableFooter";let k=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("tr",{ref:s,className:(0,f.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...a})});k.displayName="TableRow",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("th",{ref:s,className:(0,f.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...a})}).displayName="TableHead";let S=o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("td",{ref:s,className:(0,f.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...a})});S.displayName="TableCell",o.forwardRef((e,s)=>{let{className:t,...a}=e;return(0,r.jsx)("caption",{ref:s,className:(0,f.cn)("mt-4 text-sm text-muted-foreground",t),...a})}).displayName="TableCaption";var C=t(42491),T=t(9950),D=t(35418),F=t(15340),E=t(84120),P=t(55362),O=t(48252),A=t(60787),I=t(26058),z=t(95616),Y=t(11961),R=t(76782),Z=t(98325),K=t(96917),W=t(10813),M=t(56194),L=t(9476),V=t(43010),U=t(72151),B=t(53876),G=t(90445),H=t(17541),J=t(63205),$=t(49806),q=t(67722),X=t(57087),Q=t(27082),ee=t(26100),es=t(48861),et=t(58485),ea=t(47947),en=t(9557),er=t(6780),el=t(70571),ei=t(87138);let eo=e=>{let{onClose:s}=e,[t,a]=(0,o.useState)([]),[n,l]=(0,o.useState)([]),[i,c]=(0,o.useState)(""),[d,h]=(0,o.useState)(!1),[u,x]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[j,g]=(0,o.useState)(!1),[b,N]=(0,o.useState)(0),[y,w]=(0,o.useState)([]),v=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(j||N(0),j){let e=setInterval(()=>{N(e=>{let s=e+(Math.floor(5*Math.random())+1);return s<100?s:100})},800);return()=>clearInterval(e)}},[j]),(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/content/computer");if(!e.ok)throw Error("Failed to fetch files");let s=await e.json();Array.isArray(s)?a(s.toSorted()):console.error("Unexpected data format from API")}catch(e){console.error("Error fetching files:",e)}})()},[y]);let _=t.filter(e=>e.toLowerCase().includes(i.toLowerCase())),k=async()=>{let e=n.length>0?n:_;if(console.log("Delete selected files",e),0===e.length){console.log("No files to delete");return}try{if(!(await fetch("/api/content/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})})).ok)throw Error("Failed to delete files");a(s=>s.filter(s=>!e.includes(s))),l([]),console.log("Deleted files:",e)}catch(e){console.error("Error deleting files:",e)}},S=async e=>{console.log("Delete selected file",e);try{if(!(await fetch("/api/content/file?filename=".concat(encodeURIComponent(e)),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to delete file");a(s=>s.filter(s=>s!==e)),l(s=>s.filter(s=>s!==e)),console.log("Deleted file:",e)}catch(e){console.error("Error deleting file:",e)}};function O(e){(0,en.ko)(e,x,g,f,w)}return(0,r.jsxs)(C.m5,{open:!0,onOpenChange:s,children:[(0,r.jsx)(er.aR,{open:null!==u||null!=p,children:(0,r.jsxs)(er._T,{children:[(0,r.jsx)(er.fY,{children:(0,r.jsx)(er.f$,{children:"Alert"})}),(0,r.jsx)(er.yT,{children:u||p}),(0,r.jsx)(er.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{x(null),f(null),g(!1)},children:"Close"})]})}),(0,r.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),h(!0)},onDragLeave:function(e){e.preventDefault(),h(!1)},onDrop:function(e){e.preventDefault(),h(!1),e.dataTransfer.files&&O(e.dataTransfer.files)},onClick:function(){v&&v.current&&v.current.click()},children:[(0,r.jsx)("input",{type:"file",multiple:!0,ref:v,style:{display:"none"},onChange:function(e){e.target.files&&O(e.target.files)}}),(0,r.jsxs)("div",{className:"flex-none p-4",children:["Upload files",j&&(0,r.jsx)(el.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:b})]}),(0,r.jsx)("div",{className:"flex-none p-4 bg-secondary border-b ".concat(d?"animate-pulse":""),children:(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:d?(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(T.u,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drop files to upload"})]}):(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(D.v,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drag and drop files here"})]})})})]}),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)("div",{className:"flex-none p-4",children:"Synced files"}),(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-b",children:(0,r.jsx)(C.sZ,{placeholder:"Find synced files",value:i,onValueChange:c})}),(0,r.jsx)("div",{className:"flex-grow overflow-auto",children:(0,r.jsxs)(C.e8,{children:[(0,r.jsx)(C.rb,{children:0===t.length?(0,r.jsxs)("div",{className:"flex items-center justify-center",children:[(0,r.jsx)(F.C,{className:"h-4 w-4 mr-2",weight:"bold"}),"No files synced"]}):(0,r.jsxs)("div",{children:["Could not find a good match.",(0,r.jsx)(ei.default,{href:"/search",className:"block",children:"Need advanced search? Click here."})]})}),(0,r.jsx)(C.fu,{heading:"Synced files",children:_.map(e=>(0,r.jsx)(C.di,{value:e,onSelect:e=>{l(s=>s.includes(e)?s.filter(s=>s!==e):[...s,e])},children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,r.jsxs)("div",{className:"flex items-center ".concat(n.includes(e)?"font-semibold":""),children:[n.includes(e)&&(0,r.jsx)(E.J,{className:"h-4 w-4 mr-2"}),(0,r.jsx)("span",{className:"break-all",children:e})]}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>S(e),className:"ml-auto",children:(0,r.jsx)(P.r,{className:"h-4 w-4"})})]})},e))})]})}),(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-t",children:(0,r.jsx)("div",{className:"flex justify-between",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:k,className:"mr-2",children:[(0,r.jsx)(P.r,{className:"h-4 w-4 mr-2"}),n.length>0?"Delete Selected (".concat(n.length,")"):"Delete All"]})})})]})]})},ec=e=>{var s,t;let{items:a,selected:n,callbackFunc:l}=e,[i,c]=(0,o.useState)(null!==(t=null==n?void 0:n.toString())&&void 0!==t?t:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(w.h_,{children:[(0,r.jsx)(w.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(m.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(s=a.find(e=>e.id.toString()===i))||void 0===s?void 0:s.name," ",(0,r.jsx)(O.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(w.AW,{children:(0,r.jsx)(w._x,{value:i,onValueChange:async e=>{c(e),await l(e)},children:a.map(e=>(0,r.jsx)(w.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},ed=()=>{let[e,s]=(0,o.useState)([]),{toast:t}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),t=await e.json();s(e=>[...e,t])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),t({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&&s(s=>s.filter(s=>s.token!==e))}catch(e){console.error("Error deleting API key:",e)}},l=async()=>{try{let e=await fetch("/auth/token"),t=await e.json();(null==t?void 0:t.length)>0&&s(t)}catch(e){console.error("Error listing API keys:",e)}};return(0,o.useEffect)(()=>{l()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function eh(){let[e,s]=(0,o.useState)("Settings"),{apiKeys:t,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:l}=ed(),{userConfig:x}=(0,d.h)(!0),[p,f]=(0,o.useState)(null),[w,C]=(0,o.useState)(void 0),[E,O]=(0,o.useState)(null),[en,er]=(0,o.useState)(void 0),[el,ei]=(0,o.useState)(""),[eh,eu]=(0,o.useState)("verified"),[em,ex]=(0,o.useState)(!1),{toast:ep}=(0,c.pm)(),ef=(0,h.IC)(),ej="w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950";(0,o.useEffect)(()=>{var e;f(x),er(null==x?void 0:x.phone_number),eu((null==x?void 0:x.is_phone_number_verified)?"verified":(null==x?void 0:x.phone_number)?"otp":"setup"),C(null==x?void 0:x.given_name),O(null!==(e=null==x?void 0:x.notion_token)&&void 0!==e?e:null)},[x]);let eg=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(en),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");eu("verify")}catch(e){console.error("Error sending OTP:",e),ep({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},eb=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(el),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");eu("verified"),ep({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),ep({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},eN=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");er(void 0),eu("setup"),ep({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),ep({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},ey=async e=>{try{let s="/api/subscription?email=".concat(null==p?void 0:p.username,"&operation=").concat(e);if(!(await fetch(s,{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");p&&(p.subscription_state="cancel"===e?"unsubscribed":"subscribed",f(p)),ep({title:"\uD83D\uDCB3 Subscription",description:(null==p?void 0:p.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(s){console.error("Error changing subscription:",s),ep({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"})}},ew=async()=>{if(w)try{if(!(await fetch("/api/user/name?name=".concat(w),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");p&&(p.given_name=w,f(p)),ep({title:"✅ Updated Profile",description:"You name has been updated to ".concat(w)})}catch(e){console.error("Error updating name:",e),ep({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},ev=e=>async s=>{if((null==p?void 0:p.is_active)||"search"===e)try{if(!(await fetch("/api/model/".concat(e,"?id=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");ep({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(s){console.error("Failed to update ".concat(e," model:"),s),ep({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},e_=async()=>{if(E)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:E})})).ok)throw Error("Failed to save Notion API key");p&&(p.notion_token=E,f(p)),ep({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),ep({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ek=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));ep({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(s){console.error("Error syncing content:",s),ep({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eS=async e=>{try{if(!(await fetch("/api/content/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));p&&("computer"===e?p.enabled_content_source.computer=!1:"notion"===e?(p.enabled_content_source.notion=!1,p.notion_token=null,O(p.notion_token)):"github"===e&&(p.enabled_content_source.github=!1),f(p)),"computer"===e?ep({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):ep({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(s){console.error("Error disconnecting ".concat(e,":"),s),ep({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return p?(0,r.jsxs)("div",{className:i().page,children:[(0,r.jsx)("title",{children:e}),(0,r.jsx)("div",{className:i().sidePanel,children:(0,r.jsx)(es.Z,{conversationId:null,uploadedFiles:[],isMobileWidth:ef})}),(0,r.jsx)("div",{className:i().content,children:(0,r.jsx)("div",{className:"".concat(i().contentBody," mx-10 my-2"),children:(0,r.jsx)(o.Suspense,{fallback:(0,r.jsx)(et.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(A.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(y.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)(N.I,{type:"text",onChange:e=>C(e.target.value),value:w,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:ew,disabled:w===p.given_name,children:[(0,r.jsx)(I.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(y.Zb,{id:"subscription",className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(z.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(y.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a 14 day trial of the Khoj Futurist plan. Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"unsubscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"expired"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Free Plan"}),p.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>ey("cancel"),children:[(0,r.jsx)(Y.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>ey("resubscribe"),children:[(0,r.jsx)(R.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(p.khoj_cloud_subscription_url,"?prefilled_email=").concat(p.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(R.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})})]})]})]}),em&&(0,r.jsx)(eo,{onClose:()=>ex(!1)}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(y.Zb,{id:"computer",className:ej,children:[(0,r.jsxs)(y.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(Z.I,{className:"h-8 w-8 mr-2"}),"Files",p.enabled_content_source.computer&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(y.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage your synced files"}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>ex(!0),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.computer||"hidden"),onClick:()=>eS("computer"),children:[(0,r.jsx)(M.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(y.Zb,{id:"github",className:"".concat(ej," hidden"),children:[(0,r.jsxs)(y.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(L.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(y.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",children:p.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(V.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(M.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(y.Zb,{id:"notion",className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.F,{className:"h-7 w-7 mr-2"}),"Notion",p.enabled_content_source.notion&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(y.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!p.notion_oauth_url&&(0,r.jsx)(N.I,{onChange:e=>O(e.target.value),value:E||"",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)(y.eW,{className:"flex flex-wrap gap-4",children:[p.notion_oauth_url&&!p.enabled_content_source.notion?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>{window.open(p.notion_oauth_url)},children:[(0,r.jsx)(V.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):p.enabled_content_source.notion&&E===p.notion_token?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>ek("notion"),children:[(0,r.jsx)(B.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):p.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:e_,disabled:E===p.notion_token,children:[(0,r.jsx)(I.B,{className:"h-5 w-5 inline mr-1"}),p.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.notion_token||"hidden"),onClick:()=>eS("notion"),children:[(0,r.jsx)(M.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[p.chat_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(G.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(ec,{items:p.chat_model_options,selected:p.selected_chat_model_config,callbackFunc:ev("chat")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.search_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.r,{className:"h-7 w-7 mr-2"}),"Search"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the search model to find your documents"}),(0,r.jsx)(ec,{items:p.search_model_options,selected:p.selected_search_model_config,callbackFunc:ev("search")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4"})]}),p.paint_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(J.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(ec,{items:p.paint_model_options,selected:p.selected_paint_model_config,callbackFunc:ev("paint")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.voice_model_options.length>0&&(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(T.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden pb-12 grid gap-8",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(ec,{items:p.voice_model_options,selected:p.selected_voice_model_config,callbackFunc:ev("voice")})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-8",children:[!p.anonymous_mode&&(0,r.jsxs)(y.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950",children:[(0,r.jsxs)(y.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)(m.z,{variant:"secondary",className:"!mt-0",onClick:a,children:[(0,r.jsx)(D.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(y.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Desktop",target:"_blank",children:"Desktop"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Emacs",children:"Emacs"})," ","apps and more."]}),(0,r.jsx)(v,{children:(0,r.jsx)(_,{children:t.map(e=>(0,r.jsxs)(k,{children:[(0,r.jsx)(S,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(S,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{children:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[(0,r.jsx)(q.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{ep({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),n(e.token)}}),(0,r.jsx)(P.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{ep({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),l(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(y.eW,{className:"flex flex-wrap gap-4"})]}),(0,r.jsxs)(y.Zb,{className:ej,children:[(0,r.jsxs)(y.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(X.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===eh&&(0,r.jsx)(K.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==eh&&(0,r.jsx)(F.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(y.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)(ea.Z,{initialValue:en||"",onChangeNumber:er,disabled:"verify"===eh,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(i().phoneInput)}}),"verify"===eh&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(en)}),(0,r.jsx)(j,{autoFocus:!0,maxLength:6,value:el||"",onChange:ei,onComplete:()=>eu("verify"),children:(0,r.jsxs)(g,{children:[(0,r.jsx)(b,{index:0}),(0,r.jsx)(b,{index:1}),(0,r.jsx)(b,{index:2}),(0,r.jsx)(b,{index:3}),(0,r.jsx)(b,{index:4}),(0,r.jsx)(b,{index:5})]})})]})]})]}),(0,r.jsxs)(y.eW,{className:"flex flex-wrap gap-4",children:["verify"===eh&&(0,r.jsx)(m.z,{variant:"outline",onClick:eb,children:"Verify"})||(0,r.jsx)(m.z,{variant:"outline",disabled:!en||en===p.phone_number&&"verified"===eh||!(0,u.y)(en),onClick:eg,children:p.phone_number?en&&(en!==p.phone_number||"verified"!==eh)&&(0,u.y)(en)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(ee.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)(V.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===eh&&(0,r.jsxs)(m.z,{variant:"outline",onClick:()=>eN(),children:[(0,r.jsx)(M.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]}):(0,r.jsx)(et.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},70571:function(e,s,t){"use strict";t.d(s,{E:function(){return i}});var a=t(57437),n=t(2265),r=t(52431),l=t(37440);let i=n.forwardRef((e,s)=>{let{className:t,value:n,indicatorColor:i,...o}=e;return(0,a.jsx)(r.fC,{ref:s,className:(0,l.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...o,children:(0,a.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(i),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});i.displayName=r.fC.displayName},35657:function(e,s,t){"use strict";t.d(s,{pm:function(){return u}});var a=t(2265);let n=0,r=new Map,l=e=>{if(r.has(e))return;let s=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,s)},i=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;return t?l(t):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},o=[],c={toasts:[]};function d(e){c=i(c,e),o.forEach(e=>{e(c)})}function h(e){let{...s}=e,t=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...s,id:t,open:!0,onOpenChange:e=>{e||a()}}}),{id:t,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function u(){let[e,s]=a.useState(c);return a.useEffect(()=>(o.push(s),()=>{let e=o.indexOf(s);e>-1&&o.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},55268:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN",sidePanel:"settings_sidePanel__osdez"}}},function(e){e.O(0,[4229,647,9001,3062,3678,1603,2971,7023,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
|
File without changes
|
|
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{8423-132ea64eac83fd43.js → 8423-898d821eaab634af.js}
RENAMED
|
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{9417-2e54c6fd056982d8.js → 9417-5d14ac74aaab2c66.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|