khoj 1.27.2.dev29__py3-none-any.whl → 1.27.2.dev130__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 (72) hide show
  1. khoj/database/adapters/__init__.py +34 -10
  2. khoj/interface/compiled/404/index.html +1 -1
  3. khoj/interface/compiled/_next/static/chunks/1034-da58b679fcbb79c1.js +1 -0
  4. khoj/interface/compiled/_next/static/chunks/1467-5a191c1cd5bf0b83.js +1 -0
  5. khoj/interface/compiled/_next/static/chunks/1603-5d70d9dfcdcb1f10.js +1 -0
  6. khoj/interface/compiled/_next/static/chunks/3423-fa918f4e5365a35e.js +1 -0
  7. khoj/interface/compiled/_next/static/chunks/8423-3ad0bfb299801220.js +1 -0
  8. khoj/interface/compiled/_next/static/chunks/app/agents/{page-5ae1e540bb5be8a9.js → page-2beaba7c9bb750bd.js} +1 -1
  9. khoj/interface/compiled/_next/static/chunks/app/automations/{page-774ae3e033f938cd.js → page-9b5c77e0b0dd772c.js} +1 -1
  10. khoj/interface/compiled/_next/static/chunks/app/chat/page-7dc98df9c88828f0.js +1 -0
  11. khoj/interface/compiled/_next/static/chunks/app/factchecker/page-d887f55fe6d4f35d.js +1 -0
  12. khoj/interface/compiled/_next/static/chunks/app/{page-4dc472cf6d674004.js → page-d46244282af16509.js} +1 -1
  13. khoj/interface/compiled/_next/static/chunks/app/search/{page-9b64f61caa5bd7f9.js → page-ab2995529ece3140.js} +1 -1
  14. khoj/interface/compiled/_next/static/chunks/app/settings/{page-7a8c382af2a7e870.js → page-89e6737b2cc9fb3a.js} +1 -1
  15. khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-eb9e282691858f2e.js → page-505b07bce608b34e.js} +1 -1
  16. khoj/interface/compiled/_next/static/chunks/{webpack-2b720658ccc746f2.js → webpack-8ae5ce45161bd98e.js} +1 -1
  17. khoj/interface/compiled/_next/static/css/{2272c73fc7a3b571.css → 26c1c33d0423a7d8.css} +1 -1
  18. khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css +1 -0
  19. khoj/interface/compiled/_next/static/css/b70402177a7c3207.css +1 -0
  20. khoj/interface/compiled/_next/static/css/e9c5fe555dd3050b.css +25 -0
  21. khoj/interface/compiled/agents/index.html +1 -1
  22. khoj/interface/compiled/agents/index.txt +2 -2
  23. khoj/interface/compiled/automations/index.html +1 -1
  24. khoj/interface/compiled/automations/index.txt +2 -2
  25. khoj/interface/compiled/chat/index.html +1 -1
  26. khoj/interface/compiled/chat/index.txt +2 -2
  27. khoj/interface/compiled/factchecker/index.html +1 -1
  28. khoj/interface/compiled/factchecker/index.txt +2 -2
  29. khoj/interface/compiled/index.html +1 -1
  30. khoj/interface/compiled/index.txt +2 -2
  31. khoj/interface/compiled/search/index.html +1 -1
  32. khoj/interface/compiled/search/index.txt +2 -2
  33. khoj/interface/compiled/settings/index.html +1 -1
  34. khoj/interface/compiled/settings/index.txt +2 -2
  35. khoj/interface/compiled/share/chat/index.html +1 -1
  36. khoj/interface/compiled/share/chat/index.txt +2 -2
  37. khoj/processor/conversation/anthropic/anthropic_chat.py +14 -10
  38. khoj/processor/conversation/anthropic/utils.py +13 -2
  39. khoj/processor/conversation/google/gemini_chat.py +15 -11
  40. khoj/processor/conversation/offline/chat_model.py +10 -9
  41. khoj/processor/conversation/openai/gpt.py +11 -8
  42. khoj/processor/conversation/prompts.py +131 -22
  43. khoj/processor/conversation/utils.py +132 -6
  44. khoj/processor/tools/online_search.py +5 -3
  45. khoj/processor/tools/run_code.py +144 -0
  46. khoj/routers/api.py +6 -6
  47. khoj/routers/api_chat.py +156 -88
  48. khoj/routers/helpers.py +91 -47
  49. khoj/routers/research.py +321 -0
  50. khoj/search_filter/date_filter.py +1 -3
  51. khoj/search_filter/file_filter.py +1 -2
  52. khoj/search_type/text_search.py +3 -3
  53. khoj/utils/helpers.py +15 -2
  54. khoj/utils/yaml.py +4 -0
  55. {khoj-1.27.2.dev29.dist-info → khoj-1.27.2.dev130.dist-info}/METADATA +1 -1
  56. {khoj-1.27.2.dev29.dist-info → khoj-1.27.2.dev130.dist-info}/RECORD +63 -60
  57. khoj/interface/compiled/_next/static/chunks/1603-5138bb7c8035d9a6.js +0 -1
  58. khoj/interface/compiled/_next/static/chunks/2697-61fcba89fd87eab4.js +0 -1
  59. khoj/interface/compiled/_next/static/chunks/3423-0b533af8bf6ac218.js +0 -1
  60. khoj/interface/compiled/_next/static/chunks/9479-ff7d8c4dae2014d1.js +0 -1
  61. khoj/interface/compiled/_next/static/chunks/app/chat/page-97f5b61aaf46d364.js +0 -1
  62. khoj/interface/compiled/_next/static/chunks/app/factchecker/page-d82403db2866bad8.js +0 -1
  63. khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css +0 -1
  64. khoj/interface/compiled/_next/static/css/76d55eb435962b19.css +0 -25
  65. khoj/interface/compiled/_next/static/css/ddcc0cf73e062476.css +0 -1
  66. /khoj/interface/compiled/_next/static/{atzIseFarmC7TIwq2BgHC → N19uqHAJYqRAVxvuVwHfE}/_buildManifest.js +0 -0
  67. /khoj/interface/compiled/_next/static/{atzIseFarmC7TIwq2BgHC → N19uqHAJYqRAVxvuVwHfE}/_ssgManifest.js +0 -0
  68. /khoj/interface/compiled/_next/static/chunks/{1970-60c96aed937a4928.js → 1970-444843bea1d17d61.js} +0 -0
  69. /khoj/interface/compiled/_next/static/chunks/{9417-2ca87207387fc790.js → 9417-19cfd1a9cb758e71.js} +0 -0
  70. {khoj-1.27.2.dev29.dist-info → khoj-1.27.2.dev130.dist-info}/WHEEL +0 -0
  71. {khoj-1.27.2.dev29.dist-info → khoj-1.27.2.dev130.dist-info}/entry_points.txt +0 -0
  72. {khoj-1.27.2.dev29.dist-info → khoj-1.27.2.dev130.dist-info}/licenses/LICENSE +0 -0
@@ -102,8 +102,8 @@ def load_embeddings(
102
102
 
103
103
 
104
104
  async def query(
105
- user: KhojUser,
106
105
  raw_query: str,
106
+ user: KhojUser,
107
107
  type: SearchType = SearchType.All,
108
108
  question_embedding: Union[torch.Tensor, None] = None,
109
109
  max_distance: float = None,
@@ -130,12 +130,12 @@ async def query(
130
130
  top_k = 10
131
131
  with timer("Search Time", logger, state.device):
132
132
  hits = EntryAdapters.search_with_embeddings(
133
- user=user,
133
+ raw_query=raw_query,
134
134
  embeddings=question_embedding,
135
135
  max_results=top_k,
136
136
  file_type_filter=file_type,
137
- raw_query=raw_query,
138
137
  max_distance=max_distance,
138
+ user=user,
139
139
  agent=agent,
140
140
  ).all()
141
141
  hits = await sync_to_async(list)(hits) # type: ignore[call-arg]
khoj/utils/helpers.py CHANGED
@@ -313,12 +313,14 @@ class ConversationCommand(str, Enum):
313
313
  Help = "help"
314
314
  Online = "online"
315
315
  Webpage = "webpage"
316
+ Code = "code"
316
317
  Image = "image"
317
318
  Text = "text"
318
319
  Automation = "automation"
319
320
  AutomatedTask = "automated_task"
320
321
  Summarize = "summarize"
321
322
  Diagram = "diagram"
323
+ Research = "research"
322
324
 
323
325
 
324
326
  command_descriptions = {
@@ -327,11 +329,13 @@ command_descriptions = {
327
329
  ConversationCommand.Default: "The default command when no command specified. It intelligently auto-switches between general and notes mode.",
328
330
  ConversationCommand.Online: "Search for information on the internet.",
329
331
  ConversationCommand.Webpage: "Get information from webpage suggested by you.",
332
+ ConversationCommand.Code: "Run Python code to parse information, run complex calculations, create documents and charts.",
330
333
  ConversationCommand.Image: "Generate illustrative, creative images by describing your imagination in words.",
331
334
  ConversationCommand.Automation: "Automatically run your query at a specified time or interval.",
332
335
  ConversationCommand.Help: "Get help with how to use or setup Khoj from the documentation",
333
336
  ConversationCommand.Summarize: "Get help with a question pertaining to an entire document.",
334
337
  ConversationCommand.Diagram: "Draw a flowchart, diagram, or any other visual representation best expressed with primitives like lines, rectangles, and text.",
338
+ ConversationCommand.Research: "Do deep research on a topic. This will take longer than usual, but give a more detailed, comprehensive answer.",
335
339
  }
336
340
 
337
341
  command_descriptions_for_agent = {
@@ -340,6 +344,7 @@ command_descriptions_for_agent = {
340
344
  ConversationCommand.Online: "Agent can search the internet for information.",
341
345
  ConversationCommand.Webpage: "Agent can read suggested web pages for information.",
342
346
  ConversationCommand.Summarize: "Agent can read an entire document. Agents knowledge base must be a single document.",
347
+ ConversationCommand.Research: "Agent can do deep research on a topic.",
343
348
  }
344
349
 
345
350
  tool_descriptions_for_llm = {
@@ -348,18 +353,26 @@ tool_descriptions_for_llm = {
348
353
  ConversationCommand.Notes: "To search the user's personal knowledge base. Especially helpful if the question expects context from the user's notes or documents.",
349
354
  ConversationCommand.Online: "To search for the latest, up-to-date information from the internet. Note: **Questions about Khoj should always use this data source**",
350
355
  ConversationCommand.Webpage: "To use if the user has directly provided the webpage urls or you are certain of the webpage urls to read.",
356
+ ConversationCommand.Code: "To run Python code in a Pyodide sandbox with no network access. Helpful when need to parse information, run complex calculations, create documents and charts for user. Matplotlib, bs4, pandas, numpy, etc. are available.",
351
357
  ConversationCommand.Summarize: "To retrieve an answer that depends on the entire document or a large text.",
352
358
  }
353
359
 
360
+ function_calling_description_for_llm = {
361
+ ConversationCommand.Notes: "To search the user's personal knowledge base. Especially helpful if the question expects context from the user's notes or documents.",
362
+ ConversationCommand.Online: "To search the internet for information. Provide all relevant context to ensure new searches, not previously run, are performed.",
363
+ ConversationCommand.Webpage: "To extract information from a webpage. Useful for more detailed research from the internet. Usually used when you know the webpage links to refer to. Share the webpage link and information to extract in your query.",
364
+ ConversationCommand.Code: "To run Python code in a Pyodide sandbox with no network access. Helpful when need to parse information, run complex calculations, create documents and charts for user. Matplotlib, bs4, pandas, numpy, etc. are available.",
365
+ }
366
+
354
367
  mode_descriptions_for_llm = {
355
- ConversationCommand.Image: "Use this if you are confident the user is requesting you to create a new picture based on their description.",
368
+ ConversationCommand.Image: "Use this if you are confident the user is requesting you to create a new picture based on their description. This does not support generating charts or graphs.",
356
369
  ConversationCommand.Automation: "Use this if you are confident the user is requesting a response at a scheduled date, time and frequency",
357
370
  ConversationCommand.Text: "Use this if a normal text response would be sufficient for accurately responding to the query.",
358
371
  ConversationCommand.Diagram: "Use this if the user is requesting a diagram or visual representation that requires primitives like lines, rectangles, and text.",
359
372
  }
360
373
 
361
374
  mode_descriptions_for_agent = {
362
- ConversationCommand.Image: "Agent can generate image in response.",
375
+ ConversationCommand.Image: "Agent can generate images in response. It cannot not use this to generate charts and graphs.",
363
376
  ConversationCommand.Automation: "Agent can schedule a task to run at a scheduled date, time and frequency in response.",
364
377
  ConversationCommand.Text: "Agent can generate text in response.",
365
378
  ConversationCommand.Diagram: "Agent can generate a visual representation that requires primitives like lines, rectangles, and text.",
khoj/utils/yaml.py CHANGED
@@ -41,3 +41,7 @@ def parse_config_from_string(yaml_config: dict) -> FullConfig:
41
41
  def parse_config_from_file(yaml_config_file):
42
42
  "Parse and validate config in YML file"
43
43
  return parse_config_from_string(load_config_from_file(yaml_config_file))
44
+
45
+
46
+ def yaml_dump(data):
47
+ return yaml.dump(data, allow_unicode=True, sort_keys=False, default_flow_style=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: khoj
3
- Version: 1.27.2.dev29
3
+ Version: 1.27.2.dev130
4
4
  Summary: Your Second Brain
5
5
  Project-URL: Homepage, https://khoj.dev
6
6
  Project-URL: Documentation, https://docs.khoj.dev
@@ -11,7 +11,7 @@ khoj/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  khoj/database/admin.py,sha256=4QoMRRyfvc834Qg4Z8KMZ3MW3cbsTqtElpkwnP3oyz4,9618
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=5fmHFvrnSf635UiBLx-gMvLseStd8P8pVf4Wbz6TqlQ,65410
14
+ khoj/database/adapters/__init__.py,sha256=cbOecrW8LddpzAvmti8SXaeKiEAULz0XK37D3IqADE8,66475
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=Jsxxc9xSZPHECaftZRvVyaPVGxIxTC0wxYXgK3wEtew,8731
@@ -109,26 +109,27 @@ khoj/interface/compiled/chat.svg,sha256=l2JoYRRgk201adTTdvJ-buKUrc0WGfsudix5xEvt
109
109
  khoj/interface/compiled/close.svg,sha256=hQ2iFLkNzHk0_iyTrSbwnWAeXYlgA-c2Eof2Iqh76n4,417
110
110
  khoj/interface/compiled/copy-button-success.svg,sha256=byqWAYD3Pn9IOXRjOKudJ-TJbP2UESbQGvtLWazNGjY,829
111
111
  khoj/interface/compiled/copy-button.svg,sha256=05bKM2eRxksfBlAPT7yMaoNJEk85bZCxQg67EVrPeHo,669
112
- khoj/interface/compiled/index.html,sha256=zeMBzT52CCWu1eJ7QOIcsoVtwRsHEDM-fEL5OY8qQN8,12184
113
- khoj/interface/compiled/index.txt,sha256=vYAKtGX03fG9BRQMuJkUajQ8RyzFhAsAkU09m3RuGEg,5625
112
+ khoj/interface/compiled/index.html,sha256=-uqNOEjJN1F5DzZphcOsOrmc6nuMTzo6RjJAuaa-9Yw,12314
113
+ khoj/interface/compiled/index.txt,sha256=dHls1NziyZFfvYyrwPCEYWEc7yXT89ubxRBo6d0OKXw,5673
114
114
  khoj/interface/compiled/khoj.webmanifest,sha256=lsknYkvEdMbRTOUYKXPM_8krN2gamJmM4u3qj8u9lrU,1682
115
115
  khoj/interface/compiled/logo.svg,sha256=_QCKVYM4WT2Qhcf7aVFImjq_s5CwjynGXYAOgI7yf8w,8059
116
116
  khoj/interface/compiled/send.svg,sha256=VdavOWkVddcwcGcld6pdfmwfz7S91M-9O28cfeiKJkM,635
117
117
  khoj/interface/compiled/share.svg,sha256=91lwo75PvMDrgocuZQab6EQ62CxRbubh9Bhw7CWMKbg,1221
118
118
  khoj/interface/compiled/thumbs-down.svg,sha256=JGNl-DwoRmH2XFMPWwFFklmoYtKxaQbkLE3nuYKe8ZY,1019
119
119
  khoj/interface/compiled/thumbs-up.svg,sha256=yS1wxTRtiztkN-6nZciLoYQUB_KTYNPV8xFRwH2TQFw,1036
120
- khoj/interface/compiled/404/index.html,sha256=218RBU1PinqzVadcgfGWBJ4LAHnkG3XuqX9UqhDsrFU,12051
121
- khoj/interface/compiled/_next/static/atzIseFarmC7TIwq2BgHC/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
122
- khoj/interface/compiled/_next/static/atzIseFarmC7TIwq2BgHC/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
120
+ khoj/interface/compiled/404/index.html,sha256=4aAo_XbUJERDQIu5ecCSycYFFijqIivYToZBn3kisI0,12051
121
+ khoj/interface/compiled/_next/static/N19uqHAJYqRAVxvuVwHfE/_buildManifest.js,sha256=6I9QUstNpJnhe3leR2Daw0pSXwzcbBscv6h2jmmPpms,224
122
+ khoj/interface/compiled/_next/static/N19uqHAJYqRAVxvuVwHfE/_ssgManifest.js,sha256=Z49s4suAsf5y_GfnQSvm4qtq2ggxEbZPfEDTXjy6XgA,80
123
+ khoj/interface/compiled/_next/static/chunks/1034-da58b679fcbb79c1.js,sha256=Na2MJjnR44aBYNaUX6faMh8swqUxaTRsWnmH_gR_Dbk,16380
123
124
  khoj/interface/compiled/_next/static/chunks/1210.132a7e1910006bbb.js,sha256=2dJueIfOg5qlQdanOM9HrgwcfrUXCD57bfd8Iv7iJcU,2104
124
125
  khoj/interface/compiled/_next/static/chunks/1279-f37ee4a388ebf544.js,sha256=U_1WaocOdgJ4HZB8tRx_izzYGD1EZlCohC1uLCffCWc,45582
125
126
  khoj/interface/compiled/_next/static/chunks/1459.690bf20e7d7b7090.js,sha256=z-ruZPxF_Z3ef_WOThd9Ox36AMhxaW3znizVivNnA34,34239
126
- khoj/interface/compiled/_next/static/chunks/1603-5138bb7c8035d9a6.js,sha256=6Ft5oo9M3VACg5p6bmqmALqRsh0kfhqvH3_oWa6t3Ps,72053
127
- khoj/interface/compiled/_next/static/chunks/1970-60c96aed937a4928.js,sha256=6cdvTgAJqyyihAHrhAN0Ht8yA-Y6ERdj99lLIveswZg,29835
128
- khoj/interface/compiled/_next/static/chunks/2697-61fcba89fd87eab4.js,sha256=zPnrqFOi2Hvli7WScWqgktXmBOy1gpC-g6UZwGY2hDg,7652
127
+ khoj/interface/compiled/_next/static/chunks/1467-5a191c1cd5bf0b83.js,sha256=EMnV-LGHpLaP_I36AildnxWxh6guoP4cQeYRlmzkdH0,11285
128
+ khoj/interface/compiled/_next/static/chunks/1603-5d70d9dfcdcb1f10.js,sha256=3iT7-GjRiFtOU_idIMhAtRt3Z7GVtDYG2BS5BkSHrwY,73115
129
+ khoj/interface/compiled/_next/static/chunks/1970-444843bea1d17d61.js,sha256=6cdvTgAJqyyihAHrhAN0Ht8yA-Y6ERdj99lLIveswZg,29835
129
130
  khoj/interface/compiled/_next/static/chunks/3062-71ed4b46ac2bb87c.js,sha256=847h3nNxc8t4GOW20GIAp8c5kquVPEQ7EZurPzGySo0,258667
130
131
  khoj/interface/compiled/_next/static/chunks/3110-ef2cacd1b8d79ad8.js,sha256=6Mbnwyhm_BJLppjqXE74SDZsekJV-t1mhjTK86iE904,9508
131
- khoj/interface/compiled/_next/static/chunks/3423-0b533af8bf6ac218.js,sha256=i5gfw1PCHxXx0MOOKVXBT-SjCw7xPs8cCFOk_nB95pk,18747
132
+ khoj/interface/compiled/_next/static/chunks/3423-fa918f4e5365a35e.js,sha256=ppYMknTbye0Drmphn2PFd-9bgJ7NF9DJ57bt-6TFKqs,21679
132
133
  khoj/interface/compiled/_next/static/chunks/394-6bcb8c429f168f21.js,sha256=eg8aHEE09K4aI1MfxpslzHWU_ol0iR52EqlcrsJr20I,1084027
133
134
  khoj/interface/compiled/_next/static/chunks/4504-1629487c8bc82203.js,sha256=z6NvJ2KOjYPbMNsYQKyX9PV4DeURUoP6LKoNb4kZXg0,11637
134
135
  khoj/interface/compiled/_next/static/chunks/4602-8eeb4b76385ad159.js,sha256=pz2lEr0JOrMdrddv2R2vej4e9uxpOr5KFX966ClLbOU,29928
@@ -137,10 +138,10 @@ khoj/interface/compiled/_next/static/chunks/6297-d1c842ed3f714ab0.js,sha256=4nzZ
137
138
  khoj/interface/compiled/_next/static/chunks/7023-a5bf5744d19b3bd3.js,sha256=TBJA7dTnI8nymtbljKuZzo2hbStXWR-P8Qkl57k2Tw8,123898
138
139
  khoj/interface/compiled/_next/static/chunks/7113-f2e114d7034a0835.js,sha256=_WB4I13sT-IJhhwbN6-pePwZYGrtDRVKERptTLMANzU,26827
139
140
  khoj/interface/compiled/_next/static/chunks/7883-b1305ec254213afe.js,sha256=dDbERTNiKRIIdC7idybjZq03gnxQtudMawrekye0zH8,241134
141
+ khoj/interface/compiled/_next/static/chunks/8423-3ad0bfb299801220.js,sha256=UNESTNfnAxPj_fJPR2kjFaybIH59HRebIwRz-3zgRTI,12521
140
142
  khoj/interface/compiled/_next/static/chunks/8840-b8d7b9f0923c6651.js,sha256=n1JrzFrvB_rC6THUiPniysyjauEG3Q3qAh20PTcfmhQ,173276
141
143
  khoj/interface/compiled/_next/static/chunks/9001-3b27af6d5f21df44.js,sha256=ran2mMGTO2kiAJebRGMyfyAu4Sdjw-WobS_m6g-qjz8,34223
142
- khoj/interface/compiled/_next/static/chunks/9417-2ca87207387fc790.js,sha256=F_6dFaA3bWVQX8ISxQ7mlz1CEaGFGsClOk0Fg_BQGSM,19548
143
- khoj/interface/compiled/_next/static/chunks/9479-ff7d8c4dae2014d1.js,sha256=LDfzA8c6NaQs12JAfUm_L16egJPM68Ki_Ez1ruTM4Qw,22911
144
+ khoj/interface/compiled/_next/static/chunks/9417-19cfd1a9cb758e71.js,sha256=F_6dFaA3bWVQX8ISxQ7mlz1CEaGFGsClOk0Fg_BQGSM,19548
144
145
  khoj/interface/compiled/_next/static/chunks/94ca1967.5584df65931cfe83.js,sha256=lxdrZ8h3_IWkTuk6QlzM2Hd9Pvu9_p8h_EI4aveSOgE,1174519
145
146
  khoj/interface/compiled/_next/static/chunks/964ecbae.ea4eab2a3a835ffe.js,sha256=EccPkhdFk6L0NIAVQfWe4kOpRWqhf20PkYecy7R_fyo,1175119
146
147
  khoj/interface/compiled/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js,sha256=wK1TsLdl56xtbQG6HMRDpylzTOYXQaAnnn2xobFnX40,267216
@@ -149,35 +150,35 @@ khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js,sha256
149
150
  khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js,sha256=i52E7sWOcSq1G8eYZL3mtTxbUbwRNxcAbSWQ6uWpMsY,475
150
151
  khoj/interface/compiled/_next/static/chunks/main-f84cd3c1873cd842.js,sha256=jKg2A4pPMmEAQmrA10rACH3daS8XXJeMnGOz1AsTkdI,111099
151
152
  khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js,sha256=6QPOwdWeAVe8x-SsiDrm-Ga6u2DkqgG5SFqglrlyIgA,91381
152
- khoj/interface/compiled/_next/static/chunks/webpack-2b720658ccc746f2.js,sha256=yOA_yjWC8b6vFS23_H4lVBG6EBjuVoqh-7sehox1XtU,4065
153
+ khoj/interface/compiled/_next/static/chunks/webpack-8ae5ce45161bd98e.js,sha256=eoWaSN0cw8hXZYtljSYqjKwsDWYtKIYwg-G3FgbbCVo,4064
153
154
  khoj/interface/compiled/_next/static/chunks/app/layout-d0f0a9067427fb20.js,sha256=ilPUPuMQt_2D48lC5c6AYeXT7J28ElR_Ym6VtjQwCO0,442
154
- khoj/interface/compiled/_next/static/chunks/app/page-4dc472cf6d674004.js,sha256=opMZKInlBotS4PCcuL2Zh01Kyh_bfGBuTFK362EZT5M,29540
155
+ khoj/interface/compiled/_next/static/chunks/app/page-d46244282af16509.js,sha256=RGzs4vWJT5DJ0FdKIYxR88SEQfUsNtPDa6lm32DppgM,29491
155
156
  khoj/interface/compiled/_next/static/chunks/app/_not-found/page-07ff4ab42b07845e.js,sha256=3mCUnxfMxyK44eqk21TVBrC6u--WSbvx31fTmQuOvMQ,1755
156
157
  khoj/interface/compiled/_next/static/chunks/app/agents/layout-75636ab3a413fa8e.js,sha256=0bdI7GBXZxpLy88hdWQiOc26QRZaD9R86YNMmGakWl4,372
157
- khoj/interface/compiled/_next/static/chunks/app/agents/page-5ae1e540bb5be8a9.js,sha256=RyqNewzRh_od2VJjj_u-Opoz-bcg7Xu52Z_ihzkCMtM,17724
158
+ khoj/interface/compiled/_next/static/chunks/app/agents/page-2beaba7c9bb750bd.js,sha256=v7rzEtrY6aflEM09wa29eV2L7BO1vQj_4cx4mCOO11c,17729
158
159
  khoj/interface/compiled/_next/static/chunks/app/automations/layout-27c28e923c9b1ff0.js,sha256=d2vJ_lVB0pfeFXNUPzHAe1ca5NzdNowHPh___SPqugM,5143
159
- khoj/interface/compiled/_next/static/chunks/app/automations/page-774ae3e033f938cd.js,sha256=I3xdNFJyXv_l8D_k3p9AjkzpzSsD8VufwTMI9X1ju3I,35449
160
+ khoj/interface/compiled/_next/static/chunks/app/automations/page-9b5c77e0b0dd772c.js,sha256=I2rSjdz93nzmds1aiM83PwoS6sUTSriCv49RadRhuqY,35444
160
161
  khoj/interface/compiled/_next/static/chunks/app/chat/layout-96fcf62857bf8f30.js,sha256=1CjjxW27P-98-jfx8gBX3eBiLI-3k9zQ6nJqcZoNMBQ,374
161
- khoj/interface/compiled/_next/static/chunks/app/chat/page-97f5b61aaf46d364.js,sha256=SPO01m9tS3TBS2azI5kNKQ4BqOoteiOWqrkc9KLJl_s,6133
162
+ khoj/interface/compiled/_next/static/chunks/app/chat/page-7dc98df9c88828f0.js,sha256=p4OrdQmsotzo_l8kFD0ebF2qtgbmB1G3OkZIZE8l2ME,6263
162
163
  khoj/interface/compiled/_next/static/chunks/app/factchecker/layout-7b30c541c05fb904.js,sha256=yub2AuBKHKSCqrHRFnkZv9JXLmLJLOB99iiaD3DtZQM,170
163
- khoj/interface/compiled/_next/static/chunks/app/factchecker/page-d82403db2866bad8.js,sha256=677GXWmH1BGRVfh6nvl66pMlDYzJevl6jv8XDG3uYQ8,14032
164
+ khoj/interface/compiled/_next/static/chunks/app/factchecker/page-d887f55fe6d4f35d.js,sha256=dJRF_dr7byQzn9HIq3ITwyJ8rUPQElhbWF9y2cFZVEY,14062
164
165
  khoj/interface/compiled/_next/static/chunks/app/search/layout-3720f1362310bebb.js,sha256=Smpa4MQaw5ItashtspsDKsOvRa6sOXH_lv4jIfWIbNI,170
165
- khoj/interface/compiled/_next/static/chunks/app/search/page-9b64f61caa5bd7f9.js,sha256=Cx4HFJAQ98tgBqB30jE_a84tDe_px9FYe3NCzXktTJE,6958
166
+ khoj/interface/compiled/_next/static/chunks/app/search/page-ab2995529ece3140.js,sha256=iSaohxnhsEPTd_9Uu81rmUdFxvPFOT6ByOy0bj_pXDQ,6958
166
167
  khoj/interface/compiled/_next/static/chunks/app/settings/layout-a8f33dfe92f997fb.js,sha256=VQp-ZD9hDz-r6yXCDMgdxrvnm6qcuKViX7AKc9B6JBw,5347
167
- khoj/interface/compiled/_next/static/chunks/app/settings/page-7a8c382af2a7e870.js,sha256=44kkbCexNQ1Qs0zUmtLX0-zDSxJ5dUzUyJcYbEYR8Uk,32383
168
+ khoj/interface/compiled/_next/static/chunks/app/settings/page-89e6737b2cc9fb3a.js,sha256=Gazp3ap1Ko60zl6paOADsaW6iWBaFy8tgM4OKR5N0OY,32383
168
169
  khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-2df56074e42adaa0.js,sha256=RPeayaV3Gbu0bJnD9vW5ml-xN-zN6UFBlTel-vOMYys,373
169
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-eb9e282691858f2e.js,sha256=xE8yACm9I2z-QYbIa4wF5XTalPclzdVS0WwHT_JtDF0,5491
170
+ khoj/interface/compiled/_next/static/chunks/app/share/chat/page-505b07bce608b34e.js,sha256=9xRS5IfyP270ZGwjDbyMG4K8RpvukuioTtdCfVJjT1M,5511
170
171
  khoj/interface/compiled/_next/static/chunks/pages/_app-f870474a17b7f2fd.js,sha256=eqdFPAN_XFyMUzZ9qwFk-_rhMWZrU7lgNVt1foVUANo,286
171
172
  khoj/interface/compiled/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js,sha256=vjERjtMAbVk-19LyPf1Jc-H6TMcrSznSz6brzNqbqf8,253
172
- khoj/interface/compiled/_next/static/css/2272c73fc7a3b571.css,sha256=1fHKFd8zLOHosAHx-kxv4b9lVSqHag_E71WkV3dXx2Y,26940
173
+ khoj/interface/compiled/_next/static/css/26c1c33d0423a7d8.css,sha256=kJh-g5tAVGvRl2bJRrbpSLXn485JMSZiNgxPOLp4phk,26912
173
174
  khoj/interface/compiled/_next/static/css/3cf13271869a4aeb.css,sha256=sGjJTeMeN6wbQF4OCPgWYgJmSLLSHyzIH2rSVstWx7k,1857
174
175
  khoj/interface/compiled/_next/static/css/467a524c75e7d7c0.css,sha256=yNoCTf6WSvmOpMGCnq1LEjF8lFDydKu4O5isN5KWqO8,2622
175
- khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css,sha256=3CjTMmtMrm_MYt1ywtUh2MHEjSLSl356SQLl4hdBuYw,534
176
176
  khoj/interface/compiled/_next/static/css/553f9cdcc7a2bcd6.css,sha256=JpjOOwmqP9Hba-w_8Lx9jWW0ZD0kD3wR0HvdPGDyUPo,2134
177
+ khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css,sha256=BSqRkeb9vBh0phx5GkAlZirTFZintbyggGaUkuOBfaU,914
177
178
  khoj/interface/compiled/_next/static/css/5a400c87d295e68a.css,sha256=ojDUPJ9fJpEo9DzTAsEa-k1cg7Bef-nSTfpszMiqknQ,17711
178
- khoj/interface/compiled/_next/static/css/76d55eb435962b19.css,sha256=7HKgJ7f1C6d03khVlJNAp387XUseDejbiOe3Ky3LSY8,1883083
179
179
  khoj/interface/compiled/_next/static/css/80bd6301fc657983.css,sha256=T7_aQHcWpQBQLKadauHNzjYGw713FtRNTlUqmJjsL6I,1634
180
- khoj/interface/compiled/_next/static/css/ddcc0cf73e062476.css,sha256=GhCBwb3i2oMWlIP9XEjY24nrM-wtgaWU-K99aL6y75U,8785
180
+ khoj/interface/compiled/_next/static/css/b70402177a7c3207.css,sha256=pM50w1PNtMXpCwwjSJDiunN2n99sFtIt_MR3GB2g0Aw,8405
181
+ khoj/interface/compiled/_next/static/css/e9c5fe555dd3050b.css,sha256=VEyO3SSSKBd9AOuJP6x6mjSH4y2I4JFDYFVe8W4sx8U,2515886
181
182
  khoj/interface/compiled/_next/static/media/0e790e04fd40ad16-s.p.woff2,sha256=41ewITd0G1ZAoB62BTHMW58a1q8Hl6vSbTQkkHP7EbI,39372
182
183
  khoj/interface/compiled/_next/static/media/4221e1667cd19c7d-s.woff2,sha256=_Y3g0keA8P6nZnFfm_VO5o2Sne1iST3v9xz4fBo3fwM,75532
183
184
  khoj/interface/compiled/_next/static/media/6c276159aa0eb14b-s.woff2,sha256=i9Ibzi_O7y5KpImujj2rEdOZf96lpNYxYzVvCryW5Uc,140408
@@ -250,8 +251,8 @@ khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp,sha256=M2AW_HLpBn
250
251
  khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp,sha256=BBeRPBZkxY3-aKkMnYv5TSkxmbeMbyUH4VRIPfrWg1E,137406
251
252
  khoj/interface/compiled/_next/static/media/globe.98e105ca.webp,sha256=g3ofb8-W9GM75zIhlvQhaS8I2py9TtrovOKR3_7Jf04,514
252
253
  khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp,sha256=I_N7Yke3IOoS-0CC6XD8o0IUWG8PdPbrHmf6lpgWlZY,1380
253
- khoj/interface/compiled/agents/index.html,sha256=NHu3X0J3bv5VG9JkyrnR_oqONDQp1TEks4bdH3IUiWo,12658
254
- khoj/interface/compiled/agents/index.txt,sha256=8hcJfot9m6D437jzHm2eQgMzOzSvuMQ-FgcxPmqv22k,6045
254
+ khoj/interface/compiled/agents/index.html,sha256=1ZW9vhbo3uS0PP8MPxAF6iBROLW2o-_3fUkNQQXNlDM,12966
255
+ khoj/interface/compiled/agents/index.txt,sha256=M9uqOrGn1IOJsEJefFxEXDxy2ax3Tkav12nF0dnt91I,6178
255
256
  khoj/interface/compiled/assets/icons/khoj_lantern.ico,sha256=eggu-B_v3z1R53EjOFhIqqPnICBGdoaw1xnc0NrzHck,174144
256
257
  khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png,sha256=aTxivDb3CYyThkVZWz8A19xl_dNut5DbkXhODWF3A9Q,5640
257
258
  khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png,sha256=xPCMLHiaL7lYOdQLZrKwWE-Qjn5ZaysSZB0ScYv4UZU,12312
@@ -262,18 +263,18 @@ khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png,sha256=i
262
263
  khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png,sha256=Dd4fPwtFl6BWqnHjeb1mCK_ND0hhHsWtx8sNE7EiMuE,406179
263
264
  khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png,sha256=DEDaNRCkfEWUeh3kYZWIQDTVK1a6KKnYdwj5ZWisN_Q,82985
264
265
  khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png,sha256=Ma3blirRmq3X4oYSsDbbT7MDn29rymDrjwmUfA9BMuM,236285
265
- khoj/interface/compiled/automations/index.html,sha256=440A47WQfnxYTHcnbbOL7N9FQEKrSoDTGvS5kjpb558,30941
266
- khoj/interface/compiled/automations/index.txt,sha256=OT7svGWm94pSkARPBRsIGdGIO3WYf17KnYIjLdlsd0E,5633
267
- khoj/interface/compiled/chat/index.html,sha256=Btv8LJiGiJZ4cwUNYyxMmNGrSnF_yvFQ0Hom93EU1tc,13987
268
- khoj/interface/compiled/chat/index.txt,sha256=bECTqWBh9Y0PjRDjPbr7cZjhh1drm0RAlmLgIIHaQq4,6636
269
- khoj/interface/compiled/factchecker/index.html,sha256=C39EkiLYgXJRM9LArVqYFE518CdN2_Xm0xsDHIxqkaI,29973
270
- khoj/interface/compiled/factchecker/index.txt,sha256=biez4I3MNs2YOf7DBgQLFnBUYFCry51IVC7019XAGB4,5788
271
- khoj/interface/compiled/search/index.html,sha256=ED3ZlxgIY6h9VeRE5ZtEINsEFNYvuR460ZgRDZT3b7Y,30161
272
- khoj/interface/compiled/search/index.txt,sha256=bbzW83fqvL6Aldznk2f0OGpawEAbqGqTGfYP3XSBKr0,5256
273
- khoj/interface/compiled/settings/index.html,sha256=m_EOvvUSq-65XipvZiuZUoUuxwVJKyUmsj9suf54hp0,12831
274
- khoj/interface/compiled/settings/index.txt,sha256=mdR4p40KbgDqtJ47vDpsVwLc2EsyLWpAn3oAd0veFVs,6078
275
- khoj/interface/compiled/share/chat/index.html,sha256=LvXMnO_4Gg2MOg2XHZDO7-PVh4Q6vsnecrTqZW5p7rs,15312
276
- khoj/interface/compiled/share/chat/index.txt,sha256=RUvPxLDr2wKFRLVA6rhz220qgYV017n2MFzmlPsaGUg,7447
266
+ khoj/interface/compiled/automations/index.html,sha256=3ygidgMbhlI0MHNoLRLTyuftG9ypDv2gzWKV70MhMAo,30633
267
+ khoj/interface/compiled/automations/index.txt,sha256=5643FkDOWLiRlNvEBHG62zs0UnCFWxtpMKRQDfgSkzY,5500
268
+ khoj/interface/compiled/chat/index.html,sha256=TAbjLwUpTZc6D5U_1mPgxn5aG6A9r3JeSH0xYiomr4U,14117
269
+ khoj/interface/compiled/chat/index.txt,sha256=fcQEsBalpKTHjwQvDvA-Ds2nE2Gu2r9eNZPgzbADph8,6684
270
+ khoj/interface/compiled/factchecker/index.html,sha256=SWqlPAJCzdFMgfZ-pYv4v0hu9w-k0YX28RYWlIzPzQQ,29973
271
+ khoj/interface/compiled/factchecker/index.txt,sha256=TyJCuF06MACX48CTldhoMk_jS99IHEacYRJzGhQOikY,5788
272
+ khoj/interface/compiled/search/index.html,sha256=AsVg4B4qAfaiczQFDcIqPeTmhTtfSfd290DWV9ONycg,30161
273
+ khoj/interface/compiled/search/index.txt,sha256=tqUzKhRkP6CNkl_TEBTddBDIkq4eYo56MkaW1sdBS0o,5256
274
+ khoj/interface/compiled/settings/index.html,sha256=mdGvRsLHjZMXquD8XzmQ59_3faZ4SwYH9d31tAhX4Ro,12831
275
+ khoj/interface/compiled/settings/index.txt,sha256=7eMjy4sD-Pd_554nVHieJELzOsR3EYwCVlsFCMIU_F8,6078
276
+ khoj/interface/compiled/share/chat/index.html,sha256=Lu3Nqgn2HhfF4-QpouUmQmflBE2yNhUmH4lYAPOobpg,15442
277
+ khoj/interface/compiled/share/chat/index.txt,sha256=BLLFg9_oUtV8Q2i2BL_BEjFuugBNSh2kxn8ndQ8jYGo,7495
277
278
  khoj/interface/email/feedback.html,sha256=xksuPFamx4hGWyTTxZKRgX_eiYQQEuv-eK9Xmkt-nwU,1216
278
279
  khoj/interface/email/magic_link.html,sha256=EoGKQucfPj3xQrWXhSZAzPFOYCHF_ZX94TWCd1XHl1M,941
279
280
  khoj/interface/email/task.html,sha256=tY7a0gzVeQ2lSQNu7WyXR_s7VYeWTrxWEj1iHVuoVE4,2813
@@ -325,63 +326,65 @@ khoj/processor/content/pdf/pdf_to_entries.py,sha256=kROQUGqHs6J8Xi2rEHVgkc_iLMcS
325
326
  khoj/processor/content/plaintext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
326
327
  khoj/processor/content/plaintext/plaintext_to_entries.py,sha256=97i7Cm0DTY7jW4iqKOT_oVc2ooa_XhQ8iImsljp1Kek,4994
327
328
  khoj/processor/conversation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
328
- khoj/processor/conversation/prompts.py,sha256=15lA_w_JVXQJwm59sVl2TUYywzCc3dFy69cHVtnLFb0,40932
329
- khoj/processor/conversation/utils.py,sha256=d6nHGRoJHFWIMrE-3KteOAWQ5XJqeGhXIYb8dsiOc8A,20388
329
+ khoj/processor/conversation/prompts.py,sha256=Jkg5AZYoZVEiGwLyxp1WU7oSDEPqPUJwDyusPL6vPic,46225
330
+ khoj/processor/conversation/utils.py,sha256=U_7truIVYmIHnz4ZJYRXzCxUEYUW5kXvM9i2j7Km3xM,24945
330
331
  khoj/processor/conversation/anthropic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
331
- khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=1KVQMPvb3EBxeKj6e_BxcO9L1Ow5Rh5xoJ2SKOpBIYs,8205
332
- khoj/processor/conversation/anthropic/utils.py,sha256=1QRNgG-ATWqVPHcumYecOLS20bLV0HRPcmkL_DzJUkI,6336
332
+ khoj/processor/conversation/anthropic/anthropic_chat.py,sha256=rhMbwhT40I9_H1h_hnGcY_7G6_a5c50CGzdkKADEqZE,8435
333
+ khoj/processor/conversation/anthropic/utils.py,sha256=6_FnsfLRqjkubkfMVmPTEEBzvMUOAccIz5AHV6B9mU8,6623
333
334
  khoj/processor/conversation/google/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
334
- khoj/processor/conversation/google/gemini_chat.py,sha256=lYLFMMur7gJuz3IUmrviPLaGXhOznleVBmk2PW-LfUo,8426
335
+ khoj/processor/conversation/google/gemini_chat.py,sha256=uI9_KaS-8zPSvQGwO7-zYmcAwMO3J-HYOqWypRk6wDk,8677
335
336
  khoj/processor/conversation/google/utils.py,sha256=fJmzmk_BG2fPpiw827t5E-VuRRVD2Cb7ujIS78D2Q2w,10165
336
337
  khoj/processor/conversation/offline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
337
- khoj/processor/conversation/offline/chat_model.py,sha256=BUpm5a-RwfR1_RPmPoUjM78JbrAucv9DgqcHADuiAbY,10571
338
+ khoj/processor/conversation/offline/chat_model.py,sha256=WBu9N-DwdIuHIj_IToqaSN5PA6j0NrwpwFo-9E2gSJA,10731
338
339
  khoj/processor/conversation/offline/utils.py,sha256=51McImxl6u1qgRYvMt7uzsgLGSLq5SMFy74ymlNjIcc,3033
339
340
  khoj/processor/conversation/offline/whisper.py,sha256=DJI-8y8DULO2cQ49m2VOvRyIZ2TxBypc15gM8O3HuMI,470
340
341
  khoj/processor/conversation/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
341
- khoj/processor/conversation/openai/gpt.py,sha256=cboRE8Z7aETZMWlIOtqFSdw8gflTlnx2-AhZ3i9TnKI,7902
342
+ khoj/processor/conversation/openai/gpt.py,sha256=Vmxi8QAPEKsRl-CqWsLhLElB3mRgnWOoyS33BY0Rkgc,8007
342
343
  khoj/processor/conversation/openai/utils.py,sha256=s2s35q-pmvilb-PyqdCsPPVlV1tlWMSQNoCHPDFtXeI,6232
343
344
  khoj/processor/conversation/openai/whisper.py,sha256=zoEeK1LNCg_tzP4xzYi5vRPzNPGuDGzpkrkG7d1LUn4,447
344
345
  khoj/processor/image/generate.py,sha256=sSviN4d5jPCayEqVY-VgePf1bac9ljbpAJ3_g1rijZA,9058
345
346
  khoj/processor/speech/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
346
347
  khoj/processor/speech/text_to_speech.py,sha256=Q7sapi5Hv6woXOumtrGqR0t6izZrFBkWXFOGrHM6dJ4,1929
347
348
  khoj/processor/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
348
- khoj/processor/tools/online_search.py,sha256=vslmNXfvK3_b9WmsnQP6oGHti3Cd8JKZNdHCbtU60cA,14491
349
+ khoj/processor/tools/online_search.py,sha256=LUbWRQCbZ_QqWwb7_w8DuMsWBSlfUVX_peHYInAb6DM,14567
350
+ khoj/processor/tools/run_code.py,sha256=BmGIO8vBBkDSVJ_CnjcC-DKm_23Irht5w2DVNQHf548,4851
349
351
  khoj/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
350
- khoj/routers/api.py,sha256=a2vCEYTEHCOMRiXbZxwy3KHCP7nQ0AWnodo86hjWvVc,28197
352
+ khoj/routers/api.py,sha256=TvkA4CopbxmSVjw_wQwuNY697ssE4EwmArEJLvvcE5c,28212
351
353
  khoj/routers/api_agents.py,sha256=4T0osmOGFmYC-BhdAkT5HpT2zaktlL7Agj47-To-jxo,9773
352
- khoj/routers/api_chat.py,sha256=HkdKqfaBDwqidzQmvJQ7cBJQyE5uxjjL0kBqMlQKK74,42754
354
+ khoj/routers/api_chat.py,sha256=xX1hOIiPVW5lImsvXZh0kgCtYRdTIYPeU9D1HcVHQck,45483
353
355
  khoj/routers/api_content.py,sha256=lWunOwVWYvnl1ue_D81g9ZSwBc0UxHmBIrdJoVPxN_A,17900
354
356
  khoj/routers/api_model.py,sha256=KDsxNwHspC94eTcv6l3ehr773EOvgc670UnZLE1WZ4o,3642
355
357
  khoj/routers/api_phone.py,sha256=p9yfc4WeMHDC0hg3aQk60a2VBy8rZPdEnz9wdJ7DzkU,2208
356
358
  khoj/routers/api_subscription.py,sha256=sR5_XxQ4e_1hk3K4g0i3S8PZeULP23lnGtrWnfjhNDI,5307
357
359
  khoj/routers/auth.py,sha256=HO54PR-BkWA_iJIktEobUrObcXVYG-00jpnIcEVdR5s,6564
358
360
  khoj/routers/email.py,sha256=SGYNPQvfcvYeHf70F0YqpY0FLMRElF2ZekROXdwGI18,3821
359
- khoj/routers/helpers.py,sha256=GAA3GSB-T7fvq5-75_4YQCIbpq2Tp7tL5xzlDrhHQ6M,76172
361
+ khoj/routers/helpers.py,sha256=k6xnjzHswtL5d-5tFwtKJDPhR_DMELuK11ZOyRWgYgk,77430
360
362
  khoj/routers/notion.py,sha256=Lp67xP9rVgpAF9BQoGTjZFcVdF1HYtvPP0kjq6uurKU,2802
363
+ khoj/routers/research.py,sha256=qSzRfUE_P_8X9ucxh8YnoIAz4Y99vhpFaNHd3aEEfvQ,13118
361
364
  khoj/routers/storage.py,sha256=tJrwhFRVWv0MHv7V7huMc1Diwm-putZSwnZXJ3tqT_c,2338
362
365
  khoj/routers/twilio.py,sha256=MLsuCm4--ETvr3sLxbF0CL_ehlg_l2rKBSLR2Qh2Xls,1081
363
366
  khoj/routers/web_client.py,sha256=zvvYdBPPDS5PzPiO1mXTGp88wrDnR_1jyMM781XDpZs,4456
364
367
  khoj/search_filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
365
368
  khoj/search_filter/base_filter.py,sha256=BzoZA_wAUg_eZ5vhaaipwVTSG0ZMxWCHxHsZrzo4KS0,358
366
- khoj/search_filter/date_filter.py,sha256=4VL63kDVqYKFOzkCeV6R8Z8lxFaAbbn_z_RWaWQNDWY,10103
367
- khoj/search_filter/file_filter.py,sha256=tHYW-ibaENf_jrJ88kiO_xhrPZb6FQLtngG9ISTB6h8,1168
369
+ khoj/search_filter/date_filter.py,sha256=7MCXyeDy9TGG81IesLrgV7vnTUDXWe8xj8NeeESd1Xk,10019
370
+ khoj/search_filter/file_filter.py,sha256=H47C8yoVMiSub8VWu8wHerlIq-PffFnB08Nm2OJyBE8,1146
368
371
  khoj/search_filter/word_filter.py,sha256=5Yx95aSiqGke9kEIbp8T-Ak4dS9cTd3VxI1SaJoK1wY,1005
369
372
  khoj/search_type/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
370
- khoj/search_type/text_search.py,sha256=TwiKoUQ6UG8inAW7eReSRD5H3J5n49STirain0QZVQY,9507
373
+ khoj/search_type/text_search.py,sha256=1ukoAJtFnu3Eamv_W3D2WNP5rZDVslHxn1z1Yqi485c,9507
371
374
  khoj/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
372
375
  khoj/utils/cli.py,sha256=AgO3rO-bN5oI71sIReGxrJXPeXEH80fnCIsyVlZYgjI,3695
373
376
  khoj/utils/config.py,sha256=aiOkH0je8A30DAGYTHMRePrgJonFv_i07_7CdhhhcdA,1805
374
377
  khoj/utils/constants.py,sha256=UwE7U9bNsfeqTb0K2lcdXdAscM4-7uuVoR3KbZS03Pg,1216
375
378
  khoj/utils/fs_syncer.py,sha256=bQgcbYYC3x11RyCqI_kUzzqGpcKTodGgdT-3OTQsXqw,9977
376
- khoj/utils/helpers.py,sha256=z46vG59Qa06CaVyzGtJfh-TU6iC5FktDYpS_hUmD0-I,18017
379
+ khoj/utils/helpers.py,sha256=PP4t3hIaD8eXeDq4pxK0IMUKB5Spg2o18TRfBinUuDc,19648
377
380
  khoj/utils/initialization.py,sha256=TjA2ZImYKI-J1tEBE_0TaOLnVQidVV5GDEFBOPq8aik,10048
378
381
  khoj/utils/jsonl.py,sha256=0Ac_COqr8sLCXntzZtquxuCEVRM2c3yKeDRGhgOBRpQ,1192
379
382
  khoj/utils/models.py,sha256=Q5tcC9-z25sCiub048fLnvZ6_IIO1bcPNxt5payekk0,2009
380
383
  khoj/utils/rawconfig.py,sha256=kURDuk7x0MDtniGLU4x1IsvU4UIBS-V9dSM4GD8X-LY,4274
381
384
  khoj/utils/state.py,sha256=x4GTewP1YhOA6c_32N4wOjnV-3AA3xG_qbY1-wC2Uxc,1559
382
- khoj/utils/yaml.py,sha256=H0mfw0ZvBFUvFmCQn8pWkfxdmIebsrSykza7D8Wv6wQ,1430
383
- khoj-1.27.2.dev29.dist-info/METADATA,sha256=PA_Ka4v7h0CWPJCF-Jq8ytt7nLudre09NqKpt19yPfk,7075
384
- khoj-1.27.2.dev29.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
385
- khoj-1.27.2.dev29.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
386
- khoj-1.27.2.dev29.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
387
- khoj-1.27.2.dev29.dist-info/RECORD,,
385
+ khoj/utils/yaml.py,sha256=qy1Tkc61rDMesBw_Cyx2vOR6H-Hngcsm5kYfjwQBwkE,1543
386
+ khoj-1.27.2.dev130.dist-info/METADATA,sha256=CUtBqPAGZY3fpC7sxw-_g0j8cvcY0EA5L4yxMhJDpyY,7076
387
+ khoj-1.27.2.dev130.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
388
+ khoj-1.27.2.dev130.dist-info/entry_points.txt,sha256=KBIcez5N_jCgq_ER4Uxf-e1lxTBMTE_BBjMwwfeZyAg,39
389
+ khoj-1.27.2.dev130.dist-info/licenses/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
390
+ khoj-1.27.2.dev130.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1603],{79306:function(e,t,s){"use strict";s.d(t,{GW:function(){return o},T8:function(){return d},h2:function(){return i},o9:function(){return a}});var n,a,r=s(29039);let l=e=>window.fetch(e).then(e=>e.json()).catch(e=>console.warn(e));function o(){let{data:e,error:t}=(0,r.ZP)("/api/v1/user",l,{revalidateOnFocus:!1});return t||!e||"Forbidden"===e.detail?null:e}function i(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],{data:t,error:s,isLoading:n}=(0,r.ZP)("/api/settings?detailed=".concat(e),l,{revalidateOnFocus:!1});return s||!t||(null==t?void 0:t.detail)==="Forbidden"?{userConfig:null,isLoadingUserConfig:n}:{userConfig:t,isLoadingUserConfig:n}}function d(e){return(null==e?void 0:e.subscription_state)&&["subscribed".valueOf(),"trial".valueOf(),"unsubscribed".valueOf()].includes(e.subscription_state)||!1}(n=a||(a={})).EXPIRED="expired",n.TRIAL="trial",n.SUBSCRIBED="subscribed",n.UNSUBSCRIBED="unsubscribed",n.INVALID="invalid"},9557:function(e,t,s){"use strict";function n(e){if(e.image||e.detail){let t,s;return t="",e.image&&(t=e.image),s={intentType:e.intentType,response:t,inferredQueries:e.inferredQueries},e.detail&&(t+=e.detail),s}if(e.response)return{response:e.response,intentType:"",inferredQueries:[]};throw Error("Invalid JSON response")}function a(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=function(e){if(e.startsWith("{")&&e.endsWith("}"))try{let t=JSON.parse(e);if(!t.type)return{type:"message",data:t};return t}catch(t){return{type:"message",data:e}}else if(e.length>0)return{type:"message",data:e};else return{type:"message",data:""}}(e);if(!t||!r||!r.type)return{context:s,onlineContext:a};if("status"===r.type){console.log("status: ".concat(r.data));let e=r.data;t.trainOfThought.push(e)}else if("references"===r.type){let e=r.data;e.context&&(s=e.context),e.onlineContext&&(a=e.onlineContext)}else if("message"===r.type){var l,o;let e=r.data;if(null!==e&&"object"==typeof e){let s=n(e);s.intentType&&"excalidraw"===s.intentType?t.rawResponse=s.response:t.rawResponse+=s.response,t.intentType=s.intentType,t.inferredQueries=s.inferredQueries}else if("string"==typeof e&&(null===(l=e.trim())||void 0===l?void 0:l.startsWith("{"))&&(null===(o=e.trim())||void 0===o?void 0:o.endsWith("}")))try{let s=JSON.parse(e.trim()),a=n(s);t.rawResponse+=a.response,t.intentType=a.intentType,t.inferredQueries=a.inferredQueries}catch(s){t.rawResponse+=JSON.stringify(e)}else t.rawResponse+=e}else"start_llm_response"===r.type?console.log("Started streaming: ".concat(new Date)):"end_llm_response"===r.type&&(console.log("Completed streaming: ".concat(new Date)),a&&(t.onlineContext=a),s&&(t.context=s),t.completed=!0);return{context:s,onlineContext:a}}function r(e,t,s,n){if(!e){console.error("No conversation ID provided");return}let a="/api/chat/conversation/file-filters/bulk";fetch(a,{method:"add"===n?"POST":"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:e,filenames:t})}).then(e=>{if(!e.ok)throw Error("Failed to call API at ".concat(a," with error ").concat(e.statusText));return e.json()}).then(e=>{s(e)}).catch(e=>{console.error(e)})}async function l(e){try{let t=await fetch("/api/chat/sessions?client=web&agent_slug=".concat(e),{method:"POST"});if(!t.ok)throw Error("Failed to fetch chat sessions with status: ".concat(t.status));let s=(await t.json()).conversation_id;if(!s)throw Error("Conversation ID not found in response");return s}catch(e){throw console.error("Error creating new conversation:",e),e}}function o(e,t,s,n,a,l){let o=["text/org","text/markdown","text/plain","text/html","application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],i=["org","md","txt","html","pdf","docx"],d=[],c=[],u=[];for(let t of e){let e=t.name.split(".").pop();t&&t.name&&e?o.includes(t.type)||i.includes(e.toLowerCase())?c.push(t):d.push(t.name):t&&d.push(t.name)}if(0===c.length){t("No supported files found");return}d.length>0&&t("The following files are not supported yet:\n"+d.join("\n"));let f=new FormData,m=Array.from(c).map(e=>new Promise((t,s)=>{let n=new FileReader;n.onload=function(n){if(null===n.target){s();return}let a=n.target.result,r=e.type,l=e.name;if(""===r){let e=l.split(".").pop();if("org"===e)r="text/org";else if("md"===e)r="text/markdown";else if("txt"===e)r="text/plain";else if("html"===e)r="text/html";else if("pdf"===e)r="application/pdf";else{t();return}}if(null===a){s();return}let o=new Blob([a],{type:r});f.append("files",o,e.name),t()},n.onerror=s,n.readAsArrayBuffer(e)}));s(!0),Promise.all(m).then(()=>fetch("/api/content?client=web",{method:"PATCH",body:f})).then(e=>{for(let e of c)u.push(e.name),l&&a&&r(l,[e.name],a,"add");a&&a(u)}).catch(e=>{console.log(e),n("Error uploading file: ".concat(e))}).finally(()=>{s(!1)})}s.d(t,{A0:function(){return l},VK:function(){return a},jh:function(){return r},ko:function(){return o}})},69591:function(e,t,s){"use strict";s.d(t,{EK:function(){return o},IC:function(){return d},LF:function(){return l},Nr:function(){return c},k6:function(){return i}});var n=s(2265),a=s(29039);let r=()=>window.fetch("https://ipapi.co/json").then(e=>e.json()).catch(e=>console.log(e)),l=e=>e.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function o(){console.log("%c %s","font-family:monospace",'\n __ __ __ __ ______ __ _____ __\n /\\ \\/ / /\\ \\_\\ \\ /\\ __ \\ /\\ \\ /\\ __ \\ /\\ \\\n \\ \\ _"-. \\ \\ __ \\ \\ \\ \\/\\ \\ _\\_\\ \\ \\ \\ __ \\ \\ \\ \\\n \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\ \\_____\\ /\\_____\\ \\ \\_\\ \\_\\ \\ \\_\\\n \\/_/\\/_/ \\/_/\\/_/ \\/_____/ \\/_____/ \\/_/\\/_/ \\/_/\n\n\n Greetings traveller,\n\n I am ✨Khoj✨, your open-source, personal AI copilot.\n\n See my source code at https://github.com/khoj-ai/khoj\n Read my operating manual at https://docs.khoj.dev\n ')}function i(){let{data:e,error:t}=(0,a.ZP)("/api/ip",r,{revalidateOnFocus:!1});if(!t&&e)return e}function d(){let[e,t]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=()=>{window.innerWidth<=768?t(!0):t(!1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}function c(e,t){let[s,a]=(0,n.useState)(e);return(0,n.useEffect)(()=>{let s=setTimeout(()=>{a(e)},t);return()=>{clearTimeout(s)}},[e,t]),s}},58485:function(e,t,s){"use strict";s.d(t,{Z:function(){return r},l:function(){return l}});var n=s(57437),a=s(62784);function r(e){return(0,n.jsx)("div",{className:e.className||"bg-background opacity-50 flex items-center justify-center h-screen",children:(0,n.jsxs)("div",{children:[e.message||"Loading"," ",(0,n.jsx)("span",{children:(0,n.jsx)(a.U,{className:"inline animate-spin h-5 w-5"})})]})})}function l(e){return(0,n.jsx)("button",{className:"".concat(e.className),children:(0,n.jsxs)("span",{children:[e.message," ",(0,n.jsx)(a.U,{className:"inline animate-spin ".concat(e.iconClassName?e.iconClassName:"h-5 w-5 mx-3")})]})})}},48861:function(e,t,s){"use strict";s.d(t,{En:function(){return ex},ZP:function(){return eC}});var n=s(57437),a=s(88649),r=s.n(a),l=s(2265),o=s(29039),i=s(79306),d=s(87138),c=s(42491),u=s(58485),f=s(90837),m=s(7951),h=s(94880),x=s(81101),p=s(84120),j=s(26100),g=s(20721),N=s(49948),C=s(20319),w=s(31632),v=s(62850),y=s(32333),b=s(86545),_=s(56581),k=s(46910),R=s(19573),z=s(55362),S=s(98750),L=s(34797),M=s(50495),Z=s(83102),T=s(6780),D=s(9557),E=s(80023);function I(e){let{className:t}=e;return(0,n.jsxs)("svg",{width:"70",height:"auto",viewBox:"0 0 442 200",className:"".concat(null!=t?t:"fill-zinc-950 dark:fill-zinc-300"),xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_45_75)",children:[(0,n.jsx)("path",{d:"M57.9394 93.0404L67.5396 49.1063C68.7987 49.5268 71.7365 51.9442 74.7267 51.9442C78.5039 51.9442 79.2383 47.4246 86.1631 45.7955C91.6715 44.4817 96.3404 45.4276 99.0684 47.6349C99.0684 47.6349 99.6979 53.6259 101.167 55.4127C102.531 57.0418 104.629 56.4637 104.629 56.4637C107.672 70.8106 114.072 100.661 115.279 105.233C116.8 110.961 110.924 114.114 108.669 119.369C106.413 124.625 94.242 126.884 87.0549 127.62C79.8679 128.356 59.723 119.632 57.9394 117.215C56.1557 114.797 55.3688 109.857 55.1065 105.18C54.8442 101.449 56.8902 95.5104 57.9394 93.0404Z",fill:"#FAE80B"}),(0,n.jsx)("path",{d:"M57.9394 92.9879L62.2936 74.8046C63.5526 75.2251 66.9626 73.4383 71.4742 69.0764C74.1497 66.4488 79.8678 58.8812 86.0582 55.3601C90.5698 52.785 94.924 54.204 97.5995 56.4112C97.5995 56.4112 100.013 57.6199 102.846 57.6199C104.944 57.6199 104.629 56.4112 104.629 56.4112C107.672 70.7581 114.072 100.608 115.279 105.18C116.8 110.908 110.924 114.062 108.669 119.317C106.413 124.572 94.242 126.832 87.0549 127.568C79.8679 128.303 59.723 119.58 57.9394 117.162C56.1557 114.745 55.3688 109.805 55.1065 105.128C54.8442 101.449 56.8902 95.5104 57.9394 92.9879Z",fill:"#FFCC09"}),(0,n.jsx)("path",{d:"M69.3233 123.731C58.9886 121.104 55.8934 109.069 55.6311 103.393C58.7787 106.599 67.12 112.8 75.1464 111.959C85.2188 110.908 92.7207 106.862 100.852 100.503C108.983 94.1966 114.544 97.1921 114.544 106.809C114.544 116.426 107.619 118.108 105.521 122.47C103.423 126.884 82.281 127.042 69.3233 123.731Z",fill:"#FBA719"}),(0,n.jsx)("path",{d:"M217.018 30.3459C218.946 32.2774 217.886 40.2931 217.886 45.315C217.886 48.4054 218.368 51.0129 218.368 53.4273C218.368 56.0348 217.886 58.5458 217.886 60.9602C218.368 62.9882 217.886 70.6177 218.946 71.1006C220.489 72.1629 222.031 66.9478 222.513 66.465C224.056 62.9883 222.995 65.1129 224.923 60.9602C226.948 57.0006 229.069 52.8479 230.611 49.9506C231.961 46.8602 234.082 42.4177 235.624 38.7479C237.167 36.3335 238.227 31.6979 240.637 29.7664C242.18 28.2212 247.193 28.2212 251.821 28.2212C255.291 28.7041 258.858 28.7041 259.919 30.6356C261.268 33.726 255.773 41.8383 254.231 45.2184C252.303 49.3712 250.76 51.8821 248.736 55.3588C248.254 56.4211 248.254 57.3869 247.675 58.9321C245.747 63.954 243.24 67.3341 240.637 72.5492C239.577 74.4807 238.709 76.9917 237.167 79.1163C236.106 82.0136 234.564 84.6211 234.564 86.6492C234.564 89.5464 236.588 93.6992 237.649 95.6307C241.12 102.294 244.687 108.861 248.157 115.911C248.639 117.264 248.639 118.809 249.7 120.354C251.242 124.313 253.267 127.404 255.677 132.426C257.219 135.999 261.172 142.566 260.304 145.463C258.762 149.037 254.616 148.071 250.182 148.071C244.687 148.071 240.541 148.071 238.709 147.009C236.685 145.463 235.142 139.959 233.6 137.061C230.129 128.949 228.587 124.313 224.634 115.911C223.574 112.821 222.031 109.731 220.489 107.316C218.464 104.709 218.464 112.821 217.886 116.394C217.886 120.837 217.886 124.313 217.886 126.342C217.886 132.909 219.428 144.015 216.536 147.009C213.451 149.616 198.894 149.037 196.773 145.463C196.291 143.532 196.773 137.544 196.773 132.426C197.255 127.404 196.773 124.313 196.773 119.871C196.291 108.861 196.291 98.7211 196.291 87.7115C196.291 83.5588 197.351 79.5992 196.773 76.5088C196.773 74.4807 196.291 73.0321 196.291 71.004C196.291 69.4588 196.773 68.3965 196.773 66.8513C196.773 63.3746 196.291 59.8013 196.291 56.3246C196.291 52.7513 196.773 49.2746 196.773 46.1842C196.773 41.7417 195.423 36.237 196.291 32.5671C196.773 31.0219 198.315 29.6698 198.894 29.0904C199.376 29.0904 199.376 29.0904 199.954 28.6075C203.811 27.2554 214.994 27.7384 217.018 30.3459Z"}),(0,n.jsx)("path",{d:"M327.788 29.863C328.849 30.3459 328.849 32.2774 329.331 34.3054C329.813 38.265 329.331 46.3773 329.331 51.0129C328.849 58.5458 329.331 66.465 329.331 72.1629C329.331 82.1102 329.331 97.2724 329.331 105.868C329.331 114.946 329.331 127.5 328.849 138.22C328.849 142.663 329.331 146.14 327.306 147.685C324.896 149.23 310.628 149.23 308.796 147.685C306.772 145.657 307.736 139.09 307.736 134.647C307.736 132.619 307.736 130.687 307.736 128.659C307.736 119.002 307.254 109.924 307.736 98.9143C307.736 96.3067 308.218 93.4094 307.736 92.3471C306.193 90.8019 302.241 91.8642 299.156 91.8642C297.131 91.8642 292.6 90.319 290.576 92.3471C288.648 94.9546 289.515 102.005 289.515 106.447C289.515 117.457 289.997 123.155 289.997 134.647C289.997 140.635 290.479 145.657 287.587 147.685C284.502 149.713 272.451 149.23 270.427 147.202C267.342 144.305 267.824 132.619 267.824 125.569C267.824 103.936 268.884 87.9047 268.306 68.5896C268.306 64.63 268.788 60.4773 268.788 57.58C268.788 55.552 268.306 53.4273 267.728 50.5301C267.728 48.9849 268.21 46.9568 268.21 45.4116C268.692 39.9068 267.728 32.8568 268.692 30.8288C270.716 27.9315 286.334 27.352 288.744 30.4424C290.768 33.3397 289.226 39.4239 289.226 42.9972C288.744 46.9568 289.226 52.0752 289.226 57.58C289.226 59.1252 289.226 62.0225 289.226 64.6301C289.226 67.0444 289.226 70.6177 289.708 71.68C290.768 73.2252 295.878 73.2252 298.288 73.2252C300.313 73.2252 305.808 73.7081 306.868 72.1629C307.929 70.6177 307.929 62.0225 307.929 59.1253C307.929 51.013 307.929 46.3773 307.929 38.265C307.929 35.3677 307.447 32.2774 308.411 30.3459C309.471 28.3178 311.881 28.8006 313.906 28.3178C315.737 28.3178 325.764 27.2555 327.788 29.863Z"}),(0,n.jsx)("path",{d:"M371.652 26.1931C379.75 25.7102 387.752 28.2212 392.765 30.6356C394.308 31.6979 397.778 35.2712 398.742 36.8164C401.345 40.2931 402.888 42.8041 403.755 47.3431C404.237 48.4054 404.816 48.8883 404.816 49.3711C404.816 49.854 404.816 50.4335 404.816 51.3993C405.298 53.8136 406.358 56.4211 406.84 57.9664C406.84 59.8979 406.84 61.4431 406.84 63.4711C406.84 65.0163 407.322 66.3684 407.322 67.9136C408.383 76.9916 407.804 87.7115 407.322 97.6587C407.322 104.226 407.322 110.696 406.262 116.781C405.201 122.961 403.659 129.529 402.309 132.909C401.827 133.971 400.285 136.482 399.224 137.544L398.742 138.027C397.2 140.442 394.308 142.47 391.223 144.594C389.68 145.463 389.198 145.946 387.752 146.526C386.21 147.009 384.667 147.009 382.064 147.588C380.714 147.588 379.172 148.65 377.629 148.65C374.159 149.133 369.531 149.133 367.121 149.133C364.036 148.65 360.469 147.588 357.481 146.043C356.999 146.043 356.42 145.174 356.42 145.174C354.878 144.691 352.853 143.629 351.986 143.146C349.961 141.6 347.358 138.51 345.816 136.579C342.345 130.591 339.838 121.416 339.26 112.821C338.778 106.254 338.778 97.6588 338.778 92.154C338.296 88.0012 338.778 83.5588 339.26 79.5992C339.26 73.9013 339.26 67.9136 339.742 62.8917C340.224 60.2841 340.803 57.8698 341.285 55.8417C341.285 52.7513 341.285 50.3369 341.767 47.7294C343.309 43.287 346.78 35.6575 350.347 32.5671C351.407 32.0842 352.757 31.0219 354.299 30.1527C358.445 28.1246 364.422 26.5795 370.978 26H371.652V26.1931ZM361.53 59.8979C359.987 72.6458 360.469 86.1663 361.048 99.3005C361.53 109.441 362.108 124.893 366.736 128.563C366.736 129.046 368.085 129.625 369.146 130.108C373.291 131.46 376.665 130.591 379.75 128.563C380.811 127.5 382.161 125.955 382.643 124.99C384.185 122.575 385.245 115.525 385.728 110.89C385.728 106.93 385.728 101.908 386.21 96.3067C386.21 85.2971 385.728 74.0944 384.667 64.6301C384.185 58.0629 383.607 52.0753 381.582 48.9849C380.232 46.9568 378.111 45.4116 376.087 44.8322C373.677 43.963 372.616 44.8322 371.652 44.8322H371.17C364.615 45.7979 362.59 52.365 361.53 59.8979Z"}),(0,n.jsx)("path",{d:"M439.426 28.2212C441.836 30.6356 441.45 89.4499 441.45 96.9827C440.968 113.497 440.968 125.183 440.968 142.759C440.968 145.85 441.45 147.395 441.45 149.423C441.45 153.383 440.39 159.37 440.968 165.454C440.968 171.442 441.45 178.878 439.908 182.259C438.847 186.701 434.798 191.916 430.846 194.33C426.893 196.938 420.241 197.904 412.336 197.421C407.226 196.938 401.153 196.359 399.128 193.268C398.646 191.916 398.646 187.763 398.646 184.866C398.646 180.713 398.646 177.816 400.189 176.754C403.274 175.209 409.829 180.23 414.746 178.782C416.77 178.299 418.891 176.174 419.855 172.601C420.241 169.704 419.855 165.455 419.855 161.978C419.855 158.887 420.241 156.473 420.241 153.383C420.241 147.395 420.241 140.828 420.241 134.84C420.241 127.307 419.373 120.257 419.373 113.497C419.373 104.033 419.855 47.3431 419.855 38.7479C419.855 32.7602 417.831 28.8006 422.266 26.676C425.833 25.6136 436.823 25.6137 439.426 28.2212Z"}),(0,n.jsx)("path",{d:"M46.6374 143.679C43.5946 143.679 41.2864 142.838 39.6601 141.104C36.7223 138.004 37.5092 133.379 37.5617 133.169C37.719 132.275 52.3031 43.8816 53.667 35.2104C54.9261 27.1698 64.0542 25.383 68.7232 25.5932L68.6183 28.7464C68.5658 28.7464 65.733 28.6413 62.8476 29.5347C59.2803 30.6383 57.2344 32.6878 56.7622 35.6834C55.4507 44.3546 40.8142 132.801 40.6568 133.694C40.6568 133.747 40.1322 137.005 41.9684 138.95C43.2799 140.316 45.4832 140.789 48.6308 140.368L48.9981 143.469C48.2112 143.627 47.4243 143.679 46.6374 143.679Z"}),(0,n.jsx)("path",{d:"M106.023 33.371H102.928C102.98 33.2133 102.98 33.0031 102.98 32.8455V15.2403C102.98 13.506 101.564 12.0871 99.8324 12.0871H89.4977C90.8616 10.8784 91.7535 9.09161 91.7535 7.09461C91.7535 3.41592 88.7632 0.42041 85.091 0.42041C81.4188 0.42041 78.4285 3.41592 78.4285 7.09461C78.4285 9.09161 79.2679 10.8784 80.6843 12.0871H70.8217C69.0905 12.0871 67.6741 13.506 67.6741 15.2403V32.8455C67.6741 33.0557 67.6741 33.2133 67.7265 33.371H64.0543C61.5887 33.371 59.5427 35.4205 59.5427 37.8905C59.5427 40.4131 61.5887 42.4101 64.0543 42.4101H106.075C108.541 42.4101 110.587 40.3605 110.587 37.8905C110.534 35.368 108.541 33.371 106.023 33.371ZM85.0385 3.52103C86.9795 3.52103 88.5534 5.0976 88.5534 7.04205C88.5534 8.98651 86.9795 10.5631 85.0385 10.5631C83.0975 10.5631 81.5237 8.98651 81.5237 7.04205C81.5237 5.0976 83.0975 3.52103 85.0385 3.52103Z"}),(0,n.jsx)("path",{d:"M123.177 143.679C122.443 143.679 121.656 143.627 120.816 143.522L121.184 140.421C124.331 140.841 126.535 140.316 127.846 139.002C129.682 137.058 129.158 133.799 129.158 133.799C129 132.906 114.364 44.4596 113.052 35.7884C112.58 32.7929 110.534 30.7433 106.967 29.6397C104.082 28.7463 101.249 28.8514 101.196 28.8514L101.091 25.6983C105.76 25.4881 114.941 27.2749 116.147 35.3154C117.459 43.9866 132.095 132.38 132.253 133.274C132.305 133.431 133.092 138.056 130.154 141.157C128.528 142.786 126.22 143.679 123.177 143.679Z"}),(0,n.jsx)("path",{d:"M122.443 151.142L122.39 129.805C122.39 124.76 109.642 120.031 109.642 120.031H109.433C105.026 124.34 97.5765 127.44 85.2483 127.44C72.9201 127.44 65.5231 124.34 61.064 120.031H60.8541C60.8541 120.031 48.1063 124.76 48.1063 129.805C48.1063 134.85 48.1063 151.142 48.1063 151.142C48.1063 151.142 42.1782 154.978 42.1782 159.445C42.1782 163.912 42.1782 167.17 42.1782 167.17C42.1782 167.17 47.2144 178.154 85.2483 178.154H85.3007C123.335 178.154 128.371 167.17 128.371 167.17C128.371 167.17 128.371 163.912 128.371 159.445C128.371 154.978 122.443 151.142 122.443 151.142Z"}),(0,n.jsx)("path",{d:"M117.931 87.658C116.725 85.2406 113.42 80.5108 112.056 78.5664L103.924 41.1488L101.091 41.7795L112.738 95.2256L112.79 95.3833C112.79 95.4358 113.262 96.8547 113.63 99.062C113.052 99.5875 112.37 100.06 111.584 100.533C108.331 102.478 96.7897 105.894 85.3009 108.994C73.8645 105.894 62.3756 102.478 59.1231 100.533C58.2837 100.008 57.5493 99.4824 56.9197 98.9043C57.287 96.7496 57.7066 95.3833 57.7591 95.3307V95.2782L69.4053 41.5167L66.5725 40.886L58.3362 79.0394C56.8148 81.194 53.877 85.4508 52.7754 87.7106C51.8311 89.6025 50.7819 94.5424 54.0344 98.8518C53.2475 103.739 52.9852 111.78 57.7591 118.401C62.7953 125.391 72.0284 128.912 85.2484 128.912C98.4685 128.912 107.702 125.391 112.738 118.401C117.459 111.832 117.249 103.949 116.515 99.062C120.03 94.6475 118.928 89.6025 117.931 87.658ZM116.095 88.604C116.725 89.9178 117.459 92.9658 115.99 96.0139C115.78 95.2256 115.623 94.7526 115.571 94.5424L113.262 83.9793C114.364 85.661 115.518 87.4478 116.095 88.604ZM54.664 88.604C55.1886 87.5529 56.1328 86.0289 57.182 84.4523L54.9787 94.4899C54.9262 94.6475 54.7689 95.068 54.6115 95.6986C53.4049 92.7556 54.0869 89.8652 54.664 88.604ZM56.6574 101.374C57.0771 101.69 57.6017 102.005 58.0739 102.32C61.1166 104.16 70.9792 107.155 81.3139 110.045C70.5595 112.936 60.8543 115.301 59.4378 115.669C56.5525 110.939 56.2902 105.473 56.6574 101.374ZM85.3009 125.969C73.6546 125.969 65.4184 123.131 60.8018 117.508C64.1068 116.72 74.5465 114.092 85.3533 111.149C95.9504 114.039 106.338 116.615 109.8 117.508C105.183 123.131 96.9471 125.969 85.3009 125.969ZM111.111 115.669C109.17 115.196 99.7275 112.831 89.3403 110.045C99.7275 107.155 109.59 104.107 112.685 102.268C113.157 102.005 113.525 101.742 113.944 101.427C114.311 105.526 113.997 110.991 111.111 115.669Z"}),(0,n.jsx)("path",{d:"M39.188 44.7224C38.8733 44.7224 38.611 44.6173 38.3487 44.4597L24.2893 34.5797C23.6073 34.1068 23.4499 33.2134 23.922 32.5302C24.3942 31.847 25.286 31.6893 25.968 32.1623L40.0274 42.0422C40.7094 42.5152 40.8668 43.4086 40.3946 44.0918C40.0799 44.5122 39.6602 44.7224 39.188 44.7224Z"}),(0,n.jsx)("path",{d:"M18.8334 80.6685L1.67885 80.6159C0.891941 80.6159 0.209961 79.9853 0.209961 79.1445C0.209961 78.3036 0.83948 77.673 1.67885 77.673L18.8334 77.7255C19.6203 77.7255 20.3023 78.3562 20.3023 79.197C20.3023 80.0379 19.6203 80.6685 18.8334 80.6685Z"}),(0,n.jsx)("path",{d:"M13.2726 128.754C12.8004 128.754 12.3283 128.544 12.066 128.071C11.6463 127.388 11.8562 126.495 12.4857 126.074L26.9123 116.825C27.5943 116.404 28.4861 116.562 28.9058 117.245C29.3255 117.928 29.1157 118.822 28.4861 119.242L14.0595 128.492C13.8497 128.649 13.5874 128.754 13.2726 128.754Z"}),(0,n.jsx)("path",{d:"M130.889 43.6188C130.417 43.6188 129.997 43.4086 129.682 42.9881C129.21 42.305 129.368 41.4116 130.05 40.9386L144.109 31.0587C144.738 30.5857 145.683 30.7433 146.155 31.4265C146.627 32.1097 146.47 33.0031 145.788 33.4761L131.728 43.356C131.466 43.5137 131.204 43.6188 130.889 43.6188Z"}),(0,n.jsx)("path",{d:"M151.244 79.5649C150.457 79.5649 149.775 78.9343 149.775 78.0934C149.775 77.3051 150.404 76.6219 151.244 76.6219L168.398 76.5694C169.185 76.5694 169.867 77.2 169.867 78.0409C169.867 78.8292 169.238 79.5123 168.398 79.5123L151.244 79.5649Z"}),(0,n.jsx)("path",{d:"M156.804 127.598C156.542 127.598 156.28 127.546 156.017 127.388L141.591 118.139C140.909 117.718 140.699 116.825 141.171 116.142C141.591 115.458 142.483 115.248 143.165 115.721L157.591 124.97C158.273 125.391 158.483 126.284 158.011 126.967C157.749 127.388 157.277 127.598 156.804 127.598Z"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_45_75",children:(0,n.jsx)("rect",{width:"442",height:"200",fill:"currentColor"})})})]})}function F(e){let{className:t}=e;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 27 27",fill:"none",className:null!=t?t:"w-6 h-6",children:[(0,n.jsx)("path",{d:"m 18.562765,17.147843 c 1.380497,-1.679442 2.307667,-4.013099 2.307667,-6.330999 C 20.870432,5.3951476 16.353958,1 10.782674,1 5.2113555,1 0.69491525,5.3951476 0.69491525,10.816844 c 0,5.421663 4.51644025,9.816844 10.08775875,9.816844 2.381867,0 4.570922,-0.803307 6.296712,-2.14673 0.508475,-0.508475 4.514633,4.192839 4.514633,4.192839 1.036377,1.008544 2.113087,-0.02559 1.07671,-1.034139 z m -7.780091,1.925408 c -4.3394583,0 -8.6708434,-4.033489 -8.6708434,-8.256407 0,-4.2229187 4.3313851,-8.2564401 8.6708434,-8.2564401 4.339458,0 8.670809,4.2369112 8.670809,8.4598301 0,4.222918 -4.331351,8.053017 -8.670809,8.053017 z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",fillOpacity:"1",strokeWidth:"1.10519",strokeDasharray:"none"}),(0,n.jsx)("path",{d:"m 13.337351,9.3402647 0.05184,2.1532893",stroke:"currentColor",strokeWidth:"1.95702",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M 8.431347,9.2809457 8.483191,11.434235",stroke:"currentColor",strokeWidth:"1.95701",strokeLinecap:"round"})]})}function O(e){let{className:t}=e;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 27 27",fill:"none",className:null!=t?t:"w-6 h-6",children:[(0,n.jsx)("path",{d:"m 20.503667,19.512812 c 1.498791,-1.721309 2.505409,-4.113142 2.505409,-6.488822 0,-5.556853 -4.903485,-10.0615654 -10.952165,-10.0615654 -6.0487172,0 -10.9521652,4.5047124 -10.9521652,10.0615654 0,5.556818 4.903448,10.061562 10.9521652,10.061562 2.585967,0 4.962599,-0.823331 6.836268,-2.200243 z m -8.446756,1.973405 c -4.7113005,0 -9.4138363,-4.134038 -9.4138363,-8.462227 0,-4.3281914 4.7025358,-8.4622628 9.4138363,-8.4622628 4.711301,0 9.4138,4.3425313 9.4138,8.6707228 0,4.328187 -4.702499,8.253767 -9.4138,8.253767 z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",fillOpacity:"1",strokeWidth:"1.16584",strokeDasharray:"none"}),(0,n.jsx)("path",{d:"m 14.703831,11.557853 0.0553,2.175599",stroke:"currentColor",strokeWidth:"2.03174",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"m 9.470316,11.497919 0.055305,2.175598",stroke:"currentColor",strokeWidth:"2.03172",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"m 13.921987,2.0293778 c -1.700446,0.00578 -2.945437,0.011553 -3.53279,0.01733",stroke:"currentColor",strokeWidth:"1.69465",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"m 21.395697,5.8423397 -1.28226,1.167146",stroke:"currentColor",strokeWidth:"2.03172",strokeLinecap:"round"})]})}function P(e){let{className:t}=e;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 64 64",fill:"none",className:null!=t?t:"w-6 h-6",children:(0,n.jsx)("path",{d:"m 30.065286,2.6838408 c 0,-1.0516338 -0.536857,-0.2904639 -1.602626,-0.2904639 -1.065769,0 -2.256759,-0.7611699 -2.256759,0.2904639 v 4.7442407 c 0,0.019613 2.9e-4,0.03913 8.68e-4,0.058553 C 12.904724,8.2984689 2.0847457,17.487997 2.0847457,31.229969 c 0,3.541245 0.7282659,6.446979 2.1822891,8.775946 1.4616456,2.341058 3.5599931,3.944353 6.0242102,5.03229 4.798181,2.118273 11.240941,2.377047 17.844348,2.377047 6.603408,0 13.046168,-0.258774 17.844349,-2.377047 2.464217,-1.087937 4.562564,-2.691232 6.02421,-5.03229 1.454023,-2.328967 2.182289,-5.234701 2.182289,-8.775946 0,-13.741972 -10.819978,-22.9315001 -24.122023,-23.7433349 5.78e-4,-0.019422 8.68e-4,-0.03894 8.68e-4,-0.058553 z m -1.929693,8.5525432 c -12.474689,0 -22.1914625,8.103305 -22.1914625,19.993585 0,3.031408 0.6216504,5.19719 1.6087846,6.778396 0.9796083,1.568926 2.4136592,2.714368 4.3145029,3.553622 3.932038,1.735919 9.549855,2.044963 16.268175,2.044963 6.718321,0 12.336138,-0.309044 16.268176,-2.044963 1.900843,-0.839254 3.334894,-1.984696 4.314503,-3.553622 0.987134,-1.581206 1.608784,-3.746988 1.608784,-6.778396 0,-11.89028 -9.716773,-19.993585 -22.191463,-19.993585 z M 16.557439,22.66129 c 1.065769,0 1.929692,0.852488 1.929692,1.904151 v 5.712452 c 0,1.051663 -0.863923,1.904151 -1.929692,1.904151 -1.065769,0 -1.929692,-0.852488 -1.929692,-1.904151 v -5.712452 c 0,-1.051663 0.863923,-1.904151 1.929692,-1.904151 z m 22.191463,0 c 1.065769,0 1.929692,0.852488 1.929692,1.904151 v 5.712452 c 0,1.051663 -0.863923,1.904151 -1.929692,1.904151 -1.065769,0 -1.929693,-0.852488 -1.929693,-1.904151 v -5.712452 c 0,-1.051663 0.863924,-1.904151 1.929693,-1.904151 z M 8.2209746,53.949727 c 6.4574264,-1.16515 13.1131284,-1.774098 19.9146184,-1.774098 6.801587,0 13.457289,0.608948 19.914716,1.774098 1.048305,0.189177 2.053578,-0.496127 2.245293,-1.530557 0.191715,-1.034525 -0.502781,-2.026492 -1.551087,-2.215575 -6.685419,-1.206374 -13.573456,-1.836268 -20.608922,-1.836268 -7.035465,0 -13.923502,0.629894 -20.6088253,1.836268 -1.0484018,0.189083 -1.7428981,1.18105 -1.5511832,2.215575 0.1917149,1.03443 1.1969882,1.719734 2.2453901,1.530557 z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var W=s(54764),A=s.n(W),Y=s(44458),V=s(37440);let B=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(Y.fC,{ref:t,className:(0,V.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...a})});B.displayName=Y.fC.displayName;let H=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(Y.Ee,{ref:t,className:(0,V.cn)("aspect-square h-full w-full",s),...a})});H.displayName=Y.Ee.displayName;let U=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(Y.NY,{ref:t,className:(0,V.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...a})});U.displayName=Y.NY.displayName;var X=s(92005),G=s(87592),J=s(22468),$=s(28165);let K=X.v2;X.ZA,X.h_,X.Tr,X.Ee;let Q=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(X.fC,{ref:t,className:(0,V.cn)("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",s),...a})});Q.displayName=X.fC.displayName;let q=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(X.xz,{ref:t,className:(0,V.cn)("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",s),...a})});q.displayName=X.xz.displayName,l.forwardRef((e,t)=>{let{className:s,inset:a,children:r,...l}=e;return(0,n.jsxs)(X.fF,{ref:t,className:(0,V.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",a&&"pl-8",s),...l,children:[r,(0,n.jsx)(G.Z,{className:"ml-auto h-4 w-4"})]})}).displayName=X.fF.displayName,l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(X.tu,{ref:t,className:(0,V.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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",s),...a})}).displayName=X.tu.displayName;let ee=l.forwardRef((e,t)=>{let{className:s,align:a="start",alignOffset:r=-4,sideOffset:l=8,...o}=e;return(0,n.jsx)(X.h_,{children:(0,n.jsx)(X.VY,{ref:t,align:a,alignOffset:r,sideOffset:l,className:(0,V.cn)("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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",s),...o})})});ee.displayName=X.VY.displayName;let et=l.forwardRef((e,t)=>{let{className:s,inset:a,...r}=e;return(0,n.jsx)(X.ck,{ref:t,className:(0,V.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",s),...r})});et.displayName=X.ck.displayName,l.forwardRef((e,t)=>{let{className:s,children:a,checked:r,...l}=e;return(0,n.jsxs)(X.oC,{ref:t,className:(0,V.cn)("relative flex 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),checked:r,...l,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(X.wU,{children:(0,n.jsx)(J.Z,{className:"h-4 w-4"})})}),a]})}).displayName=X.oC.displayName,l.forwardRef((e,t)=>{let{className:s,children:a,...r}=e;return(0,n.jsxs)(X.Rk,{ref:t,className:(0,V.cn)("relative flex 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),...r,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(X.wU,{children:(0,n.jsx)($.Z,{className:"h-2 w-2 fill-current"})})}),a]})}).displayName=X.Rk.displayName,l.forwardRef((e,t)=>{let{className:s,inset:a,...r}=e;return(0,n.jsx)(X.__,{ref:t,className:(0,V.cn)("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",s),...r})}).displayName=X.__.displayName;let es=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(X.Z0,{ref:t,className:(0,V.cn)("-mx-1 my-1 h-px bg-muted",s),...a})});es.displayName=X.Z0.displayName;var en=s(60787),ea=s(50434),er=s(71241),el=s(47714),eo=s(89475),ei=s(69591);function ed(e){let{is_active:t}=e;return(0,n.jsxs)("div",{className:"flex flex-row items-center",children:[(0,n.jsx)("div",{className:"w-3 h-3 rounded-full ".concat(t?"bg-yellow-500":"bg-muted"," mr-1")}),(0,n.jsx)("p",{className:"text-xs",children:t?"Futurist":"Free"})]})}function ec(){var e,t;let s=(0,i.GW)(),[a,r]=(0,l.useState)(!1),[o,c]=(0,l.useState)(!1),u=(0,ei.IC)();return(0,l.useEffect)(()=>{"dark"===localStorage.getItem("theme")?(document.documentElement.classList.add("dark"),r(!0)):"light"===localStorage.getItem("theme")?(document.documentElement.classList.remove("dark"),r(!1)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(document.documentElement.classList.add("dark"),r(!0)),c(!0)},[]),(0,l.useEffect)(()=>{o&&(a?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",a?"dark":"light"))},[a,o]),(0,n.jsx)("div",{className:A().titleBar,children:u?(0,n.jsxs)(k.h_,{children:[(0,n.jsx)(k.$F,{children:s?(0,n.jsxs)(B,{className:"h-10 w-10 border-2 ".concat(s.is_active?"border-yellow-500":"border-stone-700 dark:border-stone-300"),children:[(0,n.jsx)(H,{src:null==s?void 0:s.photo,alt:"user profile"}),(0,n.jsx)(U,{className:"bg-transparent hover:bg-muted",children:null==s?void 0:s.username[0].toUpperCase()})]}):(0,n.jsx)(en.Y,{className:"h-10 w-10"})}),(0,n.jsxs)(k.AW,{className:"gap-2",children:[(0,n.jsx)(k.Xi,{className:"w-full",children:(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("p",{className:"font-semibold",children:null==s?void 0:s.email}),(0,n.jsx)(ed,{is_active:null!==(e=null==s?void 0:s.is_active)&&void 0!==e&&e})]})}),(0,n.jsx)(k.VD,{}),(0,n.jsx)(k.Xi,{onClick:()=>r(!a),className:"w-full cursor-pointer",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[a?(0,n.jsx)(ea.k,{className:"w-6 h-6"}):(0,n.jsx)(er.J,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:a?"Light Mode":"Dark Mode"})]})}),(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"/agents",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(P,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Agents"})]})})}),(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"/automations",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(O,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Automations"})]})})}),s&&(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"/search",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(F,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Search"})]})})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(k.VD,{}),s&&(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"/settings",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(el.D,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Settings"})]})})}),(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"https://docs.khoj.dev",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(eo.H,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Help"})]})})}),s?(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"/auth/logout",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(j.o,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Logout"})]})})}):(0,n.jsx)(k.Xi,{children:(0,n.jsx)(d.default,{href:"/login",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(j.o,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Login"})]})})})]})]})]}):(0,n.jsx)(Q,{className:"border-none",children:(0,n.jsxs)(K,{children:[(0,n.jsx)(q,{children:s?(0,n.jsxs)(B,{className:"h-10 w-10 border-2 ".concat(s.is_active?"border-yellow-500":"border-stone-700 dark:border-stone-300"),children:[(0,n.jsx)(H,{src:null==s?void 0:s.photo,alt:"user profile"}),(0,n.jsx)(U,{className:"bg-transparent hover:bg-muted",children:null==s?void 0:s.username[0].toUpperCase()})]}):(0,n.jsx)(en.Y,{className:"w-10 h-10"})}),(0,n.jsxs)(ee,{align:"end",className:"rounded-xl gap-2",children:[(0,n.jsx)(et,{className:"w-full",children:(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("p",{className:"font-semibold",children:null==s?void 0:s.email}),(0,n.jsx)(ed,{is_active:null!==(t=null==s?void 0:s.is_active)&&void 0!==t&&t})]})}),(0,n.jsx)(es,{className:"dark:bg-white height-[2px] bg-black"}),(0,n.jsx)(et,{onClick:()=>r(!a),className:"w-full hover:cursor-pointer",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[a?(0,n.jsx)(ea.k,{className:"w-6 h-6"}):(0,n.jsx)(er.J,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:a?"Light Mode":"Dark Mode"})]})}),(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"/agents",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(P,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Agents"})]})})}),(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"/automations",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(O,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Automations"})]})})}),s&&(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"/search",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(F,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Search"})]})})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(es,{className:"dark:bg-white height-[2px] bg-black"}),(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"https://docs.khoj.dev",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(eo.H,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Help"})]})})}),s&&(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"/settings",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(el.D,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Settings"})]})})}),s?(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"/auth/logout",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(j.o,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Logout"})]})})}):(0,n.jsx)(et,{children:(0,n.jsx)(d.default,{href:"/login",className:"no-underline w-full",children:(0,n.jsxs)("div",{className:"flex flex-rows",children:[(0,n.jsx)(j.o,{className:"w-6 h-6"}),(0,n.jsx)("p",{className:"ml-3 font-semibold",children:"Login"})]})})})]})]})]})})})}let eu=e=>fetch(e).then(t=>{if(!t.ok)throw Error("Failed to call API at ".concat(e," with error ").concat(t.statusText));return t.json()});function ef(e,t){fetch("/api/chat/share?client=web&conversation_id=".concat(e),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{t(e.url)}).catch(e=>{console.error(e)})}function em(e){let{data:t,error:s}=(0,o.ZP)("/api/content/computer",eu),{data:a,error:i}=(0,o.ZP)(e.conversationId?"/api/chat/conversation/file-filters/".concat(e.conversationId):null,eu),[f,h]=(0,l.useState)(!1),[N,C]=(0,l.useState)([]),[w,v]=(0,l.useState)([]),y=null!==e.conversationId;(0,l.useEffect)(()=>{if(!t)return;let e=Array.from(new Set(t)).sort();Array.isArray(w)&&(e=w.concat(e.filter(e=>!w.includes(e)))),C(e)},[t,w]),(0,l.useEffect)(()=>{for(let t of e.uploadedFiles)v(e=>[...e,t])},[e.uploadedFiles]),(0,l.useEffect)(()=>{Array.isArray(a)?v(a):v([])},[a]);let b=()=>{(0,D.jh)(e.conversationId,w,v,"remove")},_=()=>{(0,D.jh)(e.conversationId,N,v,"add")};if(s)return(0,n.jsx)("div",{children:"Failed to load files"});if(i)return(0,n.jsx)("div",{children:"Failed to load selected files"});if(!t||!a&&e.conversationId)return(0,n.jsx)(u.l,{});let k=()=>(0,n.jsxs)(c.mY,{children:[(0,n.jsx)(c.sZ,{placeholder:"Find file"}),(0,n.jsxs)(c.e8,{children:[(0,n.jsxs)(c.rb,{children:["No results found. ",(0,n.jsx)(d.default,{href:"/search",children:"Try advanced search"}),"."]}),y&&(0,n.jsxs)(c.fu,{heading:"Quick",children:[(0,n.jsxs)(c.di,{onSelect:()=>{b()},children:[(0,n.jsx)(z.r,{className:"h-4 w-4 mr-2"}),(0,n.jsx)("span",{children:"Clear all"})]}),(0,n.jsxs)(c.di,{onSelect:()=>{_()},children:[(0,n.jsx)(x.G,{className:"h-4 w-4 mr-2"}),(0,n.jsx)("span",{children:"Select all"})]})]}),(0,n.jsx)(c.fu,{heading:"Manage files",children:(0,n.jsx)(c.di,{children:(0,n.jsx)(d.default,{href:"/settings",children:"Settings"})})}),(0,n.jsxs)(c.fu,{heading:"".concat(y?"Configure files":"Synced files"),children:[0==w.length&&(0,n.jsx)(c.di,{children:(0,n.jsx)(d.default,{href:"/settings",children:"Upload documents"})}),N.map(t=>Array.isArray(w)&&w.includes(t)?(0,n.jsxs)(c.di,{value:t,className:"bg-accent text-accent-foreground mb-1",onSelect:t=>{y&&(0,D.jh)(e.conversationId,[t],v,"remove")},children:[(0,n.jsx)(p.J,{className:"h-4 w-4 mr-2"}),(0,n.jsx)("span",{className:"break-all",children:t})]},t):(0,n.jsx)(c.di,{className:"mb-1",value:t,onSelect:t=>{y&&(0,D.jh)(e.conversationId,[t],v,"add")},children:(0,n.jsx)("span",{className:"break-all",children:t})},t))]})]})]});return e.isMobileWidth?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(m.dy,{children:[(0,n.jsxs)(m.Qz,{className:"bg-background border border-muted p-4 rounded-2xl my-8 text-left inline-flex items-center justify-between w-full",children:["Manage Files ",(0,n.jsx)(j.o,{className:"h-4 w-4 mx-2"})]}),(0,n.jsxs)(m.sc,{children:[(0,n.jsxs)(m.OX,{children:[(0,n.jsx)(m.iI,{children:"Files"}),(0,n.jsx)(m.u6,{children:y?"Manage files for this conversation":"Shared files"})]}),(0,n.jsx)("div",{className:"".concat(r().panelWrapper),children:(0,n.jsx)(k,{})}),(0,n.jsx)(m.ze,{children:(0,n.jsx)(m.uh,{children:(0,n.jsx)(M.z,{variant:"outline",children:"Done"})})})]})]})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(R.J2,{open:f,onOpenChange:h,children:[(0,n.jsx)(R.xo,{asChild:!0,children:(0,n.jsx)("div",{className:"w-auto bg-background border border-muted p-4 drop-shadow-sm rounded-2xl my-8",children:(0,n.jsxs)("div",{className:"flex items-center justify-between space-x-4",children:[(0,n.jsxs)("h4",{className:"text-sm font-semibold",children:[y?"Manage Context":"Files",(0,n.jsx)("p",{children:y?(0,n.jsxs)("span",{className:"text-muted-foreground text-xs",children:["Using"," ",0==w.length?t.length:w.length," ","files"]}):(0,n.jsxs)("span",{className:"text-muted-foreground text-xs",children:["Shared"," ",0==w.length?t.length:w.length," ","files"]})})]}),(0,n.jsxs)(M.z,{variant:"ghost",size:"sm",className:"w-9 p-0",children:[f?(0,n.jsx)(g.K,{className:"h-4 w-4"}):(0,n.jsx)(j.o,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Toggle"})]})]})})}),(0,n.jsx)(R.yk,{className:"mx-2",children:(0,n.jsx)(k,{})})]})})}function eh(e){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)(h.x,{children:[(0,n.jsx)(E.gb,{orientation:"vertical",className:"h-full w-2.5 border-l border-l-transparent p-[1px]"}),(0,n.jsx)("div",{className:r().sessionsList,children:null!=e.subsetOrganizedData&&Object.keys(e.subsetOrganizedData).filter(e=>"All Time"!==e).map(t=>(0,n.jsxs)("div",{className:"my-4",children:[(0,n.jsx)("div",{className:"text-muted-foreground text-sm font-bold p-[0.5rem]",children:t}),e.subsetOrganizedData&&e.subsetOrganizedData[t].map(t=>(0,n.jsx)(ep,{updated:t.updated,created:t.created,compressed:!0,conversation_id:t.conversation_id,slug:t.slug,agent_name:t.agent_name,showSidePanel:e.setEnabled},t.conversation_id))]},t))})]}),e.data&&e.data.length>5&&(0,n.jsx)(ej,{data:e.organizedData,showSidePanel:e.setEnabled})]}),(0,n.jsx)(em,{conversationId:e.conversationId,uploadedFiles:e.uploadedFiles,isMobileWidth:e.isMobileWidth})]})}function ex(e){let[t,s]=(0,l.useState)(""),[a,r]=(0,l.useState)(!1),[i,d]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),[m,h]=(0,l.useState)(""),[x,p]=(0,l.useState)(!1),[j,g]=(0,l.useState)(!1);if((0,l.useEffect)(()=>{i&&(ef(e.conversationId,h),p(!0),d(!1))},[i,e.conversationId]),a)return(0,n.jsx)(f.Vq,{open:a,onOpenChange:e=>r(e),children:(0,n.jsxs)(f.cZ,{children:[(0,n.jsxs)(f.fK,{children:[(0,n.jsx)(f.$N,{children:"Set a new title for the conversation"}),(0,n.jsx)(f.Be,{children:"This will help you identify the conversation easily, and also help you search for it later."}),(0,n.jsx)(Z.I,{value:t,onChange:e=>s(e.target.value)})]}),(0,n.jsx)(f.cN,{children:(0,n.jsx)(M.z,{onClick:()=>{!function(e,t){fetch("/api/chat/title?client=web&conversation_id=".concat(e,"&title=").concat(t),{method:"PATCH",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{}).catch(e=>{console.error(e)})}(e.conversationId,t),e.setTitle(t),r(!1)},type:"submit",children:"Rename"})})]})});if(i||x)return m&&navigator.clipboard.writeText(m),(0,n.jsx)(f.Vq,{open:i||x,onOpenChange:e=>{p(e),d(e)},children:(0,n.jsxs)(f.cZ,{children:[(0,n.jsxs)(f.fK,{children:[(0,n.jsx)(f.$N,{children:"Conversation Share URL"}),(0,n.jsxs)(f.Be,{children:["Sharing this chat session will allow anyone with a link to view the conversation.",(0,n.jsx)(Z.I,{className:"w-full bg-accent text-accent-foreground rounded-md p-2 mt-2",value:m,readOnly:!0})]})]}),(0,n.jsxs)(f.cN,{children:[!x&&(0,n.jsxs)(M.z,{onClick:()=>{ef(e.conversationId,h),p(!0)},className:"bg-orange-500",disabled:!0,children:[(0,n.jsx)(N.$,{className:"mr-2 h-4 w-4 animate-spin"}),"Sharing"]}),x&&(0,n.jsx)(M.z,{onClick:()=>{navigator.clipboard.writeText(m)},variant:"default",children:"Copy"})]})]})});if(c)return(0,n.jsx)(T.aR,{open:c,onOpenChange:e=>u(e),children:(0,n.jsxs)(T._T,{children:[(0,n.jsxs)(T.fY,{children:[(0,n.jsx)(T.f$,{children:"Delete Conversation"}),(0,n.jsx)(T.yT,{children:"Are you sure you want to delete this conversation? This action cannot be undone."})]}),(0,n.jsxs)(T.xo,{children:[(0,n.jsx)(T.le,{children:"Cancel"}),(0,n.jsx)(T.OL,{onClick:()=>{!function(e){fetch("/api/chat/history?client=web&conversation_id=".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}}).then(e=>{e.json(),(0,o.JG)("/api/chat/sessions")}).then(e=>{}).catch(e=>{console.error(e)})}(e.conversationId),u(!1)},className:"bg-rose-500 hover:bg-rose-600",children:"Delete"})]})]})});let w=function(){switch(e.sizing){case"sm":default:return"h-4 w-4";case"md":return"h-6 w-6";case"lg":return"h-8 w-8"}}();return(0,n.jsxs)(k.h_,{onOpenChange:e=>g(e),open:j,children:[(0,n.jsx)(k.$F,{children:(0,n.jsx)(C.F,{className:"".concat(w)})}),(0,n.jsxs)(k.AW,{children:[(0,n.jsx)(k.Xi,{children:(0,n.jsxs)(M.z,{className:"p-0 text-sm h-auto",variant:"ghost",onClick:()=>r(!0),children:[(0,n.jsx)(S.z,{className:"mr-2 ".concat(w)}),"Rename"]})}),(0,n.jsx)(k.Xi,{children:(0,n.jsxs)(M.z,{className:"p-0 text-sm h-auto",variant:"ghost",onClick:()=>d(!0),children:[(0,n.jsx)(L.m,{className:"mr-2 ".concat(w)}),"Share"]})}),(0,n.jsx)(k.Xi,{children:(0,n.jsxs)(M.z,{className:"p-0 text-sm h-auto text-rose-300 hover:text-rose-400",variant:"ghost",onClick:()=>u(!0),children:[(0,n.jsx)(z.r,{className:"mr-2 ".concat(w)}),"Delete"]})})]})]})}function ep(e){let[t,s]=(0,l.useState)(!1),[a,o]=(0,l.useState)(e.slug||"New Conversation \uD83C\uDF31");var i=new URLSearchParams(window.location.search).get("conversationId")||"-1";return(0,n.jsxs)("div",{onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),className:"".concat(r().session," ").concat(e.compressed?r().compressed:"!max-w-full"," ").concat(t?"".concat(r().sessionHover):""," ").concat(i===e.conversation_id&&"-1"!=i?"dark:bg-neutral-800 bg-white":""),children:[(0,n.jsx)(d.default,{href:"/chat?conversationId=".concat(e.conversation_id),onClick:()=>e.showSidePanel(!1),children:(0,n.jsx)("p",{className:r().session,children:a})}),(0,n.jsx)(ex,{conversationId:e.conversation_id,setTitle:o})]},e.conversation_id)}function ej(e){let{data:t,showSidePanel:s}=e;return(0,n.jsxs)(f.Vq,{children:[(0,n.jsx)(f.hg,{className:"flex text-left text-medium text-gray-500 hover:text-gray-300 cursor-pointer my-4 text-sm p-[0.5rem]",children:(0,n.jsxs)("span",{className:"mr-2",children:["See All ",(0,n.jsx)(j.o,{className:"inline h-4 w-4",weight:"bold"})]})}),(0,n.jsx)(f.cZ,{children:(0,n.jsxs)(f.fK,{children:[(0,n.jsx)(f.$N,{children:"All Conversations"}),(0,n.jsx)(f.Be,{className:"p-0",children:(0,n.jsx)(h.x,{className:"h-[500px] py-4",children:t&&Object.keys(t).map(e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-muted-foreground text-sm font-bold p-[0.5rem] ",children:e}),t[e].map(e=>(0,n.jsx)(ep,{updated:e.updated,created:e.created,compressed:!1,conversation_id:e.conversation_id,slug:e.slug,agent_name:e.agent_name,showSidePanel:s},e.conversation_id))]},e))})})]})})]})}let eg=async e=>(await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}})).json(),eN=e=>{let{data:t,error:s}=(0,o.ZP)(e,eg);return{data:t,isLoading:!s&&!t,isError:s}};function eC(e){let[t,s]=(0,l.useState)(null),[a,o]=(0,l.useState)(null),[c,u]=(0,l.useState)(null),[f,h]=(0,l.useState)(!1),x=(0,i.GW)(),{data:p}=eN(x?"/api/chat/sessions":"");return(0,l.useEffect)(()=>{if(p){s(p);let e={},t={},n=0,a=new Date;p.forEach(s=>{let r=new Date(s.updated),l=Math.ceil(Math.abs(a.getTime()-r.getTime())/864e5),o=l<7?"Recent":l<30?"Last Month":"All Time";e[o]||(e[o]=[]),e[o].push(s),n<8&&(t[o]||(t[o]=[]),t[o].push(s),n++)}),u(t),o(e)}},[p]),(0,n.jsxs)("div",{className:"".concat(r().panel," ").concat(f?r().expanded:r().collapsed," ").concat(e.isMobileWidth?"mt-0":"mt-1"),children:[(0,n.jsxs)("div",{className:"flex justify-between flex-row",children:[e.isMobileWidth?(0,n.jsxs)(m.dy,{open:f,onOpenChange:e=>{f||h(!1),h(e)},children:[(0,n.jsx)(m.Qz,{children:(0,n.jsx)(w.Y,{className:"h-8 w-8 mx-2",weight:"thin"})}),(0,n.jsxs)(m.sc,{children:[(0,n.jsxs)(m.OX,{children:[(0,n.jsx)(m.iI,{children:"Sessions and Files"}),(0,n.jsx)(m.u6,{children:"View all conversation sessions and manage conversation file filters"})]}),x?(0,n.jsx)("div",{className:"".concat(r().panelWrapper),children:(0,n.jsx)(eh,{setEnabled:h,subsetOrganizedData:c,organizedData:a,data:t,uploadedFiles:e.uploadedFiles,userProfile:x,conversationId:e.conversationId,isMobileWidth:e.isMobileWidth})}):(0,n.jsx)("div",{className:"".concat(r().panelWrapper),children:(0,n.jsxs)(d.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),className:"text-center",children:[" ",(0,n.jsxs)(M.z,{variant:"default",children:[(0,n.jsx)(v.B,{className:"h-4 w-4 mr-1"}),"Sign Up"]})]})}),(0,n.jsx)(m.ze,{children:(0,n.jsx)(m.uh,{children:(0,n.jsx)(M.z,{variant:"outline",children:"Done"})})})]})]}):(0,n.jsxs)("div",{className:"grid grid-flow-col gap-4 w-fit",children:[(0,n.jsx)(d.default,{href:"/",className:"content-center",children:(0,n.jsx)(I,{})}),(0,n.jsxs)("div",{className:"grid grid-flow-col gap-2 items-center",children:[(0,n.jsx)(d.default,{className:"mx-4",href:"/",children:f?(0,n.jsx)(y.a,{className:"h-6 w-6",weight:"fill"}):(0,n.jsx)(y.a,{className:"h-6 w-6",color:"gray"})}),(0,n.jsx)("button",{className:r().button,onClick:()=>h(!f),children:f?(0,n.jsx)(w.Y,{className:"h-6 w-6",weight:"fill"}):(0,n.jsx)(w.Y,{className:"h-6 w-6",color:"gray"})})]}),(0,n.jsx)("div",{className:"fixed right-0 top-[0.9rem] w-fit h-fit",children:(0,n.jsx)(ec,{})})]}),e.isMobileWidth&&(0,n.jsx)(d.default,{href:"/",className:"content-center",children:(0,n.jsx)(I,{})}),e.isMobileWidth&&(0,n.jsx)(ec,{})]}),x&&!e.isMobileWidth&&f&&(0,n.jsx)("div",{className:"".concat(r().panelWrapper),children:(0,n.jsx)(eh,{setEnabled:h,subsetOrganizedData:c,organizedData:a,data:t,uploadedFiles:e.uploadedFiles,userProfile:x,conversationId:e.conversationId,isMobileWidth:e.isMobileWidth})}),!x&&f&&!e.isMobileWidth&&(0,n.jsxs)("div",{className:"".concat(r().panelWrapper),children:[(0,n.jsxs)(d.default,{href:"/",className:"flex flex-col content-start items-start no-underline",children:[(0,n.jsxs)(M.z,{variant:"ghost",children:[(0,n.jsx)(b.T,{className:"h-4 w-4 mr-1"}),"Home"]}),(0,n.jsxs)(M.z,{variant:"ghost",children:[(0,n.jsx)(_.E,{className:"h-4 w-4 mr-1"}),"New Conversation"]})]}),(0,n.jsxs)(d.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ",(0,n.jsxs)(M.z,{variant:"default",children:[(0,n.jsx)(v.B,{className:"h-4 w-4 mr-1"}),"Sign Up"]})]})]})]})}},6780:function(e,t,s){"use strict";s.d(t,{OL:function(){return p},_T:function(){return u},aR:function(){return i},f$:function(){return h},fY:function(){return f},le:function(){return j},xo:function(){return m},yT:function(){return x}});var n=s(57437),a=s(2265),r=s(76669),l=s(37440),o=s(50495);let i=r.fC;r.xz;let d=r.h_,c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.aV,{className:(0,l.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a,ref:t})});c.displayName=r.aV.displayName;let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsxs)(d,{children:[(0,n.jsx)(c,{}),(0,n.jsx)(r.VY,{ref:t,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a})]})});u.displayName=r.VY.displayName;let f=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,l.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...s})};f.displayName="AlertDialogHeader";let m=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,l.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};m.displayName="AlertDialogFooter";let h=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,l.cn)("text-lg font-semibold",s),...a})});h.displayName=r.Dx.displayName;let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",s),...a})});x.displayName=r.dk.displayName;let p=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.aU,{ref:t,className:(0,l.cn)((0,o.d)(),s),...a})});p.displayName=r.aU.displayName;let j=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.$j,{ref:t,className:(0,l.cn)((0,o.d)({variant:"outline"}),"mt-2 sm:mt-0",s),...a})});j.displayName=r.$j.displayName},50495:function(e,t,s){"use strict";s.d(t,{d:function(){return i},z:function(){return d}});var n=s(57437),a=s(2265),r=s(71538),l=s(12218),o=s(37440);let i=(0,l.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),d=a.forwardRef((e,t)=>{let{className:s,variant:a,size:l,asChild:d=!1,...c}=e,u=d?r.g7:"button";return(0,n.jsx)(u,{className:(0,o.cn)(i({variant:a,size:l,className:s})),ref:t,...c})});d.displayName="Button"},36013:function(e,t,s){"use strict";s.d(t,{Ol:function(){return o},SZ:function(){return d},Zb:function(){return l},aY:function(){return c},eW:function(){return u},ll:function(){return i}});var n=s(57437),a=s(2265),r=s(37440);let l=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",s),...a})});l.displayName="Card";let o=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",s),...a})});o.displayName="CardHeader";let i=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("h3",{ref:t,className:(0,r.cn)("text-2xl font-semibold leading-none tracking-tight",s),...a})});i.displayName="CardTitle";let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("p",{ref:t,className:(0,r.cn)("text-sm text-muted-foreground",s),...a})});d.displayName="CardDescription";let c=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("p-6 pt-0",s),...a})});c.displayName="CardContent";let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)("div",{ref:t,className:(0,r.cn)("flex items-center p-6 pt-0",s),...a})});u.displayName="CardFooter"},42491:function(e,t,s){"use strict";s.d(t,{di:function(){return p},e8:function(){return f},fu:function(){return h},m5:function(){return c},mY:function(){return d},rb:function(){return m},sZ:function(){return u},zz:function(){return x}});var n=s(57437),a=s(2265),r=s(35353),l=s(54817),o=s(37440),i=s(90837);let d=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.mY,{ref:t,className:(0,o.cn)("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...a})});d.displayName=r.mY.displayName;let c=e=>{let{children:t,...s}=e;return(0,n.jsx)(i.Vq,{...s,children:(0,n.jsx)(i.cZ,{className:"overflow-hidden p-0 shadow-lg",children:(0,n.jsx)(d,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t})})})},u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,n.jsx)(l.Z,{className:(0,o.cn)("mr-2 h-4 w-4 shrink-0 opacity-50",s)}),(0,n.jsx)(r.mY.Input,{ref:t,className:(0,o.cn)("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...a})]})});u.displayName=r.mY.Input.displayName;let f=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.mY.List,{ref:t,className:(0,o.cn)("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...a})});f.displayName=r.mY.List.displayName;let m=a.forwardRef((e,t)=>(0,n.jsx)(r.mY.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));m.displayName=r.mY.Empty.displayName;let h=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.mY.Group,{ref:t,className:(0,o.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...a})});h.displayName=r.mY.Group.displayName;let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.mY.Separator,{ref:t,className:(0,o.cn)("-mx-1 h-px bg-border",s),...a})});x.displayName=r.mY.Separator.displayName;let p=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.mY.Item,{ref:t,className:(0,o.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",s),...a})});p.displayName=r.mY.Item.displayName},90837:function(e,t,s){"use strict";s.d(t,{$N:function(){return x},Be:function(){return p},Vq:function(){return i},cN:function(){return h},cZ:function(){return f},fK:function(){return m},hg:function(){return d}});var n=s(57437),a=s(2265),r=s(13304),l=s(74697),o=s(37440);let i=r.fC,d=r.xz,c=r.h_;r.x8;let u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.aV,{ref:t,className:(0,o.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a})});u.displayName=r.aV.displayName;let f=a.forwardRef((e,t)=>{let{className:s,children:a,...i}=e;return(0,n.jsxs)(c,{children:[(0,n.jsx)(u,{}),(0,n.jsxs)(r.VY,{ref:t,className:(0,o.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...i,children:[a,(0,n.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});f.displayName=r.VY.displayName;let m=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...s})};m.displayName="DialogHeader";let h=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...s})};h.displayName="DialogFooter";let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,o.cn)("text-lg font-semibold leading-none tracking-tight",s),...a})});x.displayName=r.Dx.displayName;let p=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,o.cn)("text-sm text-muted-foreground",s),...a})});p.displayName=r.dk.displayName},7951:function(e,t,s){"use strict";s.d(t,{OX:function(){return m},Qz:function(){return i},dy:function(){return o},iI:function(){return x},sc:function(){return f},u6:function(){return p},uh:function(){return c},ze:function(){return h}});var n=s(57437),a=s(2265),r=s(37213),l=s(37440);let o=e=>{let{shouldScaleBackground:t=!0,...s}=e;return(0,n.jsx)(r.dy.Root,{shouldScaleBackground:t,...s})};o.displayName="Drawer";let i=r.dy.Trigger,d=r.dy.Portal,c=r.dy.Close,u=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.dy.Overlay,{ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-black/80",s),...a})});u.displayName=r.dy.Overlay.displayName;let f=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,n.jsxs)(d,{children:[(0,n.jsx)(u,{}),(0,n.jsxs)(r.dy.Content,{ref:t,className:(0,l.cn)("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",s),...o,children:[(0,n.jsx)("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),a]})]})});f.displayName="DrawerContent";let m=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,l.cn)("grid gap-1.5 p-4 text-center sm:text-left",t),...s})};m.displayName="DrawerHeader";let h=e=>{let{className:t,...s}=e;return(0,n.jsx)("div",{className:(0,l.cn)("mt-auto flex flex-col gap-2 p-4",t),...s})};h.displayName="DrawerFooter";let x=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.dy.Title,{ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",s),...a})});x.displayName=r.dy.Title.displayName;let p=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.dy.Description,{ref:t,className:(0,l.cn)("text-sm text-muted-foreground",s),...a})});p.displayName=r.dy.Description.displayName},46910:function(e,t,s){"use strict";s.d(t,{$F:function(){return u},AW:function(){return m},VD:function(){return p},Xi:function(){return h},_x:function(){return f},h_:function(){return c},qB:function(){return x}});var n=s(57437),a=s(2265),r=s(79219),l=s(87592),o=s(22468),i=s(28165),d=s(37440);let c=r.fC,u=r.xz;r.ZA,r.Uv,r.Tr;let f=r.Ee;a.forwardRef((e,t)=>{let{className:s,inset:a,children:o,...i}=e;return(0,n.jsxs)(r.fF,{ref:t,className:(0,d.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",s),...i,children:[o,(0,n.jsx)(l.Z,{className:"ml-auto h-4 w-4"})]})}).displayName=r.fF.displayName,a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.tu,{ref:t,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",s),...a})}).displayName=r.tu.displayName;let m=a.forwardRef((e,t)=>{let{className:s,sideOffset:a=4,...l}=e;return(0,n.jsx)(r.Uv,{children:(0,n.jsx)(r.VY,{ref:t,sideOffset:a,className:(0,d.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",s),...l})})});m.displayName=r.VY.displayName;let h=a.forwardRef((e,t)=>{let{className:s,inset:a,...l}=e;return(0,n.jsx)(r.ck,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",s),...l})});h.displayName=r.ck.displayName,a.forwardRef((e,t)=>{let{className:s,children:a,checked:l,...i}=e;return(0,n.jsxs)(r.oC,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:l,...i,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(r.wU,{children:(0,n.jsx)(o.Z,{className:"h-4 w-4"})})}),a]})}).displayName=r.oC.displayName;let x=a.forwardRef((e,t)=>{let{className:s,children:a,...l}=e;return(0,n.jsxs)(r.Rk,{ref:t,className:(0,d.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...l,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(r.wU,{children:(0,n.jsx)(i.Z,{className:"h-2 w-2 fill-current"})})}),a]})});x.displayName=r.Rk.displayName,a.forwardRef((e,t)=>{let{className:s,inset:a,...l}=e;return(0,n.jsx)(r.__,{ref:t,className:(0,d.cn)("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",s),...l})}).displayName=r.__.displayName;let p=a.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,n.jsx)(r.Z0,{ref:t,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",s),...a})});p.displayName=r.Z0.displayName},83102:function(e,t,s){"use strict";s.d(t,{I:function(){return l}});var n=s(57437),a=s(2265),r=s(37440);let l=a.forwardRef((e,t)=>{let{className:s,type:a,...l}=e;return(0,n.jsx)("input",{type:a,className:(0,r.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:t,...l})});l.displayName="Input"},19573:function(e,t,s){"use strict";s.d(t,{J2:function(){return o},xo:function(){return i},yk:function(){return d}});var n=s(57437),a=s(2265),r=s(61485),l=s(37440);let o=r.fC,i=r.xz,d=a.forwardRef((e,t)=>{let{className:s,align:a="center",sideOffset:o=4,...i}=e;return(0,n.jsx)(r.h_,{children:(0,n.jsx)(r.VY,{ref:t,align:a,sideOffset:o,className:(0,l.cn)("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...i})})});d.displayName=r.VY.displayName},94880:function(e,t,s){"use strict";s.d(t,{B:function(){return i},x:function(){return o}});var n=s(57437),a=s(2265),r=s(80023),l=s(37440);let o=a.forwardRef((e,t)=>{let{className:s,children:a,...o}=e;return(0,n.jsxs)(r.fC,{ref:t,className:(0,l.cn)("relative overflow-hidden",s),...o,children:[(0,n.jsx)(r.l_,{className:"h-full w-full rounded-[inherit]",children:a}),(0,n.jsx)(i,{}),(0,n.jsx)(r.Ns,{})]})});o.displayName=r.fC.displayName;let i=a.forwardRef((e,t)=>{let{className:s,orientation:a="vertical",...o}=e;return(0,n.jsx)(r.gb,{ref:t,orientation:a,className:(0,l.cn)("flex touch-none select-none transition-colors","vertical"===a&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===a&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...o,children:(0,n.jsx)(r.q4,{className:"relative flex-1 rounded-full bg-border"})})});i.displayName=r.gb.displayName},37440:function(e,t,s){"use strict";s.d(t,{cn:function(){return r}});var n=s(44839),a=s(96164);function r(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,a.m6)((0,n.W)(t))}},54764:function(e){e.exports={menu:"navMenu_menu__fqlFF",selected:"navMenu_selected__A__aP",titleBar:"navMenu_titleBar__HJoio",settingsMenuProfile:"navMenu_settingsMenuProfile__3npiK",settingsMenu:"navMenu_settingsMenu__X2i2U",settingsMenuOptions:"navMenu_settingsMenuOptions__KWnLv"}},88649:function(e){e.exports={session:"sidePanel_session__R9wgH",compressed:"sidePanel_compressed__YBPtM",sessionHover:"sidePanel_sessionHover__iwfo8",button:"sidePanel_button__ihOfG",showMoreButton:"sidePanel_showMoreButton__dt9Zw",panel:"sidePanel_panel__VZ8ye",expanded:"sidePanel_expanded__ZjTHo",collapsed:"sidePanel_collapsed__OjVmG",header:"sidePanel_header__d5cGA",profile:"sidePanel_profile__x0w58",panelWrapper:"sidePanel_panelWrapper__k_lal",modalSessionsList:"sidePanel_modalSessionsList__nKe2n",content:"sidePanel_content__Wq20_",singleReference:"sidePanel_singleReference__r9z1n"}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2697],{82697:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var s=n(57437),o=n(15238),a=n.n(o),i=n(2265),l=n(53423),r=n(94880),c=n(58485),u=n(16288),d=n(20721),g=n(26100),h=n(19666),m=n(50495),v=e=>{let{name:t,avatar:n,link:o,description:a}=e;return(0,s.jsx)("div",{className:"relative group flex",children:(0,s.jsx)(h.pn,{children:(0,s.jsxs)(h.u,{delayDuration:0,children:[(0,s.jsx)(h.aJ,{asChild:!0,children:(0,s.jsxs)(m.z,{variant:"ghost",className:"flex items-center justify-center",children:[n,(0,s.jsx)("div",{children:t})]})}),(0,s.jsx)(h._v,{children:(0,s.jsxs)("div",{className:"w-80 h-30",children:[(0,s.jsx)("a",{href:o,target:"_blank",rel:"noreferrer",className:"mt-1 ml-2 block no-underline",children:(0,s.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[n,(0,s.jsxs)("div",{className:"mr-2 mt-1 flex justify-center items-center text-sm font-semibold text-gray-800",children:[t,(0,s.jsx)(g.o,{weight:"bold",className:"ml-1"})]})]})}),a&&(0,s.jsx)("p",{className:"mt-2 ml-6 text-sm text-gray-600 line-clamp-2",children:a||"A Khoj agent"})]})})]})})})},f=n(89417),p=n(69591);function x(e){var t,n,o,g,h,m,x,b,y;let[j,M]=(0,i.useState)(null),[C,w]=(0,i.useState)(0),[N,_]=(0,i.useState)(!0),I=(0,i.useRef)(null),S=(0,i.useRef)(null),k=(0,i.useRef)(null),H=(0,i.useRef)(null),[T,E]=(0,i.useState)(null),[L,q]=(0,i.useState)(!1),[O,A]=(0,i.useState)(!0),R=(0,p.IC)(),Q="[data-radix-scroll-area-viewport]";(0,i.useEffect)(()=>{var e;let t=null===(e=S.current)||void 0===e?void 0:e.querySelector(Q);if(!t)return;let n=()=>{let{scrollTop:e,scrollHeight:n,clientHeight:s}=t;A(n-(e+s)<=50)};return t.addEventListener("scroll",n),()=>t.removeEventListener("scroll",n)},[]),(0,i.useEffect)(()=>{e.incomingMessages&&e.incomingMessages.length>0&&O&&Z()},[e.incomingMessages,O]),(0,i.useEffect)(()=>{j&&j.chat&&j.chat.length>0&&C<2&&requestAnimationFrame(()=>{var e;null===(e=k.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"})})},[j,C]),(0,i.useEffect)(()=>{if(!N||L)return;let t=new IntersectionObserver(t=>{t[0].isIntersecting&&N&&(q(!0),function(t){if(!N||L)return;let n=(t+1)*10,s="";if(e.conversationId)s="/api/chat/history?client=web&conversation_id=".concat(encodeURIComponent(e.conversationId),"&n=").concat(n);else{if(!e.publicConversationSlug)return;s="/api/chat/share/history?client=web&public_conversation_slug=".concat(e.publicConversationSlug,"&n=").concat(n)}fetch(s).then(e=>e.json()).then(n=>{if(e.setTitle(n.response.slug),n&&n.response&&n.response.chat&&n.response.chat.length>0){if(w(Math.ceil(n.response.chat.length/10)),n.response.chat.length===(null==j?void 0:j.chat.length)){_(!1),q(!1);return}e.setAgent(n.response.agent),M(n.response),q(!1),0===t?Z(!0):W()}else{if(n.response.agent&&n.response.conversation_id){let t={chat:[],agent:n.response.agent,conversation_id:n.response.conversation_id,slug:n.response.slug};e.setAgent(n.response.agent),M(t)}_(!1),q(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(C))},{threshold:1});return I.current&&t.observe(I.current),()=>t.disconnect()},[N,C,L]),(0,i.useEffect)(()=>{_(!0),q(!1),w(0),M(null)},[e.conversationId]),(0,i.useEffect)(()=>{if(e.incomingMessages){let t=e.incomingMessages[e.incomingMessages.length-1];t&&!t.completed&&(E(e.incomingMessages.length-1),e.setTitle(t.rawQuery))}},[e.incomingMessages]);let W=()=>{var e;let t=null===(e=S.current)||void 0===e?void 0:e.querySelector(Q);requestAnimationFrame(()=>{var e;null===(e=H.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"}),null==t||t.scrollBy({behavior:"smooth",top:-150})})},Z=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=null===(e=S.current)||void 0===e?void 0:e.querySelector(Q);requestAnimationFrame(()=>{null==n||n.scrollTo({top:n.scrollHeight,behavior:t?"auto":"smooth"})}),A(!0)};return e.conversationId||e.publicConversationSlug?(0,s.jsx)(r.x,{className:"h-[80vh] relative",ref:S,children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"".concat(a().chatHistory," ").concat(e.customClassName),children:[(0,s.jsx)("div",{ref:I,style:{height:"1px"},children:L&&(0,s.jsx)(c.l,{message:"Loading Conversation",className:"opacity-50"})}),j&&j.chat&&j.chat.map((e,t)=>{var n;return(0,s.jsx)(l.Z,{ref:t===j.chat.length-2?k:t===j.chat.length-(C-1)*10?H:null,isMobileWidth:R,chatMessage:e,customClassName:"fullHistory",borderLeftColor:"".concat(null==j?void 0:null===(n=j.agent)||void 0===n?void 0:n.color,"-500"),isLastMessage:t===j.chat.length-1},"".concat(t,"fullHistory"))}),e.incomingMessages&&e.incomingMessages.map((e,t)=>{var n,o,r;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(l.Z,{isMobileWidth:R,chatMessage:{message:e.rawQuery,context:[],onlineContext:{},created:e.timestamp,by:"you",automationId:"",images:e.images},customClassName:"fullHistory",borderLeftColor:"".concat(null==j?void 0:null===(n=j.agent)||void 0===n?void 0:n.color,"-500")},"".concat(t,"outgoing")),e.trainOfThought&&function(e,t,n,o){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=e.length-1;return(0,s.jsxs)("div",{className:"".concat(a().trainOfThought," shadow-sm"),children:[!i&&(0,s.jsx)(c.l,{className:"float-right"}),e.map((e,o)=>(0,s.jsx)(l.H,{message:e,primary:o===r&&t&&!i,agentColor:n},"train-".concat(o)))]},o)}(e.trainOfThought,t===T,(null==j?void 0:null===(o=j.agent)||void 0===o?void 0:o.color)||"orange","".concat(t,"trainOfThought"),e.completed),(0,s.jsx)(l.Z,{isMobileWidth:R,chatMessage:{message:e.rawResponse,context:e.context,onlineContext:e.onlineContext,created:e.timestamp,by:"khoj",automationId:"",rawQuery:e.rawQuery,intent:{type:e.intentType||"",query:e.rawQuery,"memory-type":"","inferred-queries":e.inferredQueries||[]}},customClassName:"fullHistory",borderLeftColor:"".concat(null==j?void 0:null===(r=j.agent)||void 0===r?void 0:r.color,"-500"),isLastMessage:!0},"".concat(t,"incoming"))]},"incomingMessage".concat(t))}),e.pendingMessage&&(0,s.jsx)(l.Z,{isMobileWidth:R,chatMessage:{message:e.pendingMessage,context:[],onlineContext:{},created:new Date().getTime().toString(),by:"you",automationId:""},customClassName:"fullHistory",borderLeftColor:"".concat(null==j?void 0:null===(t=j.agent)||void 0===t?void 0:t.color,"-500"),isLastMessage:!0},"pendingMessage-".concat(e.pendingMessage.length)),j&&(0,s.jsx)("div",{className:"".concat(a().agentIndicator," pb-4"),children:(0,s.jsx)("div",{className:"relative group mx-2 cursor-pointer",children:(0,s.jsx)(v,{name:j&&j.agent&&(null===(g=j.agent)||void 0===g?void 0:g.name)?null===(h=j.agent)||void 0===h?void 0:h.name:"Agent",link:j&&j.agent&&(null===(m=j.agent)||void 0===m?void 0:m.slug)?"/agents?agent=".concat(null===(x=j.agent)||void 0===x?void 0:x.slug):"/agents",avatar:(0,f.TI)(null===(n=j.agent)||void 0===n?void 0:n.icon,null===(o=j.agent)||void 0===o?void 0:o.color)||(0,s.jsx)(u.v,{}),description:j&&j.agent&&(null===(b=j.agent)||void 0===b?void 0:b.persona)?null===(y=j.agent)||void 0===y?void 0:y.persona:"Your agent is no longer available. You will be reset to the default agent."})})})]}),(0,s.jsx)("div",{className:"".concat(e.customClassName," fixed bottom-[15%] z-10"),children:!O&&(0,s.jsx)("button",{title:"Scroll to bottom",className:"absolute bottom-0 right-0 bg-white dark:bg-[hsl(var(--background))] text-neutral-500 dark:text-white p-2 rounded-full shadow-xl",onClick:()=>{Z(),A(!0)},children:(0,s.jsx)(d.K,{size:24})})})]})}):null}},15238:function(e){e.exports={chatHistory:"chatHistory_chatHistory__CoaVT",agentIndicator:"chatHistory_agentIndicator__wOU1f",trainOfThought:"chatHistory_trainOfThought__mMWSR"}}}]);