khoj 2.0.0b5__tar.gz → 2.0.0b6__tar.gz

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 (476) hide show
  1. {khoj-2.0.0b5 → khoj-2.0.0b6}/PKG-INFO +1 -1
  2. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/adapters/__init__.py +1 -2
  3. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/404/index.html +2 -2
  4. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/7127-0f4a2a77d97fb5fa.js +1 -0
  5. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/agents/layout-4e2a134ec26aa606.js +1 -0
  6. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/chat/layout-ad4d1792ab1a4108.js +1 -0
  7. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-2f7981f8fe4417ae.js → khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-714aad6bc4209c37.js +1 -1
  8. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/page-2025944ec1f80144.js → khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/page-2b3056cba8aa96ce.js +1 -1
  9. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/search/layout-c02531d586972d7d.js +1 -0
  10. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-e8e5db7830bf3f47.js +1 -0
  11. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/page-ee8ef5270163e7f2.js → khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/page-4a4b0c0f4749c2b2.js +1 -1
  12. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/webpack-ccb40c06ac7cb92f.js → khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/chunks/webpack-2d7431816511b8a5.js +1 -1
  13. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/css/23b26df423cd8a9c.css +1 -0
  14. khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/css/76c658ee459140a9.css +1 -0
  15. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/agents/index.html +2 -2
  16. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/agents/index.txt +1 -1
  17. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/automations/index.html +2 -2
  18. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/automations/index.txt +1 -1
  19. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/chat/index.html +2 -2
  20. khoj-2.0.0b6/src/khoj/interface/compiled/chat/index.txt +8 -0
  21. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/index.html +2 -2
  22. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/index.txt +2 -2
  23. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/search/index.html +2 -2
  24. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/search/index.txt +1 -1
  25. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/settings/index.html +2 -2
  26. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/settings/index.txt +1 -1
  27. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/share/chat/index.html +2 -2
  28. khoj-2.0.0b6/src/khoj/interface/compiled/share/chat/index.txt +8 -0
  29. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/google/gemini_chat.py +1 -1
  30. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/google/utils.py +21 -3
  31. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/openai/utils.py +33 -9
  32. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/tools/online_search.py +26 -11
  33. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/helpers.py +0 -3
  34. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/7127-aaf5c3c70609edc6.js +0 -1
  35. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/agents/layout-e3d72f0edda6aa0c.js +0 -1
  36. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/chat/layout-33934fc2d6ae6838.js +0 -1
  37. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/search/layout-4505b79deb734a30.js +0 -1
  38. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6fb51c5c80f8ec67.js +0 -1
  39. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/css/1d2ec813e8586a1b.css +0 -1
  40. khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/css/fc82e43baa9ae218.css +0 -1
  41. khoj-2.0.0b5/src/khoj/interface/compiled/chat/index.txt +0 -8
  42. khoj-2.0.0b5/src/khoj/interface/compiled/share/chat/index.txt +0 -8
  43. {khoj-2.0.0b5 → khoj-2.0.0b6}/.gitignore +0 -0
  44. {khoj-2.0.0b5 → khoj-2.0.0b6}/LICENSE +0 -0
  45. {khoj-2.0.0b5 → khoj-2.0.0b6}/README.md +0 -0
  46. {khoj-2.0.0b5 → khoj-2.0.0b6}/pyproject.toml +0 -0
  47. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/__init__.py +0 -0
  48. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/app/README.md +0 -0
  49. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/app/__init__.py +0 -0
  50. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/app/asgi.py +0 -0
  51. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/app/settings.py +0 -0
  52. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/app/urls.py +0 -0
  53. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/configure.py +0 -0
  54. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/__init__.py +0 -0
  55. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/admin.py +0 -0
  56. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/apps.py +0 -0
  57. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/management/__init__.py +0 -0
  58. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/management/commands/__init__.py +0 -0
  59. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/management/commands/change_default_model.py +0 -0
  60. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/management/commands/change_generated_images_url.py +0 -0
  61. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/management/commands/convert_images_png_to_webp.py +0 -0
  62. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/management/commands/delete_orphaned_fileobjects.py +0 -0
  63. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0001_khojuser.py +0 -0
  64. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0002_googleuser.py +0 -0
  65. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0003_vector_extension.py +0 -0
  66. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0004_content_types_and_more.py +0 -0
  67. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0005_embeddings_corpus_id.py +0 -0
  68. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0006_embeddingsdates.py +0 -0
  69. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0007_add_conversation.py +0 -0
  70. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0008_alter_conversation_conversation_log.py +0 -0
  71. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0009_khojapiuser.py +0 -0
  72. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0010_chatmodeloptions_and_more.py +0 -0
  73. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0010_rename_embeddings_entry_and_more.py +0 -0
  74. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0011_merge_20231102_0138.py +0 -0
  75. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0012_entry_file_source.py +0 -0
  76. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0013_subscription.py +0 -0
  77. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0014_alter_googleuser_picture.py +0 -0
  78. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0015_alter_subscription_user.py +0 -0
  79. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0016_alter_subscription_renewal_date.py +0 -0
  80. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0017_searchmodel.py +0 -0
  81. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0018_searchmodelconfig_delete_searchmodel.py +0 -0
  82. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0019_alter_googleuser_family_name_and_more.py +0 -0
  83. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0020_reflectivequestion.py +0 -0
  84. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0021_speechtotextmodeloptions_and_more.py +0 -0
  85. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0022_texttoimagemodelconfig.py +0 -0
  86. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0023_usersearchmodelconfig.py +0 -0
  87. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0024_alter_entry_embeddings.py +0 -0
  88. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0025_clientapplication_khojuser_phone_number_and_more.py +0 -0
  89. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0025_searchmodelconfig_embeddings_inference_endpoint_and_more.py +0 -0
  90. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0026_searchmodelconfig_cross_encoder_inference_endpoint_and_more.py +0 -0
  91. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0027_merge_20240118_1324.py +0 -0
  92. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0028_khojuser_verified_phone_number.py +0 -0
  93. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0029_userrequests.py +0 -0
  94. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0030_conversation_slug_and_title.py +0 -0
  95. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0031_agent_conversation_agent.py +0 -0
  96. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0031_alter_googleuser_locale.py +0 -0
  97. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0032_merge_20240322_0427.py +0 -0
  98. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0033_rename_tuning_agent_personality.py +0 -0
  99. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0034_alter_chatmodeloptions_chat_model.py +0 -0
  100. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0035_processlock.py +0 -0
  101. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0036_alter_processlock_name.py +0 -0
  102. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0036_delete_offlinechatprocessorconversationconfig.py +0 -0
  103. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0036_publicconversation.py +0 -0
  104. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0037_chatmodeloptions_openai_config_and_more.py +0 -0
  105. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0037_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +0 -0
  106. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0038_merge_20240425_0857.py +0 -0
  107. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0038_merge_20240426_1640.py +0 -0
  108. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0039_merge_20240501_0301.py +0 -0
  109. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0040_alter_processlock_name.py +0 -0
  110. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0040_merge_20240504_1010.py +0 -0
  111. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0041_merge_20240505_1234.py +0 -0
  112. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0042_serverchatsettings.py +0 -0
  113. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0043_alter_chatmodeloptions_model_type.py +0 -0
  114. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0044_conversation_file_filters.py +0 -0
  115. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0045_fileobject.py +0 -0
  116. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0046_khojuser_email_verification_code_and_more.py +0 -0
  117. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0047_alter_entry_file_type.py +0 -0
  118. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0048_voicemodeloption_uservoicemodelconfig.py +0 -0
  119. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0049_datastore.py +0 -0
  120. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0049_texttoimagemodelconfig_api_key_and_more.py +0 -0
  121. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0050_alter_processlock_name.py +0 -0
  122. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0051_merge_20240702_1220.py +0 -0
  123. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0052_alter_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +0 -0
  124. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0053_agent_style_color_agent_style_icon.py +0 -0
  125. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0054_alter_agent_style_color.py +0 -0
  126. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0055_alter_agent_style_icon.py +0 -0
  127. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0056_chatmodeloptions_vision_enabled.py +0 -0
  128. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0056_searchmodelconfig_cross_encoder_model_config.py +0 -0
  129. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0057_merge_20240816_1409.py +0 -0
  130. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0057_remove_serverchatsettings_default_model_and_more.py +0 -0
  131. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0058_alter_chatmodeloptions_chat_model.py +0 -0
  132. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0059_searchmodelconfig_bi_encoder_confidence_threshold.py +0 -0
  133. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0060_merge_20240905_1828.py +0 -0
  134. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0061_alter_chatmodeloptions_model_type.py +0 -0
  135. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0061_alter_texttoimagemodelconfig_model_type.py +0 -0
  136. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0062_merge_20240913_0222.py +0 -0
  137. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0063_conversation_temp_id.py +0 -0
  138. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0064_remove_conversation_temp_id_alter_conversation_id.py +0 -0
  139. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0065_remove_agent_avatar_remove_agent_public_and_more.py +0 -0
  140. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0066_remove_agent_tools_agent_input_tools_and_more.py +0 -0
  141. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0067_alter_agent_style_icon.py +0 -0
  142. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0068_alter_agent_output_modes.py +0 -0
  143. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0069_webscraper_serverchatsettings_web_scraper.py +0 -0
  144. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0070_alter_agent_input_tools_alter_agent_output_modes.py +0 -0
  145. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0071_subscription_enabled_trial_at_and_more.py +0 -0
  146. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0072_entry_search_model.py +0 -0
  147. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0073_delete_usersearchmodelconfig.py +0 -0
  148. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0074_alter_conversation_title.py +0 -0
  149. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0075_migrate_generated_assets_and_validate.py +0 -0
  150. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0076_rename_openaiprocessorconversationconfig_aimodelapi_and_more.py +0 -0
  151. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0077_chatmodel_alter_agent_chat_model_and_more.py +0 -0
  152. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0078_khojuser_email_verification_code_expiry.py +0 -0
  153. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0079_entry_file_object.py +0 -0
  154. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0079_searchmodelconfig_embeddings_inference_endpoint_type.py +0 -0
  155. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0080_speechtotextmodeloptions_ai_model_api.py +0 -0
  156. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0081_agent_is_hidden_chatmodel_description_and_more.py +0 -0
  157. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0081_merge_20250120_1633.py +0 -0
  158. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0082_merge_20250121_1842.py +0 -0
  159. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0083_alter_agent_output_modes_alter_agent_personality_and_more.py +0 -0
  160. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0084_alter_agent_input_tools.py +0 -0
  161. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0085_alter_agent_output_modes.py +0 -0
  162. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0086_alter_texttoimagemodelconfig_model_type.py +0 -0
  163. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0087_alter_aimodelapi_api_key.py +0 -0
  164. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0088_ratelimitrecord.py +0 -0
  165. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0089_chatmodel_price_tier_and_more.py +0 -0
  166. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0090_alter_khojuser_uuid.py +0 -0
  167. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/0091_chatmodel_friendly_name_and_more.py +0 -0
  168. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/migrations/__init__.py +0 -0
  169. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/models/__init__.py +0 -0
  170. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/database/tests.py +0 -0
  171. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/1191.b547ec13349b4aed.js +0 -0
  172. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/1327-1a9107b9a2a04a98.js +0 -0
  173. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/1588.f0558a0bdffc4761.js +0 -0
  174. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/1915-5c6508f6ebb62a30.js +0 -0
  175. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/1918.925cb4a35518d258.js +0 -0
  176. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/2117-080746c8e170c81a.js +0 -0
  177. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/2242.9a07e19f1a3a8b16.js +0 -0
  178. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/2327-ea623ca2d22f78e9.js +0 -0
  179. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/2612.bcf5a623b3da209e.js +0 -0
  180. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/2849.dc00ae5ba7219cfc.js +0 -0
  181. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/2939-4af3fd24b8ffc9ad.js +0 -0
  182. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/303.fe76de943e930fbd.js +0 -0
  183. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/3265.924139c4146ee344.js +0 -0
  184. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/3489.c523fe96a2eee74f.js +0 -0
  185. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/3592-b2a2444b0ec7b119.js +0 -0
  186. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/3595-ac8e81e04ecb89cb.js +0 -0
  187. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4327.8d2a1b8f1ea78208.js +0 -0
  188. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4447-cd95608f8e93e711.js +0 -0
  189. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4533.586e74b45a2bde25.js +0 -0
  190. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4551.82ce1476b5516bc2.js +0 -0
  191. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4609-33aa487dff03a9fd.js +0 -0
  192. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4610.196691887afb7fea.js +0 -0
  193. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4748.0edd37cba3ea2809.js +0 -0
  194. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/4980.63500d68b3bb1222.js +0 -0
  195. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5210.cd35a1c1ec594a20.js +0 -0
  196. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5303-c65c9c6aeb263a0d.js +0 -0
  197. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5329.f8b3c5b3d16159cd.js +0 -0
  198. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5427-13d6ffd380fdfab7.js +0 -0
  199. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5477-18323501c445315e.js +0 -0
  200. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/558-c14e76cff03f6a60.js +0 -0
  201. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5639-09e2009a2adedf8b.js +0 -0
  202. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/5830.8876eccb82da9b7d.js +0 -0
  203. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/6230.88a71d8145347b3f.js +0 -0
  204. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/6434.e6cd986d690f2cef.js +0 -0
  205. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/7161.77e0530a40ad5ca8.js +0 -0
  206. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/7200-ac3b2e37ff30e126.js +0 -0
  207. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/7303.d0612f812a967a08.js +0 -0
  208. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/7505.c31027a3695bdebb.js +0 -0
  209. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/7760.35649cc21d9585bd.js +0 -0
  210. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/83.48e2db193a940052.js +0 -0
  211. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8427.844694e06133fb51.js +0 -0
  212. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8665.4db7e6b2e8933497.js +0 -0
  213. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8667-50b03a89e82e0ba7.js +0 -0
  214. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8694.2bd9c2f65d8c5847.js +0 -0
  215. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/872.caf84cc1a39ae59f.js +0 -0
  216. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8888.ebe0e552b59e7fed.js +0 -0
  217. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8890.6e8a59e4de6978bc.js +0 -0
  218. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/8950.5f2272e0ac923f9e.js +0 -0
  219. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/90542734.2c21f16f18b22411.js +0 -0
  220. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9202.c703864fcedc8d1f.js +0 -0
  221. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9245.a04e92d034540234.js +0 -0
  222. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9320.6aca4885d541aa44.js +0 -0
  223. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/945-74376499b067d28e.js +0 -0
  224. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/94ca1967.1b3402358e0e1255.js +0 -0
  225. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9535.f78cd92d03331e55.js +0 -0
  226. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9537-d9ab442ce15d1e20.js +0 -0
  227. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9568-0d60ac475f4cc538.js +0 -0
  228. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/964ecbae.d5be7c49c320d695.js +0 -0
  229. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/9968.b111fc002796da81.js +0 -0
  230. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/_not-found/page-84f94d15b2da4eac.js +0 -0
  231. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/agents/page-9a4610474cd59a71.js +0 -0
  232. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/automations/layout-63603d2cb33279f7.js +0 -0
  233. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/automations/page-f7bb9d777b7745d4.js +0 -0
  234. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/layout-c2de87a25fededbb.js +0 -0
  235. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/search/page-4885df3cd175c957.js +0 -0
  236. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/settings/layout-f88cedfe9ad4df7c.js +0 -0
  237. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/app/settings/page-8be3b35178abf2ec.js +0 -0
  238. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/d3ac728e-4c56e7f41db266b7.js +0 -0
  239. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/f3e3247b-1758d4651e4457c2.js +0 -0
  240. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/fd9d1056-aa94101ec5388dba.js +0 -0
  241. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js +0 -0
  242. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js +0 -0
  243. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/main-fc8e0fefa2ef3d8c.js +0 -0
  244. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js +0 -0
  245. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js +0 -0
  246. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -0
  247. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/3090706713c12a32.css +0 -0
  248. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/37a73b87f02df402.css +0 -0
  249. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/5b28ced915454767.css +0 -0
  250. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/7889a30fe9c83846.css +0 -0
  251. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/c34713c98384ee87.css +0 -0
  252. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/db7d90554f3ab82b.css +0 -0
  253. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/css/ea5485b3f3859a5a.css +0 -0
  254. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2 +0 -0
  255. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/2aa11a72f7f24b58-s.woff2 +0 -0
  256. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/383a65b63658737d-s.woff2 +0 -0
  257. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/40381518f67e6cb9-s.p.woff2 +0 -0
  258. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/6f22fce21a7c433c-s.woff2 +0 -0
  259. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/77c207b095007c34-s.p.woff2 +0 -0
  260. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/82ef96de0e8f4d8c-s.p.woff2 +0 -0
  261. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/85fe2766c5e6072a-s.woff2 +0 -0
  262. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/8a6e4d7cd15e805a-s.woff2 +0 -0
  263. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
  264. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
  265. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
  266. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
  267. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
  268. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
  269. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
  270. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
  271. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
  272. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
  273. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
  274. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
  275. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
  276. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
  277. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
  278. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
  279. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
  280. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
  281. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
  282. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
  283. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
  284. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
  285. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
  286. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
  287. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
  288. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
  289. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
  290. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
  291. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
  292. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
  293. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
  294. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
  295. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
  296. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
  297. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
  298. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
  299. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
  300. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
  301. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
  302. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
  303. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
  304. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
  305. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
  306. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
  307. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
  308. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
  309. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
  310. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
  311. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
  312. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
  313. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
  314. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
  315. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
  316. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
  317. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
  318. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
  319. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
  320. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
  321. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
  322. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
  323. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/a6ecd16fa044d500-s.p.woff2 +0 -0
  324. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2 +0 -0
  325. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/c32c8052c071fc42-s.woff2 +0 -0
  326. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/c4250770ab8708b6-s.p.woff2 +0 -0
  327. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp +0 -0
  328. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp +0 -0
  329. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/globe.98e105ca.webp +0 -0
  330. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp +0 -0
  331. {khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/dcmPjmptCjq-wVkHMyE3t → khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/rJstCbqWCWL11UqVtay74}/_buildManifest.js +0 -0
  332. {khoj-2.0.0b5/src/khoj/interface/compiled/_next/static/dcmPjmptCjq-wVkHMyE3t → khoj-2.0.0b6/src/khoj/interface/compiled/_next/static/rJstCbqWCWL11UqVtay74}/_ssgManifest.js +0 -0
  333. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/agents.svg +0 -0
  334. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern.ico +0 -0
  335. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern.svg +0 -0
  336. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png +0 -0
  337. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png +0 -0
  338. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern_128x128_dark.png +0 -0
  339. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png +0 -0
  340. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern_512x512.png +0 -0
  341. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/icons/khoj_lantern_logomarktype_1200x630.png +0 -0
  342. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/samples/desktop-browse-draw-sample.png +0 -0
  343. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/samples/desktop-plain-chat-sample.png +0 -0
  344. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png +0 -0
  345. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png +0 -0
  346. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png +0 -0
  347. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png +0 -0
  348. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/automation.svg +0 -0
  349. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/chat.svg +0 -0
  350. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/close.svg +0 -0
  351. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/copy-button-success.svg +0 -0
  352. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/copy-button.svg +0 -0
  353. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/khoj.webmanifest +0 -0
  354. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/logo.svg +0 -0
  355. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/send.svg +0 -0
  356. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/share.svg +0 -0
  357. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/thumbs-down.svg +0 -0
  358. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/compiled/thumbs-up.svg +0 -0
  359. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/email/feedback.html +0 -0
  360. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/email/magic_link.html +0 -0
  361. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/email/task.html +0 -0
  362. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/email/welcome.html +0 -0
  363. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/.well-known/assetlinks.json +0 -0
  364. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/agents.svg +0 -0
  365. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/automation.svg +0 -0
  366. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/chat.svg +0 -0
  367. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/github.svg +0 -0
  368. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/khoj-logo-sideways-200.png +0 -0
  369. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/khoj-logo-sideways-500.png +0 -0
  370. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/khoj-logo-sideways.svg +0 -0
  371. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/khoj.svg +0 -0
  372. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/logotype.svg +0 -0
  373. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/search.svg +0 -0
  374. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/icons/sync.svg +0 -0
  375. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/khoj.css +0 -0
  376. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/assets/utils.js +0 -0
  377. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/base_config.html +0 -0
  378. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/content_source_github_input.html +0 -0
  379. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/login.html +0 -0
  380. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/interface/web/utils.html +0 -0
  381. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/main.py +0 -0
  382. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/manage.py +0 -0
  383. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/__init__.py +0 -0
  384. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_offline_chat_default_model.py +0 -0
  385. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_offline_chat_default_model_2.py +0 -0
  386. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_offline_chat_schema.py +0 -0
  387. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_offline_model.py +0 -0
  388. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_processor_config_openai.py +0 -0
  389. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_server_pg.py +0 -0
  390. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/migrations/migrate_version.py +0 -0
  391. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/__init__.py +0 -0
  392. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/__init__.py +0 -0
  393. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/docx/__init__.py +0 -0
  394. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/docx/docx_to_entries.py +0 -0
  395. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/github/__init__.py +0 -0
  396. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/github/github_to_entries.py +0 -0
  397. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/images/__init__.py +0 -0
  398. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/images/image_to_entries.py +0 -0
  399. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/markdown/__init__.py +0 -0
  400. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/markdown/markdown_to_entries.py +0 -0
  401. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/notion/notion_to_entries.py +0 -0
  402. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/org_mode/__init__.py +0 -0
  403. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/org_mode/org_to_entries.py +0 -0
  404. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/org_mode/orgnode.py +0 -0
  405. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/pdf/__init__.py +0 -0
  406. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/pdf/pdf_to_entries.py +0 -0
  407. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/plaintext/__init__.py +0 -0
  408. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/plaintext/plaintext_to_entries.py +0 -0
  409. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/content/text_to_entries.py +0 -0
  410. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/__init__.py +0 -0
  411. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/anthropic/__init__.py +0 -0
  412. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/anthropic/anthropic_chat.py +0 -0
  413. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/anthropic/utils.py +0 -0
  414. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/google/__init__.py +0 -0
  415. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/offline/__init__.py +0 -0
  416. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/offline/chat_model.py +0 -0
  417. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/offline/utils.py +0 -0
  418. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/offline/whisper.py +0 -0
  419. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/openai/__init__.py +0 -0
  420. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/openai/gpt.py +0 -0
  421. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/openai/whisper.py +0 -0
  422. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/prompts.py +0 -0
  423. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/conversation/utils.py +0 -0
  424. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/embeddings.py +0 -0
  425. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/image/generate.py +0 -0
  426. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/README.md +0 -0
  427. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/__init__.py +0 -0
  428. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/grounding_agent.py +0 -0
  429. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/grounding_agent_uitars.py +0 -0
  430. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_actions.py +0 -0
  431. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_agent_anthropic.py +0 -0
  432. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_agent_base.py +0 -0
  433. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_agent_binary.py +0 -0
  434. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_agent_openai.py +0 -0
  435. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_environment_base.py +0 -0
  436. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_environment_browser.py +0 -0
  437. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/operator/operator_environment_computer.py +0 -0
  438. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/speech/__init__.py +0 -0
  439. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/speech/text_to_speech.py +0 -0
  440. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/tools/__init__.py +0 -0
  441. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/processor/tools/run_code.py +0 -0
  442. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/__init__.py +0 -0
  443. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api.py +0 -0
  444. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_agents.py +0 -0
  445. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_automation.py +0 -0
  446. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_chat.py +0 -0
  447. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_content.py +0 -0
  448. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_model.py +0 -0
  449. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_phone.py +0 -0
  450. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/api_subscription.py +0 -0
  451. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/auth.py +0 -0
  452. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/email.py +0 -0
  453. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/helpers.py +0 -0
  454. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/notion.py +0 -0
  455. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/research.py +0 -0
  456. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/storage.py +0 -0
  457. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/twilio.py +0 -0
  458. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/routers/web_client.py +0 -0
  459. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_filter/__init__.py +0 -0
  460. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_filter/base_filter.py +0 -0
  461. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_filter/date_filter.py +0 -0
  462. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_filter/file_filter.py +0 -0
  463. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_filter/word_filter.py +0 -0
  464. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_type/__init__.py +0 -0
  465. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/search_type/text_search.py +0 -0
  466. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/__init__.py +0 -0
  467. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/cli.py +0 -0
  468. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/config.py +0 -0
  469. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/constants.py +0 -0
  470. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/fs_syncer.py +0 -0
  471. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/initialization.py +0 -0
  472. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/jsonl.py +0 -0
  473. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/models.py +0 -0
  474. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/rawconfig.py +0 -0
  475. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/state.py +0 -0
  476. {khoj-2.0.0b5 → khoj-2.0.0b6}/src/khoj/utils/yaml.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: khoj
3
- Version: 2.0.0b5
3
+ Version: 2.0.0b6
4
4
  Summary: Your Second Brain
5
5
  Project-URL: Homepage, https://khoj.dev
6
6
  Project-URL: Documentation, https://docs.khoj.dev
@@ -703,8 +703,7 @@ class AgentAdapters:
703
703
  if agent.creator != user:
704
704
  return False
705
705
 
706
- async for entry in Entry.objects.filter(agent=agent).aiterator():
707
- await entry.adelete()
706
+ await Entry.objects.filter(agent=agent).adelete()
708
707
 
709
708
  if agent:
710
709
  await agent.adelete()
@@ -1,8 +1,8 @@
1
- <!DOCTYPE html><html lang="en" class="__variable_f36179 __variable_386ca1"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/1d8a05b60287ae6c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/40381518f67e6cb9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/77c207b095007c34-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/82ef96de0e8f4d8c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/a6ecd16fa044d500-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c4250770ab8708b6-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/7889a30fe9c83846.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/3090706713c12a32.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5b28ced915454767.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ccb40c06ac7cb92f.js"/><script src="/_next/static/chunks/fd9d1056-aa94101ec5388dba.js" async=""></script><script src="/_next/static/chunks/2117-080746c8e170c81a.js" async=""></script><script src="/_next/static/chunks/main-app-de1f09df97a3cfc7.js" async=""></script><script src="/_next/static/chunks/7200-ac3b2e37ff30e126.js" async=""></script><script src="/_next/static/chunks/app/layout-c2de87a25fededbb.js" async=""></script><meta name="robots" content="noindex"/><meta http-equiv="Content-Security-Policy" content="default-src &#x27;self&#x27; https://assets.khoj.dev; media-src * blob:; script-src &#x27;self&#x27; https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com &#x27;unsafe-inline&#x27; &#x27;unsafe-eval&#x27;; connect-src &#x27;self&#x27; blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src &#x27;self&#x27; https://assets.khoj.dev &#x27;unsafe-inline&#x27; https://fonts.googleapis.com https://accounts.google.com; img-src &#x27;self&#x27; data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src &#x27;self&#x27; https://assets.khoj.dev https://fonts.gstatic.com; frame-src &#x27;self&#x27; https://accounts.google.com https://app.chatwoot.com; child-src &#x27;self&#x27; https://app.chatwoot.com; object-src &#x27;none&#x27;;"/><title>404: This page could not be found.</title><title>Khoj AI - Ask Anything</title><meta name="description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta name="keywords" content="research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant"/><meta property="og:title" content="Khoj AI"/><meta property="og:description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><meta property="og:url" content="https://app.khoj.dev/"/><meta property="og:site_name" content="Khoj AI"/><meta property="og:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta property="og:image:width" content="940"/><meta property="og:image:height" content="525"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta property="og:image:width" content="256"/><meta property="og:image:height" content="256"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Khoj AI"/><meta name="twitter:description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta name="twitter:image:width" content="940"/><meta name="twitter:image:height" content="525"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta name="twitter:image:width" content="256"/><meta name="twitter:image:height" content="256"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/static/assets/icons/khoj_lantern.ico"/><link rel="apple-touch-icon" href="/static/assets/icons/khoj_lantern_256x256.png"/><meta name="next-size-adjust"/><script>
1
+ <!DOCTYPE html><html lang="en" class="__variable_f36179 __variable_386ca1"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/1d8a05b60287ae6c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/40381518f67e6cb9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/77c207b095007c34-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/82ef96de0e8f4d8c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/a6ecd16fa044d500-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c4250770ab8708b6-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/7889a30fe9c83846.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/3090706713c12a32.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5b28ced915454767.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-2d7431816511b8a5.js"/><script src="/_next/static/chunks/fd9d1056-aa94101ec5388dba.js" async=""></script><script src="/_next/static/chunks/2117-080746c8e170c81a.js" async=""></script><script src="/_next/static/chunks/main-app-de1f09df97a3cfc7.js" async=""></script><script src="/_next/static/chunks/7200-ac3b2e37ff30e126.js" async=""></script><script src="/_next/static/chunks/app/layout-c2de87a25fededbb.js" async=""></script><meta name="robots" content="noindex"/><meta http-equiv="Content-Security-Policy" content="default-src &#x27;self&#x27; https://assets.khoj.dev; media-src * blob:; script-src &#x27;self&#x27; https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com &#x27;unsafe-inline&#x27; &#x27;unsafe-eval&#x27;; connect-src &#x27;self&#x27; blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src &#x27;self&#x27; https://assets.khoj.dev &#x27;unsafe-inline&#x27; https://fonts.googleapis.com https://accounts.google.com; img-src &#x27;self&#x27; data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src &#x27;self&#x27; https://assets.khoj.dev https://fonts.gstatic.com; frame-src &#x27;self&#x27; https://accounts.google.com https://app.chatwoot.com; child-src &#x27;self&#x27; https://app.chatwoot.com; object-src &#x27;none&#x27;;"/><title>404: This page could not be found.</title><title>Khoj AI - Ask Anything</title><meta name="description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta name="keywords" content="research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant"/><meta property="og:title" content="Khoj AI"/><meta property="og:description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><meta property="og:url" content="https://app.khoj.dev/"/><meta property="og:site_name" content="Khoj AI"/><meta property="og:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta property="og:image:width" content="940"/><meta property="og:image:height" content="525"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta property="og:image:width" content="256"/><meta property="og:image:height" content="256"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Khoj AI"/><meta name="twitter:description" content="Khoj is a personal research assistant. It helps you understand better and create faster."/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta name="twitter:image:width" content="940"/><meta name="twitter:image:height" content="525"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta name="twitter:image:width" content="256"/><meta name="twitter:image:height" content="256"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png"/><meta name="twitter:image:width" content="1200"/><meta name="twitter:image:height" content="630"/><link rel="icon" href="/static/assets/icons/khoj_lantern.ico"/><link rel="apple-touch-icon" href="/static/assets/icons/khoj_lantern_256x256.png"/><meta name="next-size-adjust"/><script>
2
2
  try {
3
3
  if (localStorage.getItem('theme') === 'dark' ||
4
4
  (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
5
5
  document.documentElement.classList.add('dark');
6
6
  }
7
7
  } catch (e) {}
8
- </script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-ccb40c06ac7cb92f.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/1d8a05b60287ae6c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/40381518f67e6cb9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/7889a30fe9c83846.css\",\"style\"]\n9:HL[\"/_next/static/css/3090706713c12a32.css\",\"style\"]\na:HL[\"/_next/static/css/5b28ced915454767.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"b:I[12846,[],\"\"]\nd:I[4707,[],\"\"]\ne:I[36423,[],\"\"]\nf:I[85147,[\"7200\",\"static/chunks/7200-ac3b2e37ff30e126.js\",\"3185\",\"static/chunks/app/layout-c2de87a25fededbb.js\"],\"ThemeProvider\"]\n15:I[61060,[],\"\"]\n10:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n11:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n12:{\"display\":\"inline-block\"}\n13:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n16:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Lb\",null,{\"buildId\":\"dcmPjmptCjq-wVkHMyE3t\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$Lc\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7889a30fe9c83846.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3090706713c12a32.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5b28ced915454767.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_386ca1\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$10\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$11\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$12\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$13\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L14\"],\"globalErrorComponent\":\"$15\",\"missingSlots\":\"$W16\"}]\n"])</script><script>self.__next_f.push([1,"14:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Ask Anything\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"keywords\",\"content\":\"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"18\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"19\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"25\",{\"name\":\"twitter:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"26\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"28\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"29\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"30\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"31\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"32\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"33\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"34\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"c:null\n"])</script></body></html>
8
+ </script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-2d7431816511b8a5.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/1d8a05b60287ae6c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/40381518f67e6cb9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/7889a30fe9c83846.css\",\"style\"]\n9:HL[\"/_next/static/css/3090706713c12a32.css\",\"style\"]\na:HL[\"/_next/static/css/5b28ced915454767.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"b:I[12846,[],\"\"]\nd:I[4707,[],\"\"]\ne:I[36423,[],\"\"]\nf:I[85147,[\"7200\",\"static/chunks/7200-ac3b2e37ff30e126.js\",\"3185\",\"static/chunks/app/layout-c2de87a25fededbb.js\"],\"ThemeProvider\"]\n15:I[61060,[],\"\"]\n10:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n11:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n12:{\"display\":\"inline-block\"}\n13:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n16:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Lb\",null,{\"buildId\":\"rJstCbqWCWL11UqVtay74\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$Lc\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/7889a30fe9c83846.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/3090706713c12a32.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"2\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5b28ced915454767.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_386ca1\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$Ld\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Le\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$10\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$11\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$12\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$13\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L14\"],\"globalErrorComponent\":\"$15\",\"missingSlots\":\"$W16\"}]\n"])</script><script>self.__next_f.push([1,"14:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Ask Anything\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"keywords\",\"content\":\"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"17\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"18\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"19\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:description\",\"content\":\"Khoj is a personal research assistant. It helps you understand better and create faster.\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"25\",{\"name\":\"twitter:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"26\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"28\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"29\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"30\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"31\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"32\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"33\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"34\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"c:null\n"])</script></body></html>
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7127],{27127:function(e,t,a){"use strict";a.d(t,{Z:function(){return eO}});var n=a(57437),s=a(42501),o=a.n(s),r=a(2265),l=a(48614),c=a(14368),i=a(91499),d=a.n(i),h=a(19983),u=a(13506),g=a.n(u),m=a(34040);a(2446);var f=a(37052),p=a(19273),x=a(3244),v=a(4235),j=a(66070),y=a(69304),w=a(57054),b=a(18848),M=a(42225),N=a(27648);let C=new h.Z({html:!0,linkify:!0,typographer:!0});function _(e){let t=(0,M.Le)(e.title||".txt","w-6 h-6 text-muted-foreground inline-flex mr-2"),a=e.title.split("/").pop()||e.title,s=function(e){let t=["org","md","markdown"].includes(e.title.split(".").pop()||"")?e.content.split("\n").slice(1).join("\n"):e.content;return e.showFullContent?b.Z.sanitize(C.render(t)):b.Z.sanitize(t)}(e),[o,l]=(0,r.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(w.J2,{open:o&&!e.showFullContent,onOpenChange:l,children:[(0,n.jsx)(w.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:"".concat(e.showFullContent?"w-auto bg-muted":"w-auto"," overflow-hidden break-words text-balance rounded-lg border-none p-2 shadow-none"),children:e.showFullContent?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("h3",{className:"".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground}"),children:[t,e.showFullContent?e.title:a]}),(0,n.jsx)("p",{className:"text-sm overflow-x-auto block",dangerouslySetInnerHTML:{__html:s}})]}):(0,n.jsx)(T,{type:"notes"},"".concat(e.title))})}),(0,n.jsx)(w.yk,{className:"w-[400px] mx-2",children:(0,n.jsxs)(j.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none p-2",children:[(0,n.jsxs)("h3",{className:"line-clamp-2 text-muted-foreground}",children:[t,e.title]}),(0,n.jsx)("p",{className:"border-t mt-1 pt-1 text-sm overflow-hidden line-clamp-5",dangerouslySetInnerHTML:{__html:s}})]})})]})})}function k(e){var t,a,s,o,l,c;let i=(0,M.Le)(".py","!w-4 h-4 text-muted-foreground flex-shrink-0"),d=b.Z.sanitize(e.code),[h,u]=(0,r.useState)(!1),[g,m]=(0,r.useState)(!1),p=e=>{let t="text/plain",a=e.b64_data;e.filename.match(/\.(png|jpg|jpeg|webp)$/)?(t="image/".concat(e.filename.split(".").pop()),a=atob(e.b64_data)):e.filename.endsWith(".json")?t="application/json":e.filename.endsWith(".csv")&&(t="text/csv");let n=new ArrayBuffer(a.length),s=new Uint8Array(n);for(let e=0;e<a.length;e++)s[e]=a.charCodeAt(e);let o=new Blob([n],{type:t}),r=URL.createObjectURL(o),l=document.createElement("a");l.href=r,l.download=e.filename,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r)},x=(t,a)=>(null==t?void 0:t.length)==0?null:(0,n.jsx)("div",{className:"".concat(a||e.showFullContent?"border-t mt-1 pt-1":void 0),children:t.slice(0,e.showFullContent?void 0:1).map((t,s)=>(0,n.jsxs)("div",{children:[(0,n.jsxs)("h4",{className:"text-sm text-muted-foreground flex items-center",children:[(0,n.jsx)("span",{className:"overflow-hidden mr-2 font-bold ".concat(e.showFullContent?void 0:"line-clamp-1"),children:t.filename}),(0,n.jsx)("button",{className:"".concat(a?"hidden":void 0),onClick:e=>{e.preventDefault(),p(t)},onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),title:"Download file: ".concat(t.filename),children:(0,n.jsx)(f.b,{className:"w-4 h-4",weight:g?"fill":"regular"})})]}),t.filename.match(/\.(txt|org|md|csv|json)$/)?(0,n.jsx)("pre",{className:"".concat(e.showFullContent?"block":"line-clamp-2"," text-sm mt-1 p-1 bg-background rounded overflow-x-auto"),children:t.b64_data}):t.filename.match(/\.(png|jpg|jpeg|webp)$/)?(0,n.jsx)("img",{src:"data:image/".concat(t.filename.split(".").pop(),";base64,").concat(t.b64_data),alt:t.filename,className:"mt-1 max-h-32 rounded"}):null]},"".concat(t.filename,"-").concat(s)))});return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(w.J2,{open:h&&!e.showFullContent,onOpenChange:u,children:[(0,n.jsx)(w.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),className:"".concat(e.showFullContent?"w-auto bg-muted":"w-auto"," overflow-hidden break-words text-balance rounded-lg border-none p-2 shadow-none"),children:e.showFullContent?(0,n.jsxs)("div",{className:"flex flex-col px-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[i,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(t=e.output_files)||void 0===t?void 0:t.length)>0?"artifacts":""]})]}),(0,n.jsx)("pre",{className:"text-xs pb-2 ".concat(e.showFullContent?"block overflow-x-auto":(null===(a=e.output_files)||void 0===a?void 0:a.length)>0?"hidden":"overflow-hidden line-clamp-3"),children:d}),(null===(s=e.output_files)||void 0===s?void 0:s.length)>0&&x(e.output_files,!1)]}):(0,n.jsx)(T,{type:"code"},"code-".concat(e.code))})}),(0,n.jsx)(w.yk,{className:"w-[400px] mx-2",children:(0,n.jsxs)(j.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none p-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[i,(0,n.jsxs)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:["code ",(null===(o=e.output_files)||void 0===o?void 0:o.length)>0?"artifact":""]})]}),(null===(l=e.output_files)||void 0===l?void 0:l.length)>0&&x(null===(c=e.output_files)||void 0===c?void 0:c.slice(0,1),!0)||(0,n.jsx)("pre",{className:"text-xs border-t mt-1 pt-1 overflow-hidden line-clamp-10",children:d})]})})]})})}function R(e){let[t,a]=(0,r.useState)(!1);if(!e.link||e.link.split(" ").length>1)return null;let s="https://www.google.com/s2/favicons?domain=globe",o="unknown";try{o=new URL(e.link).hostname,s="https://www.google.com/s2/favicons?domain=".concat(o)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(w.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,n.jsx)(w.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},className:"".concat(e.showFullContent?"w-auto bg-muted":"w-auto"," overflow-hidden break-words text-balance rounded-lg border-none p-2 shadow-none"),children:e.showFullContent?(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)(N.default,{href:e.link,children:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("img",{src:s,alt:"",className:"!w-4 h-4 flex-shrink-0"}),(0,n.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground flex-grow"),children:o})]})}),(0,n.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," font-bold"),children:e.title}),(0,n.jsx)("p",{className:"overflow-hidden text-sm ".concat(e.showFullContent?"block":"line-clamp-2"),children:e.description})]}):(0,n.jsx)(T,{type:"online",link:e.link},e.title)})}),(0,n.jsx)(w.yk,{className:"w-[400px] mx-2",children:(0,n.jsx)(j.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none",children:(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline px-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("img",{src:s,alt:"",className:"!w-4 h-4 flex-shrink-0"}),(0,n.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," text-muted-foreground flex-grow"),children:o})]}),(0,n.jsx)("h3",{className:"border-t mt-1 pt-1 overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," font-bold"),children:e.title}),(0,n.jsx)("p",{className:"overflow-hidden text-sm ".concat(e.showFullContent?"block":"line-clamp-5"),children:e.description})]})})})})]})})}function T(e){let t="",a="unknown";if(e.link)try{a=new URL(e.link).hostname,t="https://www.google.com/s2/favicons?domain=".concat(a)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}let s=null,o="!w-4 !h-4 text-muted-foreground inline-flex mr-2 rounded-lg";switch(e.type){case"code":s=(0,n.jsx)(p.E,{className:"".concat(o)});break;case"online":s=(0,n.jsx)("img",{src:t,alt:"",className:"".concat(o)});break;case"notes":s=(0,n.jsx)(x.j,{className:"".concat(o)});break;default:s=null}return s?(0,n.jsx)("div",{className:"flex items-center gap-2",children:s}):null}function E(e){let t=e.notesReferenceCardData.length>0||e.codeReferenceCardData.length>0||e.onlineReferenceCardData.length>0,a=e.notesReferenceCardData.length+e.codeReferenceCardData.length+e.onlineReferenceCardData.length;return 0===a?null:(0,n.jsx)("div",{className:"pt-0 px-4 pb-4",children:(0,n.jsxs)("h3",{className:"inline-flex items-center",children:[(0,n.jsxs)("div",{className:"text-gray-400 m-2",children:[a," sources"]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-2 w-auto m-2",children:t&&(0,n.jsx)(O,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData,codeReferenceCardData:e.codeReferenceCardData,isMobileWidth:e.isMobileWidth})})]})})}function O(e){let[t,a]=(0,r.useState)(3);if((0,r.useEffect)(()=>{a(e.isMobileWidth?3:5)},[e.isMobileWidth]),!e.notesReferenceCardData&&!e.onlineReferenceCardData)return null;let s=e.codeReferenceCardData.slice(0,t),o=e.notesReferenceCardData.slice(0,t-s.length),l=o.length+s.length<t?e.onlineReferenceCardData.filter(e=>e.link).slice(0,t-s.length-o.length):[];return(0,n.jsxs)(y.yo,{children:[(0,n.jsxs)(y.aM,{className:"text-balance w-auto justify-start overflow-hidden break-words p-0 bg-transparent border-none text-gray-400 align-middle items-center m-0 inline-flex",children:[s.map((e,t)=>(0,r.createElement)(k,{showFullContent:!1,...e,key:"code-".concat(t)})),o.map((e,t)=>(0,r.createElement)(_,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),l.map((e,t)=>(0,r.createElement)(R,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),(0,n.jsx)(v.o,{className:"m-0"})]}),(0,n.jsxs)(y.ue,{className:"overflow-y-scroll",children:[(0,n.jsxs)(y.Tu,{children:[(0,n.jsx)(y.bC,{children:"References"}),(0,n.jsx)(y.Ei,{children:"View all references for this response"})]}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[e.codeReferenceCardData.map((e,t)=>(0,r.createElement)(k,{showFullContent:!0,...e,key:"code-".concat(t)})),e.notesReferenceCardData.map((e,t)=>(0,r.createElement)(_,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,r.createElement)(R,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]})}var I=a(59199),S=a(24379),F=a(58441),L=a(49807),D=a(74541),B=a(52874),P=a(5033),z=a(30655),A=a(80382),q=a(7143),H=a(2585),U=a(58905),Z=a(39966),W=a(71640),V=a(24148),G=a(68382),J=a(78582),Q=a(96620),$=a(77276),K=a(39957),Y=a(14308),X=a(84671),ee=a(36663);let et=(0,a(30166).default)(()=>Promise.all([a.e(6555),a.e(7293),a.e(4609),a.e(2242)]).then(a.bind(a,92242)).then(e=>e.default),{loadableGenerated:{webpack:()=>[92242]},ssr:!1});function ea(e){return(0,n.jsx)(r.Suspense,{fallback:(0,n.jsx)(Y.Z,{}),children:(0,n.jsx)(et,{data:e.data})})}var en=a(26110),es=a(49027),eo=a(7436),er=a(19378),el=a(50656),ec=a(45199),ei=a(25778),ed=a(62869),eh=e=>{let{chart:t}=e,[a,s]=(0,r.useState)(null),[o]=(0,r.useState)("mermaid-chart-".concat(Math.random().toString(12).substring(7))),l=(0,r.useRef)(null);(0,r.useEffect)(()=>{el.Z.initialize({startOnLoad:!1}),el.Z.parseError=e=>{let t;console.error("Mermaid errors:",e);try{t="string"==typeof e?JSON.parse(e):e}catch(a){t=(null==e?void 0:e.toString())||"Unknown error"}console.log("Mermaid error message:",t),"element is null"!==t.str?s("Something went wrong while rendering the diagram. Please try again later or downvote the message if the issue persists."):s(null)},el.Z.contentLoaded()},[]);let c=async()=>{if(l.current)try{var e;let t=l.current.querySelector("svg");if(!t)throw Error("No SVG found");let[,,a,n]=(null===(e=t.getAttribute("viewBox"))||void 0===e?void 0:e.split(" ").map(Number))||[0,0,0,0],s=document.createElement("canvas");s.width=2*a,s.height=2*n;let o=s.getContext("2d");if(!o)throw Error("Failed to get canvas context");let r=new XMLSerializer().serializeToString(t),c=new Blob([r],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(c),d=new Image;d.src=i,await new Promise((e,t)=>{d.onload=()=>{o.scale(2,2),o.drawImage(d,0,0,a,n),s.toBlob(a=>{if(!a){t(Error("Failed to create blob"));return}let n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download="mermaid-diagram-".concat(Date.now(),".png"),s.click(),URL.revokeObjectURL(n),URL.revokeObjectURL(i),e(!0)},"image/png")},d.onerror=()=>t(Error("Failed to load SVG"))})}catch(e){console.error("Error exporting diagram:",e),s("Failed to export diagram")}};return(0,r.useEffect)(()=>{l.current&&(l.current.removeAttribute("data-processed"),el.Z.run({nodes:[l.current]}).then(()=>{s(null)}).catch(e=>{let t;try{t="string"==typeof e?JSON.parse(e):e}catch(a){t=(null==e?void 0:e.toString())||"Unknown error"}console.log("Mermaid error message:",t),"element is null"!==t.str?s("Something went wrong while rendering the diagram. Please try again later or downvote the message if the issue persists."):s(null)}))},[t]),(0,n.jsxs)("div",{children:[a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 bg-red-100 border border-red-500 rounded-md p-1 mt-3 text-red-900 text-sm",children:[(0,n.jsx)(ec.k,{className:"w-12 h-12"}),(0,n.jsx)("span",{children:a})]}),(0,n.jsx)("code",{className:"block bg-secondary text-secondary-foreground p-4 mt-3 rounded-lg font-mono text-sm whitespace-pre-wrap overflow-x-auto max-h-[400px] border border-gray-200",children:t})]}):(0,n.jsx)("div",{id:o,ref:l,className:"mermaid",style:{width:"auto",height:"auto",boxSizing:"border-box",overflow:"auto"},children:t}),!a&&(0,n.jsxs)(ed.z,{onClick:c,variant:"secondary",className:"mt-3",children:[(0,n.jsx)(ei.U,{className:"w-5 h-5"}),"Export as PNG"]})]})};let eu=new h.Z({html:!0,linkify:!0,typographer:!0});function eg(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function em(e){let{uquery:t,kquery:a}=e,[s,o]=(0,r.useState)(null);return(0,r.useEffect)(()=>{null!==s&&setTimeout(()=>{o(null)},2e3)},[s]),(0,n.jsxs)("div",{className:"".concat(d().feedbackButtons," flex align-middle justify-center items-center"),children:[(0,n.jsx)("button",{title:"Like",className:d().thumbsUpButton,disabled:null!==s,onClick:()=>{eg(t,a,"positive"),o(!0)},children:!0===s?(0,n.jsx)(S.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,n.jsx)(S.V,{alt:"Like Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),(0,n.jsx)("button",{title:"Dislike",className:d().thumbsDownButton,disabled:null!==s,onClick:()=>{eg(t,a,"negative"),o(!1)},children:!1===s?(0,n.jsx)(F.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,n.jsx)(F.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function ef(e){let t=e.message.match(/\*\*(.*)\*\*/),a=function(e,t){let a=e.toLowerCase(),s="inline mt-1 mr-2 ".concat(t," h-4 w-4");return a.includes("understanding")?(0,n.jsx)(L.a,{className:"".concat(s)}):a.includes("generating")?(0,n.jsx)(D.Z,{className:"".concat(s)}):a.includes("tools")?(0,n.jsx)(B.v,{className:"".concat(s)}):a.includes("notes")?(0,n.jsx)(P.gt,{className:"".concat(s)}):a.includes("read")?(0,n.jsx)(z.f,{className:"".concat(s)}):a.includes("search")?(0,n.jsx)(A.Y,{className:"".concat(s)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,n.jsx)(q.u,{className:"".concat(s)}):a.includes("diagram")?(0,n.jsx)(H.j,{className:"".concat(s)}):a.includes("paint")?(0,n.jsx)(U.Y,{className:"".concat(s)}):a.includes("code")?(0,n.jsx)(p.E,{className:"".concat(s)}):a.includes("operating")?(0,n.jsx)(Z.A,{className:"".concat(s)}):(0,n.jsx)(L.a,{className:"".concat(s)})}(t?t[1]:"",e.primary?(0,X.oz)(e.agentColor):"text-gray-500"),s=e.message,o=null;try{let e=s.match(/\{.*("action": "screenshot"|"type": "screenshot"|"image": "data:image\/.*").*\}/);if(e){o=JSON.parse(e[0]);let t='<img src="'.concat(o.image,'" alt="State of environment" class="max-w-full" />');s=s.replace(":\n**Action**: ".concat(e[0]),"\n\n- ".concat(o.text,"\n").concat(t))}}catch(e){console.error("Failed to parse screenshot data",e)}let r=b.Z.sanitize(eu.render(s));return r=r.replace(/<h[1-6].*?<\/h[1-6]>/g,""),(0,n.jsxs)("div",{className:"".concat(d().trainOfThoughtElement," break-words items-center ").concat(e.primary?"text-gray-400":"text-gray-300"," ").concat(d().trainOfThought," ").concat(e.primary?d().primary:""),children:[a,(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:r},className:"break-words"})]})}eu.use(g(),{inline:!0,code:!0});let ep=(0,r.forwardRef)((e,t)=>{var a,s;let o,l;let[c,i]=(0,r.useState)(!1),[h,u]=(0,r.useState)(!1),[g,f]=(0,r.useState)(""),[p,x]=(0,r.useState)(""),[v,j]=(0,r.useState)(!1),[y,w]=(0,r.useState)(!1),[N,C]=(0,r.useState)(""),[_,k]=(0,r.useState)(""),R=(0,r.useRef)(!1),T=(0,r.useRef)(null);function O(e){let t=new Date(e+"Z"),a=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),n=t.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," ");return"".concat(a," on ").concat(n)}async function S(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;j(!0);let a=F(t[0]);for(let e=0;e<t.length&&!R.current;e++){let n=a;e<t.length-1&&(a=F(t[e+1]));try{let e=await n,t=URL.createObjectURL(e);await function(e){return new Promise((t,a)=>{let n=new Audio(e);n.onended=t,n.onerror=a,n.play()})}(t)}catch(e){console.error("Error:",e);break}}j(!1),w(!1)}async function F(e){let t=await fetch("/api/chat/speech?text=".concat(encodeURIComponent(e)),{method:"POST",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("Network response was not ok");return await t.blob()}(0,r.useEffect)(()=>{R.current=y},[y]),(0,r.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(T.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,ee.Z)(T.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return T.current&&e.observe(T.current,{childList:!0}),()=>e.disconnect()},[T.current]),(0,r.useEffect)(()=>{let t=e.chatMessage.message;e.chatMessage.excalidrawDiagram&&C(e.chatMessage.excalidrawDiagram),e.chatMessage.mermaidjsDiagram&&k(e.chatMessage.mermaidjsDiagram),t=t.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),t=(0,I.AQ)(t,e.chatMessage.codeContext),e.chatMessage.codeContext&&Object.entries(e.chatMessage.codeContext).forEach(e=>{var a,n;let[s,o]=e;null===(n=o.results)||void 0===n||null===(a=n.output_files)||void 0===a||a.forEach(e=>{(e.filename.endsWith(".png")||e.filename.endsWith(".jpg"))&&!t.includes("![".concat(e.filename,"]("))&&(t+="\n\n![".concat(e.filename,"](data:image/png;base64,").concat(e.b64_data,")"))})});let a=t,n=t;if(e.chatMessage.images&&e.chatMessage.images.length>0){let t=e.chatMessage.images.map(e=>{let t=e.startsWith("data%3Aimage")?decodeURIComponent(e):e;return b.Z.sanitize(t)}),s=t.map((e,t)=>"![uploaded image ".concat(t+1,"](").concat(e,")")).join("\n"),o=t.map((e,t)=>'<div class="'.concat(d().imageWrapper,'"><img src="').concat(e,'" alt="uploaded image ').concat(t+1,'" /></div>')).join(""),r='<div class="'.concat(d().imagesContainer,'">').concat(o,"</div>");a="".concat(s,"\n\n").concat(a),n="".concat(r).concat(n)}f(a);let s=eu.render(n);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),x(b.Z.sanitize(s))},[e.chatMessage.message,e.chatMessage.images,e.chatMessage.intent]),(0,r.useEffect)(()=>{c&&setTimeout(()=>{i(!1)},2e3)},[c]),(0,r.useEffect)(()=>{T.current&&(T.current.querySelectorAll("pre > .hljs").forEach(e=>{if(!e.querySelector("".concat(d().codeCopyButton))){let t=document.createElement("button"),a=(0,n.jsx)(W.w,{size:24});(0,m.createRoot)(t).render(a),t.className="hljs ".concat(d().codeCopyButton),t.addEventListener("click",()=>{let a=e.textContent||"";a=(a=(a=a.replace(/^\$+/,"")).replace(/^Copy/,"")).trim(),navigator.clipboard.writeText(a);let s=(0,n.jsx)(V.J,{size:24});(0,m.createRoot)(t).render(s)}),e.prepend(t)}}),(0,ee.Z)(T.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]}))},[p,h,T]);let L=async t=>{let a=t.turnId||e.turnId;(await fetch("/api/chat/conversation/message",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:e.conversationId,turn_id:a})})).ok?e.onDeleteMessage(a):console.error("Failed to delete message")},D=function(e,t,a){let n=[],s=[],o=[];if(a)for(let[e,t]of Object.entries(a))t.results&&o.push({code:t.code,output:t.results.std_out,output_files:t.results.output_files,error:t.results.std_err});if(t){let e=[];for(let[a,n]of Object.entries(t)){if(n.answerBox&&e.push({title:n.answerBox.title,description:n.answerBox.answer,link:n.answerBox.source}),n.knowledgeGraph&&e.push({title:n.knowledgeGraph.title,description:n.knowledgeGraph.description,link:n.knowledgeGraph.descriptionLink}),n.webpages){if(n.webpages instanceof Array){let t=n.webpages.map(e=>({title:e.query,description:e.snippet,link:e.link}));e.push(...t)}else{let t=n.webpages;e.push({title:t.query,description:t.snippet,link:t.link})}}if(n.organic){let t=n.organic.map(e=>({title:e.title,description:e.snippet,link:e.link}));e.push(...t)}}n.push(...e)}if(e){let t=e.map(e=>e.compiled||""===e.compiled?{title:e.file,content:e.compiled}:{title:e.split("\n")[0],content:e.split("\n").slice(1).join("\n")});s.push(...t)}return{notesReferenceCardData:s,onlineReferenceCardData:n,codeReferenceCardData:o}}(e.chatMessage.context,e.chatMessage.onlineContext,e.chatMessage.codeContext);return(0,n.jsxs)("div",{ref:t,className:(a=e.chatMessage,o=[d().chatMessageContainer],"khoj"===a.by&&o.push("shadow-md"),o.push(d()[a.by]),a.message||o.push(d().emptyChatMessage),e.customClassName&&o.push(d()["".concat(a.by).concat(e.customClassName)]),o.join(" ")),onMouseLeave:e=>u(!1),onMouseEnter:e=>u(!0),"data-created":O(e.chatMessage.created),children:[(0,n.jsxs)("div",{className:(s=e.chatMessage,(l=[d().chatMessageWrapper]).push(d()[s.by]),"khoj"===s.by&&l.push("border-l-4 border-opacity-50 ".concat("border-l-"+e.borderLeftColor)),l.join(" ")),children:[e.chatMessage.queryFiles&&e.chatMessage.queryFiles.length>0&&(0,n.jsx)("div",{className:"flex flex-wrap flex-col mb-2 max-w-full",children:e.chatMessage.queryFiles.map((e,t)=>(0,n.jsxs)(en.Vq,{children:[(0,n.jsx)(en.hg,{asChild:!0,children:(0,n.jsxs)("div",{className:"flex items-center space-x-2 cursor-pointer bg-gray-500 bg-opacity-25 rounded-lg p-2 w-full ",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,M.Le)(e.file_type)}),(0,n.jsx)("span",{className:"truncate flex-1 min-w-0 max-w-[200px]",children:e.name}),e.size&&(0,n.jsxs)("span",{className:"text-gray-400 flex-shrink-0",children:["(",(0,eo.xq)(e.size),")"]})]})}),(0,n.jsxs)(en.cZ,{children:[(0,n.jsx)(en.fK,{children:(0,n.jsx)(es.$N,{children:(0,n.jsx)("div",{className:"truncate min-w-0 break-words break-all text-wrap max-w-full whitespace-normal",children:e.name})})}),(0,n.jsx)(en.Be,{children:(0,n.jsx)(er.x,{className:"h-72 w-full rounded-md break-words break-all text-wrap",children:e.content})})]})]},t))}),(0,n.jsx)("div",{ref:T,className:d().chatMessage,dangerouslySetInnerHTML:{__html:p}}),N&&(0,n.jsx)(ea,{data:N}),_&&(0,n.jsx)(eh,{chart:_})]}),(0,n.jsx)("div",{className:d().teaserReferencesContainer,children:(0,n.jsx)(E,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:D.notesReferenceCardData,onlineReferenceCardData:D.onlineReferenceCardData,codeReferenceCardData:D.codeReferenceCardData})}),(0,n.jsx)("div",{className:d().chatFooter,children:(h||e.isMobileWidth||e.isLastMessage||v)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{title:O(e.chatMessage.created),className:"text-gray-400 relative top-0 left-4",children:function(e){e.endsWith("Z")||(e+="Z");let t=new Date(e),a=new Date().getTime()-t.getTime();return a<6e4?"Just now":a<36e5?"".concat(Math.round(a/6e4),"m ago"):a<864e5?"".concat(Math.round(a/36e5),"h ago"):"".concat(Math.round(a/864e5),"d ago")}(e.chatMessage.created)}),(0,n.jsxs)("div",{className:"".concat(d().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(v?y?(0,n.jsx)(Y.l,{iconClassName:"p-0",className:"m-0"}):(0,n.jsx)("button",{title:"Pause Speech",onClick:e=>w(!0),children:(0,n.jsx)(G.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,n.jsx)("button",{title:"Speak",onClick:e=>S(),children:(0,n.jsx)(J.j,{alt:"Speak Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})})),e.chatMessage.turnId&&(0,n.jsx)("button",{title:"Delete",className:"".concat(d().deleteButton),onClick:()=>L(e.chatMessage),children:(0,n.jsx)(Q.r,{alt:"Delete Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})}),"khoj"===e.chatMessage.by&&e.onRetryMessage&&e.isLastMessage&&(0,n.jsx)("button",{title:"Retry",className:"".concat(d().retryButton),onClick:()=>{var t,a,n;let s=e.chatMessage.turnId||e.turnId,o=e.chatMessage.rawQuery||(null===(t=e.chatMessage.intent)||void 0===t?void 0:t.query);if(console.log("Retry button clicked for turnId:",s),console.log("ChatMessage data:",{rawQuery:e.chatMessage.rawQuery,intent:e.chatMessage.intent,message:e.chatMessage.message}),console.log("Extracted query:",o),o)null===(a=e.onRetryMessage)||void 0===a||a.call(e,o,s);else{console.error("No original query found for retry");let t=prompt("Enter the original query to retry:");t&&(null===(n=e.onRetryMessage)||void 0===n||n.call(e,t,s))}},children:(0,n.jsx)($._,{alt:"Retry Message",className:"hsl(var(--muted-foreground)) hover:text-blue-500"})}),(0,n.jsx)("button",{title:"Copy",className:"".concat(d().copyButton),onClick:()=>{navigator.clipboard.writeText(g),i(!0)},children:c?(0,n.jsx)(K.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,n.jsx)(K.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,n.jsx)(em,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,n.jsx)(em,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});ep.displayName="ChatMessage";var ex=a(17104),ev=a(66142),ej=a(25397),ey=a(44849),ew=a.n(ey);function eb(e){let{frames:t,autoPlay:a=!0,playbackSpeed:s=1e3}=e,[o,l]=(0,r.useState)(0),[c,i]=(0,r.useState)(a),[d,h]=(0,r.useState)(!0),u=(0,r.useRef)(null);(0,r.useEffect)(()=>{d&&t.length>0&&l(t.length-1)},[t.length,d]),(0,r.useEffect)(()=>(c&&t.length>1?u.current=setInterval(()=>{l(e=>{let a=e+1;return a>=t.length?(i(!1),e):a})},s):u.current&&(clearInterval(u.current),u.current=null),()=>{u.current&&clearInterval(u.current)}),[c,t.length,s]);let g=t[o],m=e=>{l(e),h(!1),i(!1)};return t.length?(0,n.jsxs)("div",{className:ew().videoPlayer,children:[(0,n.jsxs)("div",{className:ew().screen,children:[(null==g?void 0:g.image)&&(0,n.jsx)("img",{src:g.image,alt:"Train of thought frame ".concat(o+1),className:ew().screenImage}),(0,n.jsx)("div",{className:ew().textOverlay,children:(0,n.jsx)("div",{className:ew().thoughtText,children:null==g?void 0:g.text})})]}),(0,n.jsxs)("div",{className:ew().controls,children:[(0,n.jsxs)("div",{className:ew().timeline,children:[(0,n.jsx)("input",{type:"range",min:0,max:Math.max(0,t.length-1),value:o,onChange:e=>m(parseInt(e.target.value)),className:ew().timelineSlider}),(0,n.jsx)("div",{className:ew().frameMarkers,children:t.map((e,t)=>(0,n.jsx)("div",{className:"".concat(ew().frameMarker," ").concat(e.image?ew().hasImage:ew().textOnly," ").concat(t===o?ew().active:""),onClick:()=>m(t),title:"Frame ".concat(t+1,": ").concat(e.text.slice(0,50),"...")},t))})]}),(0,n.jsxs)("div",{className:ew().controlButtons,children:[(0,n.jsx)("button",{onClick:()=>{o>0&&(l(o-1),h(!1),i(!1))},disabled:0===o,title:"Previous frame",className:ew().controlButton,children:(0,n.jsx)(ex.F,{size:16})}),(0,n.jsx)("button",{onClick:()=>{i(!c),h(!1)},disabled:t.length<=1,title:c?"Pause":"Play",className:ew().controlButton,children:c?(0,n.jsx)(G.d,{size:16}):(0,n.jsx)(ev.s,{size:16})}),(0,n.jsx)("button",{onClick:()=>{o<t.length-1&&(l(o+1),h(!1),i(!1))},disabled:o===t.length-1,title:"Next frame",className:ew().controlButton,children:(0,n.jsx)(ej.N,{size:16})}),(0,n.jsx)("button",{onClick:()=>{h(!0),l(t.length-1),i(!1)},className:"".concat(ew().controlButton," ").concat(d?ew().active:""),title:"Auto-track latest",children:"Live"})]}),(0,n.jsx)("div",{className:ew().frameInfo,children:(0,n.jsxs)("span",{children:[o+1," / ",t.length]})})]})]}):null}var eM=a(72102),eN=a(23713),eC=a(795),e_=a(935),ek=a(81103),eR=e=>{let{name:t,avatar:a,link:s,description:o}=e;return(0,n.jsx)("div",{className:"relative group flex",children:(0,n.jsx)(ek.pn,{children:(0,n.jsxs)(ek.u,{delayDuration:0,children:[(0,n.jsx)(ek.aJ,{asChild:!0,children:(0,n.jsxs)(ed.z,{variant:"ghost",className:"flex items-center justify-center",children:[a,(0,n.jsx)("div",{children:t})]})}),(0,n.jsx)(ek._v,{children:(0,n.jsxs)("div",{className:"w-80 h-30",children:[(0,n.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",className:"mt-1 ml-2 block no-underline",children:(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[a,(0,n.jsxs)("div",{className:"mr-2 mt-1 flex justify-center items-center text-sm font-semibold text-gray-800",children:[t,(0,n.jsx)(v.o,{weight:"bold",className:"ml-1"})]})]})}),o&&(0,n.jsx)("p",{className:"mt-2 ml-6 text-sm text-gray-600 line-clamp-2",children:o||"A Khoj agent"})]})})]})})})},eT=a(37104);function eE(e){let[t,a]=(0,r.useState)(e.completed),[s,i]=(0,r.useState)([]);return(0,r.useEffect)(()=>{e.completed&&a(!0)},[e.completed]),(0,r.useEffect)(()=>{if(!e.trainOfThought||0===e.trainOfThought.length){i([]);return}i(function(e){if(!e)return[];let t=[],a=[],n=[];return e.forEach((e,s)=>{let o=e.data,r=!1;try{let e=o.match(/\{.*(\"action\": \"screenshot\"|\"type\": \"screenshot\"|\"image\": \"data:image\/.*\").*\}/);if(e){let l=JSON.parse(e[0]);l.image&&(r=!0,o=o.replace(":\n**Action**: ".concat(e[0]),""),l.text&&(o+="\n\n".concat(l.text)),n.length>0&&(t.push({type:"text",textEntries:[...n]}),n=[]),a.push({text:o,image:l.image,timestamp:s}))}}catch(e){console.error("Failed to parse screenshot data",e)}r||(a.length>0&&(t.push({type:"video",frames:[...a]}),a=[]),n.push(e))}),a.length>0&&t.push({type:"video",frames:a}),n.length>0&&t.push({type:"text",textEntries:n}),t}("string"==typeof e.trainOfThought[0]?e.trainOfThought.map((e,t)=>({type:"text",data:e})):e.trainOfThought))},[e.trainOfThought]),(0,n.jsxs)("div",{className:"".concat(t?"":o().trainOfThought+" border"," rounded-lg"),children:[!e.completed&&(0,n.jsx)(Y.l,{className:"float-right"}),e.completed&&(t?(0,n.jsxs)(ed.z,{className:"w-fit text-left justify-start content-start text-xs",onClick:()=>a(!1),variant:"ghost",size:"sm",children:["Thought Process ",(0,n.jsx)(eM.p,{size:16,className:"ml-1"})]}):(0,n.jsxs)(ed.z,{className:"w-fit text-left justify-start content-start text-xs p-0 h-fit",onClick:()=>a(!0),variant:"ghost",size:"sm",children:["Close ",(0,n.jsx)(eN.U,{size:16,className:"ml-1"})]})),(0,n.jsx)(l.M,{initial:!1,children:!t&&(0,n.jsx)(c.E.div,{initial:"closed",animate:"open",exit:"closed",variants:{open:{height:"auto",opacity:1,transition:{duration:.3,ease:"easeOut"}},closed:{height:0,opacity:0,transition:{duration:.3,ease:"easeIn"}}},children:s.map((t,a)=>(0,n.jsxs)("div",{children:["video"===t.type&&t.frames&&t.frames.length>0&&(0,n.jsx)(eb,{frames:t.frames,autoPlay:!1,playbackSpeed:1500}),"text"===t.type&&t.textEntries&&t.textEntries.map((o,r)=>{let l=s.length-1,c=r===t.textEntries.length-1,i=a===l&&c&&e.lastMessage&&!e.completed;return(0,n.jsx)(ef,{message:o.data,primary:i,agentColor:e.agentColor},"train-text-".concat(a,"-").concat(r,"-").concat(o.data.length))})]},"train-group-".concat(a)))})})]},e.keyId)}function eO(e){var t,a,s,l,c,i,d;let[h,u]=(0,r.useState)(null),[g,m]=(0,r.useState)(0),[f,p]=(0,r.useState)(!0),[x,v]=(0,r.useState)(null),j=(0,r.useRef)(null),y=(0,r.useRef)(null),w=(0,r.useRef)(null),b=(0,r.useRef)(null),N=(0,r.useRef)(null),[C,_]=(0,r.useState)(null),[k,R]=(0,r.useState)(!1),[T,E]=(0,r.useState)(!0),O=(0,eo.IC)(),I="[data-radix-scroll-area-viewport]",S=localStorage.getItem("message");(0,r.useEffect)(()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(I);if(!t)return;let a=()=>{let{scrollTop:e,scrollHeight:a,clientHeight:n}=t;E(a-(e+n)<=50)};return t.addEventListener("scroll",a),a(),()=>t.removeEventListener("scroll",a)},[y]),(0,r.useEffect)(()=>{e.incomingMessages&&e.incomingMessages.length>0&&T&&L(!0)},[e.incomingMessages,T]),(0,r.useEffect)(()=>{var t;let a=w.current,n=null===(t=y.current)||void 0===t?void 0:t.querySelector(I);if(!a||!n)return;let s=new ResizeObserver(()=>{let{scrollTop:t,scrollHeight:a,clientHeight:s}=n;if(a-(t+s)<=50&&e.incomingMessages&&e.incomingMessages.length>0){let t=e.incomingMessages[e.incomingMessages.length-1];(!t.completed||t.completed&&null!==C)&&L(!0)}});return s.observe(a),()=>s.disconnect()},[e.incomingMessages,C,y]),(0,r.useEffect)(()=>{h&&h.chat&&h.chat.length>0&&g<2&&requestAnimationFrame(()=>{var e;null===(e=b.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"})})},[h,g]),(0,r.useEffect)(()=>{if(!f||k)return;let t=new IntersectionObserver(t=>{t[0].isIntersecting&&f&&(R(!0),function(t){if(!f||k)return;let a=(t+1)*10,n="";if(e.conversationId)n="/api/chat/history?client=web&conversation_id=".concat(encodeURIComponent(e.conversationId),"&n=").concat(a);else{if(!e.publicConversationSlug)return;n="/api/chat/share/history?client=web&public_conversation_slug=".concat(e.publicConversationSlug,"&n=").concat(a)}fetch(n).then(e=>e.json()).then(a=>{var n;if(e.setTitle(a.response.slug),e.setIsOwner&&e.setIsOwner(null==a?void 0:null===(n=a.response)||void 0===n?void 0:n.is_owner),a&&a.response&&a.response.chat&&a.response.chat.length>0){if(m(Math.ceil(a.response.chat.length/10)),a.response.chat.length===(null==h?void 0:h.chat.length)){p(!1),R(!1);return}e.setAgent(a.response.agent),u(a.response),R(!1),0===t?L(!0):F()}else{if(a.response.agent&&a.response.conversation_id){let t={chat:[],agent:a.response.agent,conversation_id:a.response.conversation_id,slug:a.response.slug,is_owner:a.response.is_owner};e.setAgent(a.response.agent),u(t),e.setIsChatSideBarOpen&&!S&&e.setIsChatSideBarOpen(!0)}p(!1),R(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(g))},{threshold:1});return j.current&&t.observe(j.current),()=>t.disconnect()},[f,g,k]),(0,r.useEffect)(()=>{p(!0),R(!1),m(0),u(null)},[e.conversationId]),(0,r.useEffect)(()=>{if(e.incomingMessages){let t=e.incomingMessages[e.incomingMessages.length-1];t&&!t.completed&&(_(e.incomingMessages.length-1),e.setTitle(t.rawQuery),t.turnId&&v(t.turnId))}},[e.incomingMessages]);let F=()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(I);requestAnimationFrame(()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"}),null==t||t.scrollBy({behavior:"smooth",top:-150})})},L=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=null===(e=y.current)||void 0===e?void 0:e.querySelector(I);requestAnimationFrame(()=>{null==a||a.scrollTo({top:a.scrollHeight,behavior:t?"auto":"smooth"})}),(t||a&&a.scrollHeight-(a.scrollTop+a.clientHeight)<5)&&E(!0)};function D(){var e,t;return h&&h.agent&&(null===(e=h.agent)||void 0===e?void 0:e.name)?h.agent.is_hidden?"Khoj":null===(t=h.agent)||void 0===t?void 0:t.name:"Agent"}let B=t=>{t&&(u(e=>e&&t?{...e,chat:e.chat.filter(e=>e.turnId!==t)}:e),e.incomingMessages&&e.setIncomingMessages&&e.setIncomingMessages(e.incomingMessages.filter(e=>e.turnId!==t)))},P=(t,a)=>{var n;t&&(a&&B(a),null===(n=e.onRetryMessage)||void 0===n||n.call(e,t,a))};return e.conversationId||e.publicConversationSlug?(0,n.jsx)(er.x,{className:"\n h-[calc(100svh-theme(spacing.44))]\n sm:h-[calc(100svh-theme(spacing.44))]\n md:h-[calc(100svh-theme(spacing.44))]\n lg:h-[calc(100svh-theme(spacing.44))]\n ",ref:y,children:(0,n.jsxs)("div",{ref:w,children:[(0,n.jsxs)("div",{className:"print-only-header",children:[(0,n.jsxs)("div",{className:"print-header-content",children:[(0,n.jsx)("div",{className:"print-header-left",children:(0,n.jsx)(eT.S6,{className:"print-logo"})}),(0,n.jsxs)("div",{className:"print-header-right",children:[(0,n.jsx)("h1",{children:(null==h?void 0:h.slug)||"Conversation with Khoj"}),(0,n.jsx)("div",{className:"conversation-meta",children:(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:"Agent:"})," ",D()]})})]})]}),(0,n.jsx)("hr",{})]}),(0,n.jsxs)("div",{className:"".concat(o().chatHistory," ").concat(e.customClassName),children:[(0,n.jsx)("div",{ref:j,style:{height:"1px"},children:k&&(0,n.jsx)(Y.l,{className:"opacity-50"})}),h&&h.chat&&h.chat.map((t,a)=>{var s,o;return(0,n.jsxs)(r.Fragment,{children:[t.trainOfThought&&"khoj"===t.by&&(0,n.jsx)(eE,{trainOfThought:t.trainOfThought,lastMessage:!1,agentColor:(null==h?void 0:null===(s=h.agent)||void 0===s?void 0:s.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:!0},"".concat(a,"trainOfThought")),(0,n.jsx)(ep,{ref:a===h.chat.length-2?b:a===h.chat.length-(g-1)*10?N:null,isMobileWidth:O,chatMessage:t,customClassName:"fullHistory",borderLeftColor:"".concat(null==h?void 0:null===(o=h.agent)||void 0===o?void 0:o.color,"-500"),isLastMessage:a===h.chat.length-1,onDeleteMessage:B,onRetryMessage:P,conversationId:e.conversationId},"".concat(a,"fullHistory"))]},"chatMessage-".concat(a))}),e.incomingMessages&&e.incomingMessages.map((t,a)=>{var s,o,l,c,i;let d=null!==(i=null!==(c=t.turnId)&&void 0!==c?c:x)&&void 0!==i?i:void 0;return(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(ep,{isMobileWidth:O,chatMessage:{message:t.rawQuery,context:[],onlineContext:{},codeContext:{},created:t.timestamp,by:"you",automationId:"",images:t.images,conversationId:e.conversationId,turnId:d,queryFiles:t.queryFiles},customClassName:"fullHistory",borderLeftColor:"".concat(null==h?void 0:null===(s=h.agent)||void 0===s?void 0:s.color,"-500"),onDeleteMessage:B,onRetryMessage:P,conversationId:e.conversationId,turnId:d},"".concat(a,"outgoing")),t.trainOfThought&&t.trainOfThought.length>0&&(0,n.jsx)(eE,{trainOfThought:t.trainOfThought,lastMessage:a===C,agentColor:(null==h?void 0:null===(o=h.agent)||void 0===o?void 0:o.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:t.completed},"".concat(a,"trainOfThought-").concat(t.trainOfThought.length,"-").concat(t.trainOfThought.map(e=>e.length).join("-"))),(0,n.jsx)(ep,{isMobileWidth:O,chatMessage:{message:t.rawResponse,context:t.context,onlineContext:t.onlineContext,codeContext:t.codeContext,created:t.timestamp,by:"khoj",automationId:"",rawQuery:t.rawQuery,intent:{type:t.intentType||"",query:t.rawQuery,"memory-type":"","inferred-queries":t.inferredQueries||[]},conversationId:e.conversationId,images:t.generatedImages,queryFiles:t.generatedFiles,mermaidjsDiagram:t.generatedMermaidjsDiagram,turnId:d},conversationId:e.conversationId,turnId:d,onDeleteMessage:B,onRetryMessage:P,customClassName:"fullHistory",borderLeftColor:"".concat(null==h?void 0:null===(l=h.agent)||void 0===l?void 0:l.color,"-500"),isLastMessage:a===e.incomingMessages.length-1},"".concat(a,"incoming"))]},"incomingMessage".concat(a))}),e.pendingMessage&&(0,n.jsx)(ep,{isMobileWidth:O,chatMessage:{message:e.pendingMessage,context:[],onlineContext:{},codeContext:{},created:new Date().getTime().toString(),by:"you",automationId:"",conversationId:e.conversationId,turnId:void 0},conversationId:e.conversationId,onDeleteMessage:B,onRetryMessage:P,customClassName:"fullHistory",borderLeftColor:"".concat(null==h?void 0:null===(t=h.agent)||void 0===t?void 0:t.color,"-500"),isLastMessage:!0},"pendingMessage-".concat(e.pendingMessage.length)),h&&(0,n.jsx)("div",{className:"".concat(o().agentIndicator," pb-4"),children:(0,n.jsx)("div",{className:"relative group mx-2 cursor-pointer",children:(0,n.jsx)(eR,{name:D(),link:h&&h.agent&&(null===(l=h.agent)||void 0===l?void 0:l.slug)?"/agents?agent=".concat(null===(c=h.agent)||void 0===c?void 0:c.slug):"/agents",avatar:(0,M.TI)(null===(a=h.agent)||void 0===a?void 0:a.icon,null===(s=h.agent)||void 0===s?void 0:s.color)||(0,n.jsx)(eC.v,{}),description:h&&h.agent?(null===(i=h.agent)||void 0===i?void 0:i.persona)?null===(d=h.agent)||void 0===d?void 0:d.persona:"You can set a persona for your agent in the Chat Options side panel.":"Your agent is no longer available. You will be reset to the default agent."})})})]}),(0,n.jsx)("div",{className:"".concat(e.customClassName," fixed bottom-[20%] z-10"),children:!T&&(0,n.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:()=>{L()},children:(0,n.jsx)(e_.K,{size:24})})})]})}):null}},42501:function(e){e.exports={chatHistory:"chatHistory_chatHistory__CoaVT",agentIndicator:"chatHistory_agentIndicator__wOU1f",trainOfThought:"chatHistory_trainOfThought__mMWSR"}},91499:function(e){e.exports={chatMessageContainer:"chatMessage_chatMessageContainer__sAivf",chatMessageWrapper:"chatMessage_chatMessageWrapper__u5m8A",khojfullHistory:"chatMessage_khojfullHistory__NPu2l",youfullHistory:"chatMessage_youfullHistory__ioyfH",you:"chatMessage_you__6GUC4",khoj:"chatMessage_khoj__cjWON",khojChatMessage:"chatMessage_khojChatMessage__BabQz",emptyChatMessage:"chatMessage_emptyChatMessage__J9JRn",imagesContainer:"chatMessage_imagesContainer__HTRjT",imageWrapper:"chatMessage_imageWrapper__DF92M",author:"chatMessage_author__muRtC",chatFooter:"chatMessage_chatFooter__0vR8s",chatButtons:"chatMessage_chatButtons__Lbk8T",codeCopyButton:"chatMessage_codeCopyButton__Y_Ujv",feedbackButtons:"chatMessage_feedbackButtons___Brdy",copyButton:"chatMessage_copyButton__jd7q7",retryButton:"chatMessage_retryButton__Z7Pzk",trainOfThought:"chatMessage_trainOfThought__mR2Gg",primary:"chatMessage_primary__WYPEb",trainOfThoughtElement:"chatMessage_trainOfThoughtElement__le_bC"}},44849:function(e){e.exports={videoPlayer:"trainOfThoughtVideoPlayer_videoPlayer__Dz3mA",screen:"trainOfThoughtVideoPlayer_screen__dvEVh",screenImage:"trainOfThoughtVideoPlayer_screenImage__3SgOQ",textOverlay:"trainOfThoughtVideoPlayer_textOverlay__BGbhO",thoughtText:"trainOfThoughtVideoPlayer_thoughtText__zn_vT",controls:"trainOfThoughtVideoPlayer_controls__HDkO_",timeline:"trainOfThoughtVideoPlayer_timeline__hSpWu",timelineSlider:"trainOfThoughtVideoPlayer_timelineSlider__GQ8dx",frameMarkers:"trainOfThoughtVideoPlayer_frameMarkers__5y3He",frameMarker:"trainOfThoughtVideoPlayer_frameMarker__DBO9Y",hasImage:"trainOfThoughtVideoPlayer_hasImage__GFGAk",textOnly:"trainOfThoughtVideoPlayer_textOnly__okufk",active:"trainOfThoughtVideoPlayer_active__zp6u9",controlButtons:"trainOfThoughtVideoPlayer_controlButtons__rqfIH",controlButton:"trainOfThoughtVideoPlayer_controlButton___RdE_",frameInfo:"trainOfThoughtVideoPlayer_frameInfo__u5nwA"}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8459,3317,7138,244],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3317,8459,7138,244],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,s,t){Promise.resolve().then(t.bind(t,42780))},42780:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return er}});var a=t(57437),n=t(63136),i=t.n(n),l=t(2265),o=t(27127),r=t(99376),d=t(14308),c=t(59199);t(2446);var u=t(7436),h=t(5477),m=t(56937),x=t(55287),f=t(60729),p=t(34124),g=t(6512),j=t(37104),v=t(62869),y=t(91890),N=t(68772),b=t(79603),w=t(23594),_=t(34153),S=t(43551),C=t(32046),O=t(5223),k=t(76818),I=t(75256),M=t(24148),E=t(94508),T=t(23518),z=t(57054),B=t(16605);let R=B.fC,L=B.xz,F=l.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:i=4,...l}=e;return(0,a.jsx)(B.VY,{ref:s,align:n,sideOffset:i,className:(0,E.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})});F.displayName=B.VY.displayName;var A=t(93022);function P(e){var s;let{...t}=e,[n,i]=l.useState(!1),[o,r]=(0,l.useState)(void 0),[d,c]=(0,l.useState)(void 0),{data:h,error:x,isLoading:f}=(0,m.h2)(!0),[p,g]=(0,l.useState)([]),j=(0,u.IC)();return((0,l.useEffect)(()=>{if(!f&&h){if(g(h.chat_model_options),t.initialModel)c(h.chat_model_options.find(e=>e.name===t.initialModel));else{let e=h.chat_model_options.find(e=>e.id===h.selected_chat_model_config);!e&&h.chat_model_options.length>0?c(h.chat_model_options[0]):c(e)}}},[h,t.initialModel,f]),(0,l.useEffect)(()=>{d&&h&&t.onSelect(d)},[d,h,t.onSelect]),f)?(0,a.jsx)(A.O,{className:"w-full h-10"}):x?(0,a.jsx)("div",{className:"text-sm text-error",children:x.message}):(0,a.jsx)("div",{className:"grid gap-2 w-[250px]",children:(0,a.jsxs)(z.J2,{open:n,onOpenChange:i,...t,children:[(0,a.jsx)(z.xo,{asChild:!0,children:(0,a.jsxs)(v.z,{variant:"outline",role:"combobox","aria-expanded":n,"aria-label":"Select a model",className:"w-full justify-between text-left",disabled:null!==(s=t.disabled)&&void 0!==s&&s,children:[(0,a.jsx)("p",{className:"truncate",children:d?d.name.substring(0,20):"Select a model..."}),(0,a.jsx)(I.K,{className:"opacity-50"})]})}),(0,a.jsx)(z.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(Z,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)},isActive:t.isActive},e.id))},"models")]})})}):(0,a.jsxs)(R,{children:[(0,a.jsx)(F,{side:"left",align:"start",forceMount:!0,className:"min-h-[280px]",children:(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("h4",{className:"font-medium leading-none",children:null==o?void 0:o.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==o?void 0:o.description}),(null==o?void 0:o.strengths)?(0,a.jsxs)("div",{className:"mt-4 grid gap-2",children:[(0,a.jsx)("h5",{className:"text-sm font-medium leading-none",children:"Strengths"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:o.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{}),(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(Z,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)},isActive:t.isActive},e.id))},"models")]})})]})]})})]})})}function Z(e){let{model:s,isSelected:t,onSelect:n,onPeek:i,isActive:o}=e,r=l.useRef(null);return(0,u.Iy)(r,e=>{e.forEach(e=>{var t;"attributes"===e.type&&"aria-selected"===e.attributeName&&(null===(t=r.current)||void 0===t?void 0:t.getAttribute("aria-selected"))==="true"&&i(s)})}),(0,a.jsxs)(T.di,{onSelect:n,ref:r,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",disabled:!o&&"free"!==s.tier,children:[s.name," ","standard"===s.tier&&(0,a.jsx)("span",{className:"text-green-500 ml-2",children:"(Futurist)"}),(0,a.jsx)(M.J,{className:(0,E.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var J=t(17200),W=t(2602),D=t(69304),K=t(42225),U=t(26815),V=t(9270),H=t(30401);let G=l.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(V.fC,{ref:s,className:(0,E.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-secondary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-500 data-[state=checked]:text-primary-foreground",t),...n,children:(0,a.jsx)(V.z$,{className:(0,E.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(H.Z,{className:"h-4 w-4"})})})});G.displayName=V.fC.displayName;var Q=t(81103),q=t(61312),Y=t(26110),$=t(53647),X=t(84671),ee=t(95186),es=t(27648),et=t(14368);let ea=e=>fetch(e).then(e=>e.json());function en(e){let{...s}=e;return s.isMobileWidth?(0,a.jsx)(D.yo,{open:s.isOpen,onOpenChange:s.onOpenChange,children:(0,a.jsx)(D.ue,{className:"w-[300px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:(0,a.jsx)(el,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(el,{...s})})}function ei(e){let s=(0,K.BI)(),t=X.xF,[n,i]=(0,l.useState)(!1),[o,r]=(0,l.useState)(),[d,c]=(0,l.useState)(),[u,h]=(0,l.useState)(),[m,x]=(0,l.useState)(!1),[f,p]=(0,l.useState)(),[g,j]=(0,l.useState)(!1),[y,S]=(0,l.useState)();return(0,l.useEffect)(()=>{o&&d&&u?j(!0):j(!1)},[o,d,u]),(0,a.jsxs)(Y.Vq,{children:[(0,a.jsx)(Y.hg,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"secondary",children:"Create Agent"})}),(0,a.jsxs)(Y.cZ,{children:[(0,a.jsxs)(Y.fK,{children:[m&&f?(0,a.jsxs)(Y.$N,{children:["Created ",o]}):(0,a.jsx)(Y.$N,{children:"Create a New Agent"}),(0,a.jsx)(Y.GG,{}),(0,a.jsx)(Y.Be,{children:"If these settings have been helpful, create a dedicated agent you can re-use across conversations."})]}),(0,a.jsx)("div",{className:"py-4",children:m&&f?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 py-8",children:[(0,a.jsx)(et.E.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,a.jsx)(N.f,{className:"w-16 h-16 text-green-500",weight:"fill"})}),(0,a.jsx)(et.E.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-center text-lg font-medium text-accent-foreground",children:"Created successfully!"}),(0,a.jsx)(et.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},children:(0,a.jsx)(es.default,{href:"/agents?agent=".concat(f),children:(0,a.jsx)(v.z,{variant:"secondary",className:"mt-2",children:"Manage Agent"})})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U._,{htmlFor:"agent_name",children:"Name"}),(0,a.jsx)(ee.I,{id:"agent_name",className:"w-full p-2 border mt-4 border-slate-500 rounded-lg",disabled:n,value:o,onChange:e=>r(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:h,defaultValue:u,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Color"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:t.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(b.C,{className:"w-6 h-6 mr-2 ".concat((0,X.oz)(e)),weight:"fill"}),e]})},e))})]})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:c,defaultValue:d,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Icon"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:s.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,K.TI)(e,null!=u?u:"gray","w-6","h-6"),e]})},e))})]})})]})]})}),(0,a.jsxs)(Y.cN,{children:[y&&(0,a.jsx)("div",{className:"text-red-500 text-sm",children:y}),!m&&(0,a.jsxs)(v.z,{type:"submit",onClick:()=>void(!n&&(i(!0),fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o,icon:d,color:u,persona:e.customPrompt,chat_model:e.selectedModel,input_tools:e.inputTools,output_modes:e.outputModes,privacy_level:"private"})}).then(e=>e.json()).then(e=>{if(console.log("Success:",e),"detail"in e){S("Error creating agent: ".concat(e.detail)),i(!1);return}x(!0),p(e.slug),i(!1)}).catch(e=>{console.error("Error:",e),S("Error creating agent: ".concat(e)),i(!1)}))),disabled:n||!g,children:[n?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(_.R,{}),"Create"]}),(0,a.jsx)(Y.GG,{})]})]})]})}function el(e){var s,t,n,i,o;let{...r}=e,[d,c]=(0,l.useState)(!1),{data:u,error:h}=(0,J.ZP)("/api/agents/options",ea),{data:p,isLoading:g,error:j}=(0,J.ZP)("/api/agents/conversation?conversation_id=".concat(r.conversationId),ea),{data:y,error:N,isLoading:b}=(0,m.GW)(),[_,I]=(0,l.useState)(),[M,E]=(0,l.useState)(),[T,B]=(0,l.useState)(),[R,L]=(0,l.useState)(),[F,A]=(0,l.useState)(!1),[Z,D]=(0,l.useState)(!p||(null==p?void 0:null===(s=p.slug)||void 0===s?void 0:s.toLowerCase())==="khoj"),[V,H]=(0,l.useState)(),[Y,$]=(0,l.useState)(),[X,ee]=(0,l.useState)(!1),es=null!==(t=null==y?void 0:y.is_active)&&void 0!==t&&t;function et(){if(p){var e,s;B(p.input_tools),H(p.input_tools),(void 0===p.input_tools||0===p.input_tools.length)&&H((null==u?void 0:u.input_tools)?Object.keys(u.input_tools):[]),L(p.output_modes),$(p.output_modes),(void 0===p.output_modes||0===p.output_modes.length)&&$((null==u?void 0:u.output_modes)?Object.keys(u.output_modes):[]),((null===(e=p.name)||void 0===e?void 0:e.toLowerCase())==="khoj"||!0===p.is_hidden)&&c(!0),(null===(s=p.slug)||void 0===s?void 0:s.toLowerCase())==="khoj"?(E(void 0),I(void 0),D(!0)):(D(!1),I(p.persona),E(p.chat_model))}}function en(e,s){return s.includes(e)?s.filter(s=>s!==e):[...s,e]}return(0,l.useEffect)(()=>{et(),A(!1)},[p]),(0,l.useEffect)(()=>{var e,s;if(!p||g)return;let t=!!M&&M!==p.chat_model,a=!!_&&_!==p.persona,n=JSON.stringify((null==T?void 0:T.sort())||[])!==JSON.stringify(null===(e=p.input_tools)||void 0===e?void 0:e.sort()),i=JSON.stringify((null==R?void 0:R.sort())||[])!==JSON.stringify(null===(s=p.output_modes)||void 0===s?void 0:s.sort());A(t||a||n||i)},[M,_,T,R,p,g]),(0,a.jsxs)(f.DD,{collapsible:"none",className:"ml-auto opacity-30 rounded-lg p-2 transition-all transform duration-300 ease-in-out\n ".concat(r.isOpen?"translate-x-0 opacity-100 w-[300px] relative":"translate-x-full opacity-100 w-0 p-0 m-0","\n "),variant:"floating",children:[(0,a.jsxs)(f.TZ,{children:[(0,a.jsx)(f.$l,{children:p&&!d?(0,a.jsx)("div",{className:"flex items-center relative text-sm",children:(0,a.jsxs)("a",{className:"text-lg font-bold flex flex-row items-center",href:"/agents?agent=".concat(p.slug),children:[(0,K.TI)(p.icon,p.color),p.name]})}):(0,a.jsx)("div",{className:"flex items-center relative text-sm justify-between",children:(0,a.jsx)("p",{children:"Chat Options"})})}),(0,a.jsx)(f.Hz,{className:"border-b last:border-none",children:(0,a.jsx)(f.Ks,{className:"gap-0",children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&p.has_files?(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:(0,a.jsx)(S.J,{})}),(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:"Using custom knowledge base"})]})},"agent_knowledge"):null})})},"knowledge"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Instructions"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(k.g,{className:"w-full h-32 resize-none hover:resize-y",value:_||"",onChange:e=>{I(e.target.value)},readOnly:!d,disabled:!d})})})]})},"instructions"),!g&&p&&(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!es&&(0,a.jsx)("a",{href:"/settings",className:"hover:font-bold text-accent-foreground m-2 bg-accent bg-opacity-10 p-1 rounded-lg",children:"Upgrade"})]}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(P,{disabled:!d,onSelect:e=>{E(e.name)},initialModel:Z?void 0:null==p?void 0:p.chat_model,isActive:r.isActive})},"model")})]})},"model"),(0,a.jsx)(z.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(z.xo,{children:["Tools",(0,a.jsx)(C._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(z.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(n=null==u?void 0:u.input_tools)&&void 0!==n?n:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(Q.u,{children:[(0,a.jsx)(Q.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(U._,{htmlFor:s,className:"flex items-center gap-2 text-accent-foreground p-1 cursor-pointer",children:[(0,K.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(G,{id:s,className:"".concat(d?"cursor-pointer":""),checked:(null!=V?V:[]).includes(s),onCheckedChange:()=>{let e=en(s,null!=V?V:[]);B(e),H(e)},disabled:!d,children:s})]})},s),(0,a.jsx)(q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)}),Object.entries(null!==(i=null==u?void 0:u.output_modes)&&void 0!==i?i:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(Q.u,{children:[(0,a.jsx)(Q.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(U._,{htmlFor:s,className:"flex items-center gap-2 p-1 rounded-lg cursor-pointer",children:[(0,K.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(G,{id:s,className:"".concat(d?"cursor-pointer":""),checked:(null!=Y?Y:[]).includes(s),onCheckedChange:()=>{let e=en(s,null!=Y?Y:[]);L(e),$(e)},disabled:!d,children:s})]})},s),(0,a.jsx)(q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)})]})})})]})}),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Files"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(x.J_,{conversationId:r.conversationId,uploadedFiles:[],isMobileWidth:null!==(o=r.isMobileWidth)&&void 0!==o&&o})},"files-conversation")})]})},"files")]}),r.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&!d&&p.is_creator?(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"ghost",onClick:()=>window.location.href="/agents?agent=".concat(null==p?void 0:p.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[!F&&d&&_&&!Z&&M&&(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(ei,{customPrompt:_,selectedModel:M,inputTools:null!=V?V:[],outputModes:null!=Y?Y:[]})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(et(),A(!1)),variant:"ghost",disabled:!d||!F,children:"Reset"})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsxs)(v.z,{className:"w-full ".concat(F?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(F){if(!Z&&(null==p?void 0:p.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";Z&&(e="POST");let s={persona:_,chat_model:M,input_tools:T,output_modes:R,...Z?{}:{slug:null==p?void 0:p.slug}};ee(!0),fetch(Z?"/api/agents/hidden?conversation_id=".concat(r.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{ee(!1),e.json()}).then(e=>{(0,W.j)("/api/agents/conversation?conversation_id=".concat(r.conversationId)),A(!1)}).catch(e=>{console.error("Error:",e),ee(!1)})}})(),disabled:!d||!F||X,children:[X?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(O.Z,{}),X?"Saving":"Save"]})})})]})})},"actions")]})}function eo(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,l.useState)(""),[d,c]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[p,g]=(0,l.useState)(!1),j=(0,l.useRef)(null),v=e.setQueryToProcess,y=e.onConversationIdChange,N=e.isMobileWidth?"w-full":"w-4/6";if((0,l.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,l.useEffect)(()=>{let s=localStorage.getItem("images");if(s){let t=JSON.parse(s);c(t);let a=t.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let t=localStorage.getItem("message");t&&(m(!0),v(t),t.trim().startsWith("/research")&&g(!0));let a=localStorage.getItem("uploadedFiles");if(a){let s=a?JSON.parse(a):[],t=[];for(let e of s)t.push({name:e.name,file_type:e.file_type,content:e.content,size:e.size});localStorage.removeItem("uploadedFiles"),e.setUploadedFiles(t)}},[v,e.setImages,s]),(0,l.useEffect)(()=>{t&&(m(!0),v(t))},[t,v]),(0,l.useEffect)(()=>{s&&(null==y||y(s))},[s,y]),(0,l.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(m(!1),c([]),e.setUploadedFiles(void 0)):n("")},[e.streamedMessages]),!s){window.location.href="/";return}return(0,a.jsxs)("div",{className:"flex flex-row h-full w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:i().chatBodyFull,children:(0,a.jsx)(o.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:u?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:N,setIsChatSideBarOpen:e.setIsChatSideBarOpen,onRetryMessage:e.onRetryMessage})}),(0,a.jsx)("div",{className:"".concat(i().inputBox," print-hidden p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(N," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:e.isParentProcessing||!1,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:p,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)("div",{className:"print-hidden",children:(0,a.jsx)(en,{conversationId:s,isActive:e.isActive,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})})]})}function er(){let e="Khoj AI - Chat",[s,t]=(0,l.useState)(null),[n,o]=(0,l.useState)(!0),[r,h]=(0,l.useState)(e),[N,b]=(0,l.useState)(null),[w,_]=(0,l.useState)([]),[S,C]=(0,l.useState)(""),[O,k]=(0,l.useState)(!1),[I,M]=(0,l.useState)(void 0),[E,T]=(0,l.useState)([]),[z,B]=(0,l.useState)(null),[R,L]=(0,l.useState)(!1),[F,A]=(0,l.useState)(!1),{locationData:P,locationDataError:Z,locationDataLoading:J}=(0,u.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:W,error:D,isLoading:K}=(0,m.GW)(),U=(0,u.IC)(),[V,H]=(0,l.useState)(!1);async function G(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let s=e.body.getReader(),t=new TextDecoder,a="␃\uD83D\uDD1A␗",n="",i=[],l={},o={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),k(!1),T([]),N&&(0,c.tQ)(N,h);break}for(n+=t.decode(d,{stream:!0});-1!==(e=n.indexOf(a));){let s=n.slice(0,e);if(n=n.slice(e+a.length),s){let e=w.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:i,onlineContext:l,codeContext:o}=(0,c.VK)(s,e,i,l,o)),_([...w])}}}}async function Q(){if(localStorage.removeItem("message"),!S||!N){k(!1);return}let e={q:S,conversation_id:N,stream:!0,interrupt:F,...P&&{city:P.city,region:P.region,country:P.country,country_code:P.countryCode,timezone:P.timezone},...E.length>0&&{images:E},...I&&{files:I}};A(!1);let s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==z?void 0:z.signal});try{await G(s)}catch(i){let e;try{e=await s.json()}catch(s){e={streamError:"Error reading API error response stream. Expected JSON response."}}console.error(e);let t=w.find(e=>!e.completed);if(!t)return;let a=i.message,n=i.name;a.includes("Error in input stream")?t.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.streamError?t.rawResponse="Umm, not sure what just happened but I lost my train of thought. Could you try again or ask my developers to look into this if the issue persists? They can be contacted at the Khoj Github, Discord or team@khoj.dev.":429===s.status?"detail"in e?t.rawResponse="".concat(e.detail):t.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":"AbortError"===n?t.rawResponse="I've stopped processing this message. If you'd like to continue, please send the message again.":t.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),t.completed=!0,_([...w]),C(""),k(!1)}}return(0,l.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,u.EK)()},[]),(0,l.useEffect)(()=>{R&&(null==z||z.abort(),function(){let e=w.find(e=>!e.completed);e&&(e.completed=!0,_([...w]),k(!1))}(),A(!0),L(!1))},[R]),(0,l.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:I};_(s=>[...s,e]),k(!0),B(new AbortController)}},[S]),(0,l.useEffect)(()=>{O&&!J&&Q()},[O,J]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)("div",{className:"print-hidden",children:(0,a.jsx)(p.S,{conversationId:N||""})}),(0,a.jsxs)(f.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4 print-hidden",children:[(0,a.jsx)(f.vP,{className:"-ml-1"}),(0,a.jsx)(g.Z,{orientation:"vertical",className:"mr-2 h-4"}),N&&(0,a.jsx)("div",{className:"".concat(i().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:U?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(j.VO,{className:"h-auto w-16"})}):r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:r}),(0,a.jsx)(x.En,{conversationId:N,setTitle:h,sizing:"md"})]})}),(0,a.jsx)("div",{className:"flex justify-end items-start gap-2 text-sm ml-auto",children:(0,a.jsx)(v.z,{variant:"ghost",size:"icon",className:"h-12 w-12 data-[state=open]:bg-accent print-hidden",onClick:()=>H(!V),children:(0,a.jsx)(y.T,{className:"w-6 h-6"})})})]}),(0,a.jsxs)("div",{className:"".concat(i().main," ").concat(i().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(r&&r!==e?": ".concat(r):"")}),(0,a.jsx)("div",{className:i().chatBox,children:(0,a.jsx)("div",{className:i().chatBoxBody,children:(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(eo,{isLoggedIn:!!W,streamedMessages:w,setStreamedMessages:_,chatOptionsData:s,setTitle:h,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:U,onConversationIdChange:e=>{b(e)},setImages:T,setTriggeredAbort:L,isChatSideBarOpen:V,setIsChatSideBarOpen:H,isActive:null==W?void 0:W.is_active,isParentProcessing:O,onRetryMessage:(e,s)=>{if(!e){console.warn("No query provided for retry");return}s&&(_(e=>e.filter(e=>e.turnId!==s)),fetch("/api/chat/conversation/message",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:N,turn_id:s})}).catch(e=>{console.error("Failed to delete message for retry:",e)})),C(e)}})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),i=t(6394),l=t(90535),o=t(94508);let r=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.f,{ref:s,className:(0,o.cn)(r(),t),...n})});d.displayName=i.f.displayName},53647:function(e,s,t){"use strict";t.d(s,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var a=t(57437),n=t(2265),i=t(56873),l=t(40875),o=t(22135),r=t(30401),d=t(94508);let c=i.fC;i.ZA;let u=i.B4,h=n.forwardRef((e,s)=>{let{className:t,children:n,...o}=e;return(0,a.jsxs)(i.xz,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[n,(0,a.jsx)(i.JO,{asChild:!0,children:(0,a.jsx)(l.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=i.xz.displayName;let m=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.u_,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})});m.displayName=i.u_.displayName;let x=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.$G,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})})});x.displayName=i.$G.displayName;let f=n.forwardRef((e,s)=>{let{className:t,children:n,position:l="popper",...o}=e;return(0,a.jsx)(i.h_,{children:(0,a.jsxs)(i.VY,{ref:s,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:l,...o,children:[(0,a.jsx)(m,{}),(0,a.jsx)(i.l_,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,a.jsx)(x,{})]})})});f.displayName=i.VY.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.__,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n})}).displayName=i.__.displayName;let p=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,a.jsxs)(i.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(i.wU,{children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(i.eT,{children:n})]})});p.displayName=i.ck.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",t),...n})}).displayName=i.Z0.displayName},63136:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq",chatHistory:"chat_chatHistory__EzBJM"}}},function(e){e.O(0,[3849,216,5638,3954,1860,2939,7200,8667,1327,4447,3592,5639,9568,2327,5477,7127,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,s,t){Promise.resolve().then(t.bind(t,42780))},42780:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return er}});var a=t(57437),n=t(63136),i=t.n(n),l=t(2265),o=t(27127),r=t(99376),d=t(14308),c=t(59199);t(2446);var u=t(7436),h=t(5477),m=t(56937),x=t(55287),f=t(60729),p=t(34124),g=t(6512),j=t(37104),v=t(62869),y=t(91890),N=t(68772),b=t(79603),w=t(23594),_=t(34153),S=t(43551),C=t(32046),O=t(5223),k=t(76818),I=t(75256),M=t(24148),E=t(94508),T=t(23518),z=t(57054),B=t(16605);let R=B.fC,L=B.xz,F=l.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:i=4,...l}=e;return(0,a.jsx)(B.VY,{ref:s,align:n,sideOffset:i,className:(0,E.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})});F.displayName=B.VY.displayName;var A=t(93022);function P(e){var s;let{...t}=e,[n,i]=l.useState(!1),[o,r]=(0,l.useState)(void 0),[d,c]=(0,l.useState)(void 0),{data:h,error:x,isLoading:f}=(0,m.h2)(!0),[p,g]=(0,l.useState)([]),j=(0,u.IC)();return((0,l.useEffect)(()=>{if(!f&&h){if(g(h.chat_model_options),t.initialModel)c(h.chat_model_options.find(e=>e.name===t.initialModel));else{let e=h.chat_model_options.find(e=>e.id===h.selected_chat_model_config);!e&&h.chat_model_options.length>0?c(h.chat_model_options[0]):c(e)}}},[h,t.initialModel,f]),(0,l.useEffect)(()=>{d&&h&&t.onSelect(d)},[d,h,t.onSelect]),f)?(0,a.jsx)(A.O,{className:"w-full h-10"}):x?(0,a.jsx)("div",{className:"text-sm text-error",children:x.message}):(0,a.jsx)("div",{className:"grid gap-2 w-[250px]",children:(0,a.jsxs)(z.J2,{open:n,onOpenChange:i,...t,children:[(0,a.jsx)(z.xo,{asChild:!0,children:(0,a.jsxs)(v.z,{variant:"outline",role:"combobox","aria-expanded":n,"aria-label":"Select a model",className:"w-full justify-between text-left",disabled:null!==(s=t.disabled)&&void 0!==s&&s,children:[(0,a.jsx)("p",{className:"truncate",children:d?d.name.substring(0,20):"Select a model..."}),(0,a.jsx)(I.K,{className:"opacity-50"})]})}),(0,a.jsx)(z.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(Z,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)},isActive:t.isActive},e.id))},"models")]})})}):(0,a.jsxs)(R,{children:[(0,a.jsx)(F,{side:"left",align:"start",forceMount:!0,className:"min-h-[280px]",children:(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("h4",{className:"font-medium leading-none",children:null==o?void 0:o.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==o?void 0:o.description}),(null==o?void 0:o.strengths)?(0,a.jsxs)("div",{className:"mt-4 grid gap-2",children:[(0,a.jsx)("h5",{className:"text-sm font-medium leading-none",children:"Strengths"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:o.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{}),(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(Z,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)},isActive:t.isActive},e.id))},"models")]})})]})]})})]})})}function Z(e){let{model:s,isSelected:t,onSelect:n,onPeek:i,isActive:o}=e,r=l.useRef(null);return(0,u.Iy)(r,e=>{e.forEach(e=>{var t;"attributes"===e.type&&"aria-selected"===e.attributeName&&(null===(t=r.current)||void 0===t?void 0:t.getAttribute("aria-selected"))==="true"&&i(s)})}),(0,a.jsxs)(T.di,{onSelect:n,ref:r,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",disabled:!o&&"free"!==s.tier,children:[s.name," ","standard"===s.tier&&(0,a.jsx)("span",{className:"text-green-500 ml-2",children:"(Futurist)"}),(0,a.jsx)(M.J,{className:(0,E.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var J=t(17200),W=t(2602),D=t(69304),K=t(42225),U=t(26815),V=t(9270),H=t(30401);let G=l.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(V.fC,{ref:s,className:(0,E.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-secondary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-500 data-[state=checked]:text-primary-foreground",t),...n,children:(0,a.jsx)(V.z$,{className:(0,E.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(H.Z,{className:"h-4 w-4"})})})});G.displayName=V.fC.displayName;var Q=t(81103),q=t(61312),Y=t(26110),$=t(53647),X=t(84671),ee=t(95186),es=t(27648),et=t(14368);let ea=e=>fetch(e).then(e=>e.json());function en(e){let{...s}=e;return s.isMobileWidth?(0,a.jsx)(D.yo,{open:s.isOpen,onOpenChange:s.onOpenChange,children:(0,a.jsx)(D.ue,{className:"w-[300px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:(0,a.jsx)(el,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(el,{...s})})}function ei(e){let s=(0,K.BI)(),t=X.xF,[n,i]=(0,l.useState)(!1),[o,r]=(0,l.useState)(),[d,c]=(0,l.useState)(),[u,h]=(0,l.useState)(),[m,x]=(0,l.useState)(!1),[f,p]=(0,l.useState)(),[g,j]=(0,l.useState)(!1),[y,S]=(0,l.useState)();return(0,l.useEffect)(()=>{o&&d&&u?j(!0):j(!1)},[o,d,u]),(0,a.jsxs)(Y.Vq,{children:[(0,a.jsx)(Y.hg,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"secondary",children:"Create Agent"})}),(0,a.jsxs)(Y.cZ,{children:[(0,a.jsxs)(Y.fK,{children:[m&&f?(0,a.jsxs)(Y.$N,{children:["Created ",o]}):(0,a.jsx)(Y.$N,{children:"Create a New Agent"}),(0,a.jsx)(Y.GG,{}),(0,a.jsx)(Y.Be,{children:"If these settings have been helpful, create a dedicated agent you can re-use across conversations."})]}),(0,a.jsx)("div",{className:"py-4",children:m&&f?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 py-8",children:[(0,a.jsx)(et.E.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,a.jsx)(N.f,{className:"w-16 h-16 text-green-500",weight:"fill"})}),(0,a.jsx)(et.E.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-center text-lg font-medium text-accent-foreground",children:"Created successfully!"}),(0,a.jsx)(et.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},children:(0,a.jsx)(es.default,{href:"/agents?agent=".concat(f),children:(0,a.jsx)(v.z,{variant:"secondary",className:"mt-2",children:"Manage Agent"})})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(U._,{htmlFor:"agent_name",children:"Name"}),(0,a.jsx)(ee.I,{id:"agent_name",className:"w-full p-2 border mt-4 border-slate-500 rounded-lg",disabled:n,value:o,onChange:e=>r(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:h,defaultValue:u,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Color"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:t.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(b.C,{className:"w-6 h-6 mr-2 ".concat((0,X.oz)(e)),weight:"fill"}),e]})},e))})]})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:c,defaultValue:d,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Icon"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:s.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,K.TI)(e,null!=u?u:"gray","w-6","h-6"),e]})},e))})]})})]})]})}),(0,a.jsxs)(Y.cN,{children:[y&&(0,a.jsx)("div",{className:"text-red-500 text-sm",children:y}),!m&&(0,a.jsxs)(v.z,{type:"submit",onClick:()=>void(!n&&(i(!0),fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o,icon:d,color:u,persona:e.customPrompt,chat_model:e.selectedModel,input_tools:e.inputTools,output_modes:e.outputModes,privacy_level:"private"})}).then(e=>e.json()).then(e=>{if(console.log("Success:",e),"detail"in e){S("Error creating agent: ".concat(e.detail)),i(!1);return}x(!0),p(e.slug),i(!1)}).catch(e=>{console.error("Error:",e),S("Error creating agent: ".concat(e)),i(!1)}))),disabled:n||!g,children:[n?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(_.R,{}),"Create"]}),(0,a.jsx)(Y.GG,{})]})]})]})}function el(e){var s,t,n,i,o;let{...r}=e,[d,c]=(0,l.useState)(!1),{data:u,error:h}=(0,J.ZP)("/api/agents/options",ea),{data:p,isLoading:g,error:j}=(0,J.ZP)("/api/agents/conversation?conversation_id=".concat(r.conversationId),ea),{data:y,error:N,isLoading:b}=(0,m.GW)(),[_,I]=(0,l.useState)(),[M,E]=(0,l.useState)(),[T,B]=(0,l.useState)(),[R,L]=(0,l.useState)(),[F,A]=(0,l.useState)(!1),[Z,D]=(0,l.useState)(!p||(null==p?void 0:null===(s=p.slug)||void 0===s?void 0:s.toLowerCase())==="khoj"),[V,H]=(0,l.useState)(),[Y,$]=(0,l.useState)(),[X,ee]=(0,l.useState)(!1),es=null!==(t=null==y?void 0:y.is_active)&&void 0!==t&&t;function et(){if(p){var e,s;B(p.input_tools),H(p.input_tools),(void 0===p.input_tools||0===p.input_tools.length)&&H((null==u?void 0:u.input_tools)?Object.keys(u.input_tools):[]),L(p.output_modes),$(p.output_modes),(void 0===p.output_modes||0===p.output_modes.length)&&$((null==u?void 0:u.output_modes)?Object.keys(u.output_modes):[]),((null===(e=p.name)||void 0===e?void 0:e.toLowerCase())==="khoj"||!0===p.is_hidden)&&c(!0),(null===(s=p.slug)||void 0===s?void 0:s.toLowerCase())==="khoj"?(E(void 0),I(void 0),D(!0)):(D(!1),I(p.persona),E(p.chat_model))}}function en(e,s){return s.includes(e)?s.filter(s=>s!==e):[...s,e]}return(0,l.useEffect)(()=>{et(),A(!1)},[p]),(0,l.useEffect)(()=>{var e,s;if(!p||g)return;let t=!!M&&M!==p.chat_model,a=!!_&&_!==p.persona,n=JSON.stringify((null==T?void 0:T.sort())||[])!==JSON.stringify(null===(e=p.input_tools)||void 0===e?void 0:e.sort()),i=JSON.stringify((null==R?void 0:R.sort())||[])!==JSON.stringify(null===(s=p.output_modes)||void 0===s?void 0:s.sort());A(t||a||n||i)},[M,_,T,R,p,g]),(0,a.jsxs)(f.DD,{collapsible:"none",className:"ml-auto opacity-30 rounded-lg p-2 transition-all transform duration-300 ease-in-out\n ".concat(r.isOpen?"translate-x-0 opacity-100 w-[300px] relative":"translate-x-full opacity-100 w-0 p-0 m-0","\n "),variant:"floating",children:[(0,a.jsxs)(f.TZ,{children:[(0,a.jsx)(f.$l,{children:p&&!d?(0,a.jsx)("div",{className:"flex items-center relative text-sm",children:(0,a.jsxs)("a",{className:"text-lg font-bold flex flex-row items-center",href:"/agents?agent=".concat(p.slug),children:[(0,K.TI)(p.icon,p.color),p.name]})}):(0,a.jsx)("div",{className:"flex items-center relative text-sm justify-between",children:(0,a.jsx)("p",{children:"Chat Options"})})}),(0,a.jsx)(f.Hz,{className:"border-b last:border-none",children:(0,a.jsx)(f.Ks,{className:"gap-0",children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&p.has_files?(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:(0,a.jsx)(S.J,{})}),(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:"Using custom knowledge base"})]})},"agent_knowledge"):null})})},"knowledge"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Instructions"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(k.g,{className:"w-full h-32 resize-none hover:resize-y",value:_||"",onChange:e=>{I(e.target.value)},readOnly:!d,disabled:!d})})})]})},"instructions"),!g&&p&&(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!es&&(0,a.jsx)("a",{href:"/settings",className:"hover:font-bold text-accent-foreground m-2 bg-accent bg-opacity-10 p-1 rounded-lg",children:"Upgrade"})]}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(P,{disabled:!d,onSelect:e=>{E(e.name)},initialModel:Z?void 0:null==p?void 0:p.chat_model,isActive:r.isActive})},"model")})]})},"model"),(0,a.jsx)(z.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(z.xo,{children:["Tools",(0,a.jsx)(C._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(z.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(n=null==u?void 0:u.input_tools)&&void 0!==n?n:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(Q.u,{children:[(0,a.jsx)(Q.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(U._,{htmlFor:s,className:"flex items-center gap-2 text-accent-foreground p-1 cursor-pointer",children:[(0,K.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(G,{id:s,className:"".concat(d?"cursor-pointer":""),checked:(null!=V?V:[]).includes(s),onCheckedChange:()=>{let e=en(s,null!=V?V:[]);B(e),H(e)},disabled:!d,children:s})]})},s),(0,a.jsx)(q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)}),Object.entries(null!==(i=null==u?void 0:u.output_modes)&&void 0!==i?i:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(Q.u,{children:[(0,a.jsx)(Q.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(U._,{htmlFor:s,className:"flex items-center gap-2 p-1 rounded-lg cursor-pointer",children:[(0,K.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(G,{id:s,className:"".concat(d?"cursor-pointer":""),checked:(null!=Y?Y:[]).includes(s),onCheckedChange:()=>{let e=en(s,null!=Y?Y:[]);L(e),$(e)},disabled:!d,children:s})]})},s),(0,a.jsx)(q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)})]})})})]})}),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Files"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(x.J_,{conversationId:r.conversationId,uploadedFiles:[],isMobileWidth:null!==(o=r.isMobileWidth)&&void 0!==o&&o})},"files-conversation")})]})},"files")]}),r.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&!d&&p.is_creator?(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"ghost",onClick:()=>window.location.href="/agents?agent=".concat(null==p?void 0:p.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[!F&&d&&_&&!Z&&M&&(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(ei,{customPrompt:_,selectedModel:M,inputTools:null!=V?V:[],outputModes:null!=Y?Y:[]})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(et(),A(!1)),variant:"ghost",disabled:!d||!F,children:"Reset"})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsxs)(v.z,{className:"w-full ".concat(F?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(F){if(!Z&&(null==p?void 0:p.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";Z&&(e="POST");let s={persona:_,chat_model:M,input_tools:T,output_modes:R,...Z?{}:{slug:null==p?void 0:p.slug}};ee(!0),fetch(Z?"/api/agents/hidden?conversation_id=".concat(r.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{ee(!1),e.json()}).then(e=>{(0,W.j)("/api/agents/conversation?conversation_id=".concat(r.conversationId)),A(!1)}).catch(e=>{console.error("Error:",e),ee(!1)})}})(),disabled:!d||!F||X,children:[X?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(O.Z,{}),X?"Saving":"Save"]})})})]})})},"actions")]})}function eo(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,l.useState)(""),[d,c]=(0,l.useState)([]),[u,m]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[p,g]=(0,l.useState)(!1),j=(0,l.useRef)(null),v=e.setQueryToProcess,y=e.onConversationIdChange,N=e.isMobileWidth?"w-full":"w-4/6";if((0,l.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,l.useEffect)(()=>{let s=localStorage.getItem("images");if(s){let t=JSON.parse(s);c(t);let a=t.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let t=localStorage.getItem("message");t&&(m(!0),v(t),t.trim().startsWith("/research")&&g(!0));let a=localStorage.getItem("uploadedFiles");if(a){let s=a?JSON.parse(a):[],t=[];for(let e of s)t.push({name:e.name,file_type:e.file_type,content:e.content,size:e.size});localStorage.removeItem("uploadedFiles"),e.setUploadedFiles(t)}},[v,e.setImages,s]),(0,l.useEffect)(()=>{t&&(m(!0),v(t))},[t,v]),(0,l.useEffect)(()=>{s&&(null==y||y(s))},[s,y]),(0,l.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(m(!1),c([]),e.setUploadedFiles(void 0)):n("")},[e.streamedMessages]),!s){window.location.href="/";return}return(0,a.jsxs)("div",{className:"flex flex-row h-full w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:i().chatBodyFull,children:(0,a.jsx)(o.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:u?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:N,setIsChatSideBarOpen:e.setIsChatSideBarOpen,onRetryMessage:e.onRetryMessage})}),(0,a.jsx)("div",{className:"".concat(i().inputBox," print-hidden p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(N," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(h.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:e.isParentProcessing||!1,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:p,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)("div",{className:"print-hidden",children:(0,a.jsx)(en,{conversationId:s,isActive:e.isActive,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})})]})}function er(){let e="Khoj AI - Chat",[s,t]=(0,l.useState)(null),[n,o]=(0,l.useState)(!0),[r,h]=(0,l.useState)(e),[N,b]=(0,l.useState)(null),[w,_]=(0,l.useState)([]),[S,C]=(0,l.useState)(""),[O,k]=(0,l.useState)(!1),[I,M]=(0,l.useState)(void 0),[E,T]=(0,l.useState)([]),[z,B]=(0,l.useState)(null),[R,L]=(0,l.useState)(!1),[F,A]=(0,l.useState)(!1),{locationData:P,locationDataError:Z,locationDataLoading:J}=(0,u.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:W,error:D,isLoading:K}=(0,m.GW)(),U=(0,u.IC)(),[V,H]=(0,l.useState)(!1);async function G(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let s=e.body.getReader(),t=new TextDecoder,a="␃\uD83D\uDD1A␗",n="",i=[],l={},o={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),k(!1),T([]),N&&(0,c.tQ)(N,h);break}for(n+=t.decode(d,{stream:!0});-1!==(e=n.indexOf(a));){let s=n.slice(0,e);if(n=n.slice(e+a.length),s){let e=w.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:i,onlineContext:l,codeContext:o}=(0,c.VK)(s,e,i,l,o)),_([...w])}}}}async function Q(){if(localStorage.removeItem("message"),!S||!N){k(!1);return}let e={q:S,conversation_id:N,stream:!0,interrupt:F,...P&&{city:P.city,region:P.region,country:P.country,country_code:P.countryCode,timezone:P.timezone},...E.length>0&&{images:E},...I&&{files:I}};A(!1);let s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==z?void 0:z.signal});try{await G(s)}catch(i){let e;try{e=await s.json()}catch(s){e={streamError:"Error reading API error response stream. Expected JSON response."}}console.error(e);let t=w.find(e=>!e.completed);if(!t)return;let a=i.message,n=i.name;a.includes("Error in input stream")?t.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.streamError?t.rawResponse="Umm, not sure what just happened but I lost my train of thought. Could you try again or ask my developers to look into this if the issue persists? They can be contacted at the Khoj Github, Discord or team@khoj.dev.":429===s.status?"detail"in e?t.rawResponse="".concat(e.detail):t.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":"AbortError"===n?t.rawResponse="I've stopped processing this message. If you'd like to continue, please send the message again.":t.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),t.completed=!0,_([...w]),C(""),k(!1)}}return(0,l.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,u.EK)()},[]),(0,l.useEffect)(()=>{R&&(null==z||z.abort(),function(){let e=w.find(e=>!e.completed);e&&(e.completed=!0,_([...w]),k(!1))}(),A(!0),L(!1))},[R]),(0,l.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:I};_(s=>[...s,e]),k(!0),B(new AbortController)}},[S]),(0,l.useEffect)(()=>{O&&!J&&Q()},[O,J]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)("div",{className:"print-hidden",children:(0,a.jsx)(p.S,{conversationId:N||""})}),(0,a.jsxs)(f.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4 print-hidden",children:[(0,a.jsx)(f.vP,{className:"-ml-1"}),(0,a.jsx)(g.Z,{orientation:"vertical",className:"mr-2 h-4"}),N&&(0,a.jsx)("div",{className:"".concat(i().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:U?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(j.VO,{className:"h-auto w-16"})}):r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:r}),(0,a.jsx)(x.En,{conversationId:N,setTitle:h,sizing:"md"})]})}),(0,a.jsx)("div",{className:"flex justify-end items-start gap-2 text-sm ml-auto",children:(0,a.jsx)(v.z,{variant:"ghost",size:"icon",className:"h-12 w-12 data-[state=open]:bg-accent print-hidden",onClick:()=>H(!V),children:(0,a.jsx)(y.T,{className:"w-6 h-6"})})})]}),(0,a.jsxs)("div",{className:"".concat(i().main," ").concat(i().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(r&&r!==e?": ".concat(r):"")}),(0,a.jsx)("div",{className:i().chatBox,children:(0,a.jsx)("div",{className:i().chatBoxBody,children:(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(eo,{isLoggedIn:!!W,streamedMessages:w,setStreamedMessages:_,chatOptionsData:s,setTitle:h,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:U,onConversationIdChange:e=>{b(e)},setImages:T,setTriggeredAbort:L,isChatSideBarOpen:V,setIsChatSideBarOpen:H,isActive:null==W?void 0:W.is_active,isParentProcessing:O,onRetryMessage:(e,s)=>{if(!e){console.warn("No query provided for retry");return}s&&(_(e=>e.filter(e=>e.turnId!==s)),fetch("/api/chat/conversation/message",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation_id:N,turn_id:s})}).catch(e=>{console.error("Failed to delete message for retry:",e)})),C(e)}})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),i=t(6394),l=t(90535),o=t(94508);let r=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.f,{ref:s,className:(0,o.cn)(r(),t),...n})});d.displayName=i.f.displayName},53647:function(e,s,t){"use strict";t.d(s,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return h},ki:function(){return u}});var a=t(57437),n=t(2265),i=t(56873),l=t(40875),o=t(22135),r=t(30401),d=t(94508);let c=i.fC;i.ZA;let u=i.B4,h=n.forwardRef((e,s)=>{let{className:t,children:n,...o}=e;return(0,a.jsxs)(i.xz,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[n,(0,a.jsx)(i.JO,{asChild:!0,children:(0,a.jsx)(l.Z,{className:"h-4 w-4 opacity-50"})})]})});h.displayName=i.xz.displayName;let m=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.u_,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})});m.displayName=i.u_.displayName;let x=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.$G,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})})});x.displayName=i.$G.displayName;let f=n.forwardRef((e,s)=>{let{className:t,children:n,position:l="popper",...o}=e;return(0,a.jsx)(i.h_,{children:(0,a.jsxs)(i.VY,{ref:s,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===l&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:l,...o,children:[(0,a.jsx)(m,{}),(0,a.jsx)(i.l_,{className:(0,d.cn)("p-1","popper"===l&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,a.jsx)(x,{})]})})});f.displayName=i.VY.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.__,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n})}).displayName=i.__.displayName;let p=n.forwardRef((e,s)=>{let{className:t,children:n,...l}=e;return(0,a.jsxs)(i.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(i.wU,{children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(i.eT,{children:n})]})});p.displayName=i.ck.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",t),...n})}).displayName=i.Z0.displayName},63136:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq",chatHistory:"chat_chatHistory__EzBJM"}}},function(e){e.O(0,[4842,5638,3954,1860,2939,7200,8667,1327,4447,3592,5639,9568,2327,5477,7127,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);