khoj 1.28.4.dev71__py3-none-any.whl → 1.28.4.dev76__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. khoj/configure.py +4 -6
  2. khoj/database/adapters/__init__.py +121 -35
  3. khoj/interface/compiled/404/index.html +1 -1
  4. khoj/interface/compiled/_next/static/chunks/1970-c78f6acc8e16e30b.js +1 -0
  5. khoj/interface/compiled/_next/static/chunks/{webpack-c9799fdebf88abb6.js → webpack-d37377886a1b4e56.js} +1 -1
  6. khoj/interface/compiled/_next/static/css/{2ff098d0815fdbc1.css → 9d45de78fba367c1.css} +1 -1
  7. khoj/interface/compiled/agents/index.html +1 -1
  8. khoj/interface/compiled/agents/index.txt +2 -2
  9. khoj/interface/compiled/automations/index.html +1 -1
  10. khoj/interface/compiled/automations/index.txt +1 -1
  11. khoj/interface/compiled/chat/index.html +1 -1
  12. khoj/interface/compiled/chat/index.txt +1 -1
  13. khoj/interface/compiled/index.html +1 -1
  14. khoj/interface/compiled/index.txt +3 -3
  15. khoj/interface/compiled/search/index.html +1 -1
  16. khoj/interface/compiled/search/index.txt +1 -1
  17. khoj/interface/compiled/settings/index.html +1 -1
  18. khoj/interface/compiled/settings/index.txt +1 -1
  19. khoj/interface/compiled/share/chat/index.html +1 -1
  20. khoj/interface/compiled/share/chat/index.txt +2 -2
  21. khoj/processor/content/docx/docx_to_entries.py +2 -2
  22. khoj/processor/content/github/github_to_entries.py +2 -2
  23. khoj/processor/content/images/image_to_entries.py +2 -2
  24. khoj/processor/content/markdown/markdown_to_entries.py +2 -2
  25. khoj/processor/content/notion/notion_to_entries.py +2 -2
  26. khoj/processor/content/org_mode/org_to_entries.py +2 -2
  27. khoj/processor/content/pdf/pdf_to_entries.py +2 -2
  28. khoj/processor/content/plaintext/plaintext_to_entries.py +2 -2
  29. khoj/processor/content/text_to_entries.py +2 -2
  30. khoj/processor/conversation/prompts.py +33 -0
  31. khoj/routers/api.py +1 -1
  32. khoj/routers/api_agents.py +8 -10
  33. khoj/routers/api_content.py +2 -2
  34. khoj/routers/helpers.py +8 -4
  35. khoj/routers/notion.py +1 -1
  36. khoj/search_type/text_search.py +1 -1
  37. khoj/utils/fs_syncer.py +2 -1
  38. {khoj-1.28.4.dev71.dist-info → khoj-1.28.4.dev76.dist-info}/METADATA +1 -1
  39. {khoj-1.28.4.dev71.dist-info → khoj-1.28.4.dev76.dist-info}/RECORD +44 -44
  40. khoj/interface/compiled/_next/static/chunks/1970-30985763f1451fa2.js +0 -1
  41. /khoj/interface/compiled/_next/static/{I1jjXZh1lBQiY837mKXbn → o-l9xN70-eH1BC65S0umF}/_buildManifest.js +0 -0
  42. /khoj/interface/compiled/_next/static/{I1jjXZh1lBQiY837mKXbn → o-l9xN70-eH1BC65S0umF}/_ssgManifest.js +0 -0
  43. {khoj-1.28.4.dev71.dist-info → khoj-1.28.4.dev76.dist-info}/WHEEL +0 -0
  44. {khoj-1.28.4.dev71.dist-info → khoj-1.28.4.dev76.dist-info}/entry_points.txt +0 -0
  45. {khoj-1.28.4.dev71.dist-info → khoj-1.28.4.dev76.dist-info}/licenses/LICENSE +0 -0
@@ -183,7 +183,7 @@ async def delete_agent(
183
183
 
184
184
 
185
185
  @api_agents.post("", response_class=Response)
186
- @requires(["authenticated", "premium"])
186
+ @requires(["authenticated"])
187
187
  async def create_agent(
188
188
  request: Request,
189
189
  common: CommonQueryParams,
@@ -191,10 +191,9 @@ async def create_agent(
191
191
  ) -> Response:
192
192
  user: KhojUser = request.user.object
193
193
 
194
- is_safe_prompt, reason = True, ""
195
-
196
- if body.privacy_level != Agent.PrivacyLevel.PRIVATE:
197
- is_safe_prompt, reason = await acheck_if_safe_prompt(body.persona)
194
+ is_safe_prompt, reason = await acheck_if_safe_prompt(
195
+ body.persona, user, lax=body.privacy_level == Agent.PrivacyLevel.PRIVATE
196
+ )
198
197
 
199
198
  if not is_safe_prompt:
200
199
  return Response(
@@ -236,7 +235,7 @@ async def create_agent(
236
235
 
237
236
 
238
237
  @api_agents.patch("", response_class=Response)
239
- @requires(["authenticated", "premium"])
238
+ @requires(["authenticated"])
240
239
  async def update_agent(
241
240
  request: Request,
242
241
  common: CommonQueryParams,
@@ -244,10 +243,9 @@ async def update_agent(
244
243
  ) -> Response:
245
244
  user: KhojUser = request.user.object
246
245
 
247
- is_safe_prompt, reason = True, ""
248
-
249
- if body.privacy_level != Agent.PrivacyLevel.PRIVATE:
250
- is_safe_prompt, reason = await acheck_if_safe_prompt(body.persona)
246
+ is_safe_prompt, reason = await acheck_if_safe_prompt(
247
+ body.persona, user, lax=body.privacy_level == Agent.PrivacyLevel.PRIVATE
248
+ )
251
249
 
252
250
  if not is_safe_prompt:
253
251
  return Response(
@@ -239,7 +239,7 @@ async def set_content_notion(
239
239
 
240
240
  if updated_config.token:
241
241
  # Trigger an async job to configure_content. Let it run without blocking the response.
242
- background_tasks.add_task(run_in_executor, configure_content, {}, False, SearchType.Notion, user)
242
+ background_tasks.add_task(run_in_executor, configure_content, user, {}, False, SearchType.Notion)
243
243
 
244
244
  update_telemetry_state(
245
245
  request=request,
@@ -512,10 +512,10 @@ async def indexer(
512
512
  success = await loop.run_in_executor(
513
513
  None,
514
514
  configure_content,
515
+ user,
515
516
  indexer_input.model_dump(),
516
517
  regenerate,
517
518
  t,
518
- user,
519
519
  )
520
520
  if not success:
521
521
  raise RuntimeError(f"Failed to {method} {t} data sent by {client} client into content index")
khoj/routers/helpers.py CHANGED
@@ -301,11 +301,15 @@ async def acreate_title_from_query(query: str, user: KhojUser = None) -> str:
301
301
  return response.strip()
302
302
 
303
303
 
304
- async def acheck_if_safe_prompt(system_prompt: str, user: KhojUser = None) -> Tuple[bool, str]:
304
+ async def acheck_if_safe_prompt(system_prompt: str, user: KhojUser = None, lax: bool = False) -> Tuple[bool, str]:
305
305
  """
306
306
  Check if the system prompt is safe to use
307
307
  """
308
- safe_prompt_check = prompts.personality_prompt_safety_expert.format(prompt=system_prompt)
308
+ safe_prompt_check = (
309
+ prompts.personality_prompt_safety_expert.format(prompt=system_prompt)
310
+ if not lax
311
+ else prompts.personality_prompt_safety_expert_lax.format(prompt=system_prompt)
312
+ )
309
313
  is_safe = True
310
314
  reason = ""
311
315
 
@@ -699,7 +703,7 @@ async def generate_summary_from_files(
699
703
  if await EntryAdapters.aagent_has_entries(agent):
700
704
  file_names = await EntryAdapters.aget_agent_entry_filepaths(agent)
701
705
  if len(file_names) > 0:
702
- file_objects = await FileObjectAdapters.async_get_file_objects_by_name(None, file_names.pop(), agent)
706
+ file_objects = await FileObjectAdapters.aget_file_objects_by_name(None, file_names.pop(), agent)
703
707
 
704
708
  if (file_objects and len(file_objects) == 0 and not query_files) or (not file_objects and not query_files):
705
709
  response_log = "Sorry, I couldn't find anything to summarize."
@@ -1971,10 +1975,10 @@ def get_user_config(user: KhojUser, request: Request, is_detailed: bool = False)
1971
1975
 
1972
1976
 
1973
1977
  def configure_content(
1978
+ user: KhojUser,
1974
1979
  files: Optional[dict[str, dict[str, str]]],
1975
1980
  regenerate: bool = False,
1976
1981
  t: Optional[state.SearchType] = state.SearchType.All,
1977
- user: KhojUser = None,
1978
1982
  ) -> bool:
1979
1983
  success = True
1980
1984
  if t == None:
khoj/routers/notion.py CHANGED
@@ -80,6 +80,6 @@ async def notion_auth_callback(request: Request, background_tasks: BackgroundTas
80
80
  notion_redirect = str(request.app.url_path_for("config_page"))
81
81
 
82
82
  # Trigger an async job to configure_content. Let it run without blocking the response.
83
- background_tasks.add_task(run_in_executor, configure_content, {}, False, SearchType.Notion, user)
83
+ background_tasks.add_task(run_in_executor, configure_content, user, {}, False, SearchType.Notion)
84
84
 
85
85
  return RedirectResponse(notion_redirect)
@@ -208,7 +208,7 @@ def setup(
208
208
  text_to_entries: Type[TextToEntries],
209
209
  files: dict[str, str],
210
210
  regenerate: bool,
211
- user: KhojUser = None,
211
+ user: KhojUser,
212
212
  config=None,
213
213
  ) -> Tuple[int, int]:
214
214
  if config:
khoj/utils/fs_syncer.py CHANGED
@@ -8,6 +8,7 @@ from bs4 import BeautifulSoup
8
8
  from magika import Magika
9
9
 
10
10
  from khoj.database.models import (
11
+ KhojUser,
11
12
  LocalMarkdownConfig,
12
13
  LocalOrgConfig,
13
14
  LocalPdfConfig,
@@ -21,7 +22,7 @@ logger = logging.getLogger(__name__)
21
22
  magika = Magika()
22
23
 
23
24
 
24
- def collect_files(search_type: Optional[SearchType] = SearchType.All, user=None) -> dict:
25
+ def collect_files(user: KhojUser, search_type: Optional[SearchType] = SearchType.All) -> dict:
25
26
  files: dict[str, dict] = {"docx": {}, "image": {}}
26
27
 
27
28
  if search_type == SearchType.All or search_type == SearchType.Org:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: khoj
3
- Version: 1.28.4.dev71
3
+ Version: 1.28.4.dev76
4
4
  Summary: Your Second Brain
5
5
  Project-URL: Homepage, https://khoj.dev
6
6
  Project-URL: Documentation, https://docs.khoj.dev
@@ -1,5 +1,5 @@
1
1
  khoj/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- khoj/configure.py,sha256=mOagLV6APR2GfTtIopuHinFCO_NcJZe54dz9xpE2K6c,17324
2
+ khoj/configure.py,sha256=UpbSbCqMHzujVA5f4pxDG8XGlnfru7zDIFgqtXZQw_s,17212
3
3
  khoj/main.py,sha256=9YMJEaKlVin5hxU0TcVH5X1CP6wX9HE8Z7qWSxNGPd0,8161
4
4
  khoj/manage.py,sha256=njo6uLxGaMamTPesHjFEOIBJbpIUrz39e1V59zKj544,664
5
5
  khoj/app/README.md,sha256=PSQjKCdpU2hgszLVF8yEhV7TWhbEEb-1aYLTRuuAsKI,2832
@@ -11,7 +11,7 @@ khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  khoj/database/admin.py,sha256=Tmvcc4f3HECgxtynIs9ISkjapvu9hsPaStugzVoCmyE,9640
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=2L0-2uTwqcqYJyQhW882tFyJWmcz9vGdrzxVyanzrK0,67241
14
+ khoj/database/adapters/__init__.py,sha256=gv2SNrTpJvW1cPzFwSSY7qF7DYYXY1bWWxi-A141nkM,69020
15
15
  khoj/database/management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  khoj/database/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  khoj/database/management/commands/change_default_model.py,sha256=HkFQOI-2rFjlu7YiulyRcTrITzSzXmY4WiV2hBmml0w,5209
@@ -110,22 +110,20 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
110
110
  khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
111
111
  khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
112
112
  khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
113
- khoj/interface/compiled/index.html,sha256=Q1-dlAePeS-aqAno0HDiaNqyUPSk8wuWuuvORekB_fE,12184
114
- khoj/interface/compiled/index.txt,sha256=Gnw4U_adVXCEhTfw2p8GZo81rDhI88noBbhUTVp7SAs,5625
113
+ khoj/interface/compiled/index.html,sha256=0rWeYAvV5lOdGLUU3Cyc5de0NJpsbP5xxEWpPojd_nM,12156
114
+ khoj/interface/compiled/index.txt,sha256=VnUfROnB_XVv1v6IqZPWw281m4msd1nFedkFsByeI5g,5611
115
115
  khoj/interface/compiled/khoj.webmanifest,sha256=lsknYkvEdMbRTOUYKXPM_8krN2gamJmM4u3qj8u9lrU,1682
116
116
  khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
117
117
  khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
118
118
  khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
119
119
  khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
120
120
  khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
121
- khoj/interface/compiled/404/index.html,sha256=b96ekI8O__FDl8Q5OemvA-faa5-gphixHgnV2fe7dhY,12051
122
- khoj/interface/compiled/_next/static/I1jjXZh1lBQiY837mKXbn/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
123
- khoj/interface/compiled/_next/static/I1jjXZh1lBQiY837mKXbn/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
121
+ khoj/interface/compiled/404/index.html,sha256=Lvs00GibsLWoJNLNeGjnkipOztnguZm1Ja3xcEXpxdg,12023
124
122
  khoj/interface/compiled/_next/static/chunks/1210.132a7e1910006bbb.js,sha256=2dJueIfOg5qlQdanOM9HrgwcfrUXCD57bfd8Iv7iJcU,2104
125
123
  khoj/interface/compiled/_next/static/chunks/1279-f37ee4a388ebf544.js,sha256=U_1WaocOdgJ4HZB8tRx_izzYGD1EZlCohC1uLCffCWc,45582
126
124
  khoj/interface/compiled/_next/static/chunks/1459.690bf20e7d7b7090.js,sha256=z-ruZPxF_Z3ef_WOThd9Ox36AMhxaW3znizVivNnA34,34239
127
125
  khoj/interface/compiled/_next/static/chunks/1603-2418b11d8e8dacb9.js,sha256=d9WbBMjq31Pgjoztt0DFKbm6SSSrF0pSNwLOuLizzHU,74267
128
- khoj/interface/compiled/_next/static/chunks/1970-30985763f1451fa2.js,sha256=6cdvTgAJqyyihAHrhAN0Ht8yA-Y6ERdj99lLIveswZg,29835
126
+ khoj/interface/compiled/_next/static/chunks/1970-c78f6acc8e16e30b.js,sha256=3hp_EoSjfrivYwGsLAZd22tJdGVnLrld6vV94-ABKU4,29801
129
127
  khoj/interface/compiled/_next/static/chunks/2261-748f7c327df3c8c1.js,sha256=mnccV1BR2b9kKlj9DPF_XzoxuUal3kgajndLRVhj5bA,37344
130
128
  khoj/interface/compiled/_next/static/chunks/3062-71ed4b46ac2bb87c.js,sha256=847h3nNxc8t4GOW20GIAp8c5kquVPEQ7EZurPzGySo0,258667
131
129
  khoj/interface/compiled/_next/static/chunks/3124-a4cea2eda163128d.js,sha256=8nvTywzLygRGYmFlGbNik1c5wDFAFH_wYjm12mC9tgY,186256
@@ -149,7 +147,7 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
149
147
  khoj/interface/compiled/_next/static/chunks/main-1ea5c2e0fdef4626.js,sha256=8_u87PGI3PahFbDfGWGvpD-a18J7X7ChUqWIeqxVq7g,111061
150
148
  khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js,sha256=i52E7sWOcSq1G8eYZL3mtTxbUbwRNxcAbSWQ6uWpMsY,475
151
149
  khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
152
- khoj/interface/compiled/_next/static/chunks/webpack-c9799fdebf88abb6.js,sha256=dZ5rJCf_vZpW-T6jTzDlyIzqJuaFQ1bxlyO79BYi_7Y,4054
150
+ khoj/interface/compiled/_next/static/chunks/webpack-d37377886a1b4e56.js,sha256=uZx5Rho2ddFBfyZSvMYSu3v0CVZ6bZaB5oKzHGSvIbE,4054
153
151
  khoj/interface/compiled/_next/static/chunks/app/layout-86561d2fac35a91a.js,sha256=2EWsyKE2kcC5uDvsOtgG5OP0hHCX8sCph4NqhUU2rCg,442
154
152
  khoj/interface/compiled/_next/static/chunks/app/page-5c06dadacb1b5945.js,sha256=RLPwyO_U0zAfZDJ3rCHC9SViS6cdKeKs8qVzsLxahfg,29576
155
153
  khoj/interface/compiled/_next/static/chunks/app/_not-found/page-07ff4ab42b07845e.js,sha256=3mCUnxfMxyK44eqk21TVBrC6u--WSbvx31fTmQuOvMQ,1755
@@ -169,11 +167,11 @@ khoj/interface/compiled/_next/static/chunks/pages/_app-f870474a17b7f2fd.js,sha25
169
167
  khoj/interface/compiled/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js,sha256=vjERjtMAbVk-19LyPf1Jc-H6TMcrSznSz6brzNqbqf8,253
170
168
  khoj/interface/compiled/_next/static/css/0e9d53dcd7f11342.css,sha256=52_LSJ59Vwm1p2UpcDXEvq99pTjz2sW4EjF5iKf-dzs,2622
171
169
  khoj/interface/compiled/_next/static/css/1f293605f2871853.css,sha256=G2b3Wx4e0DRBWSdNU20ivCChZI5HBzvPYUVVIdTRjLc,26590
172
- khoj/interface/compiled/_next/static/css/2ff098d0815fdbc1.css,sha256=F-uRnbKKlMZq5eMcvFZtUOCTgC6n_uNE6fuaHU4CBak,8829
173
170
  khoj/interface/compiled/_next/static/css/3cf13271869a4aeb.css,sha256=sGjJTeMeN6wbQF4OCPgWYgJmSLLSHyzIH2rSVstWx7k,1857
174
171
  khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css,sha256=3CjTMmtMrm_MYt1ywtUh2MHEjSLSl356SQLl4hdBuYw,534
175
172
  khoj/interface/compiled/_next/static/css/5a400c87d295e68a.css,sha256=ojDUPJ9fJpEo9DzTAsEa-k1cg7Bef-nSTfpszMiqknQ,17711
176
173
  khoj/interface/compiled/_next/static/css/80bd6301fc657983.css,sha256=T7_aQHcWpQBQLKadauHNzjYGw713FtRNTlUqmJjsL6I,1634
174
+ khoj/interface/compiled/_next/static/css/9d45de78fba367c1.css,sha256=TGW4CbYNGAfDm8sAwMbO2zxxIdxxKJq5fhxVpHgRW0E,8829
177
175
  khoj/interface/compiled/_next/static/css/af0f36f71f368260.css,sha256=Mje17fTElmqXbWAHiLvEnQAdY2YNCScR2wu9P6qEJKc,3055746
178
176
  khoj/interface/compiled/_next/static/media/5455839c73f146e7-s.p.woff2,sha256=BUeNjYxyX7Bu76aNlJrZtW3PwYgcH-kp8syFdODZoyc,35788
179
177
  khoj/interface/compiled/_next/static/media/5984b96ba4822821-s.woff2,sha256=RFrf6fMTduuQwEe78qK6_Y_Mnj97HmRDG-VujYxwA90,99368
@@ -247,8 +245,10 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
247
245
  khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
248
246
  khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
249
247
  khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
250
- khoj/interface/compiled/agents/index.html,sha256=ZfnEDJku5qM5HjezszGJH7olw4oJcPIYw1_PvTdzz0Q,12658
251
- khoj/interface/compiled/agents/index.txt,sha256=_qpxDFkyIDnpnWQwdVWpLedv5eH5e3Tc4niEwbKJwGI,6045
248
+ khoj/interface/compiled/_next/static/o-l9xN70-eH1BC65S0umF/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
249
+ khoj/interface/compiled/_next/static/o-l9xN70-eH1BC65S0umF/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
250
+ khoj/interface/compiled/agents/index.html,sha256=KBJG_KP4KG-R24aDOZvzF8C7Q0pZGnuVcw31AXM06Yk,12658
251
+ khoj/interface/compiled/agents/index.txt,sha256=tRlYvojPnStVnFGzpkb3vKKBWlqGMNDin_-99q2ZXYo,6045
252
252
  khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
253
253
  khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png,sha256=aTxivDb3CYyThkVZWz8A19xl_dNut5DbkXhODWF3A9Q,5640
254
254
  khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png,sha256=xPCMLHiaL7lYOdQLZrKwWE-Qjn5ZaysSZB0ScYv4UZU,12312
@@ -259,16 +259,16 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
259
259
  khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
260
260
  khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
261
261
  khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
262
- khoj/interface/compiled/automations/index.html,sha256=QEGk-MHWMOxM5RYyWGpJxS3lVKrc5K6AvKspPfO7tGA,30941
263
- khoj/interface/compiled/automations/index.txt,sha256=SwgMXvpjDIAFIZwSAwUDvlZPJNrnhFdIHzYzZUga1xU,5633
264
- khoj/interface/compiled/chat/index.html,sha256=WXKxLx4noxV0UgzR5lDsXBDC3cSjdbt1Dw9rMCzR7Pg,13860
265
- khoj/interface/compiled/chat/index.txt,sha256=R9StRn8Rs02d_VBOKHjE40cMCjzeY0awr3-_kHsncXY,6590
266
- khoj/interface/compiled/search/index.html,sha256=RKnbqRqOdZjE29r-uTvMhCqlbV7rgpmKd11e306Yz6w,30161
267
- khoj/interface/compiled/search/index.txt,sha256=ofBpI2XKrK8IMkAnK9ESMovosGVgVkFKAcqZT51lZ5g,5256
268
- khoj/interface/compiled/settings/index.html,sha256=4cLTcvx8IMxAB-wa0LovNUPUUXuOcyR2xyhAzQRew5I,12831
269
- khoj/interface/compiled/settings/index.txt,sha256=bCPe4C3FSEUiKdMVIkrSZrgU6umoVHOeaVh-rXWuTiI,6078
270
- khoj/interface/compiled/share/chat/index.html,sha256=BjNAtv8dqQL6Yi_Jb7P75-QDlsFXTtbPhMqLPw_anDc,15185
271
- khoj/interface/compiled/share/chat/index.txt,sha256=X-ZaPNSOdtNHQPnCuJa_huC7oYLAXtLls6o-ShXsmFM,7401
262
+ khoj/interface/compiled/automations/index.html,sha256=HTzJlI7PL4LTQrgfq_Qg2MJ1mEm94i1mRBqbUlmw-nU,30941
263
+ khoj/interface/compiled/automations/index.txt,sha256=sRI9RY2V_5rJ22Q97D6kpnJZBlMA6k1pF-xL5sUmHoo,5633
264
+ khoj/interface/compiled/chat/index.html,sha256=--jm0lP8AHSWS7AmHDjMAulTUXu2V1FgQuZdOutrwuI,13860
265
+ khoj/interface/compiled/chat/index.txt,sha256=MevOIwKFxpsL0EO6SnWBY0wTkk1gAUfjJnKXfHQ5ZIw,6590
266
+ khoj/interface/compiled/search/index.html,sha256=7cJvvpV2BuzHzbC9OJpqGEYvyOMCIt0iJH2OpOMFmmI,30161
267
+ khoj/interface/compiled/search/index.txt,sha256=WXrwiH0kKTvAoo_IWVjKjUn79-rIqGWp0llOC2vegHU,5256
268
+ khoj/interface/compiled/settings/index.html,sha256=ZWRxvxh7CGujv9v-SpP7zABHOUHTK8Rz5yIum6VVTh0,12831
269
+ khoj/interface/compiled/settings/index.txt,sha256=3UVhAASA5lyLrV7REofMyyNul6mTtS33O5_D4iRmU58,6078
270
+ khoj/interface/compiled/share/chat/index.html,sha256=VzOBwSlkUpeSqK7t0m9zbaUGuXnqXBfPUL76jmx_SOQ,15157
271
+ khoj/interface/compiled/share/chat/index.txt,sha256=rtQZnct1rppEqwoU-tHaFjeJBVV9adZMVNft8f4S9b0,7387
272
272
  khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
273
273
  khoj/interface/email/magic_link.html,sha256=EoGKQucfPj3xQrWXhSZAzPFOYCHF_ZX94TWCd1XHl1M,941
274
274
  khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
@@ -302,25 +302,25 @@ khoj/migrations/migrate_version.py,sha256=6CTsLuxiLnFVF8A7CjsIz3PcnJd8fAOZeIx6tT
302
302
  khoj/processor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
303
303
  khoj/processor/embeddings.py,sha256=jGLLXkenvCxWEeFqw3g5YpX08hy2wgSZKvPC4BGD7Og,5527
304
304
  khoj/processor/content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
305
- khoj/processor/content/text_to_entries.py,sha256=mobsDnva4OVKVe1607dSPDOvB5MXqwtbNPeLQE5kaCM,14561
305
+ khoj/processor/content/text_to_entries.py,sha256=HL7o2g8OyS5QJEm0C6F4Jebj0MPAa8CCYFg8XUb6mrc,14540
306
306
  khoj/processor/content/docx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
307
- khoj/processor/content/docx/docx_to_entries.py,sha256=TRwChDj_mwXcL4LRXVPyMn32fg4y6NEnshIiO2ZeNXg,4580
307
+ khoj/processor/content/docx/docx_to_entries.py,sha256=OiO_Q1EudlOGqUpWCV9BseSjWZjrR4plk63a6ZPeC-4,4566
308
308
  khoj/processor/content/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
- khoj/processor/content/github/github_to_entries.py,sha256=SfgXJi59LvFldnRLC5dJ3tUhM5vym-ZrbUovh1G42LQ,9887
309
+ khoj/processor/content/github/github_to_entries.py,sha256=25RberAd38W0h70SOwFLzCWTMrfF6V-YTptFMKYoMN0,9868
310
310
  khoj/processor/content/images/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
311
- khoj/processor/content/images/image_to_entries.py,sha256=zv71SpXlHmMbdJsDw6mEgwQITNWlr3nd_VRj0CH2rm8,5120
311
+ khoj/processor/content/images/image_to_entries.py,sha256=Ne0pOWvJm_zxKYjquovo8EchumaVYKYgEjY-_uC4w6w,5106
312
312
  khoj/processor/content/markdown/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
313
- khoj/processor/content/markdown/markdown_to_entries.py,sha256=3ZXkJtehcVcMrNY6V4p-8i53zDIIsiVGQg-AMtD_U1U,7076
314
- khoj/processor/content/notion/notion_to_entries.py,sha256=aFu41uynXTDU5TjXJhGpE6kYNDzXTB98NX3ruJUomRY,9858
313
+ khoj/processor/content/markdown/markdown_to_entries.py,sha256=MshR6XQGSN1O-aHgVrr4b4M91csfoI5XwZfYhenkw84,7062
314
+ khoj/processor/content/notion/notion_to_entries.py,sha256=hC8u826szKgrtsc2ibdr7EqmBo7OQQ1a2oCKGsejVVk,9839
315
315
  khoj/processor/content/org_mode/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
316
- khoj/processor/content/org_mode/org_to_entries.py,sha256=UYlCJRaNwwuf9LobiprVSGECOOyNV0q3R1kVnmOdvE8,10251
316
+ khoj/processor/content/org_mode/org_to_entries.py,sha256=KQBn792yM9fsfaFu8FFoxk1PwYR-lmA07RUXEJQFkHs,10237
317
317
  khoj/processor/content/org_mode/orgnode.py,sha256=DlHZICxbCRxqGxA_osYf1faxslxpSuIqbHco8oxAKKM,18478
318
318
  khoj/processor/content/pdf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
319
- khoj/processor/content/pdf/pdf_to_entries.py,sha256=PfaZfyhMqr-TwhD7cgloWo-IsqUUOeng9vIDFubpEjs,4930
319
+ khoj/processor/content/pdf/pdf_to_entries.py,sha256=ZR-4Z22NcRi_AjUEV7Cv_S6sT3WYQbj9gyZIFMlz5W4,4916
320
320
  khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
321
- khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=97i7Cm0DTY7jW4iqKOT_oVc2ooa_XhQ8iImsljp1Kek,4994
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=_gdchHvSuCUSCnvVVQWa-xO63QjlswLLK-hB1hwqvzQ,47130
323
+ khoj/processor/conversation/prompts.py,sha256=0ocq9XokhvzAzK3XghVSfhhTDwWINMp3YRhhfD7Op_k,48555
324
324
  khoj/processor/conversation/utils.py,sha256=I-tjKQy97nAlOaz10GYKhG7eXIweMDC2fMErMpiFsAM,27592
325
325
  khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
326
326
  khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=JjKiMY8CYv7kp2gHo7HcB-rMP5kokSutPw6w2OOURd4,8678
@@ -343,17 +343,17 @@ khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
343
343
  khoj/processor/tools/online_search.py,sha256=uxwtvKReGEW1XhkeToi7XB_oZ301DIcnD7Wr3xojuM4,16307
344
344
  khoj/processor/tools/run_code.py,sha256=wdGRdQqoxqM84baUmUkinQoLBK5xKJ_AZoeL2vddMlc,4971
345
345
  khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
346
- khoj/routers/api.py,sha256=nZLGINg7tnRrBa9uEHpgvILAmEdH-X1QWm5vXSqX5HE,28489
347
- khoj/routers/api_agents.py,sha256=4T0osmOGFmYC-BhdAkT5HpT2zaktlL7Agj47-To-jxo,9773
346
+ khoj/routers/api.py,sha256=_AI1pnQMQM75L6WVZSAVfvrk04pLEdLbHA0fkyxnUbo,28489
347
+ khoj/routers/api_agents.py,sha256=vHPruCjlQxGBdm0lcmymEb9-aAELqbOplqh21WwD0DQ,9699
348
348
  khoj/routers/api_chat.py,sha256=CBb-mqEO761BQH9qDAJe48MuQKM_u8JZgSUBjeVlALA,48416
349
- khoj/routers/api_content.py,sha256=ezSiM3scThpsBFq8Lykwh_aGW6zk5g7Gd8NBgRr3Ub0,20544
349
+ khoj/routers/api_content.py,sha256=10dw55vesCsuci577OCYgYylWgmIDA45Iax1ZQ8dnGI,20544
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=sR5_XxQ4e_1hk3K4g0i3S8PZeULP23lnGtrWnfjhNDI,5307
353
353
  khoj/routers/auth.py,sha256=HO54PR-BkWA_iJIktEobUrObcXVYG-00jpnIcEVdR5s,6564
354
354
  khoj/routers/email.py,sha256=SGYNPQvfcvYeHf70F0YqpY0FLMRElF2ZekROXdwGI18,3821
355
- khoj/routers/helpers.py,sha256=M9LBcHMlt4_Tsf_xKCwSSfNfAMv9GEq-vSVmAe7oB48,82090
356
- khoj/routers/notion.py,sha256=Lp67xP9rVgpAF9BQoGTjZFcVdF1HYtvPP0kjq6uurKU,2802
355
+ khoj/routers/helpers.py,sha256=EBF5oop-PfESuvhRqtg3bffbuiKdBDZys1bcSNEf4lY,82219
356
+ khoj/routers/notion.py,sha256=g53xyYFmjr2JnuIrTW2vytbfkiK_UkoRTxqnnLSmD5o,2802
357
357
  khoj/routers/research.py,sha256=e_p2Rj9ypryCdgCb9fhNldzf57gWQN99eDy1aOTk1yU,15675
358
358
  khoj/routers/storage.py,sha256=tJrwhFRVWv0MHv7V7huMc1Diwm-putZSwnZXJ3tqT_c,2338
359
359
  khoj/routers/twilio.py,sha256=MLsuCm4--ETvr3sLxbF0CL_ehlg_l2rKBSLR2Qh2Xls,1081
@@ -364,12 +364,12 @@ khoj/search_filter/date_filter.py,sha256=7MCXyeDy9TGG81IesLrgV7vnTUDXWe8xj8NeeES
364
364
  khoj/search_filter/file_filter.py,sha256=H47C8yoVMiSub8VWu8wHerlIq-PffFnB08Nm2OJyBE8,1146
365
365
  khoj/search_filter/word_filter.py,sha256=5Yx95aSiqGke9kEIbp8T-Ak4dS9cTd3VxI1SaJoK1wY,1005
366
366
  khoj/search_type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
367
- khoj/search_type/text_search.py,sha256=aDoRdwlREh1G0J-PZZUPhfL0arHP8f-g1DZDlT117qE,9450
367
+ khoj/search_type/text_search.py,sha256=PZzJVCXpeBM795SIqiAKXAxgnCp1NIRiVikm040r1b0,9443
368
368
  khoj/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
369
369
  khoj/utils/cli.py,sha256=AgO3rO-bN5oI71sIReGxrJXPeXEH80fnCIsyVlZYgjI,3695
370
370
  khoj/utils/config.py,sha256=aiOkH0je8A30DAGYTHMRePrgJonFv_i07_7CdhhhcdA,1805
371
371
  khoj/utils/constants.py,sha256=UwE7U9bNsfeqTb0K2lcdXdAscM4-7uuVoR3KbZS03Pg,1216
372
- khoj/utils/fs_syncer.py,sha256=bQgcbYYC3x11RyCqI_kUzzqGpcKTodGgdT-3OTQsXqw,9977
372
+ khoj/utils/fs_syncer.py,sha256=5nqwAZqRk3Nwhkwd8y4IomTPZQmW32GwAqyMzal5KyY,9996
373
373
  khoj/utils/helpers.py,sha256=3UHNiamfVQwaXgcvMqoNlRK1mlW9R-UYFiVovElvKWg,19956
374
374
  khoj/utils/initialization.py,sha256=TjA2ZImYKI-J1tEBE_0TaOLnVQidVV5GDEFBOPq8aik,10048
375
375
  khoj/utils/jsonl.py,sha256=0Ac_COqr8sLCXntzZtquxuCEVRM2c3yKeDRGhgOBRpQ,1192
@@ -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=x4GTewP1YhOA6c_32N4wOjnV-3AA3xG_qbY1-wC2Uxc,1559
379
379
  khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
380
- khoj-1.28.4.dev71.dist-info/METADATA,sha256=Q-EAb9tAUzzsFR1Lip_Q1Cu2HI1zdHasP2H-lUzcFMw,7093
381
- khoj-1.28.4.dev71.dist-info/WHEEL,sha256=3U_NnUcV_1B1kPkYaPzN-irRckL5VW_lytn0ytO_kRY,87
382
- khoj-1.28.4.dev71.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
383
- khoj-1.28.4.dev71.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
384
- khoj-1.28.4.dev71.dist-info/RECORD,,
380
+ khoj-1.28.4.dev76.dist-info/METADATA,sha256=4199wC_md7svNqENkAjlGUDZEnxLf9rjSFZWFF_kbRY,7093
381
+ khoj-1.28.4.dev76.dist-info/WHEEL,sha256=3U_NnUcV_1B1kPkYaPzN-irRckL5VW_lytn0ytO_kRY,87
382
+ khoj-1.28.4.dev76.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
383
+ khoj-1.28.4.dev76.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
384
+ khoj-1.28.4.dev76.dist-info/RECORD,,
@@ -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)(!0),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(!e.isSubscribed&&$)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||!e.isSubscribed,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"}}}]);