khoj 1.30.2.dev15__py3-none-any.whl → 1.30.2.dev23__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- khoj/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/1210.ef7a0f9a7e43da1d.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1970-1b63ac1497b03a10.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{webpack-224b38bd040ae7a0.js → webpack-9b0a570f15d6209d.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 +1 -1
- 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 +1 -1
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +1 -1
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +1 -1
- khoj/processor/conversation/prompts.py +40 -21
- khoj/routers/auth.py +2 -2
- khoj/routers/helpers.py +15 -3
- {khoj-1.30.2.dev15.dist-info → khoj-1.30.2.dev23.dist-info}/METADATA +1 -1
- {khoj-1.30.2.dev15.dist-info → khoj-1.30.2.dev23.dist-info}/RECORD +28 -28
- khoj/interface/compiled/_next/static/chunks/1210.132a7e1910006bbb.js +0 -1
- khoj/interface/compiled/_next/static/chunks/1970-e1935a1d0930a7c5.js +0 -1
- /khoj/interface/compiled/_next/static/{j4py4V8sxXHwFlBE4LvN_ → 07uMbO07BRIyOEFvL9ncb}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{j4py4V8sxXHwFlBE4LvN_ → 07uMbO07BRIyOEFvL9ncb}/_ssgManifest.js +0 -0
- {khoj-1.30.2.dev15.dist-info → khoj-1.30.2.dev23.dist-info}/WHEEL +0 -0
- {khoj-1.30.2.dev15.dist-info → khoj-1.30.2.dev23.dist-info}/entry_points.txt +0 -0
- {khoj-1.30.2.dev15.dist-info → khoj-1.30.2.dev23.dist-info}/licenses/LICENSE +0 -0
@@ -111,20 +111,22 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
|
|
111
111
|
khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
|
112
112
|
khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
|
113
113
|
khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
|
114
|
-
khoj/interface/compiled/index.html,sha256=
|
115
|
-
khoj/interface/compiled/index.txt,sha256=
|
114
|
+
khoj/interface/compiled/index.html,sha256=9gfNesrTeNDyw-wcgEgiRhZcERcPFY73kecjU73X-4E,12153
|
115
|
+
khoj/interface/compiled/index.txt,sha256=zPny9Hc2NvdgX2cx-kYK41We86OZzoBpCPXYwP5aRT8,5609
|
116
116
|
khoj/interface/compiled/khoj.webmanifest,sha256=lsknYkvEdMbRTOUYKXPM_8krN2gamJmM4u3qj8u9lrU,1682
|
117
117
|
khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
|
118
118
|
khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
|
119
119
|
khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
|
120
120
|
khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
|
121
121
|
khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
|
122
|
-
khoj/interface/compiled/404/index.html,sha256=
|
123
|
-
khoj/interface/compiled/_next/static/
|
122
|
+
khoj/interface/compiled/404/index.html,sha256=Ipwdiki45NAx2oa8JBv-Gp-l7izrwsRp26RVy2kjsGs,12023
|
123
|
+
khoj/interface/compiled/_next/static/07uMbO07BRIyOEFvL9ncb/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
|
124
|
+
khoj/interface/compiled/_next/static/07uMbO07BRIyOEFvL9ncb/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
125
|
+
khoj/interface/compiled/_next/static/chunks/1210.ef7a0f9a7e43da1d.js,sha256=yOh1qtmNHPpDd6vR7CJOXSbq8M_slPujdTR_OXxaEYU,2121
|
124
126
|
khoj/interface/compiled/_next/static/chunks/1279-4cb23143aa2c0228.js,sha256=zHMz-ixoNkLNUjN2-C48RGEyMs2mI9wsNRCczXnzIvQ,45616
|
125
127
|
khoj/interface/compiled/_next/static/chunks/1459.690bf20e7d7b7090.js,sha256=z-ruZPxF_Z3ef_WOThd9Ox36AMhxaW3znizVivNnA34,34239
|
126
128
|
khoj/interface/compiled/_next/static/chunks/1603-1407afe510f0145a.js,sha256=p9EvJACAEa6gwEA9q4hYpwkDuSBoVk1Lvl0PKNVtVHw,73915
|
127
|
-
khoj/interface/compiled/_next/static/chunks/1970-
|
129
|
+
khoj/interface/compiled/_next/static/chunks/1970-1b63ac1497b03a10.js,sha256=r9S2sLd2AcvG8lqQloOcuDwvdtUdDA16CpsJJ9zs2Fs,29906
|
128
130
|
khoj/interface/compiled/_next/static/chunks/216-b2e4344315b88832.js,sha256=Sz0t6FNM1oJXke42354nmPFREqb14BXDJO4AsqKOtAY,238786
|
129
131
|
khoj/interface/compiled/_next/static/chunks/3072-be830e4f8412b9d2.js,sha256=BBUjJdE8AgmhoF6PA8WPC8d-01ppYgcZpjNyTGeayRE,35457
|
130
132
|
khoj/interface/compiled/_next/static/chunks/3124-e8410bbd01f6f188.js,sha256=8nvTywzLygRGYmFlGbNik1c5wDFAFH_wYjm12mC9tgY,186256
|
@@ -148,7 +150,7 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
|
|
148
150
|
khoj/interface/compiled/_next/static/chunks/main-1ea5c2e0fdef4626.js,sha256=8_u87PGI3PahFbDfGWGvpD-a18J7X7ChUqWIeqxVq7g,111061
|
149
151
|
khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js,sha256=i52E7sWOcSq1G8eYZL3mtTxbUbwRNxcAbSWQ6uWpMsY,475
|
150
152
|
khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
|
151
|
-
khoj/interface/compiled/_next/static/chunks/webpack-
|
153
|
+
khoj/interface/compiled/_next/static/chunks/webpack-9b0a570f15d6209d.js,sha256=0q5Kl3gmbKelQEDpXGs_wib8RQMF-UAuHKQCY2Oxkdo,4039
|
152
154
|
khoj/interface/compiled/_next/static/chunks/app/layout-86561d2fac35a91a.js,sha256=2EWsyKE2kcC5uDvsOtgG5OP0hHCX8sCph4NqhUU2rCg,442
|
153
155
|
khoj/interface/compiled/_next/static/chunks/app/page-4a3c49c5e996cc40.js,sha256=6yWpNUFJZtRQ1D8KEtiFHUX6nSnyw_5j5RCLEJykpd4,33219
|
154
156
|
khoj/interface/compiled/_next/static/chunks/app/_not-found/page-cfba071f5a657256.js,sha256=3mCUnxfMxyK44eqk21TVBrC6u--WSbvx31fTmQuOvMQ,1755
|
@@ -174,8 +176,6 @@ khoj/interface/compiled/_next/static/css/3cf13271869a4aeb.css,sha256=sGjJTeMeN6w
|
|
174
176
|
khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css,sha256=BSqRkeb9vBh0phx5GkAlZirTFZintbyggGaUkuOBfaU,914
|
175
177
|
khoj/interface/compiled/_next/static/css/5a400c87d295e68a.css,sha256=ojDUPJ9fJpEo9DzTAsEa-k1cg7Bef-nSTfpszMiqknQ,17711
|
176
178
|
khoj/interface/compiled/_next/static/css/80bd6301fc657983.css,sha256=T7_aQHcWpQBQLKadauHNzjYGw713FtRNTlUqmJjsL6I,1634
|
177
|
-
khoj/interface/compiled/_next/static/j4py4V8sxXHwFlBE4LvN_/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
|
178
|
-
khoj/interface/compiled/_next/static/j4py4V8sxXHwFlBE4LvN_/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
|
179
179
|
khoj/interface/compiled/_next/static/media/5455839c73f146e7-s.p.woff2,sha256=BUeNjYxyX7Bu76aNlJrZtW3PwYgcH-kp8syFdODZoyc,35788
|
180
180
|
khoj/interface/compiled/_next/static/media/5984b96ba4822821-s.woff2,sha256=RFrf6fMTduuQwEe78qK6_Y_Mnj97HmRDG-VujYxwA90,99368
|
181
181
|
khoj/interface/compiled/_next/static/media/684adc3dde1b03f1-s.woff2,sha256=5loL1Nrr0sWovNVA8BcfMnck7uDntv7wBNd9oxGMaM8,19820
|
@@ -248,8 +248,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
|
|
248
248
|
khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
|
249
249
|
khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
|
250
250
|
khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
|
251
|
-
khoj/interface/compiled/agents/index.html,sha256=
|
252
|
-
khoj/interface/compiled/agents/index.txt,sha256=
|
251
|
+
khoj/interface/compiled/agents/index.html,sha256=yPuSdTDUqXOVj91_xkbVgYWgqdr-dmqdusx_mBTTmPc,12963
|
252
|
+
khoj/interface/compiled/agents/index.txt,sha256=wlinf5XmQqD8kiazIKRghhks2ThgtrMe_MPnXC0KLFU,6176
|
253
253
|
khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
|
254
254
|
khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png,sha256=aTxivDb3CYyThkVZWz8A19xl_dNut5DbkXhODWF3A9Q,5640
|
255
255
|
khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png,sha256=xPCMLHiaL7lYOdQLZrKwWE-Qjn5ZaysSZB0ScYv4UZU,12312
|
@@ -260,16 +260,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
|
|
260
260
|
khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
|
261
261
|
khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
|
262
262
|
khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
|
263
|
-
khoj/interface/compiled/automations/index.html,sha256=
|
264
|
-
khoj/interface/compiled/automations/index.txt,sha256=
|
265
|
-
khoj/interface/compiled/chat/index.html,sha256=
|
266
|
-
khoj/interface/compiled/chat/index.txt,sha256
|
267
|
-
khoj/interface/compiled/search/index.html,sha256=
|
268
|
-
khoj/interface/compiled/search/index.txt,sha256=
|
269
|
-
khoj/interface/compiled/settings/index.html,sha256=
|
270
|
-
khoj/interface/compiled/settings/index.txt,sha256=
|
271
|
-
khoj/interface/compiled/share/chat/index.html,sha256=
|
272
|
-
khoj/interface/compiled/share/chat/index.txt,sha256=
|
263
|
+
khoj/interface/compiled/automations/index.html,sha256=ke_vR0UYtR8ui9NrWqGnKk-SH37Dpuxpdiud9qRKWLc,30630
|
264
|
+
khoj/interface/compiled/automations/index.txt,sha256=mBT8uekJv5tuwjuKpNqVTFM-CF8MBUn9k2XwVzUc8qc,5498
|
265
|
+
khoj/interface/compiled/chat/index.html,sha256=X73fysqnFCq9NMXeQu-Y8AEjpZhkXkag0vWyNXQGVgc,13854
|
266
|
+
khoj/interface/compiled/chat/index.txt,sha256=-q3U1WoD9Ja2Mkokg39Z_UK9ngbq2TYqNGJVC9hMRlA,6586
|
267
|
+
khoj/interface/compiled/search/index.html,sha256=WkO_0giS6j3tBZut6Gg_xSAamf00bovJc7FgT8iDkRQ,30158
|
268
|
+
khoj/interface/compiled/search/index.txt,sha256=mJAMC36jd5-0xO4NglzISRSXo4YytT4PkhuX2daGzOs,5254
|
269
|
+
khoj/interface/compiled/settings/index.html,sha256=9-zYgpjXV0sdfCjbWnVG4rh4Ye-FQN9KqOwXnP24jcQ,12828
|
270
|
+
khoj/interface/compiled/settings/index.txt,sha256=e7YF2_Nbh0fvN3xGGqxeNoHabCJ0GkOz4YEwQ9pIvu4,6076
|
271
|
+
khoj/interface/compiled/share/chat/index.html,sha256=HeQc3b6JOQCnSWKevTFgDS8MnpuzIkQvS8wiJt5_c_Q,15151
|
272
|
+
khoj/interface/compiled/share/chat/index.txt,sha256=t30ubg79nmQieFCKXrIbxsymD6imPVe04Oi2SjI92e0,7383
|
273
273
|
khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
|
274
274
|
khoj/interface/email/magic_link.html,sha256=EoGKQucfPj3xQrWXhSZAzPFOYCHF_ZX94TWCd1XHl1M,941
|
275
275
|
khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
|
@@ -320,7 +320,7 @@ khoj/processor/content/pdf/pdf_to_entries.py,sha256=GQUvab61okhV9_DK0g2MCrMq8wKp
|
|
320
320
|
khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
321
321
|
khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=wFZwK_zIc7gWbRtO9sOHo9KvfhGAzL9psX_nKWYFduo,4975
|
322
322
|
khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
323
|
-
khoj/processor/conversation/prompts.py,sha256=
|
323
|
+
khoj/processor/conversation/prompts.py,sha256=nSaaXWNCGk7x3gL2aJrT2N-E640l7te_xfoEUQI3WqE,50150
|
324
324
|
khoj/processor/conversation/utils.py,sha256=ZbWD43lgEhiWRo9uDmghkR1VHvMNVhk6RXZ5fKzfl2o,28545
|
325
325
|
khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
326
326
|
khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=8w7oSTBIxcZa6y03Zo2nuQFa2WMiazwK_qfO2q_O-6c,8618
|
@@ -350,9 +350,9 @@ khoj/routers/api_content.py,sha256=WNlB6lVwRW8hHDthO2HypbpPvqrqt9rTU5oMRNknpMU,2
|
|
350
350
|
khoj/routers/api_model.py,sha256=KDsxNwHspC94eTcv6l3ehr773EOvgc670UnZLE1WZ4o,3642
|
351
351
|
khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
|
352
352
|
khoj/routers/api_subscription.py,sha256=J6xZNZDdOA71vCfethlPfAyfvRBq4HGCBpbsOZ9CWj0,5333
|
353
|
-
khoj/routers/auth.py,sha256=
|
353
|
+
khoj/routers/auth.py,sha256=kWPB2McwT6z4rGF6mWl92Q7ToRX-XezBPFefdxqQUk4,6579
|
354
354
|
khoj/routers/email.py,sha256=SGYNPQvfcvYeHf70F0YqpY0FLMRElF2ZekROXdwGI18,3821
|
355
|
-
khoj/routers/helpers.py,sha256=
|
355
|
+
khoj/routers/helpers.py,sha256=PY14ukbc7pzl_8p2j2xySRRg755Ll_QHb2iV64dOlBQ,82368
|
356
356
|
khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
|
357
357
|
khoj/routers/research.py,sha256=SczFMS9a8_Wxhh3n_Zt9CJ-zZugBDAd_WmiZGFa6RR8,16117
|
358
358
|
khoj/routers/storage.py,sha256=tJrwhFRVWv0MHv7V7huMc1Diwm-putZSwnZXJ3tqT_c,2338
|
@@ -377,8 +377,8 @@ khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
|
|
377
377
|
khoj/utils/rawconfig.py,sha256=bQ_MGbBzYt6ZUIsHUwZjaHKDLh6GQ7h-sENkv3fyVbQ,5028
|
378
378
|
khoj/utils/state.py,sha256=KtUEIKAZdGGN_Qr58RS1pgcywgSafun8YIXx-YEclAY,1645
|
379
379
|
khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
|
380
|
-
khoj-1.30.2.
|
381
|
-
khoj-1.30.2.
|
382
|
-
khoj-1.30.2.
|
383
|
-
khoj-1.30.2.
|
384
|
-
khoj-1.30.2.
|
380
|
+
khoj-1.30.2.dev23.dist-info/METADATA,sha256=KMNKXnvhOg_T6qM9ptCnndUZ2HfWHg5DMqkLd_q3P1Y,7120
|
381
|
+
khoj-1.30.2.dev23.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
382
|
+
khoj-1.30.2.dev23.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
|
383
|
+
khoj-1.30.2.dev23.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
|
384
|
+
khoj-1.30.2.dev23.dist-info/RECORD,,
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1210],{51210:function(e,t,i){i.r(t),i.d(t,{default:function(){return f}});var a=i(57437),l=i(2265),n=i(57818),d=i(60266),r=i(50495),s=i(10077),o=i(46613);let c=(0,n.default)(async()=>(await Promise.resolve().then(i.t.bind(i,60266,23))).Excalidraw,{loadableGenerated:{webpack:()=>[60266]},ssr:!1});function f(e){let[t,i]=(0,l.useState)([]),[n,f]=(0,l.useState)(!1),u=e=>void 0!==e.x&&void 0!==e.y&&void 0!==e.id&&void 0!==e.type;return(0,l.useEffect)(()=>{onkeydown=n?e=>{"Escape"===e.key&&(f(!1),window.dispatchEvent(new Event("resize")))}:null},[n]),(0,l.useEffect)(()=>{let t=[];for(let i of e.data)u(i)&&t.push(i);let a=[];for(let e of t)if("frame"!==e.type){if("arrow"===e.type){let i=t.find(t=>{var i;return t.id===(null===(i=e.start)||void 0===i?void 0:i.id)}),l=t.find(t=>{var i;return t.id===(null===(i=e.end)||void 0===i?void 0:i.id)});i&&l&&a.push(e)}else a.push(e)}for(let e of t)if("frame"===e.type){var l;let t=null===(l=e.children)||void 0===l?void 0:l.map(e=>a.find(t=>t.id===e)),i=null==t?void 0:t.map(e=>null==e?void 0:e.id).filter(e=>void 0!==e);if(void 0===i||0===i.length)continue;a.push({...e,children:i})}i((0,d.convertToExcalidrawElements)(a))},[]),(0,a.jsx)("div",{className:"relative",children:(0,a.jsxs)("div",{className:"".concat(n?"fixed inset-0 bg-black bg-opacity-50 backdrop-blur-sm z-50 flex items-center justify-center":""),children:[(0,a.jsx)(r.z,{onClick:()=>{f(!n),window.dispatchEvent(new Event("resize"))},variant:"outline",className:"".concat(n?"absolute top-2 left-2 z-[60]":""),children:n?(0,a.jsx)(s.f,{className:"h-4 w-4"}):(0,a.jsx)(o.t,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"\n ".concat(n?"w-[80vw] h-[80vh]":"w-full h-[500px]","\n bg-white overflow-hidden rounded-lg relative\n "),children:(0,a.jsx)(c,{initialData:{elements:t,appState:{zenModeEnabled:!0},scrollToContent:!0},theme:"dark"===localStorage.getItem("theme")?"dark":"light",validateEmbeddable:!0,renderTopRightUI:(e,t)=>(0,a.jsx)(a.Fragment,{})})})]})})}}}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1970],{81970:function(e,t,s){"use strict";s.d(t,{EY:function(){return es},ks:function(){return ea},bc:function(){return et}});var a=s(57437),r=s(2288),l=s.n(r),n=s(2265),i=s(50495),o=s(58284),c=s(5989),d=s(12275),u=s(18444),h=s(31784),x=s(20319),m=s(98750),f=s(55362),p=s(57691),j=s(68029),g=s(68131),v=s(83632),b=s(9950),N=s(35418),y=s(84120),w=s(95289),_=s(26100),C=s(26058),k=s(15780),z=s(59772),S=s(36013),T=s(90837),I=s(66820),P=s(89417),V=s(58575),O=s(47412),R=s(32653),q=s(39343),A=s(83102),B=s(31014),E=s(93146),F=s(46294),J=s(13304),D=s(40882);let W=D.fC,Z=D.wy,M=D.Fw;var X=s(37440),G=s(42491),Y=s(9557),K=s(6780),L=s(70571),Q=s(19573),$=s(18642),U=s(19666);async function H(e,t){let s="/login?next=/agents?agent=".concat(e);if(!t){window.location.href=s;return}let a=await fetch("/api/chat/sessions?agent_slug=".concat(encodeURIComponent(e)),{method:"POST"}),r=await a.json();200==a.status?window.location.href="/chat?conversationId=".concat(r.conversation_id):403==a.status||401==a.status?window.location.href=s:alert("Failed to start chat session")}function ee(e){var t;let s=(null===(t=e.text)||void 0===t?void 0:t.replace(/^\w/,e=>e.toUpperCase()))||"";return(0,a.jsx)(U.pn,{children:(0,a.jsxs)(U.u,{children:[(0,a.jsx)(U._v,{asChild:!0,children:(0,a.jsx)("div",{className:"text-sm",children:e.hoverText||s})}),(0,a.jsx)(U.aJ,{className:"cursor-text",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full border-accent-500 border p-1.5",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:e.icon}),s&&s.length>0&&(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:s})]})})]})})}let et=z.z.object({name:z.z.string({required_error:"Name is required"}).min(1,"Name is required"),persona:z.z.string({required_error:"Personality is required"}).min(1,"Personality is required"),color:z.z.string({required_error:"Color is required"}).min(1,"Color is required"),icon:z.z.string({required_error:"Icon is required"}).min(1,"Icon is required"),privacy_level:z.z.string({required_error:"Privacy level is required"}).min(1,"Privacy level is required"),chat_model:z.z.string({required_error:"Chat model is required"}).min(1,"Chat model is required"),files:z.z.array(z.z.string()).default([]).optional(),input_tools:z.z.array(z.z.string()).default([]).optional(),output_modes:z.z.array(z.z.string()).default([]).optional()});function es(e){var t;let[s,r]=(0,n.useState)(e.agentSlug===e.data.slug),[j,g]=(0,n.useState)(!1),[v,b]=(0,n.useState)(null),N=(0,a.jsx)(o.H,{}),y="Private agents are only visible to you.";"public"===e.data.privacy_level?(N=(0,a.jsx)(c.T,{}),y="Public agents are visible to everyone."):"protected"===e.data.privacy_level&&(N=(0,a.jsx)(d.M,{}),y="Protected agents are visible to anyone with a direct link.");let w=e.userProfile,_=(0,q.cI)({resolver:(0,B.F)(et),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.data.chat_model,files:e.data.files,input_tools:e.data.input_tools,output_modes:e.data.output_modes}});(0,n.useEffect)(()=>{_.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.data.chat_model,files:e.data.files,input_tools:e.data.input_tools,output_modes:e.data.output_modes})},[e.data]),s&&window.history.pushState({},"Khoj AI - Agent ".concat(e.data.slug),"/agents?agent=".concat(e.data.slug));let C=(0,V.oz)(e.data.color);function k(){return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[e.editCard&&(0,a.jsx)(ee,{icon:N,text:e.data.privacy_level,hoverText:y}),e.data.files&&e.data.files.length>0&&(0,a.jsx)(ee,{icon:(0,a.jsx)(u.f,{}),text:"knowledge",hoverText:"The agent has a custom knowledge base with ".concat(e.data.files.length," documents. It can use them to give you answers.")}),(0,a.jsx)(ee,{icon:(0,a.jsx)(h.a,{}),text:e.data.chat_model,hoverText:"The agent uses the ".concat(e.data.chat_model," model to chat with you.")}),e.data.output_modes.map(t=>(0,a.jsx)(ee,{icon:(0,P.vH)(t),hoverText:"".concat(t,": ").concat(e.outputModeOptions[t])},t)),e.data.input_tools.map(t=>(0,a.jsx)(ee,{icon:(0,P.vH)(t),hoverText:"".concat(t,": ").concat(e.inputToolOptions[t])},t))]})}return(0,a.jsxs)(S.Zb,{className:"shadow-sm bg-gradient-to-b from-white 20% to-".concat(e.data.color?e.data.color:"gray","-100/50 dark:from-[hsl(var(--background))] dark:to-").concat(e.data.color?e.data.color:"gray","-950/50 rounded-xl hover:shadow-md"),children:[j&&(0,a.jsx)(I.Z,{loginRedirectMessage:"Sign in to start chatting with ".concat(e.data.name),onOpenChange:g}),(0,a.jsx)(S.Ol,{children:(0,a.jsx)(S.ll,{children:(0,a.jsxs)(T.Vq,{open:s,onOpenChange:()=>{r(!s),window.history.pushState({},"Khoj AI - Agents","/agents")},children:[(0,a.jsx)(T.hg,{className:"focus-visible:outline-none",children:(0,a.jsxs)("div",{className:"flex items-center relative top-2",children:[(0,P.TI)(e.data.icon,e.data.color),e.data.name]})}),(0,a.jsxs)("div",{className:"flex float-right",children:[e.editCard&&(0,a.jsx)("div",{className:"float-right",children:(0,a.jsxs)(Q.J2,{children:[(0,a.jsx)(Q.xo,{children:(0,a.jsx)(i.z,{className:"bg-[hsl(var(--background))] w-10 h-10 p-0 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,a.jsx)(x.F,{className:"w-6 h-6 ".concat((0,V.oz)(e.data.color))})})}),(0,a.jsxs)(Q.yk,{className:"w-fit grid p-1",side:"bottom",align:"end",children:[(0,a.jsxs)(i.z,{className:"items-center justify-start",variant:"ghost",onClick:()=>r(!0),children:[(0,a.jsx)(m.z,{className:"w-4 h-4 mr-2"}),"Edit"]}),e.editCard&&"private"!==e.data.privacy_level&&(0,a.jsx)($.Z,{buttonTitle:"Share",title:"Share Agent",description:"Share a link to this agent with others. They'll be able to chat with it, and ask questions to all of its knowledge base.",buttonVariant:"ghost",includeIcon:!0,url:"".concat(window.location.origin,"/agents?agent=").concat(e.data.slug)}),e.data.creator===(null==w?void 0:w.username)&&(0,a.jsxs)(i.z,{className:"items-center justify-start",variant:"destructive",onClick:()=>{fetch("/api/agents/".concat(e.data.slug),{method:"DELETE"}).then(()=>{e.setAgentChangeTriggered(!0)})},children:[(0,a.jsx)(f.r,{className:"w-4 h-4 mr-2"}),"Delete"]})]})]})}),(null===(t=e.showChatButton)||void 0===t||t)&&(0,a.jsx)("div",{className:"float-right",children:e.userProfile?(0,a.jsx)(i.z,{className:"bg-[hsl(var(--background))] w-10 h-10 p-0 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>H(e.data.slug,w),children:(0,a.jsx)(p.g,{className:"w-6 h-6 ".concat((0,V.oz)(e.data.color))})}):(0,a.jsx)(i.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>g(!0),children:(0,a.jsx)(p.g,{className:"w-6 h-6 ".concat((0,V.oz)(e.data.color))})})})]}),e.editCard?(0,a.jsxs)(T.cZ,{className:"lg:max-w-screen-lg overflow-y-scroll max-h-screen",children:[(0,a.jsxs)(J.$N,{children:["Edit ",(0,a.jsx)("b",{children:e.data.name})]}),(0,a.jsx)(ea,{form:_,onSubmit:t=>{let s=e.editCard?"PATCH":"POST",a=t;e.editCard&&(a={...t,slug:e.data.slug}),fetch("/api/agents",{method:s,headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(t=>{200===t.status?(_.reset(),r(!1),b(null),e.setAgentChangeTriggered(!0)):t.json().then(e=>{console.error(e),_.clearErrors(),e.error&&b(e.error)})}).catch(e=>{console.error("Error:",e),b(e),_.clearErrors()})},create:!1,errors:v,filesOptions:e.filesOptions,modelOptions:e.modelOptions,slug:e.data.slug,inputToolOptions:e.inputToolOptions,isSubscribed:e.isSubscribed,outputModeOptions:e.outputModeOptions})]}):(0,a.jsxs)(T.cZ,{className:"whitespace-pre-line max-h-[80vh] max-w-[90vw] rounded-lg",children:[(0,a.jsx)(T.fK,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,P.TI)(e.data.icon,e.data.color),(0,a.jsx)("p",{className:"font-bold text-lg",children:e.data.name})]})}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-scroll text-neutral-500 dark:text-white",children:e.data.persona}),(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1",children:k()}),(0,a.jsx)(T.cN,{children:(0,a.jsxs)(i.z,{className:"pt-6 pb-6 ".concat(C," bg-white dark:bg-[hsl(var(--background))] text-neutral-500 dark:text-white border-2 border-stone-100 shadow-sm rounded-xl hover:bg-stone-100 dark:hover:bg-neutral-900 dark:border-neutral-700"),onClick:()=>{H(e.data.slug,w),r(!1)},children:[(0,a.jsx)(p.g,{className:"w-6 h-6 m-2 ".concat((0,V.oz)(e.data.color))}),"Start Chatting"]})})]})]})})}),(0,a.jsx)(S.aY,{children:(0,a.jsx)("div",{className:l().agentPersonality,children:(0,a.jsx)("button",{className:"".concat(l().infoButton," text-neutral-500 dark:text-white"),onClick:()=>r(!0),children:(0,a.jsx)("p",{children:e.data.persona})})})}),(0,a.jsx)(S.eW,{children:(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1",children:k()})})]})}function ea(e){let[t,s]=(0,n.useState)(!1),r=(0,P.BI)(),l=V.xF,o=(0,V.oz)(e.form.getValues("color")),[c,d]=(0,n.useState)(!1),[u,h]=(0,n.useState)(null),[x,m]=(0,n.useState)(null),[f,p]=(0,n.useState)(!1),[z,S]=(0,n.useState)(0),[T,I]=(0,n.useState)([]),[q,B]=(0,n.useState)([]),[J,D]=(0,n.useState)(0),[$,U]=(0,n.useState)(!1),H=["public","private","protected"],ee=[{fields:[{name:"name",label:"Name"},{name:"persona",label:"Personality"}],label:"Basic Settings"},{fields:[{name:"color",label:"Color"},{name:"icon",label:"Icon"},{name:"chat_model",label:"Chat Model"},{name:"privacy_level",label:"Privacy Level"}],label:"Customization & Access"},{fields:[{name:"files",label:"Knowledge Base"},{name:"input_tools",label:"Input Tools"},{name:"output_modes",label:"Output Modes"}],label:"Advanced Settings"}],es=(0,n.useRef)(null);function ea(e){e.preventDefault(),d(!0)}function er(e){e.preventDefault(),d(!1)}function el(e){e.preventDefault(),d(!1),e.dataTransfer.files&&en(e.dataTransfer.files)}function en(e){(0,Y.ko)(e,h,p,m,I)}function ei(){es&&es.current&&es.current.click()}function eo(e){e.target.files&&en(e.target.files)}(0,n.useEffect)(()=>{if(f||S(0),f){let e=setInterval(()=>{S(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[f]),(0,n.useEffect)(()=>{B(Array.from(new Set([...q,...e.form.getValues("files")||[],...e.filesOptions||[]])))},[]),(0,n.useEffect)(()=>{T.length>0&&(ec(T),B(e=>[...e,...T]))},[T]),(0,n.useEffect)(()=>{e.errors&&s(!1)},[e.errors]);let ec=t=>{for(let s of t){let t=e.form.getValues("files")||[],a=t.includes(s)?t.filter(e=>e!==s):[...t,s];e.form.setValue("files",a)}};if($)return(0,a.jsx)(K.aR,{open:!0,children:(0,a.jsxs)(K._T,{children:[(0,a.jsx)(K.fY,{children:(0,a.jsx)(K.f$,{children:"Upgrade to Futurist"})}),(0,a.jsxs)(K.yT,{children:["You need to be a Futurist subscriber to create more agents."," ",(0,a.jsx)("a",{href:"/settings",children:"Upgrade now"}),"."]}),(0,a.jsxs)(K.xo,{children:[(0,a.jsx)(K.le,{onClick:()=>{U(!1)},children:"Cancel"}),(0,a.jsx)(K.OL,{onClick:()=>{window.location.href="/settings"},children:"Continue"})]})]})});let ed=t=>{switch(t){case"name":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"name",render:e=>{let{field:t}=e;return(0,a.jsxs)(R.xJ,{className:"space-y-0 grid gap-2",children:[(0,a.jsx)(R.lX,{children:"Name"}),(0,a.jsx)(R.pf,{children:"What should this agent be called? Pick something descriptive & memorable."}),(0,a.jsx)(R.NI,{children:(0,a.jsx)(A.I,{placeholder:"Biologist",...t})}),(0,a.jsx)(R.zG,{})]})}},t);case"chat_model":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"chat_model",render:t=>{let{field:s}=t;return(0,a.jsxs)(R.xJ,{className:"space-y-1 grid gap-2",children:[(0,a.jsx)(R.lX,{children:"Chat Model"}),(0,a.jsx)(R.pf,{children:"Which large language model should this agent use?"}),(0,a.jsxs)(F.Ph,{onValueChange:s.onChange,defaultValue:s.value,children:[(0,a.jsx)(R.NI,{children:(0,a.jsx)(F.i4,{className:"text-left",children:(0,a.jsx)(F.ki,{})})}),(0,a.jsx)(F.Bw,{className:"items-start space-y-1 inline-flex flex-col",children:e.modelOptions.map(e=>(0,a.jsx)(F.Ql,{value:e.name,children:(0,a.jsx)("div",{className:"flex items-center space-x-2",children:e.name})},e.id))})]}),(0,a.jsx)(R.zG,{})]})}},t);case"privacy_level":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"privacy_level",render:e=>{let{field:t}=e;return(0,a.jsxs)(R.xJ,{className:"space-y-1 grid gap-2",children:[(0,a.jsx)(R.lX,{children:(0,a.jsx)("div",{children:"Privacy Level"})}),(0,a.jsx)(R.pf,{children:(0,a.jsxs)(Q.J2,{children:[(0,a.jsx)(Q.xo,{asChild:!0,children:(0,a.jsx)(i.z,{variant:"ghost",className:"p-0 h-fit",children:(0,a.jsxs)("span",{className:"items-center flex gap-1 text-sm",children:[(0,a.jsx)(j.k,{className:"inline"}),(0,a.jsx)("p",{className:"text-sm",children:"Learn more"})]})})}),(0,a.jsxs)(Q.yk,{children:[(0,a.jsx)("b",{children:"Private"}),": only visible to you.",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Protected"}),": visible to anyone with a link.",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Public"}),": visible to everyone.",(0,a.jsx)("br",{}),"All public agents will be reviewed by us before they are launched."]})]})}),(0,a.jsxs)(F.Ph,{onValueChange:t.onChange,defaultValue:t.value,children:[(0,a.jsx)(R.NI,{children:(0,a.jsx)(F.i4,{className:"w-[200px]",children:(0,a.jsx)(F.ki,{placeholder:"private"})})}),(0,a.jsx)(F.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:H.map(e=>(0,a.jsx)(F.Ql,{value:e,children:(0,a.jsx)("div",{className:"flex items-center space-x-2",children:e})},e))})]}),(0,a.jsx)(R.zG,{})]})}},t);case"color":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"color",render:e=>{let{field:t}=e;return(0,a.jsxs)(R.xJ,{className:"space-y-3",children:[(0,a.jsx)(R.lX,{children:"Color"}),(0,a.jsx)(R.pf,{children:"Choose a color for your agent."}),(0,a.jsxs)(F.Ph,{onValueChange:t.onChange,defaultValue:t.value,children:[(0,a.jsx)(R.NI,{children:(0,a.jsx)(F.i4,{className:"w-[200px]",children:(0,a.jsx)(F.ki,{placeholder:"Color"})})}),(0,a.jsx)(F.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:l.map(e=>(0,a.jsx)(F.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(g.C,{className:"w-6 h-6 mr-2 ".concat((0,V.oz)(e)),weight:"fill"}),e]})},e))})]}),(0,a.jsx)(R.zG,{})]})}},t);case"icon":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"icon",render:t=>{let{field:s}=t;return(0,a.jsxs)(R.xJ,{className:"space-y-3",children:[(0,a.jsx)(R.lX,{children:"Icon"}),(0,a.jsx)(R.pf,{children:"Choose an icon for your agent."}),(0,a.jsxs)(F.Ph,{onValueChange:s.onChange,defaultValue:s.value,children:[(0,a.jsx)(R.NI,{children:(0,a.jsx)(F.i4,{className:"w-[200px]",children:(0,a.jsx)(F.ki,{placeholder:"Icon"})})}),(0,a.jsx)(F.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:r.map(t=>(0,a.jsx)(F.Ql,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,P.TI)(t,e.form.getValues("color"),"w-6","h-6"),t]})},t))})]}),(0,a.jsx)(R.zG,{})]})}},t);case"persona":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"persona",render:e=>{let{field:t}=e;return(0,a.jsxs)(R.xJ,{className:"space-y-1 grid gap-2",children:[(0,a.jsx)(R.lX,{children:"Personality"}),(0,a.jsx)(R.pf,{children:"What is the personality, thought process, or tuning of this agent? Get creative; this is how you can influence the agent constitution."}),(0,a.jsx)(R.NI,{children:(0,a.jsx)(E.g,{placeholder:"You are an excellent biologist, at the top of your field in marine biology.",...t})}),(0,a.jsx)(R.zG,{})]})}},t);case"files":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"files",render:t=>{let{field:s}=t;return(0,a.jsxs)(R.xJ,{className:"flex flex-col gap-2",children:[(0,a.jsx)(R.lX,{children:"Knowledge Base"}),(0,a.jsxs)(R.pf,{children:["Which information should be part of its digital brain?"," ",(0,a.jsx)("a",{href:"/settings",children:"Manage data"}),"."]}),(0,a.jsxs)(W,{children:[(0,a.jsxs)(Z,{className:"flex items-center justify-between text-sm gap-2",children:[(0,a.jsx)(v.K,{}),s.value&&s.value.length>0?"".concat(s.value.length," files selected"):"Select files"]}),(0,a.jsx)(M,{children:(0,a.jsxs)(G.mY,{children:[(0,a.jsx)(K.aR,{open:null!==u||null!=x,children:(0,a.jsxs)(K._T,{children:[(0,a.jsx)(K.fY,{children:(0,a.jsx)(K.f$,{children:"Alert"})}),(0,a.jsx)(K.yT,{children:u||x}),(0,a.jsx)(K.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{h(null),m(null),p(!1)},children:"Close"})]})}),(0,a.jsxs)("div",{className:"flex flex-col h-full cursor-pointer",onDragOver:ea,onDragLeave:er,onDrop:el,onClick:ei,children:[(0,a.jsx)("input",{type:"file",multiple:!0,ref:es,style:{display:"none"},onChange:eo}),(0,a.jsx)("div",{className:"flex-none p-4",children:f&&(0,a.jsx)(L.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:z})}),(0,a.jsx)("div",{className:"flex-none p-4 bg-secondary border-b ".concat(c?"animate-pulse":""," rounded-lg"),children:(0,a.jsx)("div",{className:"flex items-center justify-center w-full h-16 border-2 border-dashed border-gray-300 rounded-lg",children:c?(0,a.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,a.jsx)(b.u,{className:"h-6 w-6 mr-2"}),(0,a.jsx)("span",{children:"Drop files to upload"})]}):(0,a.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,a.jsx)(N.v,{className:"h-6 w-6 mr-2"}),(0,a.jsx)("span",{children:"Drag and drop files here"})]})})})]}),(0,a.jsx)(G.sZ,{placeholder:"Select files..."}),(0,a.jsxs)(G.e8,{children:[(0,a.jsx)(G.rb,{children:"No files found."}),(0,a.jsx)(G.fu,{children:q.map(t=>(0,a.jsxs)(G.di,{value:t,onSelect:()=>{let s=e.form.getValues("files")||[],a=s.includes(t)?s.filter(e=>e!==t):[...s,t];e.form.setValue("files",a)},children:[(0,a.jsx)(y.J,{className:(0,X.cn)("mr-2 h-4 w-4",s.value&&s.value.includes(t)?"opacity-100":"opacity-0")}),t]},t))})]})]})})]})]})}},t);case"input_tools":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"input_tools",render:t=>{let{field:s}=t;return(0,a.jsxs)(R.xJ,{className:"flex flex-col gap-2",children:[(0,a.jsx)(R.lX,{children:"Restrict Input Tools"}),(0,a.jsxs)(R.pf,{children:["Which knowledge retrieval tools should this agent be limited to?",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Default:"})," No limitations."]}),(0,a.jsxs)(W,{children:[(0,a.jsxs)(Z,{className:"flex items-center justify-between text-sm gap-2",children:[(0,a.jsx)(v.K,{}),s.value&&s.value.length>0?"".concat(s.value.length," tools selected"):"All tools"]}),(0,a.jsx)(M,{children:(0,a.jsx)(G.mY,{children:(0,a.jsx)(G.e8,{children:(0,a.jsx)(G.fu,{children:Object.entries(e.inputToolOptions).map(t=>{let[r,l]=t;return(0,a.jsxs)(G.di,{value:r,onSelect:()=>{let t=e.form.getValues("input_tools")||[],s=t.includes(r)?t.filter(e=>e!==r):[...t,r];e.form.setValue("input_tools",s)},children:[(0,a.jsx)(y.J,{className:(0,X.cn)("mr-2 h-4 w-4",s.value&&s.value.includes(r)?"opacity-100":"opacity-0")}),(0,a.jsxs)("div",{className:(0,X.cn)("flex items-center space-x-2"),children:[(0,a.jsx)("p",{children:(0,a.jsx)("b",{children:r})}),(0,a.jsx)("p",{children:l})]})]},r)})})})})})]})]})}},t);case"output_modes":return(0,a.jsx)(R.Wi,{control:e.form.control,name:"output_modes",render:t=>{let{field:s}=t;return(0,a.jsxs)(R.xJ,{className:"flex flex-col gap-2",children:[(0,a.jsx)(R.lX,{children:"Restrict Output Modes"}),(0,a.jsxs)(R.pf,{children:["Which output modes should this agent be limited to?",(0,a.jsx)("br",{}),(0,a.jsx)("b",{children:"Default:"})," No limitations."]}),(0,a.jsxs)(W,{children:[(0,a.jsxs)(Z,{className:"flex items-center justify-between text-sm gap-2",children:[(0,a.jsx)(v.K,{}),s.value&&s.value.length>0?"".concat(s.value.length," modes selected"):"All modes"]}),(0,a.jsx)(M,{children:(0,a.jsx)(G.mY,{children:(0,a.jsx)(G.e8,{children:(0,a.jsx)(G.fu,{children:Object.entries(e.outputModeOptions).map(t=>{let[r,l]=t;return(0,a.jsxs)(G.di,{value:r,onSelect:()=>{let t=e.form.getValues("output_modes")||[],s=t.includes(r)?t.filter(e=>e!==r):[...t,r];e.form.setValue("output_modes",s)},children:[(0,a.jsx)(y.J,{className:(0,X.cn)("mr-2 h-4 w-4",s.value&&s.value.includes(r)?"opacity-100":"opacity-0")}),(0,a.jsxs)("div",{className:(0,X.cn)("flex items-center space-x-2"),children:[(0,a.jsx)("p",{children:(0,a.jsx)("b",{children:r})}),(0,a.jsx)("p",{children:l})]})]},r)})})})})})]})]})}},t);default:return null}};return(0,a.jsx)(R.l0,{...e.form,children:(0,a.jsxs)("form",{onSubmit:e.form.handleSubmit(t=>{e.onSubmit(t),s(!0)}),className:"space-y-6",children:[(0,a.jsx)("div",{className:"space-y-6",children:ee[J].label}),J<ee.length&&ee[J].fields.map(e=>ed(e.name)),(0,a.jsxs)("div",{className:"flex justify-between mt-4",children:[(0,a.jsxs)(i.z,{type:"button",variant:"outline",onClick:e=>{e.preventDefault(),J>0&&D(J-1)},disabled:0===J,className:"items-center ".concat(t?"bg-stone-100 dark:bg-neutral-900":""," text-white ").concat(o),children:[(0,a.jsx)(w.X,{className:"mr-2 h-4 w-4"}),"Previous"]}),J<ee.length-1?(0,a.jsxs)(i.z,{type:"button",variant:"outline",onClick:e=>{e.preventDefault(),J<ee.length-1&&D(J+1)},disabled:!(t=>{try{return et.parse(e.form.getValues()),!0}catch(s){let e=s.errors.reduce((e,t)=>(e[t.path[0]]=t.message,e),{});for(let s of t.fields)if(e[s.name])return!1;return!0}})(ee[J]),className:"items-center ".concat(t?"bg-stone-100 dark:bg-neutral-900":""," text-white ").concat(o),children:["Next",(0,a.jsx)(_.o,{className:"ml-2 h-4 w-4"})]}):(0,a.jsxs)(i.z,{type:"submit",variant:"outline",disabled:t,className:"items-center ".concat(t?"bg-stone-100 dark:bg-neutral-900":""," text-white ").concat(o),children:[(0,a.jsx)(C.B,{className:"h-4 w-4 mr-2"}),t?"Booting...":"Save"]})]}),e.errors&&(0,a.jsx)(O.bZ,{className:"bg-secondary border-none my-4",children:(0,a.jsxs)(O.X,{className:"flex items-center gap-1",children:[(0,a.jsx)(k.f,{weight:"fill",className:"h-4 w-4 text-yellow-400 inline"}),(0,a.jsx)("span",{children:e.errors})]})})]})})}},18642:function(e,t,s){"use strict";s.d(t,{Z:function(){return c}});var a=s(57437),r=s(90837),l=s(50495),n=s(83102),i=s(67135),o=s(34797);function c(e){var t;return(0,a.jsxs)(r.Vq,{children:[(0,a.jsx)(r.hg,{asChild:!0,onClick:e.onShare,children:(0,a.jsxs)(l.z,{size:"sm",className:"".concat(e.buttonClassName||"px-3"),variant:null!==(t=e.buttonVariant)&&void 0!==t?t:"default",children:[e.includeIcon&&(0,a.jsx)(o.m,{className:"w-4 h-4 mr-2"}),e.buttonTitle]})}),(0,a.jsxs)(r.cZ,{children:[(0,a.jsxs)(r.fK,{children:[(0,a.jsx)(r.$N,{children:e.title}),(0,a.jsx)(r.Be,{children:e.description})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,a.jsx)(i._,{htmlFor:"link",className:"sr-only",children:"Link"}),(0,a.jsx)(n.I,{id:"link",defaultValue:e.url,readOnly:!0})]}),(0,a.jsx)(l.z,{type:"submit",size:"sm",className:"px-3",onClick:()=>(function(e){let t=navigator.clipboard;t&&t.writeText(e)})(e.url),children:(0,a.jsx)("span",{children:"Copy"})})]})]})]})}},47412:function(e,t,s){"use strict";s.d(t,{X:function(){return c},bZ:function(){return o}});var a=s(57437),r=s(2265),l=s(12218),n=s(37440);let i=(0,l.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),o=r.forwardRef((e,t)=>{let{className:s,variant:r,...l}=e;return(0,a.jsx)("div",{ref:t,role:"alert",className:(0,n.cn)(i({variant:r}),s),...l})});o.displayName="Alert",r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("h5",{ref:t,className:(0,n.cn)("mb-1 font-medium leading-none tracking-tight",s),...r})}).displayName="AlertTitle";let c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)("div",{ref:t,className:(0,n.cn)("text-sm [&_p]:leading-relaxed",s),...r})});c.displayName="AlertDescription"},32653:function(e,t,s){"use strict";s.d(t,{NI:function(){return p},Wi:function(){return u},l0:function(){return c},lX:function(){return f},pf:function(){return j},xJ:function(){return m},zG:function(){return g}});var a=s(57437),r=s(2265),l=s(71538),n=s(39343),i=s(37440),o=s(67135);let c=n.RV,d=r.createContext({}),u=e=>{let{...t}=e;return(0,a.jsx)(d.Provider,{value:{name:t.name},children:(0,a.jsx)(n.Qr,{...t})})},h=()=>{let e=r.useContext(d),t=r.useContext(x),{getFieldState:s,formState:a}=(0,n.Gc)(),l=s(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...l}},x=r.createContext({}),m=r.forwardRef((e,t)=>{let{className:s,...l}=e,n=r.useId();return(0,a.jsx)(x.Provider,{value:{id:n},children:(0,a.jsx)("div",{ref:t,className:(0,i.cn)("space-y-2",s),...l})})});m.displayName="FormItem";let f=r.forwardRef((e,t)=>{let{className:s,...r}=e,{error:l,formItemId:n}=h();return(0,a.jsx)(o._,{ref:t,className:(0,i.cn)(l&&"text-destructive",s),htmlFor:n,...r})});f.displayName="FormLabel";let p=r.forwardRef((e,t)=>{let{...s}=e,{error:r,formItemId:n,formDescriptionId:i,formMessageId:o}=h();return(0,a.jsx)(l.g7,{ref:t,id:n,"aria-describedby":r?"".concat(i," ").concat(o):"".concat(i),"aria-invalid":!!r,...s})});p.displayName="FormControl";let j=r.forwardRef((e,t)=>{let{className:s,...r}=e,{formDescriptionId:l}=h();return(0,a.jsx)("p",{ref:t,id:l,className:(0,i.cn)("text-sm text-muted-foreground",s),...r})});j.displayName="FormDescription";let g=r.forwardRef((e,t)=>{let{className:s,children:r,...l}=e,{error:n,formMessageId:o}=h(),c=n?String(null==n?void 0:n.message):r;return c?(0,a.jsx)("p",{ref:t,id:o,className:(0,i.cn)("text-sm font-medium text-destructive",s),...l,children:c}):null});g.displayName="FormMessage"},67135:function(e,t,s){"use strict";s.d(t,{_:function(){return c}});var a=s(57437),r=s(2265),l=s(38364),n=s(12218),i=s(37440);let o=(0,n.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.f,{ref:t,className:(0,i.cn)(o(),s),...r})});c.displayName=l.f.displayName},46294:function(e,t,s){"use strict";s.d(t,{Bw:function(){return f},Ph:function(){return d},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var a=s(57437),r=s(2265),l=s(77539),n=s(42421),i=s(14392),o=s(22468),c=s(37440);let d=l.fC;l.ZA;let u=l.B4,h=r.forwardRef((e,t)=>{let{className:s,children:r,...i}=e;return(0,a.jsxs)(l.xz,{ref:t,className:(0,c.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",s),...i,children:[r,(0,a.jsx)(l.JO,{asChild:!0,children:(0,a.jsx)(n.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=l.xz.displayName;let x=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...r,children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=l.u_.displayName;let m=r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",s),...r,children:(0,a.jsx)(n.Z,{className:"h-4 w-4"})})});m.displayName=l.$G.displayName;let f=r.forwardRef((e,t)=>{let{className:s,children:r,position:n="popper",...i}=e;return(0,a.jsx)(l.h_,{children:(0,a.jsxs)(l.VY,{ref:t,className:(0,c.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"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:n,...i,children:[(0,a.jsx)(x,{}),(0,a.jsx)(l.l_,{className:(0,c.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,a.jsx)(m,{})]})})});f.displayName=l.VY.displayName,r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...r})}).displayName=l.__.displayName;let p=r.forwardRef((e,t)=>{let{className:s,children:r,...n}=e;return(0,a.jsxs)(l.ck,{ref:t,className:(0,c.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",s),...n,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(l.wU,{children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(l.eT,{children:r})]})});p.displayName=l.ck.displayName,r.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(l.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",s),...r})}).displayName=l.Z0.displayName},2288:function(e){e.exports={agentPersonality:"agentCard_agentPersonality__MmRlN",infoButton:"agentCard_infoButton__heh_w"}}}]);
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|