khoj 1.35.4.dev53__tar.gz → 1.36.1.dev2__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.
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/PKG-INFO +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/404/index.html +1 -1
- khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/4986-6f87a3f6589b0d13.js +1 -0
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/agents/page-5c32dfc2ab1d37c3.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/agents/page-febae7715efd8a45.js +1 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/automations/page-c6dee506ac1ef75c.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/automations/page-efc1228b60c92eac.js +1 -1
- khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-c967bbcceaf2a621.js +1 -0
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/page-18c5514c09249e15.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/page-24121c5745243676.js +1 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/search/page-dfbf62acab34d1f1.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/search/page-64342dabb599f37c.js +1 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/settings/page-2a68279b34a434e3.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/settings/page-619a628d69d3d36b.js +1 -1
- khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-8b91b8adb4f04450.js +1 -0
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/page-978928ef05d44a48.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/page-4ac88dde66d91663.js +1 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/webpack-4b0fb0aafc881a07.js → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/webpack-d0babda1d8f31af4.js +1 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/css/f29ee25d068f459b.css → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/css/4b47946ec47fcb07.css +1 -1
- khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/css/55d4a822f8d94b67.css +1 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/agents/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/agents/index.txt +2 -2
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/automations/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/automations/index.txt +3 -3
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/chat/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/chat/index.txt +2 -2
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/index.txt +2 -2
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/search/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/search/index.txt +3 -3
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/settings/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/settings/index.txt +4 -4
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/share/chat/index.html +1 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/4986-80ecd055ad138cf6.js +0 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-8b64c2ed43be097b.js +0 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6d7831aace573049.js +0 -1
- khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css +0 -1
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/.gitignore +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/LICENSE +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/README.md +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/pyproject.toml +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/app/README.md +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/app/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/app/asgi.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/app/settings.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/app/urls.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/configure.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/adapters/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/admin.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/apps.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/management/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/management/commands/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/management/commands/change_default_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/management/commands/change_generated_images_url.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/management/commands/convert_images_png_to_webp.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/management/commands/delete_orphaned_fileobjects.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0001_khojuser.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0002_googleuser.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0003_vector_extension.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0004_content_types_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0005_embeddings_corpus_id.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0006_embeddingsdates.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0007_add_conversation.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0008_alter_conversation_conversation_log.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0009_khojapiuser.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0010_chatmodeloptions_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0010_rename_embeddings_entry_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0011_merge_20231102_0138.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0012_entry_file_source.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0013_subscription.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0014_alter_googleuser_picture.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0015_alter_subscription_user.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0016_alter_subscription_renewal_date.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0017_searchmodel.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0018_searchmodelconfig_delete_searchmodel.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0019_alter_googleuser_family_name_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0020_reflectivequestion.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0021_speechtotextmodeloptions_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0022_texttoimagemodelconfig.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0023_usersearchmodelconfig.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0024_alter_entry_embeddings.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0025_clientapplication_khojuser_phone_number_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0025_searchmodelconfig_embeddings_inference_endpoint_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0026_searchmodelconfig_cross_encoder_inference_endpoint_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0027_merge_20240118_1324.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0028_khojuser_verified_phone_number.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0029_userrequests.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0030_conversation_slug_and_title.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0031_agent_conversation_agent.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0031_alter_googleuser_locale.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0032_merge_20240322_0427.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0033_rename_tuning_agent_personality.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0034_alter_chatmodeloptions_chat_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0035_processlock.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0036_alter_processlock_name.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0036_delete_offlinechatprocessorconversationconfig.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0036_publicconversation.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0037_chatmodeloptions_openai_config_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0037_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0038_merge_20240425_0857.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0038_merge_20240426_1640.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0039_merge_20240501_0301.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0040_alter_processlock_name.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0040_merge_20240504_1010.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0041_merge_20240505_1234.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0042_serverchatsettings.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0043_alter_chatmodeloptions_model_type.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0044_conversation_file_filters.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0045_fileobject.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0046_khojuser_email_verification_code_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0047_alter_entry_file_type.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0048_voicemodeloption_uservoicemodelconfig.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0049_datastore.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0049_texttoimagemodelconfig_api_key_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0050_alter_processlock_name.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0051_merge_20240702_1220.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0052_alter_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0053_agent_style_color_agent_style_icon.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0054_alter_agent_style_color.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0055_alter_agent_style_icon.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0056_chatmodeloptions_vision_enabled.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0056_searchmodelconfig_cross_encoder_model_config.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0057_merge_20240816_1409.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0057_remove_serverchatsettings_default_model_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0058_alter_chatmodeloptions_chat_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0059_searchmodelconfig_bi_encoder_confidence_threshold.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0060_merge_20240905_1828.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0061_alter_chatmodeloptions_model_type.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0061_alter_texttoimagemodelconfig_model_type.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0062_merge_20240913_0222.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0063_conversation_temp_id.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0064_remove_conversation_temp_id_alter_conversation_id.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0065_remove_agent_avatar_remove_agent_public_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0066_remove_agent_tools_agent_input_tools_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0067_alter_agent_style_icon.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0068_alter_agent_output_modes.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0069_webscraper_serverchatsettings_web_scraper.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0070_alter_agent_input_tools_alter_agent_output_modes.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0071_subscription_enabled_trial_at_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0072_entry_search_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0073_delete_usersearchmodelconfig.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0074_alter_conversation_title.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0075_migrate_generated_assets_and_validate.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0076_rename_openaiprocessorconversationconfig_aimodelapi_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0077_chatmodel_alter_agent_chat_model_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0078_khojuser_email_verification_code_expiry.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0079_entry_file_object.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0079_searchmodelconfig_embeddings_inference_endpoint_type.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0080_speechtotextmodeloptions_ai_model_api.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0081_agent_is_hidden_chatmodel_description_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0081_merge_20250120_1633.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0082_merge_20250121_1842.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0083_alter_agent_output_modes_alter_agent_personality_and_more.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0084_alter_agent_input_tools.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/0085_alter_agent_output_modes.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/migrations/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/models/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/database/tests.py +0 -0
- {khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/nzUuinMXEsRX86qGdx-yY → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/U-JIEyPj4AVkPBzpKkOWA}/_buildManifest.js +0 -0
- {khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/nzUuinMXEsRX86qGdx-yY → khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/U-JIEyPj4AVkPBzpKkOWA}/_ssgManifest.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/0d8bff65.4b1018183a8be7c2.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/1199-80c79778c44ad4ec.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/1243.ea2826fb35adb15a.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/133.392ae90c3b2a67f2.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/1592.b069bdb7aaddd2eb.js +0 -0
- /khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/1915-4b7980a58fb630d6.js → /khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/1915-233ac8a122732d6b.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/2069.f060659791c0c484.js +0 -0
- /khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/2117-f99825f0a867a42d.js → /khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/2117-ce1f0a4598f5e4fe.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/2170.45431769330fa5b7.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/2327-724a4b8f1591b53b.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/2509-79b3ce8040bc0bcf.js +0 -0
- /khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/3224-09c2844a0885a301.js → /khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/3224-34b5078830a51f42.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/3237.c4754f02f1a388cb.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/3305.1fc7297ba154ee95.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/3332.6313db5217bb1b67.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/3451.421db0b49fdbd881.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/3460.39c2b9b6a3898384.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/3727.dcea8f2193111552.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4299.2aaa569416cfc208.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4327.238d15c09a039b8b.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4357-73c05a7c905ffc9f.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4415.e0c0da5eedae4dd7.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4610.a1e7f40a759ed2aa.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4650.41f041da0ad365ad.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/4872.5422e8324272ab40.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5061.79a660faed0e16a9.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5279.85d537880b8041ae.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5402.b9460f1b16b57e92.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5427-d65c69daf03cc100.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5473-02d1709b2a3f4a4b.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5477-c47515d2934cd866.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5555.f7cf9795d675de51.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/58.f4bd8a3c9d88f5fe.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/5978.ddc72cd73130aadc.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/6244-4b970139897ef46e.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/6434.7afea9648e238ad5.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/7140.4be689873f6a2d1f.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/7647-469de84d236fc7fd.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/7836.86884157d53d23a1.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/7890.f681eb1d1f83bea2.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/7953.f6fc335a23efb959.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/8155-ad130153ddcc930f.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/8254.3145a4fbdcfdca46.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/8400.c95e4e79bcd79a56.js +0 -0
- /khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/849-aa69550db1c243e4.js → /khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/849-bf52aa2736c7f253.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/8580-f95d376ed2c5a2cb.js +0 -0
- /khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/8667-adbe6017a66cef10.js → /khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/8667-8136f74e9a086fca.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/8673.be44c4d9e4f1d084.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/8698.a088118fef40d302.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/9022.33974a513a281fd2.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/90542734.fecd4dc1a89ed166.js +0 -0
- /khoj-1.35.4.dev53/src/khoj/interface/compiled/_next/static/chunks/9259-5be50737cfe989bc.js → /khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/9259-fa40e7cf2ca28e04.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/9433.b1b5f5d050c43e3c.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/94ca1967.1d9b42d929a1ee8c.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/9597.83583248dfbf6e73.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/964ecbae.51d6faf8801d15e6.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/9822.34f293973c4e9b04.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/_not-found/page-0ec97c4970898f2d.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/agents/layout-15f370555e7dedaa.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/automations/layout-02f95fa0a48743eb.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/chat/layout-1c197d42e7acec53.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/layout-30e7fda7262713ce.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/search/layout-596cdc3a5a1a8e46.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/app/settings/layout-8a22f370d3eaeed3.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/d3ac728e-953b1c3bad7316d7.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/ebbfb5c1-a73c51b6a41a5ff6.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/fd9d1056-7454f5bbfcf5bd5b.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/main-98eb5932d6b2e3fa.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/main-app-de1f09df97a3cfc7.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/pages/_app-3c9ca398d360b709.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/css/089de1d8526b96e9.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/css/20ac73cc3d58b75c.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/css/37a73b87f02df402.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/css/4e4e6a4a1c920d06.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/css/b15666ef52060cd0.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/css/e4eb883b5265d372.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/1d8a05b60287ae6c-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/6f22fce21a7c433c-s.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/77c207b095007c34-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/82ef96de0e8f4d8c-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/a6ecd16fa044d500-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/c32c8052c071fc42-s.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/c4250770ab8708b6-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/e098aaaecc9cfbb2-s.p.woff2 +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/globe.98e105ca.webp +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/agents.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern.ico +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern_1200x1200.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern_128x128_dark.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern_512x512.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/icons/khoj_lantern_logomarktype_1200x630.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/samples/desktop-browse-draw-sample.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/samples/desktop-plain-chat-sample.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/automation.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/chat.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/close.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/copy-button-success.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/copy-button.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/khoj.webmanifest +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/logo.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/send.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/share.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/thumbs-down.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/compiled/thumbs-up.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/email/feedback.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/email/magic_link.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/email/task.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/email/welcome.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/.well-known/assetlinks.json +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/agents.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/automation.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/chat.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/github.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/khoj-logo-sideways-200.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/khoj-logo-sideways-500.png +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/khoj-logo-sideways.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/khoj.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/logotype.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/search.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/icons/sync.svg +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/khoj.css +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/assets/utils.js +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/base_config.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/content_source_github_input.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/login.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/interface/web/utils.html +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/main.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/manage.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_offline_chat_default_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_offline_chat_default_model_2.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_offline_chat_schema.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_offline_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_processor_config_openai.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_server_pg.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/migrations/migrate_version.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/docx/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/docx/docx_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/github/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/github/github_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/images/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/images/image_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/markdown/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/markdown/markdown_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/notion/notion_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/org_mode/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/org_mode/org_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/org_mode/orgnode.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/pdf/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/pdf/pdf_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/plaintext/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/plaintext/plaintext_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/content/text_to_entries.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/anthropic/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/anthropic/anthropic_chat.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/anthropic/utils.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/google/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/google/gemini_chat.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/google/utils.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/offline/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/offline/chat_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/offline/utils.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/offline/whisper.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/openai/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/openai/gpt.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/openai/utils.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/openai/whisper.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/prompts.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/conversation/utils.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/embeddings.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/image/generate.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/speech/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/speech/text_to_speech.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/tools/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/tools/online_search.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/processor/tools/run_code.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api_agents.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api_chat.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api_content.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api_model.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api_phone.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/api_subscription.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/auth.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/email.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/helpers.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/notion.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/research.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/storage.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/twilio.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/routers/web_client.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_filter/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_filter/base_filter.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_filter/date_filter.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_filter/file_filter.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_filter/word_filter.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_type/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/search_type/text_search.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/__init__.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/cli.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/config.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/constants.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/fs_syncer.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/helpers.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/initialization.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/jsonl.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/models.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/rawconfig.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/state.py +0 -0
- {khoj-1.35.4.dev53 → khoj-1.36.1.dev2}/src/khoj/utils/yaml.py +0 -0
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="__variable_f36179 __variable_702545"><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/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="preload" href="/_next/static/media/e098aaaecc9cfbb2-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/089de1d8526b96e9.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/20ac73cc3d58b75c.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-4b0fb0aafc881a07.js"/><script src="/_next/static/chunks/fd9d1056-7454f5bbfcf5bd5b.js" async=""></script><script src="/_next/static/chunks/2117-f99825f0a867a42d.js" async=""></script><script src="/_next/static/chunks/main-app-de1f09df97a3cfc7.js" async=""></script><meta name="robots" content="noindex"/><meta http-equiv="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';"/><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 src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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-4b0fb0aafc881a07.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/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/e098aaaecc9cfbb2-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/089de1d8526b96e9.css\",\"style\"]\n9:HL[\"/_next/static/css/20ac73cc3d58b75c.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"a:I[12846,[],\"\"]\nc:I[4707,[],\"\"]\nd:I[36423,[],\"\"]\n13:I[61060,[],\"\"]\ne:{\"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\"}\nf:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n10:{\"display\":\"inline-block\"}\n11:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n14:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$La\",null,{\"buildId\":\"nzUuinMXEsRX86qGdx-yY\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$Lb\",[[\"$\",\"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,[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/089de1d8526b96e9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/20ac73cc3d58b75c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_702545\",\"children\":[[\"$\",\"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\":[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$e\",\"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\":\"$f\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$10\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$11\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L12\"],\"globalErrorComponent\":\"$13\",\"missingSlots\":\"$W14\"}]\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"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,"b:null\n"])</script></body></html>
|
1
|
+
<!DOCTYPE html><html lang="en" class="__variable_f36179 __variable_702545"><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/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="preload" href="/_next/static/media/e098aaaecc9cfbb2-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/089de1d8526b96e9.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/20ac73cc3d58b75c.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d0babda1d8f31af4.js"/><script src="/_next/static/chunks/fd9d1056-7454f5bbfcf5bd5b.js" async=""></script><script src="/_next/static/chunks/2117-ce1f0a4598f5e4fe.js" async=""></script><script src="/_next/static/chunks/main-app-de1f09df97a3cfc7.js" async=""></script><meta name="robots" content="noindex"/><meta http-equiv="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';"/><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 src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";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-d0babda1d8f31af4.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/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/e098aaaecc9cfbb2-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/089de1d8526b96e9.css\",\"style\"]\n9:HL[\"/_next/static/css/20ac73cc3d58b75c.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"a:I[12846,[],\"\"]\nc:I[4707,[],\"\"]\nd:I[36423,[],\"\"]\n13:I[61060,[],\"\"]\ne:{\"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\"}\nf:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n10:{\"display\":\"inline-block\"}\n11:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n14:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$La\",null,{\"buildId\":\"U-JIEyPj4AVkPBzpKkOWA\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$Lb\",[[\"$\",\"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,[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/089de1d8526b96e9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/20ac73cc3d58b75c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_702545\",\"children\":[[\"$\",\"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\":[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$e\",\"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\":\"$f\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$10\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$11\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$L12\"],\"globalErrorComponent\":\"$13\",\"missingSlots\":\"$W14\"}]\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"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,"b:null\n"])</script></body></html>
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4986],{74986:function(e,t,a){"use strict";a.d(t,{Z:function(){return ey}});var n=a(57437),s=a(42501),o=a.n(s),l=a(2265),r=a(48614),c=a(40521),i=a(91499),d=a.n(i),h=a(19983),u=a(13506),m=a.n(u),g=a(34040);a(2446);var f=a(5147),p=a(86018),x=a(38525),v=a(45178),j=a(66070),w=a(69304),b=a(57054),y=a(18848),C=a(42225),M=a(27648);let N=new h.Z({html:!0,linkify:!0,typographer:!0});function k(e){let t=(0,C.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?y.Z.sanitize(N.render(t)):y.Z.sanitize(t)}(e),[o,r]=(0,l.useState)(!1);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(b.J2,{open:o&&!e.showFullContent,onOpenChange:r,children:[(0,n.jsx)(b.xo,{asChild:!0,children:(0,n.jsx)(j.Zb,{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!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)(E,{type:"notes"},"".concat(e.title))})}),(0,n.jsx)(b.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 _(e){var t,a,s,o,r,c;let i=(0,C.Le)(".py","!w-4 h-4 text-muted-foreground flex-shrink-0"),d=y.Z.sanitize(e.code),[h,u]=(0,l.useState)(!1),[m,g]=(0,l.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}),l=URL.createObjectURL(o),r=document.createElement("a");r.href=l,r.download=e.filename,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l)},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:()=>g(!0),onMouseLeave:()=>g(!1),title:"Download file: ".concat(t.filename),children:(0,n.jsx)(f.b,{className:"w-4 h-4",weight:m?"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)(b.J2,{open:h&&!e.showFullContent,onOpenChange:u,children:[(0,n.jsx)(b.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)(E,{type:"code"},"code-".concat(e.code))})}),(0,n.jsx)(b.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===(r=e.output_files)||void 0===r?void 0:r.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,l.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)(b.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,n.jsx)(b.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)(M.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)(E,{type:"online",link:e.link},e.title)})}),(0,n.jsx)(b.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 E(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 I(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)(S,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData,codeReferenceCardData:e.codeReferenceCardData,isMobileWidth:e.isMobileWidth})})]})})}function S(e){let[t,a]=(0,l.useState)(3);if((0,l.useEffect)(()=>{a(e.isMobileWidth?1:3)},[e.isMobileWidth]),!e.notesReferenceCardData&&!e.onlineReferenceCardData)return null;let s=e.codeReferenceCardData.slice(0,t),o=e.notesReferenceCardData.slice(0,t-s.length),r=o.length+s.length<t?e.onlineReferenceCardData.filter(e=>e.link).slice(0,t-s.length-o.length):[];return(0,n.jsxs)(w.yo,{children:[(0,n.jsxs)(w.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,l.createElement)(_,{showFullContent:!1,...e,key:"code-".concat(t)})),o.map((e,t)=>(0,l.createElement)(k,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r.map((e,t)=>(0,l.createElement)(R,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),(0,n.jsx)(v.o,{className:"m-0"})]}),(0,n.jsxs)(w.ue,{className:"overflow-y-scroll",children:[(0,n.jsxs)(w.Tu,{children:[(0,n.jsx)(w.bC,{children:"References"}),(0,n.jsx)(w.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,l.createElement)(_,{showFullContent:!0,...e,key:"code-".concat(t)})),e.notesReferenceCardData.map((e,t)=>(0,l.createElement)(k,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,l.createElement)(R,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]})}var T=a(59199),F=a(62467),L=a(93893),D=a(2452),O=a(22105),B=a(52938),U=a(68950),q=a(63329),A=a(35099),z=a(46561),Z=a(33758),H=a(58717),W=a(51059),P=a(38513),G=a(46732),$=a(47924),J=a(19841),Q=a(88435),V=a(14308),K=a(84671),Y=a(36663);let X=(0,a(30166).default)(()=>Promise.all([a.e(6555),a.e(7293),a.e(3727),a.e(9597)]).then(a.bind(a,99597)).then(e=>e.default),{loadableGenerated:{webpack:()=>[99597]},ssr:!1});function ee(e){return(0,n.jsx)(l.Suspense,{fallback:(0,n.jsx)(V.Z,{}),children:(0,n.jsx)(X,{data:e.data})})}var et=a(26110),ea=a(49027),en=a(7436),es=a(19378),eo=a(50656),el=a(75419),er=a(41648),ec=a(62869),ei=e=>{let{chart:t}=e,[a,s]=(0,l.useState)(null),[o]=(0,l.useState)("mermaid-chart-".concat(Math.random().toString(12).substring(7))),r=(0,l.useRef)(null);(0,l.useEffect)(()=>{eo.Z.initialize({startOnLoad:!1}),eo.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)},eo.Z.contentLoaded()},[]);let c=async()=>{if(r.current)try{var e;let t=r.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 l=new XMLSerializer().serializeToString(t),c=new Blob([l],{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,l.useEffect)(()=>{r.current&&(r.current.removeAttribute("data-processed"),eo.Z.run({nodes:[r.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)(el.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:r,className:"mermaid",style:{width:"auto",height:"auto",boxSizing:"border-box",overflow:"auto"},children:t}),!a&&(0,n.jsxs)(ec.z,{onClick:c,variant:"secondary",className:"mt-3",children:[(0,n.jsx)(er.U,{className:"w-5 h-5"}),"Export as PNG"]})]})};let ed=new h.Z({html:!0,linkify:!0,typographer:!0});function eh(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function eu(e){let{uquery:t,kquery:a}=e,[s,o]=(0,l.useState)(null);return(0,l.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:()=>{eh(t,a,"positive"),o(!0)},children:!0===s?(0,n.jsx)(F.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,n.jsx)(F.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:()=>{eh(t,a,"negative"),o(!1)},children:!1===s?(0,n.jsx)(L.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,n.jsx)(L.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function em(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)(D.a,{className:"".concat(s)}):a.includes("generating")?(0,n.jsx)(O.Z,{className:"".concat(s)}):a.includes("tools")?(0,n.jsx)(B.v,{className:"".concat(s)}):a.includes("notes")?(0,n.jsx)(U.g,{className:"".concat(s)}):a.includes("read")?(0,n.jsx)(q.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)(z.u,{className:"".concat(s)}):a.includes("diagram")?(0,n.jsx)(Z.j,{className:"".concat(s)}):a.includes("paint")?(0,n.jsx)(H.Y,{className:"".concat(s)}):a.includes("code")?(0,n.jsx)(p.E,{className:"".concat(s)}):(0,n.jsx)(D.a,{className:"".concat(s)})}(t?t[1]:"",e.primary?(0,K.oz)(e.agentColor):"text-gray-500"),s=y.Z.sanitize(ed.render(e.message));return s=s.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:s},className:"break-words"})]})}ed.use(m(),{inline:!0,code:!0});let eg=(0,l.forwardRef)((e,t)=>{var a,s;let o,r,c,i,h;let[u,m]=(0,l.useState)(!1),[f,p]=(0,l.useState)(!1),[x,v]=(0,l.useState)(""),[j,w]=(0,l.useState)(""),[b,M]=(0,l.useState)(!1),[N,k]=(0,l.useState)(!1),[_,R]=(0,l.useState)(""),[E,S]=(0,l.useState)(""),F=(0,l.useRef)(!1),L=(0,l.useRef)(null);async function D(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;M(!0);let a=O(t[0]);for(let e=0;e<t.length&&!F.current;e++){let n=a;e<t.length-1&&(a=O(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}}M(!1),k(!1)}async function O(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,l.useEffect)(()=>{F.current=N},[N]),(0,l.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(L.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,Y.Z)(L.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return L.current&&e.observe(L.current,{childList:!0}),()=>e.disconnect()},[L.current]),(0,l.useEffect)(()=>{let t=e.chatMessage.message;e.chatMessage.excalidrawDiagram&&R(e.chatMessage.excalidrawDiagram),e.chatMessage.mermaidjsDiagram&&S(e.chatMessage.mermaidjsDiagram),t=t.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),t=(0,T.AQ)(t,e.chatMessage.codeContext),e.chatMessage.codeContext&&Object.entries(e.chatMessage.codeContext).forEach(e=>{var a;let[n,s]=e;null===(a=s.results.output_files)||void 0===a||a.forEach(e=>{(e.filename.endsWith(".png")||e.filename.endsWith(".jpg"))&&!t.includes(")&&(t+="\n\n.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 y.Z.sanitize(t)}),s=t.map((e,t)=>".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(""),l='<div class="'.concat(d().imagesContainer,'">').concat(o,"</div>");a="".concat(s,"\n\n").concat(a),n="".concat(l).concat(n)}v(a);let s=ed.render(n);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),w(y.Z.sanitize(s))},[e.chatMessage.message,e.chatMessage.images,e.chatMessage.intent]),(0,l.useEffect)(()=>{u&&setTimeout(()=>{m(!1)},2e3)},[u]),(0,l.useEffect)(()=>{L.current&&(L.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,g.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)(P.J,{size:24});(0,g.createRoot)(t).render(s)}),e.prepend(t)}}),(0,Y.Z)(L.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]}))},[j,f,L]);let B=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")},U=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?{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=>p(!1),onMouseEnter:e=>p(!0),children:[(0,n.jsxs)("div",{className:(s=e.chatMessage,(r=[d().chatMessageWrapper]).push(d()[s.by]),"khoj"===s.by&&r.push("border-l-4 border-opacity-50 ".concat("border-l-"+e.borderLeftColor)),r.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)(et.Vq,{children:[(0,n.jsx)(et.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,C.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,en.xq)(e.size),")"]})]})}),(0,n.jsxs)(et.cZ,{children:[(0,n.jsx)(et.fK,{children:(0,n.jsx)(ea.$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)(et.Be,{children:(0,n.jsx)(es.x,{className:"h-72 w-full rounded-md break-words break-all text-wrap",children:e.content})})]})]},t))}),(0,n.jsx)("div",{ref:L,className:d().chatMessage,dangerouslySetInnerHTML:{__html:j}}),_&&(0,n.jsx)(ee,{data:_}),E&&(0,n.jsx)(ei,{chart:E})]}),(0,n.jsx)("div",{className:d().teaserReferencesContainer,children:(0,n.jsx)(I,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:U.notesReferenceCardData,onlineReferenceCardData:U.onlineReferenceCardData,codeReferenceCardData:U.codeReferenceCardData})}),(0,n.jsx)("div",{className:d().chatFooter,children:(f||e.isMobileWidth||e.isLastMessage||b)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{title:(i=(c=new Date(e.chatMessage.created+"Z")).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),h=c.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(i," on ").concat(h)),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&&(b?N?(0,n.jsx)(V.l,{iconClassName:"p-0",className:"m-0"}):(0,n.jsx)("button",{title:"Pause Speech",onClick:e=>k(!0),children:(0,n.jsx)(G.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,n.jsx)("button",{title:"Speak",onClick:e=>D(),children:(0,n.jsx)($.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:()=>B(e.chatMessage),children:(0,n.jsx)(J.r,{alt:"Delete Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})}),(0,n.jsx)("button",{title:"Copy",className:"".concat(d().copyButton),onClick:()=>{navigator.clipboard.writeText(x),m(!0)},children:u?(0,n.jsx)(Q.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,n.jsx)(Q.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,n.jsx)(eu,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,n.jsx)(eu,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});eg.displayName="ChatMessage";var ef=a(3894),ep=a(20461),ex=a(77168),ev=a(15483),ej=a(81103),ew=e=>{let{name:t,avatar:a,link:s,description:o}=e;return(0,n.jsx)("div",{className:"relative group flex",children:(0,n.jsx)(ej.pn,{children:(0,n.jsxs)(ej.u,{delayDuration:0,children:[(0,n.jsx)(ej.aJ,{asChild:!0,children:(0,n.jsxs)(ec.z,{variant:"ghost",className:"flex items-center justify-center",children:[a,(0,n.jsx)("div",{children:t})]})}),(0,n.jsx)(ej._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"})]})})]})})})};function eb(e){let t=e.trainOfThought.length-1,[a,s]=(0,l.useState)(e.completed);return(0,l.useEffect)(()=>{e.completed&&s(!0)},[e.completed]),(0,n.jsxs)("div",{className:"".concat(a?"":o().trainOfThought+" border"," rounded-lg"),children:[!e.completed&&(0,n.jsx)(V.l,{className:"float-right"}),e.completed&&(a?(0,n.jsxs)(ec.z,{className:"w-fit text-left justify-start content-start text-xs",onClick:()=>s(!1),variant:"ghost",size:"sm",children:["Thought Process ",(0,n.jsx)(ef.p,{size:16,className:"ml-1"})]}):(0,n.jsxs)(ec.z,{className:"w-fit text-left justify-start content-start text-xs p-0 h-fit",onClick:()=>s(!0),variant:"ghost",size:"sm",children:["Close ",(0,n.jsx)(ep.U,{size:16,className:"ml-1"})]})),(0,n.jsx)(r.M,{initial:!1,children:!a&&(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:e.trainOfThought.map((a,s)=>(0,n.jsx)(em,{message:a,primary:s===t&&e.lastMessage&&!e.completed,agentColor:e.agentColor},"train-".concat(s)))})})]},e.keyId)}function ey(e){var t,a,s,r,c,i,d,h,u;let[m,g]=(0,l.useState)(null),[f,p]=(0,l.useState)(0),[x,v]=(0,l.useState)(!0),[j,w]=(0,l.useState)(null),b=(0,l.useRef)(null),y=(0,l.useRef)(null),M=(0,l.useRef)(null),N=(0,l.useRef)(null),[k,_]=(0,l.useState)(null),[R,E]=(0,l.useState)(!1),[I,S]=(0,l.useState)(!0),T=(0,en.IC)(),F="[data-radix-scroll-area-viewport]",L=localStorage.getItem("message");(0,l.useEffect)(()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(F);if(!t)return;let a=()=>{let{scrollTop:e,scrollHeight:a,clientHeight:n}=t;S(a-(e+n)<=50)};return t.addEventListener("scroll",a),()=>t.removeEventListener("scroll",a)},[]),(0,l.useEffect)(()=>{e.incomingMessages&&e.incomingMessages.length>0&&I&&O()},[e.incomingMessages,I]),(0,l.useEffect)(()=>{m&&m.chat&&m.chat.length>0&&f<2&&requestAnimationFrame(()=>{var e;null===(e=M.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"})})},[m,f]),(0,l.useEffect)(()=>{if(!x||R)return;let t=new IntersectionObserver(t=>{t[0].isIntersecting&&x&&(E(!0),function(t){if(!x||R)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=>{if(e.setTitle(a.response.slug),a&&a.response&&a.response.chat&&a.response.chat.length>0){if(p(Math.ceil(a.response.chat.length/10)),a.response.chat.length===(null==m?void 0:m.chat.length)){v(!1),E(!1);return}e.setAgent(a.response.agent),g(a.response),E(!1),0===t?O(!0):D()}else{if(a.response.agent&&a.response.conversation_id){let t={chat:[],agent:a.response.agent,conversation_id:a.response.conversation_id,slug:a.response.slug};e.setAgent(a.response.agent),g(t),e.setIsChatSideBarOpen&&!L&&e.setIsChatSideBarOpen(!0)}v(!1),E(!1)}}).catch(e=>{console.error(e),window.location.href="/"})}(f))},{threshold:1});return b.current&&t.observe(b.current),()=>t.disconnect()},[x,f,R]),(0,l.useEffect)(()=>{v(!0),E(!1),p(0),g(null)},[e.conversationId]),(0,l.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&&w(t.turnId))}},[e.incomingMessages]);let D=()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector(F);requestAnimationFrame(()=>{var e;null===(e=N.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"start"}),null==t||t.scrollBy({behavior:"smooth",top:-150})})},O=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(F);requestAnimationFrame(()=>{null==a||a.scrollTo({top:a.scrollHeight,behavior:t?"auto":"smooth"})}),S(!0)},B=t=>{t&&(g(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)))};return e.conversationId||e.publicConversationSlug?(0,n.jsx)(es.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.72))]\n ",ref:y,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"".concat(o().chatHistory," ").concat(e.customClassName),children:[(0,n.jsx)("div",{ref:b,style:{height:"1px"},children:R&&(0,n.jsx)(V.l,{className:"opacity-50"})}),m&&m.chat&&m.chat.map((t,a)=>{var s,o,l;return(0,n.jsxs)(n.Fragment,{children:[t.trainOfThought&&"khoj"===t.by&&(0,n.jsx)(eb,{trainOfThought:null===(s=t.trainOfThought)||void 0===s?void 0:s.map(e=>e.data),lastMessage:!1,agentColor:(null==m?void 0:null===(o=m.agent)||void 0===o?void 0:o.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:!0},"".concat(a,"trainOfThought")),(0,n.jsx)(eg,{ref:a===m.chat.length-2?M:a===m.chat.length-(f-1)*10?N:null,isMobileWidth:T,chatMessage:t,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(l=m.agent)||void 0===l?void 0:l.color,"-500"),isLastMessage:a===m.chat.length-1,onDeleteMessage:B,conversationId:e.conversationId},"".concat(a,"fullHistory"))]})}),e.incomingMessages&&e.incomingMessages.map((t,a)=>{var s,o,r,c,i;let d=null!==(i=null!==(c=t.turnId)&&void 0!==c?c:j)&&void 0!==i?i:void 0;return(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)(eg,{isMobileWidth:T,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==m?void 0:null===(s=m.agent)||void 0===s?void 0:s.color,"-500"),onDeleteMessage:B,conversationId:e.conversationId,turnId:d},"".concat(a,"outgoing")),t.trainOfThought&&(0,n.jsx)(eb,{trainOfThought:t.trainOfThought,lastMessage:a===k,agentColor:(null==m?void 0:null===(o=m.agent)||void 0===o?void 0:o.color)||"orange",keyId:"".concat(a,"trainOfThought"),completed:t.completed},"".concat(a,"trainOfThought")),(0,n.jsx)(eg,{isMobileWidth:T,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,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(r=m.agent)||void 0===r?void 0:r.color,"-500"),isLastMessage:a===e.incomingMessages.length-1},"".concat(a,"incoming"))]},"incomingMessage".concat(a))}),e.pendingMessage&&(0,n.jsx)(eg,{isMobileWidth:T,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,customClassName:"fullHistory",borderLeftColor:"".concat(null==m?void 0:null===(t=m.agent)||void 0===t?void 0:t.color,"-500"),isLastMessage:!0},"pendingMessage-".concat(e.pendingMessage.length)),m&&(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)(ew,{name:m&&m.agent&&(null===(r=m.agent)||void 0===r?void 0:r.name)?m.agent.is_hidden?"Khoj":null===(c=m.agent)||void 0===c?void 0:c.name:"Agent",link:m&&m.agent&&(null===(i=m.agent)||void 0===i?void 0:i.slug)?"/agents?agent=".concat(null===(d=m.agent)||void 0===d?void 0:d.slug):"/agents",avatar:(0,C.TI)(null===(a=m.agent)||void 0===a?void 0:a.icon,null===(s=m.agent)||void 0===s?void 0:s.color)||(0,n.jsx)(ex.v,{}),description:m&&m.agent?(null===(h=m.agent)||void 0===h?void 0:h.persona)?null===(u=m.agent)||void 0===u?void 0:u.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:!I&&(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:()=>{O(),S(!0)},children:(0,n.jsx)(ev.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",trainOfThought:"chatMessage_trainOfThought__mR2Gg",primary:"chatMessage_primary__WYPEb",trainOfThoughtElement:"chatMessage_trainOfThoughtElement__le_bC"}}}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{1813:function(e,a,t){Promise.resolve().then(t.bind(t,37335))},37335:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return N}});var n=t(57437),l=t(14675),r=t.n(l),o=t(63861),s=t(2265),i=t(56937),c=t(89203),d=t(78527),u=t(26110),p=t(33494),m=t(14308),h=t(65613),f=t(7436),v=t(25427),g=t(29501),x=t(13590),A=t(60729),b=t(34124),j=t(6512),y=t(37104),O=t(49027);let _=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e)),Z=e=>fetch(e).then(e=>e.json());function M(e){let[a,t]=(0,s.useState)(!1),[l,r]=(0,s.useState)(null),[o,i]=(0,s.useState)(!0),d=(0,g.cI)({resolver:(0,x.F)(v.bc),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]}});return(0,s.useEffect)(()=>{d.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]})},[e.selectedChatModelOption,e.data]),(0,n.jsxs)(u.Vq,{open:a,onOpenChange:t,children:[(0,n.jsx)(u.hg,{children:(0,n.jsxs)("div",{className:"flex items-center text-md gap-2",children:[(0,n.jsx)(c.v,{}),"Create Agent"]})}),(0,n.jsxs)(u.cZ,{className:"lg:max-w-screen-lg py-4 overflow-y-scroll h-full md:h-4/6 rounded-lg flex flex-col",children:[(0,n.jsx)(u.fK,{children:(0,n.jsx)(O.$N,{children:"Create Agent"})}),!e.userProfile&&o&&(0,n.jsx)(p.Z,{onOpenChange:i,isMobileWidth:e.isMobileWidth}),(0,n.jsx)(v.ks,{form:d,onSubmit:a=>{fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(a=>{200===a.status?(d.reset(),t(!1),r(null),e.setAgentChangeTriggered(!0)):a.json().then(e=>{console.error(e),e.error&&r(e.error)})}).catch(e=>{console.error("Error:",e),r(e)})},create:!0,errors:l,filesOptions:e.filesOptions,modelOptions:e.modelOptions,inputToolOptions:e.inputToolOptions,outputModeOptions:e.outputModeOptions,isSubscribed:e.isSubscribed})]})]})}function N(){let{data:e,error:a,mutate:t}=(0,o.ZP)("agents",_,{revalidateOnFocus:!1}),{data:l,error:c,isLoading:u}=(0,i.GW)(),{data:g}=(0,i.h2)(!0),[x,O]=(0,s.useState)(!1),N=(0,f.IC)(),[E,w]=(0,s.useState)([]),[V,L]=(0,s.useState)([]),[P,C]=(0,s.useState)(null),{data:S,error:F}=(0,o.ZP)(g?"/api/content/computer":null,Z),{data:H,error:T}=(0,o.ZP)("/api/agents/options",Z),[k,I]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{k&&(t(),I(!1))},[k]),(0,s.useEffect)(()=>{if(e){w(e.filter(e=>e.creator===(null==l?void 0:l.username)));let a=e.filter(e=>"private"!==e.privacy_level&&e.creator!==(null==l?void 0:l.username));L(a);{let t=new URLSearchParams(window.location.search).get("agent");if(t){C(t);let n=e.find(e=>e.slug===t);n||(n=a.find(e=>e.slug===t)),n||fetch("/api/agents/".concat(t)).then(e=>{if(404===e.status)throw Error("Agent not found");return e.json()}).then(e=>{"protected"===e.privacy_level&&L(a=>[...a,e])})}}}},[e,l]),a)return(0,n.jsxs)("main",{className:r().main,children:[(0,n.jsx)("div",{className:"".concat(r().titleBar," text-5xl"),children:"Agents"}),(0,n.jsx)("div",{className:r().agentList,children:"Error loading agents"})]});if(!e)return(0,n.jsx)("main",{className:r().main,children:(0,n.jsxs)("div",{className:r().agentList,children:[(0,n.jsx)(m.l,{})," booting up your agents"]})});let W=(null==g?void 0:g.chat_model_options)||[],B=(null==g?void 0:g.selected_chat_model_config)||0,R=(null==g?void 0:g.is_active)||!1,z=W.find(e=>e.id===B);return(0,n.jsxs)(A.Hn,{children:[(0,n.jsx)(b.S,{conversationId:""}),(0,n.jsxs)(A.kV,{children:[(0,n.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,n.jsx)(A.vP,{className:"-ml-1"}),(0,n.jsx)(j.Z,{orientation:"vertical",className:"mr-2 h-4"}),N?(0,n.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,n.jsx)(y.VO,{className:"h-auto w-16"})}):(0,n.jsx)("h2",{className:"text-lg",children:"Agents"})]}),(0,n.jsx)("main",{className:"w-full mx-auto",children:(0,n.jsx)("div",{className:"grid w-full mx-auto",children:(0,n.jsxs)("div",{className:"".concat(r().pageLayout," w-full"),children:[(0,n.jsxs)("div",{className:"pt-6 md:pt-8 flex justify-between",children:[(0,n.jsx)("h1",{className:"text-3xl flex items-center",children:"Agents"}),(0,n.jsx)("div",{className:"ml-auto float-right border p-2 pt-3 rounded-xl font-bold hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,n.jsx)(M,{data:{slug:"",name:"",persona:"",color:"",icon:"",privacy_level:"private",managed_by_admin:!1,chat_model:"",input_tools:[],output_modes:[],is_hidden:!1},userProfile:u?null:null!=l?l:null,isMobileWidth:N,filesOptions:S||[],modelOptions:(null==g?void 0:g.chat_model_options)||[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:R,setAgentChangeTriggered:I,inputToolOptions:(null==H?void 0:H.input_tools)||{},outputModeOptions:(null==H?void 0:H.output_modes)||{}})})]}),x&&(0,n.jsx)(p.Z,{onOpenChange:O,isMobileWidth:N}),(0,n.jsx)(h.bZ,{className:"bg-secondary border-none my-4",children:(0,n.jsxs)(h.X,{children:[(0,n.jsx)(d.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,n.jsx)("span",{className:"font-bold",children:"How it works"})," Use any of these specialized personas to tune your conversation to your needs."]})}),(0,n.jsx)("div",{className:"pt-6 md:pt-8",children:(0,n.jsx)("div",{className:"".concat(r().agentList),children:l&&E.map(e=>(0,n.jsx)(v.EY,{data:e,userProfile:l,isMobileWidth:N,filesOptions:null!=S?S:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:R,setAgentChangeTriggered:I,modelOptions:(null==g?void 0:g.chat_model_options)||[],editCard:!0,agentSlug:P||"",inputToolOptions:(null==H?void 0:H.input_tools)||{},outputModeOptions:(null==H?void 0:H.output_modes)||{}},e.slug))})}),(0,n.jsxs)("div",{className:"pt-6 md:pt-8",children:[(0,n.jsx)("h2",{className:"text-2xl",children:"Explore"}),(0,n.jsx)("div",{className:"".concat(r().agentList),children:!u&&V.map(e=>(0,n.jsx)(v.EY,{data:e,userProfile:l||null,isMobileWidth:N,editCard:!1,filesOptions:null!=S?S:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:R,setAgentChangeTriggered:I,modelOptions:(null==g?void 0:g.chat_model_options)||[],agentSlug:P||"",inputToolOptions:(null==H?void 0:H.input_tools)||{},outputModeOptions:(null==H?void 0:H.output_modes)||{}},e.slug))})]})]})})})]})]})}},32759:function(e,a,t){"use strict";t.d(a,{E:function(){return s}});var n=t(57437),l=t(2265),r=t(60610),o=t(94508);let s=l.forwardRef((e,a)=>{let{className:t,value:l,indicatorColor:s,...i}=e;return(0,n.jsx)(r.fC,{ref:a,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...i,children:(0,n.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(s),style:{transform:"translateX(-".concat(100-(l||0),"%)")}})})});s.displayName=r.fC.displayName},76818:function(e,a,t){"use strict";t.d(a,{g:function(){return o}});var n=t(57437),l=t(2265),r=t(94508);let o=l.forwardRef((e,a)=>{let{className:t,...l}=e;return(0,n.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...l})});o.displayName="Textarea"},14675:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}},2452:function(e,a,t){"use strict";t.d(a,{a:function(){return f}});var n=t(2265),l=t(49656);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M252,124a60.14,60.14,0,0,0-32-53.08,52,52,0,0,0-92-32.11A52,52,0,0,0,36,70.92a60,60,0,0,0,0,106.14,52,52,0,0,0,92,32.13,52,52,0,0,0,92-32.13A60.05,60.05,0,0,0,252,124ZM88,204a28,28,0,0,1-26.85-20.07c1,0,1.89.07,2.85.07h8a12,12,0,0,0,0-24H64A36,36,0,0,1,52,90.05a12,12,0,0,0,8-11.32V72a28,28,0,0,1,56,0v60.18a51.61,51.61,0,0,0-7.2-3.85,12,12,0,1,0-9.6,22A28,28,0,0,1,88,204Zm104-44h-8a12,12,0,0,0,0,24h8c1,0,1.9,0,2.85-.07a28,28,0,1,1-38-33.61,12,12,0,1,0-9.6-22,51.61,51.61,0,0,0-7.2,3.85V72a28,28,0,0,1,56,0v6.73a12,12,0,0,0,8,11.32,36,36,0,0,1-12,70Zm16-44a12,12,0,0,1-12,12,40,40,0,0,1-40-40V84a12,12,0,0,1,24,0v4a16,16,0,0,0,16,16A12,12,0,0,1,208,116ZM100,88a40,40,0,0,1-40,40,12,12,0,0,1,0-24A16,16,0,0,0,76,88V84a12,12,0,0,1,24,0Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,124a48,48,0,0,1-32,45.27h0V176a40,40,0,0,1-80,0,40,40,0,0,1-80,0v-6.73h0a48,48,0,0,1,0-90.54V72a40,40,0,0,1,80,0,40,40,0,0,1,80,0v6.73A48,48,0,0,1,240,124Z",opacity:"0.2"}),n.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212,76V72a44,44,0,0,0-74.86-31.31,3.93,3.93,0,0,0-1.14,2.8v88.72a4,4,0,0,0,6.2,3.33A47.67,47.67,0,0,1,167.68,128a8.18,8.18,0,0,1,8.31,7.58,8,8,0,0,1-8,8.42,32,32,0,0,0-32,32v33.88a4,4,0,0,0,1.49,3.12,47.92,47.92,0,0,0,74.21-17.16,4,4,0,0,0-4.49-5.56A68.06,68.06,0,0,1,192,192h-7.73a8.18,8.18,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h8a51.6,51.6,0,0,0,24-5.88v0A52,52,0,0,0,212,76Zm-12,36h-4a36,36,0,0,1-36-36V72a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4a8,8,0,0,1,0,16ZM88,28A44.05,44.05,0,0,0,44,72v4a52,52,0,0,0-4,94.12h0A51.6,51.6,0,0,0,64,176h7.73A8.18,8.18,0,0,1,80,183.47,8,8,0,0,1,72,192H64a67.48,67.48,0,0,1-15.21-1.73,4,4,0,0,0-4.5,5.55A47.93,47.93,0,0,0,118.51,213a4,4,0,0,0,1.49-3.12V176a32,32,0,0,0-32-32,8,8,0,0,1-8-8.42A8.18,8.18,0,0,1,88.32,128a47.67,47.67,0,0,1,25.48,7.54,4,4,0,0,0,6.2-3.33V43.49a4,4,0,0,0-1.14-2.81A43.85,43.85,0,0,0,88,28Zm8,48a36,36,0,0,1-36,36H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,76V72a8,8,0,0,1,16,0Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M246,124a54.13,54.13,0,0,0-32-49.33V72a46,46,0,0,0-86-22.67A46,46,0,0,0,42,72v2.67a54,54,0,0,0,0,98.63V176a46,46,0,0,0,86,22.67A46,46,0,0,0,214,176v-2.7A54.07,54.07,0,0,0,246,124ZM88,210a34,34,0,0,1-34-32.94A53.67,53.67,0,0,0,64,178h8a6,6,0,0,0,0-12H64A42,42,0,0,1,50,84.39a6,6,0,0,0,4-5.66V72a34,34,0,0,1,68,0v73.05A45.89,45.89,0,0,0,88,130a6,6,0,0,0,0,12,34,34,0,0,1,0,68Zm104-44h-8a6,6,0,0,0,0,12h8a53.67,53.67,0,0,0,10-.94A34,34,0,1,1,168,142a6,6,0,0,0,0-12,45.89,45.89,0,0,0-34,15.05V72a34,34,0,0,1,68,0v6.73a6,6,0,0,0,4,5.66A42,42,0,0,1,192,166Zm14-54a6,6,0,0,1-6,6h-4a34,34,0,0,1-34-34V80a6,6,0,0,1,12,0v4a22,22,0,0,0,22,22h4A6,6,0,0,1,206,112ZM60,118H56a6,6,0,0,1,0-12h4A22,22,0,0,0,82,84V80a6,6,0,0,1,12,0v4A34,34,0,0,1,60,118Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M244,124a52.1,52.1,0,0,0-32-48V72a44,44,0,0,0-84-18.3A44,44,0,0,0,44,72v4a52,52,0,0,0,0,96v4a44,44,0,0,0,84,18.3A44,44,0,0,0,212,176v-4A52.07,52.07,0,0,0,244,124ZM88,212a36,36,0,0,1-36-36v-1.41A52.13,52.13,0,0,0,64,176h8a4,4,0,0,0,0-8H64A44,44,0,0,1,49.33,82.5,4,4,0,0,0,52,78.73V72a36,36,0,0,1,72,0v78.75A44,44,0,0,0,88,132a4,4,0,0,0,0,8,36,36,0,0,1,0,72Zm104-44h-8a4,4,0,0,0,0,8h8a52.13,52.13,0,0,0,12-1.41V176a36,36,0,1,1-36-36,4,4,0,0,0,0-8,44,44,0,0,0-36,18.75V72a36,36,0,0,1,72,0v6.73a4,4,0,0,0,2.67,3.77A44,44,0,0,1,192,168Zm12-56a4,4,0,0,1-4,4h-4a32,32,0,0,1-32-32V80a4,4,0,0,1,8,0v4a24,24,0,0,0,24,24h4A4,4,0,0,1,204,112ZM92,84a32,32,0,0,1-32,32H56a4,4,0,0,1,0-8h4A24,24,0,0,0,84,84V80a4,4,0,0,1,8,0Z"}))]]);var o=Object.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,a,t)=>a in e?o(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,m=(e,a)=>{for(var t in a||(a={}))d.call(a,t)&&p(e,t,a[t]);if(c)for(var t of c(a))u.call(a,t)&&p(e,t,a[t]);return e},h=(e,a)=>s(e,i(a));let f=(0,n.forwardRef)((e,a)=>n.createElement(l.Z,h(m({ref:a},e),{weights:r})));f.displayName="Brain"},78527:function(e,a,t){"use strict";t.d(a,{B:function(){return f}});var n=t(2265),l=t(49656);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]);var o=Object.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,a,t)=>a in e?o(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,m=(e,a)=>{for(var t in a||(a={}))d.call(a,t)&&p(e,t,a[t]);if(c)for(var t of c(a))u.call(a,t)&&p(e,t,a[t]);return e},h=(e,a)=>s(e,i(a));let f=(0,n.forwardRef)((e,a)=>n.createElement(l.Z,h(m({ref:a},e),{weights:r})));f.displayName="Lightning"},60610:function(e,a,t){"use strict";t.d(a,{fC:function(){return b},z$:function(){return j}});var n=t(2265),l=t(73966),r=t(66840),o=t(57437),s="Progress",[i,c]=(0,l.b)(s),[d,u]=i(s),p=n.forwardRef((e,a)=>{var t,n,l,s;let{__scopeProgress:i,value:c=null,max:u,getValueLabel:p=f,...m}=e;(u||0===u)&&!x(u)&&console.error((t="".concat(u),n="Progress","Invalid prop `max` of value `".concat(t,"` supplied to `").concat(n,"`. Only numbers greater than 0 are valid max values. Defaulting to `").concat(100,"`.")));let h=x(u)?u:100;null===c||A(c,h)||console.error((l="".concat(c),s="Progress","Invalid prop `value` of value `".concat(l,"` supplied to `").concat(s,"`. The `value` prop must be:\n - a positive number\n - less than the value passed to `max` (or ").concat(100," if no `max` prop is set)\n - `null` or `undefined` if the progress is indeterminate.\n\nDefaulting to `null`.")));let b=A(c,h)?c:null,j=g(b)?p(b,h):void 0;return(0,o.jsx)(d,{scope:i,value:b,max:h,children:(0,o.jsx)(r.WV.div,{"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":g(b)?b:void 0,"aria-valuetext":j,role:"progressbar","data-state":v(b,h),"data-value":null!=b?b:void 0,"data-max":h,...m,ref:a})})});p.displayName=s;var m="ProgressIndicator",h=n.forwardRef((e,a)=>{var t;let{__scopeProgress:n,...l}=e,s=u(m,n);return(0,o.jsx)(r.WV.div,{"data-state":v(s.value,s.max),"data-value":null!==(t=s.value)&&void 0!==t?t:void 0,"data-max":s.max,...l,ref:a})});function f(e,a){return"".concat(Math.round(e/a*100),"%")}function v(e,a){return null==e?"indeterminate":e===a?"complete":"loading"}function g(e){return"number"==typeof e}function x(e){return g(e)&&!isNaN(e)&&e>0}function A(e,a){return g(e)&&!isNaN(e)&&e<=a&&e>=0}h.displayName=m;var b=p,j=h}},function(e){e.O(0,[2663,9259,8667,849,3224,7647,2327,5427,2971,2117,1744],function(){return e(e.s=1813)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9718],{1813:function(e,a,t){Promise.resolve().then(t.bind(t,37335))},37335:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return N}});var n=t(57437),l=t(14675),r=t.n(l),o=t(63861),s=t(2265),i=t(56937),c=t(89203),d=t(78527),u=t(26110),p=t(33494),m=t(14308),h=t(65613),f=t(7436),v=t(25427),g=t(29501),x=t(13590),A=t(60729),b=t(34124),j=t(6512),y=t(37104),O=t(49027);let _=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e)),Z=e=>fetch(e).then(e=>e.json());function M(e){let[a,t]=(0,s.useState)(!1),[l,r]=(0,s.useState)(null),[o,i]=(0,s.useState)(!0),d=(0,g.cI)({resolver:(0,x.F)(v.bc),defaultValues:{name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]}});return(0,s.useEffect)(()=>{d.reset({name:e.data.name,persona:e.data.persona,color:e.data.color,icon:e.data.icon,privacy_level:e.data.privacy_level,chat_model:e.selectedChatModelOption,files:[]})},[e.selectedChatModelOption,e.data]),(0,n.jsxs)(u.Vq,{open:a,onOpenChange:t,children:[(0,n.jsx)(u.hg,{children:(0,n.jsxs)("div",{className:"flex items-center text-md gap-2",children:[(0,n.jsx)(c.v,{}),"Create Agent"]})}),(0,n.jsxs)(u.cZ,{className:"lg:max-w-screen-lg py-4 overflow-y-scroll h-full md:h-4/6 rounded-lg flex flex-col",children:[(0,n.jsx)(u.fK,{children:(0,n.jsx)(O.$N,{children:"Create Agent"})}),!e.userProfile&&o&&(0,n.jsx)(p.Z,{onOpenChange:i,isMobileWidth:e.isMobileWidth}),(0,n.jsx)(v.ks,{form:d,onSubmit:a=>{fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(a=>{200===a.status?(d.reset(),t(!1),r(null),e.setAgentChangeTriggered(!0)):a.json().then(e=>{console.error(e),e.error&&r(e.error)})}).catch(e=>{console.error("Error:",e),r(e)})},create:!0,errors:l,filesOptions:e.filesOptions,modelOptions:e.modelOptions,inputToolOptions:e.inputToolOptions,outputModeOptions:e.outputModeOptions,isSubscribed:e.isSubscribed})]})]})}function N(){let{data:e,error:a,mutate:t}=(0,o.ZP)("agents",_,{revalidateOnFocus:!1}),{data:l,error:c,isLoading:u}=(0,i.GW)(),{data:g}=(0,i.h2)(!0),[x,O]=(0,s.useState)(!1),N=(0,f.IC)(),[E,w]=(0,s.useState)([]),[V,L]=(0,s.useState)([]),[P,C]=(0,s.useState)(null),{data:S,error:F}=(0,o.ZP)(g?"/api/content/computer":null,Z),{data:H,error:T}=(0,o.ZP)("/api/agents/options",Z),[k,I]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{k&&(t(),I(!1))},[k]),(0,s.useEffect)(()=>{if(e){w(e.filter(e=>e.creator===(null==l?void 0:l.username)));let a=e.filter(e=>"private"!==e.privacy_level&&e.creator!==(null==l?void 0:l.username));L(a);{let t=new URLSearchParams(window.location.search).get("agent");if(t){C(t);let n=e.find(e=>e.slug===t);n||(n=a.find(e=>e.slug===t)),n||fetch("/api/agents/".concat(t)).then(e=>{if(404===e.status)throw Error("Agent not found");return e.json()}).then(e=>{"protected"===e.privacy_level&&L(a=>[...a,e])})}}}},[e,l]),a)return(0,n.jsxs)("main",{className:r().main,children:[(0,n.jsx)("div",{className:"".concat(r().titleBar," text-5xl"),children:"Agents"}),(0,n.jsx)("div",{className:r().agentList,children:"Error loading agents"})]});if(!e)return(0,n.jsx)("main",{className:r().main,children:(0,n.jsxs)("div",{className:r().agentList,children:[(0,n.jsx)(m.l,{})," booting up your agents"]})});let W=(null==g?void 0:g.chat_model_options)||[],B=(null==g?void 0:g.selected_chat_model_config)||0,R=(null==g?void 0:g.is_active)||!1,z=W.find(e=>e.id===B);return(0,n.jsxs)(A.Hn,{children:[(0,n.jsx)(b.S,{conversationId:""}),(0,n.jsxs)(A.kV,{children:[(0,n.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,n.jsx)(A.vP,{className:"-ml-1"}),(0,n.jsx)(j.Z,{orientation:"vertical",className:"mr-2 h-4"}),N?(0,n.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,n.jsx)(y.VO,{className:"h-auto w-16"})}):(0,n.jsx)("h2",{className:"text-lg",children:"Agents"})]}),(0,n.jsx)("main",{className:"w-full mx-auto",children:(0,n.jsx)("div",{className:"grid w-full mx-auto",children:(0,n.jsxs)("div",{className:"".concat(r().pageLayout," w-full"),children:[(0,n.jsxs)("div",{className:"pt-6 md:pt-8 flex justify-between",children:[(0,n.jsx)("h1",{className:"text-3xl flex items-center",children:"Agents"}),(0,n.jsx)("div",{className:"ml-auto float-right border p-2 pt-3 rounded-xl font-bold hover:bg-stone-100 dark:hover:bg-neutral-900",children:(0,n.jsx)(M,{data:{slug:"",name:"",persona:"",color:"",icon:"",privacy_level:"private",managed_by_admin:!1,chat_model:"",input_tools:[],output_modes:[],is_hidden:!1},userProfile:u?null:null!=l?l:null,isMobileWidth:N,filesOptions:S||[],modelOptions:(null==g?void 0:g.chat_model_options)||[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:R,setAgentChangeTriggered:I,inputToolOptions:(null==H?void 0:H.input_tools)||{},outputModeOptions:(null==H?void 0:H.output_modes)||{}})})]}),x&&(0,n.jsx)(p.Z,{onOpenChange:O,isMobileWidth:N}),(0,n.jsx)(h.bZ,{className:"bg-secondary border-none my-4",children:(0,n.jsxs)(h.X,{children:[(0,n.jsx)(d.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,n.jsx)("span",{className:"font-bold",children:"How it works"})," Use any of these specialized personas to tune your conversation to your needs."]})}),(0,n.jsx)("div",{className:"pt-6 md:pt-8",children:(0,n.jsx)("div",{className:"".concat(r().agentList),children:l&&E.map(e=>(0,n.jsx)(v.EY,{data:e,userProfile:l,isMobileWidth:N,filesOptions:null!=S?S:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:R,setAgentChangeTriggered:I,modelOptions:(null==g?void 0:g.chat_model_options)||[],editCard:!0,agentSlug:P||"",inputToolOptions:(null==H?void 0:H.input_tools)||{},outputModeOptions:(null==H?void 0:H.output_modes)||{}},e.slug))})}),(0,n.jsxs)("div",{className:"pt-6 md:pt-8",children:[(0,n.jsx)("h2",{className:"text-2xl",children:"Explore"}),(0,n.jsx)("div",{className:"".concat(r().agentList),children:!u&&V.map(e=>(0,n.jsx)(v.EY,{data:e,userProfile:l||null,isMobileWidth:N,editCard:!1,filesOptions:null!=S?S:[],selectedChatModelOption:(null==z?void 0:z.name)||"",isSubscribed:R,setAgentChangeTriggered:I,modelOptions:(null==g?void 0:g.chat_model_options)||[],agentSlug:P||"",inputToolOptions:(null==H?void 0:H.input_tools)||{},outputModeOptions:(null==H?void 0:H.output_modes)||{}},e.slug))})]})]})})})]})]})}},32759:function(e,a,t){"use strict";t.d(a,{E:function(){return s}});var n=t(57437),l=t(2265),r=t(60610),o=t(94508);let s=l.forwardRef((e,a)=>{let{className:t,value:l,indicatorColor:s,...i}=e;return(0,n.jsx)(r.fC,{ref:a,className:(0,o.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...i,children:(0,n.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(s),style:{transform:"translateX(-".concat(100-(l||0),"%)")}})})});s.displayName=r.fC.displayName},76818:function(e,a,t){"use strict";t.d(a,{g:function(){return o}});var n=t(57437),l=t(2265),r=t(94508);let o=l.forwardRef((e,a)=>{let{className:t,...l}=e;return(0,n.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),ref:a,...l})});o.displayName="Textarea"},14675:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}},2452:function(e,a,t){"use strict";t.d(a,{a:function(){return f}});var n=t(2265),l=t(49656);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M252,124a60.14,60.14,0,0,0-32-53.08,52,52,0,0,0-92-32.11A52,52,0,0,0,36,70.92a60,60,0,0,0,0,106.14,52,52,0,0,0,92,32.13,52,52,0,0,0,92-32.13A60.05,60.05,0,0,0,252,124ZM88,204a28,28,0,0,1-26.85-20.07c1,0,1.89.07,2.85.07h8a12,12,0,0,0,0-24H64A36,36,0,0,1,52,90.05a12,12,0,0,0,8-11.32V72a28,28,0,0,1,56,0v60.18a51.61,51.61,0,0,0-7.2-3.85,12,12,0,1,0-9.6,22A28,28,0,0,1,88,204Zm104-44h-8a12,12,0,0,0,0,24h8c1,0,1.9,0,2.85-.07a28,28,0,1,1-38-33.61,12,12,0,1,0-9.6-22,51.61,51.61,0,0,0-7.2,3.85V72a28,28,0,0,1,56,0v6.73a12,12,0,0,0,8,11.32,36,36,0,0,1-12,70Zm16-44a12,12,0,0,1-12,12,40,40,0,0,1-40-40V84a12,12,0,0,1,24,0v4a16,16,0,0,0,16,16A12,12,0,0,1,208,116ZM100,88a40,40,0,0,1-40,40,12,12,0,0,1,0-24A16,16,0,0,0,76,88V84a12,12,0,0,1,24,0Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M240,124a48,48,0,0,1-32,45.27h0V176a40,40,0,0,1-80,0,40,40,0,0,1-80,0v-6.73h0a48,48,0,0,1,0-90.54V72a40,40,0,0,1,80,0,40,40,0,0,1,80,0v6.73A48,48,0,0,1,240,124Z",opacity:"0.2"}),n.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M212,76V72a44,44,0,0,0-74.86-31.31,3.93,3.93,0,0,0-1.14,2.8v88.72a4,4,0,0,0,6.2,3.33A47.67,47.67,0,0,1,167.68,128a8.18,8.18,0,0,1,8.31,7.58,8,8,0,0,1-8,8.42,32,32,0,0,0-32,32v33.88a4,4,0,0,0,1.49,3.12,47.92,47.92,0,0,0,74.21-17.16,4,4,0,0,0-4.49-5.56A68.06,68.06,0,0,1,192,192h-7.73a8.18,8.18,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h8a51.6,51.6,0,0,0,24-5.88v0A52,52,0,0,0,212,76Zm-12,36h-4a36,36,0,0,1-36-36V72a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4a8,8,0,0,1,0,16ZM88,28A44.05,44.05,0,0,0,44,72v4a52,52,0,0,0-4,94.12h0A51.6,51.6,0,0,0,64,176h7.73A8.18,8.18,0,0,1,80,183.47,8,8,0,0,1,72,192H64a67.48,67.48,0,0,1-15.21-1.73,4,4,0,0,0-4.5,5.55A47.93,47.93,0,0,0,118.51,213a4,4,0,0,0,1.49-3.12V176a32,32,0,0,0-32-32,8,8,0,0,1-8-8.42A8.18,8.18,0,0,1,88.32,128a47.67,47.67,0,0,1,25.48,7.54,4,4,0,0,0,6.2-3.33V43.49a4,4,0,0,0-1.14-2.81A43.85,43.85,0,0,0,88,28Zm8,48a36,36,0,0,1-36,36H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,76V72a8,8,0,0,1,16,0Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M246,124a54.13,54.13,0,0,0-32-49.33V72a46,46,0,0,0-86-22.67A46,46,0,0,0,42,72v2.67a54,54,0,0,0,0,98.63V176a46,46,0,0,0,86,22.67A46,46,0,0,0,214,176v-2.7A54.07,54.07,0,0,0,246,124ZM88,210a34,34,0,0,1-34-32.94A53.67,53.67,0,0,0,64,178h8a6,6,0,0,0,0-12H64A42,42,0,0,1,50,84.39a6,6,0,0,0,4-5.66V72a34,34,0,0,1,68,0v73.05A45.89,45.89,0,0,0,88,130a6,6,0,0,0,0,12,34,34,0,0,1,0,68Zm104-44h-8a6,6,0,0,0,0,12h8a53.67,53.67,0,0,0,10-.94A34,34,0,1,1,168,142a6,6,0,0,0,0-12,45.89,45.89,0,0,0-34,15.05V72a34,34,0,0,1,68,0v6.73a6,6,0,0,0,4,5.66A42,42,0,0,1,192,166Zm14-54a6,6,0,0,1-6,6h-4a34,34,0,0,1-34-34V80a6,6,0,0,1,12,0v4a22,22,0,0,0,22,22h4A6,6,0,0,1,206,112ZM60,118H56a6,6,0,0,1,0-12h4A22,22,0,0,0,82,84V80a6,6,0,0,1,12,0v4A34,34,0,0,1,60,118Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M248,124a56.11,56.11,0,0,0-32-50.61V72a48,48,0,0,0-88-26.49A48,48,0,0,0,40,72v1.39a56,56,0,0,0,0,101.2V176a48,48,0,0,0,88,26.49A48,48,0,0,0,216,176v-1.41A56.09,56.09,0,0,0,248,124ZM88,208a32,32,0,0,1-31.81-28.56A55.87,55.87,0,0,0,64,180h8a8,8,0,0,0,0-16H64A40,40,0,0,1,50.67,86.27,8,8,0,0,0,56,78.73V72a32,32,0,0,1,64,0v68.26A47.8,47.8,0,0,0,88,128a8,8,0,0,0,0,16,32,32,0,0,1,0,64Zm104-44h-8a8,8,0,0,0,0,16h8a55.87,55.87,0,0,0,7.81-.56A32,32,0,1,1,168,144a8,8,0,0,0,0-16,47.8,47.8,0,0,0-32,12.26V72a32,32,0,0,1,64,0v6.73a8,8,0,0,0,5.33,7.54A40,40,0,0,1,192,164Zm16-52a8,8,0,0,1-8,8h-4a36,36,0,0,1-36-36V80a8,8,0,0,1,16,0v4a20,20,0,0,0,20,20h4A8,8,0,0,1,208,112ZM60,120H56a8,8,0,0,1,0-16h4A20,20,0,0,0,80,84V80a8,8,0,0,1,16,0v4A36,36,0,0,1,60,120Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M244,124a52.1,52.1,0,0,0-32-48V72a44,44,0,0,0-84-18.3A44,44,0,0,0,44,72v4a52,52,0,0,0,0,96v4a44,44,0,0,0,84,18.3A44,44,0,0,0,212,176v-4A52.07,52.07,0,0,0,244,124ZM88,212a36,36,0,0,1-36-36v-1.41A52.13,52.13,0,0,0,64,176h8a4,4,0,0,0,0-8H64A44,44,0,0,1,49.33,82.5,4,4,0,0,0,52,78.73V72a36,36,0,0,1,72,0v78.75A44,44,0,0,0,88,132a4,4,0,0,0,0,8,36,36,0,0,1,0,72Zm104-44h-8a4,4,0,0,0,0,8h8a52.13,52.13,0,0,0,12-1.41V176a36,36,0,1,1-36-36,4,4,0,0,0,0-8,44,44,0,0,0-36,18.75V72a36,36,0,0,1,72,0v6.73a4,4,0,0,0,2.67,3.77A44,44,0,0,1,192,168Zm12-56a4,4,0,0,1-4,4h-4a32,32,0,0,1-32-32V80a4,4,0,0,1,8,0v4a24,24,0,0,0,24,24h4A4,4,0,0,1,204,112ZM92,84a32,32,0,0,1-32,32H56a4,4,0,0,1,0-8h4A24,24,0,0,0,84,84V80a4,4,0,0,1,8,0Z"}))]]);var o=Object.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,a,t)=>a in e?o(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,m=(e,a)=>{for(var t in a||(a={}))d.call(a,t)&&p(e,t,a[t]);if(c)for(var t of c(a))u.call(a,t)&&p(e,t,a[t]);return e},h=(e,a)=>s(e,i(a));let f=(0,n.forwardRef)((e,a)=>n.createElement(l.Z,h(m({ref:a},e),{weights:r})));f.displayName="Brain"},78527:function(e,a,t){"use strict";t.d(a,{B:function(){return f}});var n=t(2265),l=t(49656);let r=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]);var o=Object.defineProperty,s=Object.defineProperties,i=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,a,t)=>a in e?o(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,m=(e,a)=>{for(var t in a||(a={}))d.call(a,t)&&p(e,t,a[t]);if(c)for(var t of c(a))u.call(a,t)&&p(e,t,a[t]);return e},h=(e,a)=>s(e,i(a));let f=(0,n.forwardRef)((e,a)=>n.createElement(l.Z,h(m({ref:a},e),{weights:r})));f.displayName="Lightning"},60610:function(e,a,t){"use strict";t.d(a,{fC:function(){return b},z$:function(){return j}});var n=t(2265),l=t(73966),r=t(66840),o=t(57437),s="Progress",[i,c]=(0,l.b)(s),[d,u]=i(s),p=n.forwardRef((e,a)=>{var t,n,l,s;let{__scopeProgress:i,value:c=null,max:u,getValueLabel:p=f,...m}=e;(u||0===u)&&!x(u)&&console.error((t="".concat(u),n="Progress","Invalid prop `max` of value `".concat(t,"` supplied to `").concat(n,"`. Only numbers greater than 0 are valid max values. Defaulting to `").concat(100,"`.")));let h=x(u)?u:100;null===c||A(c,h)||console.error((l="".concat(c),s="Progress","Invalid prop `value` of value `".concat(l,"` supplied to `").concat(s,"`. The `value` prop must be:\n - a positive number\n - less than the value passed to `max` (or ").concat(100," if no `max` prop is set)\n - `null` or `undefined` if the progress is indeterminate.\n\nDefaulting to `null`.")));let b=A(c,h)?c:null,j=g(b)?p(b,h):void 0;return(0,o.jsx)(d,{scope:i,value:b,max:h,children:(0,o.jsx)(r.WV.div,{"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":g(b)?b:void 0,"aria-valuetext":j,role:"progressbar","data-state":v(b,h),"data-value":null!=b?b:void 0,"data-max":h,...m,ref:a})})});p.displayName=s;var m="ProgressIndicator",h=n.forwardRef((e,a)=>{var t;let{__scopeProgress:n,...l}=e,s=u(m,n);return(0,o.jsx)(r.WV.div,{"data-state":v(s.value,s.max),"data-value":null!==(t=s.value)&&void 0!==t?t:void 0,"data-max":s.max,...l,ref:a})});function f(e,a){return"".concat(Math.round(e/a*100),"%")}function v(e,a){return null==e?"indeterminate":e===a?"complete":"loading"}function g(e){return"number"==typeof e}function x(e){return g(e)&&!isNaN(e)&&e>0}function A(e,a){return g(e)&&!isNaN(e)&&e<=a&&e>=0}h.displayName=m;var b=p,j=h}},function(e){e.O(0,[1607,9259,8667,849,3224,7647,2327,5427,2971,2117,1744],function(){return e(e.s=1813)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4371],{2743:function(e,t,a){Promise.resolve().then(a.bind(a,77837))},77837:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eg}});var s=a(57437),n=a(63861),r=a(14308),o=a(66070),i=a(62869),l=a(53647),c=a(47107),d=a.n(c),u=a(13590),m=a(29501),h=a(31229),x=a(2265),f=a(15681),p=a(95186),g=a(26110),j=a(49027),y=a(76818),w=a(7436),v=a(30190),N=a.n(v),b=a(97673),k=a(99376),D=a(57054),S=a(41317),C=a(87332),_=a(19841),M=a(3634),I=a(97822),A=a(93435),T=a(27484),R=a(39353),z=a(66594),P=a(12443),L=a(89203),O=a(78527),W=a(56937),q=a(33494),E=a(77992),U=a(89534),V=a(65613),F=a(17814),B=a(60729),G=a(34124),Z=a(6512),J=a(37104);let Q=()=>window.fetch("/api/automations").then(e=>e.json()).catch(e=>console.log(e));function X(e){let t=e.split(" "),a=t[2],s=t[4];return"*"===a&&"*"===s?"Day":"*"!==s?"Week":"*"!==a?"Month":"Day"}function H(e){let t=e.split(" ");if("*"===t[3]&&"*"!==t[4])return Number(t[4])}function Y(e){let t=e.split(" "),a=t[1],s=t[0],n=Number(a)>=12?"PM":"AM",r=Number(a)>12?Number(a)-12:a;"00"===r&&(r="12");let o=s;return 10>Number(o)&&"00"!==o&&(o="0".concat(o)),"".concat(r,":").concat(o," ").concat(n)}function $(e){return String(e.split(" ")[2])}function K(e){return d().toString(e)}let ee=["Day","Week","Month"],et=Array.from({length:31},(e,t)=>String(t+1)),ea=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],es=[],en=["AM","PM"];for(var er=0;er<en.length;er++)for(var eo=0;eo<12;eo++)for(var ei=0;ei<60;ei+=15){let e=String(ei).padStart(2,"0"),t=0===eo?12:eo;es.push("".concat(t,":").concat(e," ").concat(en[er]))}let el=Date.now(),ec=[{subject:"Weekly Newsletter",scheduling_request:"/research Compile a message including: 1. A recap of news from last week 2. An at-home workout I can do before work 3. A quote to inspire me for the week ahead",schedule:"9AM every Monday",next:"Next run at 9AM on Monday",crontime:"0 9 * * 1",id:el,query_to_run:""},{subject:"Front Page of Hacker News",scheduling_request:"/research Summarize the top 5 posts from https://news.ycombinator.com/best and share them with me, including links",schedule:"9PM on every Wednesday",next:"Next run at 9PM on Wednesday",crontime:"0 21 * * 3",id:el+2,query_to_run:""},{subject:"Market Summary",scheduling_request:"/research Get the market summary for today and share it with me. Focus on tech stocks and the S&P 500.",schedule:"9AM on every weekday",next:"Next run at 9AM on Monday",crontime:"0 9 * * *",id:el+3,query_to_run:""},{subject:"Market Crash Notification",scheduling_request:"Notify me if the stock market fell by more than 5% today.",schedule:"5PM every evening",next:"Next run at 5PM today",crontime:"0 17 * * *",id:el+5,query_to_run:""},{subject:"Round-up of research papers about AI in healthcare",scheduling_request:"/research Summarize the top 3 research papers about AI in healthcare that were published in the last week. Include links to the full papers.",schedule:"9AM every Friday",next:"Next run at 9AM on Friday",crontime:"0 9 * * 5",id:el+4,query_to_run:""},{subject:"Daily Bedtime Story",scheduling_request:"Compose a bedtime story that a five-year-old might enjoy. It should not exceed five paragraphs. Appeal to the imagination, but weave in learnings.",schedule:"9PM every night",next:"Next run at 9PM today",crontime:"0 21 * * *",id:el+1,query_to_run:""}];function ed(e){let t=encodeURIComponent(e.subject),a=encodeURIComponent(e.scheduling_request),s=encodeURIComponent(e.crontime);return"".concat(window.location.origin,"/automations?subject=").concat(t,"&query=").concat(a,"&crontime=").concat(s)}function eu(e){let[t,a]=(0,x.useState)(!1),[n,r]=(0,x.useState)(null),[l,c]=(0,x.useState)(!1),d=e.automation,[u,m]=(0,x.useState)(""),[h,f]=(0,x.useState)("");return((0,x.useEffect)(()=>{let e=n||d;m(Y(e.crontime));let t=X(e.crontime);if("Day"===t)f("Daily");else if("Week"===t){let t=H(e.crontime);void 0===t?f("Weekly"):f("".concat(ea[t]))}else if("Month"===t){let t=$(e.crontime);f("Monthly on the ".concat(t))}},[n,d]),l)?null:(0,s.jsxs)(o.Zb,{className:"h-full shadow-md rounded-lg dark:bg-muted ".concat(N().automationCard),children:[(0,s.jsx)(o.Ol,{children:(0,s.jsxs)(o.ll,{className:"line-clamp-2 leading-normal flex justify-between",children:[(null==n?void 0:n.subject)||d.subject,(0,s.jsxs)(D.J2,{children:[(0,s.jsx)(D.xo,{asChild:!0,children:(0,s.jsx)(i.z,{className:"bg-background",variant:"ghost",children:(0,s.jsx)(S.F,{className:"h-4 w-4"})})}),(0,s.jsxs)(D.yk,{className:"w-auto grid gap-2 text-left bg-secondary",children:[!e.suggestedCard&&e.locationData&&(0,s.jsx)(ep,{isMobileWidth:e.isMobileWidth,callToAction:"Edit",createNew:!1,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:r,authenticatedData:e.authenticatedData,isCreating:t,automation:n||d,ipLocationData:e.locationData,setToastMessage:e.setToastMessage}),(0,s.jsx)(b.Z,{buttonTitle:"Share",includeIcon:!0,buttonClassName:"justify-start px-4 py-2 h-10",buttonVariant:"outline",title:"Share Automation",description:"Copy the link below and share it with your coworkers or friends.",url:ed(d),onShare:()=>{navigator.clipboard.writeText(ed(d))}}),!e.suggestedCard&&(0,s.jsxs)(i.z,{variant:"outline",className:"justify-start",onClick:()=>{!function(e,t){fetch("/api/trigger/automation?automation_id=".concat(e),{method:"POST"}).then(e=>{if(!e.ok)throw Error("Network response was not ok");return e}).then(e=>{t("Automation triggered. Check your inbox in a few minutes!")}).catch(e=>{t("Sorry, something went wrong. Try again later.")})}(d.id.toString(),e.setToastMessage)},children:[(0,s.jsx)(C.s,{className:"h-4 w-4 mr-2"}),"Run Now"]}),(0,s.jsxs)(i.z,{variant:"destructive",className:"justify-start",onClick:()=>{if(e.suggestedCard){c(!0);return}!function(e,t){fetch("/api/automation?automation_id=".concat(e),{method:"DELETE"}).then(e=>e.json()).then(e=>{t(!0)})}(d.id.toString(),c)},children:[(0,s.jsx)(_.r,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),(0,s.jsx)(o.aY,{className:"text-secondary-foreground break-all",children:(null==n?void 0:n.scheduling_request)||d.scheduling_request}),(0,s.jsxs)(o.eW,{className:"flex flex-col items-start md:flex-row md:justify-between md:items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center rounded-lg p-1.5 border-blue-200 border dark:border-blue-500",children:[(0,s.jsx)(M.T,{className:"h-4 w-4 mr-2 text-blue-700 dark:text-blue-300"}),(0,s.jsx)("div",{className:"text-s text-blue-700 dark:text-blue-300",children:u})]}),(0,s.jsxs)("div",{className:"flex items-center rounded-lg p-1.5 border-purple-200 border dark:border-purple-500",children:[(0,s.jsx)(I.u,{className:"h-4 w-4 mr-2 text-purple-700 dark:text-purple-300"}),(0,s.jsx)("div",{className:"text-s text-purple-700 dark:text-purple-300",children:h})]})]}),e.suggestedCard&&e.setNewAutomationData&&(0,s.jsx)(ep,{isMobileWidth:e.isMobileWidth,callToAction:"Add",createNew:!0,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:t,automation:d,ipLocationData:e.locationData,setToastMessage:e.setToastMessage})]})]})}function em(e){let t=(0,k.useSearchParams)(),[a,n]=(0,x.useState)(!0),r=t.get("subject"),o=t.get("query"),i=t.get("crontime");if(!r||!o||!i)return null;let l={id:0,subject:decodeURIComponent(r),scheduling_request:decodeURIComponent(o),query_to_run:"",schedule:K(decodeURIComponent(i)),crontime:decodeURIComponent(i),next:""};return a?(0,s.jsx)(ep,{isMobileWidth:e.isMobileWidth,callToAction:"Shared",createNew:!0,setIsCreating:n,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:a,automation:l,ipLocationData:e.locationData,setToastMessage:e.setToastMessage}):null}let eh=h.z.object({subject:h.z.optional(h.z.string()),everyBlah:h.z.string({required_error:"Every is required"}),dayOfWeek:h.z.optional(h.z.number()),dayOfMonth:h.z.optional(h.z.string()),timeRecurrence:h.z.string({required_error:"Time Recurrence is required"}),schedulingRequest:h.z.string({required_error:"Query to Run is required"})});function ex(e){let t=e.automation,a=(0,m.cI)({resolver:(0,u.F)(eh),defaultValues:{subject:null==t?void 0:t.subject,everyBlah:(null==t?void 0:t.crontime)?X(t.crontime):"Day",dayOfWeek:(null==t?void 0:t.crontime)?H(t.crontime):void 0,timeRecurrence:(null==t?void 0:t.crontime)?Y(t.crontime):"12:00 PM",dayOfMonth:(null==t?void 0:t.crontime)?$(t.crontime):"1",schedulingRequest:null==t?void 0:t.scheduling_request}});return(0,s.jsx)(ef,{authenticatedData:e.authenticatedData,locationData:e.locationData||null,form:a,onSubmit:a=>{let s=function(e,t,a,s){let n="",r=t.split(":")[1].split(" ")[0],o=t.split(":")[1].split(" ")[1],i=Number(t.split(":")[0]),l="PM"===o&&i<12?String(i+12):i;switch(e){case"Day":n="".concat(r," ").concat(l," * * *");break;case"Week":n="".concat(r," ").concat(l," * * ").concat(void 0!==a?7===a?0:a:"*");break;case"Month":n="".concat(r," ").concat(l," ").concat(s," * *")}return n}(a.everyBlah,a.timeRecurrence,a.dayOfWeek,a.dayOfMonth),n="/api/automation?";n+="q=".concat(encodeURIComponent(a.schedulingRequest)),(null==t?void 0:t.id)&&!e.createNew&&(n+="&automation_id=".concat(encodeURIComponent(t.id))),a.subject&&(n+="&subject=".concat(encodeURIComponent(a.subject))),n+="&crontime=".concat(encodeURIComponent(s)),e.locationData&&e.locationData.city&&(n+="&city=".concat(encodeURIComponent(e.locationData.city))),e.locationData&&e.locationData.region&&(n+="®ion=".concat(encodeURIComponent(e.locationData.region))),e.locationData&&e.locationData.country&&(n+="&country=".concat(encodeURIComponent(e.locationData.country))),e.locationData&&e.locationData.timezone&&(n+="&timezone=".concat(encodeURIComponent(e.locationData.timezone))),fetch(n,{method:e.createNew?"POST":"PUT"}).then(e=>e.json()).then(t=>{e.setIsEditing(!1),e.setUpdatedAutomationData({id:t.id,subject:t.subject||"",query_to_run:t.query_to_run,scheduling_request:t.scheduling_request,schedule:K(t.crontime),crontime:t.crontime,next:t.next})}).catch(t=>{console.error("Error saving automation:",t),e.setIsEditing(!1),e.setToastMessage("Sorry, something went wrong. Try again or contact team@khoj.dev.")})},create:e.createNew,isLoggedIn:e.isLoggedIn,setShowLoginPrompt:e.setShowLoginPrompt})}function ef(e){var t,a;let[n,r]=(0,x.useState)(!1),{errors:o}=e.form.formState,c=["Make a picture of","Generate a summary of","Create a newsletter of","Notify me when"];return(0,s.jsx)(f.l0,{...e.form,children:(0,s.jsxs)("form",{onSubmit:e.form.handleSubmit(t=>{e.onSubmit(t),r(!0)}),className:"space-y-6",children:[(0,s.jsx)(f.xJ,{className:"space-y-1",children:(0,s.jsxs)(f.pf,{children:["Emails will be sent to this address. Timezone and location data will be used to schedule automations.",e.locationData&&(t=e.locationData,a=e.authenticatedData,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[a?(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(R.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),a.email]}):null,t&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(z.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),t?"".concat(t.city,", ").concat(t.country):"Unknown"]}),t&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(P.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),t?"".concat(t.timezone):"Unknown"]})]}))]})}),!e.create&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"subject",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"space-y-1",children:[(0,s.jsx)(f.lX,{children:"Subject"}),(0,s.jsx)(f.pf,{children:"This is the subject of the email you will receive."}),(0,s.jsx)(f.NI,{children:(0,s.jsx)(p.I,{placeholder:"Digest of Healthcare AI trends",...a})}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.subject)||void 0===t?void 0:t.message})]})}}),(0,s.jsx)(f.Wi,{control:e.form.control,name:"everyBlah",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.lX,{children:"Frequency"}),(0,s.jsx)(f.pf,{children:"How often should this automation run?"}),(0,s.jsxs)(l.Ph,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(A.W,{className:"h-4 w-4 mr-2 inline"}),"Every"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:ee.map(e=>(0,s.jsx)(l.Ql,{value:e,children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.everyBlah)||void 0===t?void 0:t.message})]})}}),"Week"===e.form.watch("everyBlah")&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"dayOfWeek",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.pf,{children:"Every week, on which day should this automation run?"}),(0,s.jsxs)(l.Ph,{onValueChange:e=>a.onChange(Number(e)),defaultValue:String(a.value),children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(T.n,{className:"h-4 w-4 mr-2 inline"}),"On"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:ea.map((e,t)=>(0,s.jsx)(l.Ql,{value:String(t),children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.dayOfWeek)||void 0===t?void 0:t.message})]})}}),"Month"===e.form.watch("everyBlah")&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"dayOfMonth",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.pf,{children:"Every month, on which day should the automation run?"}),(0,s.jsxs)(l.Ph,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(T.n,{className:"h-4 w-4 mr-2 inline"}),"On the"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:et.map(e=>(0,s.jsx)(l.Ql,{value:e,children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.dayOfMonth)||void 0===t?void 0:t.message})]})}}),("Day"===e.form.watch("everyBlah")||"Week"==e.form.watch("everyBlah")||"Month"==e.form.watch("everyBlah"))&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"timeRecurrence",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.lX,{children:"Time"}),(0,s.jsx)(f.pf,{children:"On the days this automation runs, at what time should it run?"}),(0,s.jsxs)(l.Ph,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(I.u,{className:"h-4 w-4 mr-2 inline"}),"At"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:es.map(e=>(0,s.jsx)(l.Ql,{value:e,children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.timeRecurrence)||void 0===t?void 0:t.message})]})}}),(0,s.jsx)(f.Wi,{control:e.form.control,name:"schedulingRequest",render:t=>{var a;let{field:n}=t;return(0,s.jsxs)(f.xJ,{className:"space-y-1",children:[(0,s.jsx)(f.lX,{children:"Instructions"}),(0,s.jsx)(f.pf,{children:"What do you want Khoj to do?"}),e.create&&(0,s.jsx)("div",{children:c.map(e=>{var t;return t=n.onChange,(0,s.jsxs)(i.z,{className:"text-xs bg-slate-50 dark:bg-slate-950 h-auto p-1.5 m-1 rounded-full",variant:"ghost",onClick:a=>{a.preventDefault(),t({target:{value:e}},a)},children:[e,"..."]},e)})}),(0,s.jsx)(f.NI,{children:(0,s.jsx)(y.g,{placeholder:"Create a summary of the latest news about AI in healthcare.",value:n.value,onChange:n.onChange})}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(a=o.schedulingRequest)||void 0===a?void 0:a.message})]})}}),(0,s.jsx)("fieldset",{disabled:n,children:e.isLoggedIn?n?(0,s.jsx)(i.z,{type:"submit",disabled:!0,children:"Saving..."}):(0,s.jsx)(i.z,{type:"submit",children:"Save"}):(0,s.jsx)(i.z,{onClick:t=>{t.preventDefault(),e.setShowLoginPrompt(!0)},variant:"default",children:"Login to Save"})})]})})}function ep(e){return e.isMobileWidth?(0,s.jsxs)(F.dy,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,s.jsx)(F.Qz,{asChild:!0,children:(0,s.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,s.jsx)(L.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,s.jsxs)(F.sc,{className:"p-2",children:[(0,s.jsx)(F.iI,{children:"Automation"}),(0,s.jsx)(ex,{createNew:e.createNew,automation:e.automation,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData,setToastMessage:e.setToastMessage})]})]}):(0,s.jsxs)(g.Vq,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,s.jsx)(g.hg,{asChild:!0,children:(0,s.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,s.jsx)(L.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,s.jsxs)(g.cZ,{className:"max-h-[98vh] overflow-y-auto",children:[(0,s.jsx)(j.$N,{children:"Automation"}),(0,s.jsx)(ex,{automation:e.automation,createNew:e.createNew,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData,setToastMessage:e.setToastMessage})]})]})}function eg(){let{data:e,error:t,isLoading:a}=(0,W.GW)(),{data:o,error:l,isLoading:c}=(0,n.ZP)(e?"automations":null,Q,{revalidateOnFocus:!1}),[d,u]=(0,x.useState)(!1),[m,h]=(0,x.useState)(null),[f,p]=(0,x.useState)([]),[g,j]=(0,x.useState)([]),[y,v]=(0,x.useState)(!1),b=(0,w.IC)(),{locationData:k,locationDataError:D,locationDataLoading:S}=(0,w.k6)(),[C,_]=(0,x.useState)(""),{toast:M}=(0,E.pm)();return((0,x.useEffect)(()=>{m&&(p([...f,m]),h(null))},[m,f]),(0,x.useEffect)(()=>{let e=o?o.concat(f):f;e&&j(ec.filter(t=>void 0===e.find(e=>t.subject===e.subject)))},[o,f]),(0,x.useEffect)(()=>{C&&(M({title:"Automation",description:C,action:(0,s.jsx)(U.gD,{altText:"Dismiss",children:"Ok"}),variant:C.includes("Sorry")?"destructive":"default"}),_(""))},[C]),l)?(0,s.jsx)(r.l,{message:"Oops, something went wrong. Please refresh the page."}):(0,s.jsxs)(B.Hn,{children:[(0,s.jsx)(G.S,{conversationId:""}),(0,s.jsxs)(B.kV,{children:[(0,s.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,s.jsx)(B.vP,{className:"-ml-1"}),(0,s.jsx)(Z.Z,{orientation:"vertical",className:"mr-2 h-4"}),b?(0,s.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,s.jsx)(J.VO,{className:"h-auto w-16"})}):(0,s.jsx)("h2",{className:"text-lg",children:"Automations"})]}),(0,s.jsx)("main",{className:"w-full mx-auto",children:(0,s.jsx)("div",{className:"grid w-full mx-auto",children:(0,s.jsxs)("div",{className:"".concat(N().pageLayout," w-full"),children:[(0,s.jsxs)("div",{className:"pt-6 md:pt-8 grid gap-1 md:flex md:justify-between",children:[(0,s.jsx)("h1",{className:"text-3xl flex items-center",children:"Automations"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[e?(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(R.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),e.email]}):null,k&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(z.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),k?"".concat(k.city,", ").concat(k.country):"Unknown"]}),k&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(P.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),k?"".concat(k.timezone):"Unknown"]})]})]}),y&&(0,s.jsx)(q.Z,{onOpenChange:v,isMobileWidth:b}),(0,s.jsx)(V.bZ,{className:"bg-secondary border-none my-4",children:(0,s.jsxs)(V.X,{children:[(0,s.jsx)(O.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,s.jsx)("span",{className:"font-bold",children:"How it works"})," Automations help you structure your time by automating tasks you do regularly. Build your own, or try out our presets. Get results straight to your inbox."]})}),(0,s.jsx)("div",{className:"flex justify-between items-center py-4",children:e?(0,s.jsx)(ep,{isMobileWidth:b,callToAction:"Create Automation",createNew:!0,setIsCreating:u,setShowLoginPrompt:v,setNewAutomationData:h,authenticatedData:e,isCreating:d,ipLocationData:k,setToastMessage:_}):(0,s.jsxs)(i.z,{className:"shadow-sm",onClick:()=>v(!0),variant:"outline",children:[(0,s.jsx)(L.v,{className:"h-4 w-4 mr-2"}),"Create Automation"]})}),(0,s.jsx)(x.Suspense,{children:(0,s.jsx)(em,{isMobileWidth:b,authenticatedData:e||null,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,setNewAutomationData:h,setToastMessage:_})}),c&&(0,s.jsx)(r.l,{message:"booting up your automations"}),(0,s.jsxs)("div",{className:"".concat(N().automationsLayout),children:[e&&o&&o.map(t=>(0,s.jsx)(eu,{isMobileWidth:b,authenticatedData:e,automation:t,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,setToastMessage:_},t.id)),e&&f.map(t=>(0,s.jsx)(eu,{isMobileWidth:b,authenticatedData:e,automation:t,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,setToastMessage:_},t.id))]}),(0,s.jsx)("h3",{className:"text-xl py-4",children:"Explore"}),(0,s.jsx)("div",{className:"".concat(N().automationsLayout),children:g.map(t=>(0,s.jsx)(eu,{isMobileWidth:b,setNewAutomationData:h,authenticatedData:e||null,automation:t,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,suggestedCard:!0,setToastMessage:_},t.id))})]})})})]})]})}},97673:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var s=a(57437),n=a(26110),r=a(62869),o=a(95186),i=a(26815),l=a(92457);function c(e){var t;return(0,s.jsxs)(n.Vq,{children:[(0,s.jsx)(n.hg,{asChild:!0,onClick:e.onShare,children:(0,s.jsxs)(r.z,{size:"sm",className:"".concat(e.buttonClassName||"px-3"),variant:null!==(t=e.buttonVariant)&&void 0!==t?t:"default",children:[e.includeIcon&&(0,s.jsx)(l.m,{className:"w-4 h-4 mr-2"}),e.buttonTitle]})}),(0,s.jsxs)(n.cZ,{children:[(0,s.jsxs)(n.fK,{children:[(0,s.jsx)(n.$N,{children:e.title}),(0,s.jsx)(n.Be,{children:e.description})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,s.jsx)(i._,{htmlFor:"link",className:"sr-only",children:"Link"}),(0,s.jsx)(o.I,{id:"link",defaultValue:e.url,readOnly:!0})]}),(0,s.jsx)(r.z,{type:"submit",size:"sm",className:"px-3",onClick:()=>(function(e){let t=navigator.clipboard;t&&t.writeText(e)})(e.url),children:(0,s.jsx)("span",{children:"Copy"})})]})]})]})}},65613:function(e,t,a){"use strict";a.d(t,{X:function(){return c},bZ:function(){return l}});var s=a(57437),n=a(2265),r=a(90535),o=a(94508);let i=(0,r.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),l=n.forwardRef((e,t)=>{let{className:a,variant:n,...r}=e;return(0,s.jsx)("div",{ref:t,role:"alert",className:(0,o.cn)(i({variant:n}),a),...r})});l.displayName="Alert",n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)("h5",{ref:t,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",a),...n})}).displayName="AlertTitle";let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",a),...n})});c.displayName="AlertDescription"},15681:function(e,t,a){"use strict";a.d(t,{NI:function(){return p},Wi:function(){return u},l0:function(){return c},lX:function(){return f},pf:function(){return g},xJ:function(){return x},zG:function(){return j}});var s=a(57437),n=a(2265),r=a(37053),o=a(29501),i=a(94508),l=a(26815);let c=o.RV,d=n.createContext({}),u=e=>{let{...t}=e;return(0,s.jsx)(d.Provider,{value:{name:t.name},children:(0,s.jsx)(o.Qr,{...t})})},m=()=>{let e=n.useContext(d),t=n.useContext(h),{getFieldState:a,formState:s}=(0,o.Gc)(),r=a(e.name,s);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...r}},h=n.createContext({}),x=n.forwardRef((e,t)=>{let{className:a,...r}=e,o=n.useId();return(0,s.jsx)(h.Provider,{value:{id:o},children:(0,s.jsx)("div",{ref:t,className:(0,i.cn)("space-y-2",a),...r})})});x.displayName="FormItem";let f=n.forwardRef((e,t)=>{let{className:a,...n}=e,{error:r,formItemId:o}=m();return(0,s.jsx)(l._,{ref:t,className:(0,i.cn)(r&&"text-destructive",a),htmlFor:o,...n})});f.displayName="FormLabel";let p=n.forwardRef((e,t)=>{let{...a}=e,{error:n,formItemId:o,formDescriptionId:i,formMessageId:l}=m();return(0,s.jsx)(r.g7,{ref:t,id:o,"aria-describedby":n?"".concat(i," ").concat(l):"".concat(i),"aria-invalid":!!n,...a})});p.displayName="FormControl";let g=n.forwardRef((e,t)=>{let{className:a,...n}=e,{formDescriptionId:r}=m();return(0,s.jsx)("p",{ref:t,id:r,className:(0,i.cn)("text-sm text-muted-foreground",a),...n})});g.displayName="FormDescription";let j=n.forwardRef((e,t)=>{let{className:a,children:n,...r}=e,{error:o,formMessageId:l}=m(),c=o?String(null==o?void 0:o.message):n;return c?(0,s.jsx)("p",{ref:t,id:l,className:(0,i.cn)("text-sm font-medium text-destructive",a),...r,children:c}):null});j.displayName="FormMessage"},26815:function(e,t,a){"use strict";a.d(t,{_:function(){return c}});var s=a(57437),n=a(2265),r=a(6394),o=a(90535),i=a(94508);let l=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.f,{ref:t,className:(0,i.cn)(l(),a),...n})});c.displayName=r.f.displayName},53647:function(e,t,a){"use strict";a.d(t,{Bw:function(){return f},Ph:function(){return d},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});var s=a(57437),n=a(2265),r=a(56873),o=a(40875),i=a(22135),l=a(30401),c=a(94508);let d=r.fC;r.ZA;let u=r.B4,m=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,s.jsxs)(r.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...i,children:[n,(0,s.jsx)(r.JO,{asChild:!0,children:(0,s.jsx)(o.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=r.xz.displayName;let h=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});h.displayName=r.u_.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(o.Z,{className:"h-4 w-4"})})});x.displayName=r.$G.displayName;let f=n.forwardRef((e,t)=>{let{className:a,children:n,position:o="popper",...i}=e;return(0,s.jsx)(r.h_,{children:(0,s.jsxs)(r.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:o,...i,children:[(0,s.jsx)(h,{}),(0,s.jsx)(r.l_,{className:(0,c.cn)("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,s.jsx)(x,{})]})})});f.displayName=r.VY.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...n})}).displayName=r.__.displayName;let p=n.forwardRef((e,t)=>{let{className:a,children:n,...o}=e;return(0,s.jsxs)(r.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...o,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(r.wU,{children:(0,s.jsx)(l.Z,{className:"h-4 w-4"})})}),(0,s.jsx)(r.eT,{children:n})]})});p.displayName=r.ck.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",a),...n})}).displayName=r.Z0.displayName},76818:function(e,t,a){"use strict";a.d(t,{g:function(){return o}});var s=a(57437),n=a(2265),r=a(94508);let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...n})});o.displayName="Textarea"},89534:function(e,t,a){"use strict";a.d(t,{FN:function(){return m},Mi:function(){return f},VW:function(){return c},_i:function(){return d},gD:function(){return h},lj:function(){return p},sA:function(){return x}});var s=a(57437),n=a(2265),r=a(41915),o=a(90535),i=a(32489),l=a(94508);let c=r.zt,d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.l_,{ref:t,className:(0,l.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",a),...n})});d.displayName=r.l_.displayName;let u=(0,o.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),m=n.forwardRef((e,t)=>{let{className:a,variant:n,...o}=e;return(0,s.jsx)(r.fC,{ref:t,className:(0,l.cn)(u({variant:n}),a),...o})});m.displayName=r.fC.displayName;let h=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.aU,{ref:t,className:(0,l.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",a),...n})});h.displayName=r.aU.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.x8,{ref:t,className:(0,l.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",a),"toast-close":"",...n,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=r.x8.displayName;let f=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.Dx,{ref:t,className:(0,l.cn)("text-sm font-semibold",a),...n})});f.displayName=r.Dx.displayName;let p=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.dk,{ref:t,className:(0,l.cn)("text-sm opacity-90",a),...n})});p.displayName=r.dk.displayName},77992:function(e,t,a){"use strict";a.d(t,{pm:function(){return m}});var s=a(2265);let n=0,r=new Map,o=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?o(a):e.toasts.forEach(e=>{o(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=i(c,e),l.forEach(e=>{e(c)})}function u(e){let{...t}=e,a=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>d({type:"DISMISS_TOAST",toastId:a});return d({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:e=>{e||s()}}}),{id:a,dismiss:s,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function m(){let[e,t]=s.useState(c);return s.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},30190:function(e){e.exports={automationsLayout:"automations_automationsLayout__Atoh_",automationCard:"automations_automationCard__BKidA",pageLayout:"automations_pageLayout__OaoYA"}}},function(e){e.O(0,[2663,9259,8667,849,1915,3224,5473,2327,2971,2117,1744],function(){return e(e.s=2743)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4371],{2743:function(e,t,a){Promise.resolve().then(a.bind(a,77837))},77837:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eg}});var s=a(57437),n=a(63861),r=a(14308),o=a(66070),i=a(62869),l=a(53647),c=a(47107),d=a.n(c),u=a(13590),m=a(29501),h=a(31229),x=a(2265),f=a(15681),p=a(95186),g=a(26110),j=a(49027),y=a(76818),w=a(7436),v=a(30190),N=a.n(v),b=a(97673),k=a(99376),D=a(57054),S=a(41317),C=a(87332),_=a(19841),M=a(3634),I=a(97822),A=a(93435),T=a(27484),R=a(39353),z=a(66594),P=a(12443),L=a(89203),O=a(78527),W=a(56937),q=a(33494),E=a(77992),U=a(89534),V=a(65613),F=a(17814),B=a(60729),G=a(34124),Z=a(6512),J=a(37104);let Q=()=>window.fetch("/api/automations").then(e=>e.json()).catch(e=>console.log(e));function X(e){let t=e.split(" "),a=t[2],s=t[4];return"*"===a&&"*"===s?"Day":"*"!==s?"Week":"*"!==a?"Month":"Day"}function H(e){let t=e.split(" ");if("*"===t[3]&&"*"!==t[4])return Number(t[4])}function Y(e){let t=e.split(" "),a=t[1],s=t[0],n=Number(a)>=12?"PM":"AM",r=Number(a)>12?Number(a)-12:a;"00"===r&&(r="12");let o=s;return 10>Number(o)&&"00"!==o&&(o="0".concat(o)),"".concat(r,":").concat(o," ").concat(n)}function $(e){return String(e.split(" ")[2])}function K(e){return d().toString(e)}let ee=["Day","Week","Month"],et=Array.from({length:31},(e,t)=>String(t+1)),ea=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],es=[],en=["AM","PM"];for(var er=0;er<en.length;er++)for(var eo=0;eo<12;eo++)for(var ei=0;ei<60;ei+=15){let e=String(ei).padStart(2,"0"),t=0===eo?12:eo;es.push("".concat(t,":").concat(e," ").concat(en[er]))}let el=Date.now(),ec=[{subject:"Weekly Newsletter",scheduling_request:"/research Compile a message including: 1. A recap of news from last week 2. An at-home workout I can do before work 3. A quote to inspire me for the week ahead",schedule:"9AM every Monday",next:"Next run at 9AM on Monday",crontime:"0 9 * * 1",id:el,query_to_run:""},{subject:"Front Page of Hacker News",scheduling_request:"/research Summarize the top 5 posts from https://news.ycombinator.com/best and share them with me, including links",schedule:"9PM on every Wednesday",next:"Next run at 9PM on Wednesday",crontime:"0 21 * * 3",id:el+2,query_to_run:""},{subject:"Market Summary",scheduling_request:"/research Get the market summary for today and share it with me. Focus on tech stocks and the S&P 500.",schedule:"9AM on every weekday",next:"Next run at 9AM on Monday",crontime:"0 9 * * *",id:el+3,query_to_run:""},{subject:"Market Crash Notification",scheduling_request:"Notify me if the stock market fell by more than 5% today.",schedule:"5PM every evening",next:"Next run at 5PM today",crontime:"0 17 * * *",id:el+5,query_to_run:""},{subject:"Round-up of research papers about AI in healthcare",scheduling_request:"/research Summarize the top 3 research papers about AI in healthcare that were published in the last week. Include links to the full papers.",schedule:"9AM every Friday",next:"Next run at 9AM on Friday",crontime:"0 9 * * 5",id:el+4,query_to_run:""},{subject:"Daily Bedtime Story",scheduling_request:"Compose a bedtime story that a five-year-old might enjoy. It should not exceed five paragraphs. Appeal to the imagination, but weave in learnings.",schedule:"9PM every night",next:"Next run at 9PM today",crontime:"0 21 * * *",id:el+1,query_to_run:""}];function ed(e){let t=encodeURIComponent(e.subject),a=encodeURIComponent(e.scheduling_request),s=encodeURIComponent(e.crontime);return"".concat(window.location.origin,"/automations?subject=").concat(t,"&query=").concat(a,"&crontime=").concat(s)}function eu(e){let[t,a]=(0,x.useState)(!1),[n,r]=(0,x.useState)(null),[l,c]=(0,x.useState)(!1),d=e.automation,[u,m]=(0,x.useState)(""),[h,f]=(0,x.useState)("");return((0,x.useEffect)(()=>{let e=n||d;m(Y(e.crontime));let t=X(e.crontime);if("Day"===t)f("Daily");else if("Week"===t){let t=H(e.crontime);void 0===t?f("Weekly"):f("".concat(ea[t]))}else if("Month"===t){let t=$(e.crontime);f("Monthly on the ".concat(t))}},[n,d]),l)?null:(0,s.jsxs)(o.Zb,{className:"h-full shadow-md rounded-lg dark:bg-muted ".concat(N().automationCard),children:[(0,s.jsx)(o.Ol,{children:(0,s.jsxs)(o.ll,{className:"line-clamp-2 leading-normal flex justify-between",children:[(null==n?void 0:n.subject)||d.subject,(0,s.jsxs)(D.J2,{children:[(0,s.jsx)(D.xo,{asChild:!0,children:(0,s.jsx)(i.z,{className:"bg-background",variant:"ghost",children:(0,s.jsx)(S.F,{className:"h-4 w-4"})})}),(0,s.jsxs)(D.yk,{className:"w-auto grid gap-2 text-left bg-secondary",children:[!e.suggestedCard&&e.locationData&&(0,s.jsx)(ep,{isMobileWidth:e.isMobileWidth,callToAction:"Edit",createNew:!1,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:r,authenticatedData:e.authenticatedData,isCreating:t,automation:n||d,ipLocationData:e.locationData,setToastMessage:e.setToastMessage}),(0,s.jsx)(b.Z,{buttonTitle:"Share",includeIcon:!0,buttonClassName:"justify-start px-4 py-2 h-10",buttonVariant:"outline",title:"Share Automation",description:"Copy the link below and share it with your coworkers or friends.",url:ed(d),onShare:()=>{navigator.clipboard.writeText(ed(d))}}),!e.suggestedCard&&(0,s.jsxs)(i.z,{variant:"outline",className:"justify-start",onClick:()=>{!function(e,t){fetch("/api/trigger/automation?automation_id=".concat(e),{method:"POST"}).then(e=>{if(!e.ok)throw Error("Network response was not ok");return e}).then(e=>{t("Automation triggered. Check your inbox in a few minutes!")}).catch(e=>{t("Sorry, something went wrong. Try again later.")})}(d.id.toString(),e.setToastMessage)},children:[(0,s.jsx)(C.s,{className:"h-4 w-4 mr-2"}),"Run Now"]}),(0,s.jsxs)(i.z,{variant:"destructive",className:"justify-start",onClick:()=>{if(e.suggestedCard){c(!0);return}!function(e,t){fetch("/api/automation?automation_id=".concat(e),{method:"DELETE"}).then(e=>e.json()).then(e=>{t(!0)})}(d.id.toString(),c)},children:[(0,s.jsx)(_.r,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),(0,s.jsx)(o.aY,{className:"text-secondary-foreground break-all",children:(null==n?void 0:n.scheduling_request)||d.scheduling_request}),(0,s.jsxs)(o.eW,{className:"flex flex-col items-start md:flex-row md:justify-between md:items-center gap-2",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("div",{className:"flex items-center rounded-lg p-1.5 border-blue-200 border dark:border-blue-500",children:[(0,s.jsx)(M.T,{className:"h-4 w-4 mr-2 text-blue-700 dark:text-blue-300"}),(0,s.jsx)("div",{className:"text-s text-blue-700 dark:text-blue-300",children:u})]}),(0,s.jsxs)("div",{className:"flex items-center rounded-lg p-1.5 border-purple-200 border dark:border-purple-500",children:[(0,s.jsx)(I.u,{className:"h-4 w-4 mr-2 text-purple-700 dark:text-purple-300"}),(0,s.jsx)("div",{className:"text-s text-purple-700 dark:text-purple-300",children:h})]})]}),e.suggestedCard&&e.setNewAutomationData&&(0,s.jsx)(ep,{isMobileWidth:e.isMobileWidth,callToAction:"Add",createNew:!0,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:t,automation:d,ipLocationData:e.locationData,setToastMessage:e.setToastMessage})]})]})}function em(e){let t=(0,k.useSearchParams)(),[a,n]=(0,x.useState)(!0),r=t.get("subject"),o=t.get("query"),i=t.get("crontime");if(!r||!o||!i)return null;let l={id:0,subject:decodeURIComponent(r),scheduling_request:decodeURIComponent(o),query_to_run:"",schedule:K(decodeURIComponent(i)),crontime:decodeURIComponent(i),next:""};return a?(0,s.jsx)(ep,{isMobileWidth:e.isMobileWidth,callToAction:"Shared",createNew:!0,setIsCreating:n,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:a,automation:l,ipLocationData:e.locationData,setToastMessage:e.setToastMessage}):null}let eh=h.z.object({subject:h.z.optional(h.z.string()),everyBlah:h.z.string({required_error:"Every is required"}),dayOfWeek:h.z.optional(h.z.number()),dayOfMonth:h.z.optional(h.z.string()),timeRecurrence:h.z.string({required_error:"Time Recurrence is required"}),schedulingRequest:h.z.string({required_error:"Query to Run is required"})});function ex(e){let t=e.automation,a=(0,m.cI)({resolver:(0,u.F)(eh),defaultValues:{subject:null==t?void 0:t.subject,everyBlah:(null==t?void 0:t.crontime)?X(t.crontime):"Day",dayOfWeek:(null==t?void 0:t.crontime)?H(t.crontime):void 0,timeRecurrence:(null==t?void 0:t.crontime)?Y(t.crontime):"12:00 PM",dayOfMonth:(null==t?void 0:t.crontime)?$(t.crontime):"1",schedulingRequest:null==t?void 0:t.scheduling_request}});return(0,s.jsx)(ef,{authenticatedData:e.authenticatedData,locationData:e.locationData||null,form:a,onSubmit:a=>{let s=function(e,t,a,s){let n="",r=t.split(":")[1].split(" ")[0],o=t.split(":")[1].split(" ")[1],i=Number(t.split(":")[0]),l="PM"===o&&i<12?String(i+12):i;switch(e){case"Day":n="".concat(r," ").concat(l," * * *");break;case"Week":n="".concat(r," ").concat(l," * * ").concat(void 0!==a?7===a?0:a:"*");break;case"Month":n="".concat(r," ").concat(l," ").concat(s," * *")}return n}(a.everyBlah,a.timeRecurrence,a.dayOfWeek,a.dayOfMonth),n="/api/automation?";n+="q=".concat(encodeURIComponent(a.schedulingRequest)),(null==t?void 0:t.id)&&!e.createNew&&(n+="&automation_id=".concat(encodeURIComponent(t.id))),a.subject&&(n+="&subject=".concat(encodeURIComponent(a.subject))),n+="&crontime=".concat(encodeURIComponent(s)),e.locationData&&e.locationData.city&&(n+="&city=".concat(encodeURIComponent(e.locationData.city))),e.locationData&&e.locationData.region&&(n+="®ion=".concat(encodeURIComponent(e.locationData.region))),e.locationData&&e.locationData.country&&(n+="&country=".concat(encodeURIComponent(e.locationData.country))),e.locationData&&e.locationData.timezone&&(n+="&timezone=".concat(encodeURIComponent(e.locationData.timezone))),fetch(n,{method:e.createNew?"POST":"PUT"}).then(e=>e.json()).then(t=>{e.setIsEditing(!1),e.setUpdatedAutomationData({id:t.id,subject:t.subject||"",query_to_run:t.query_to_run,scheduling_request:t.scheduling_request,schedule:K(t.crontime),crontime:t.crontime,next:t.next})}).catch(t=>{console.error("Error saving automation:",t),e.setIsEditing(!1),e.setToastMessage("Sorry, something went wrong. Try again or contact team@khoj.dev.")})},create:e.createNew,isLoggedIn:e.isLoggedIn,setShowLoginPrompt:e.setShowLoginPrompt})}function ef(e){var t,a;let[n,r]=(0,x.useState)(!1),{errors:o}=e.form.formState,c=["Make a picture of","Generate a summary of","Create a newsletter of","Notify me when"];return(0,s.jsx)(f.l0,{...e.form,children:(0,s.jsxs)("form",{onSubmit:e.form.handleSubmit(t=>{e.onSubmit(t),r(!0)}),className:"space-y-6",children:[(0,s.jsx)(f.xJ,{className:"space-y-1",children:(0,s.jsxs)(f.pf,{children:["Emails will be sent to this address. Timezone and location data will be used to schedule automations.",e.locationData&&(t=e.locationData,a=e.authenticatedData,(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[a?(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(R.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),a.email]}):null,t&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(z.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),t?"".concat(t.city,", ").concat(t.country):"Unknown"]}),t&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(P.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),t?"".concat(t.timezone):"Unknown"]})]}))]})}),!e.create&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"subject",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"space-y-1",children:[(0,s.jsx)(f.lX,{children:"Subject"}),(0,s.jsx)(f.pf,{children:"This is the subject of the email you will receive."}),(0,s.jsx)(f.NI,{children:(0,s.jsx)(p.I,{placeholder:"Digest of Healthcare AI trends",...a})}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.subject)||void 0===t?void 0:t.message})]})}}),(0,s.jsx)(f.Wi,{control:e.form.control,name:"everyBlah",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.lX,{children:"Frequency"}),(0,s.jsx)(f.pf,{children:"How often should this automation run?"}),(0,s.jsxs)(l.Ph,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(A.W,{className:"h-4 w-4 mr-2 inline"}),"Every"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:ee.map(e=>(0,s.jsx)(l.Ql,{value:e,children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.everyBlah)||void 0===t?void 0:t.message})]})}}),"Week"===e.form.watch("everyBlah")&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"dayOfWeek",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.pf,{children:"Every week, on which day should this automation run?"}),(0,s.jsxs)(l.Ph,{onValueChange:e=>a.onChange(Number(e)),defaultValue:String(a.value),children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(T.n,{className:"h-4 w-4 mr-2 inline"}),"On"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:ea.map((e,t)=>(0,s.jsx)(l.Ql,{value:String(t),children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.dayOfWeek)||void 0===t?void 0:t.message})]})}}),"Month"===e.form.watch("everyBlah")&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"dayOfMonth",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.pf,{children:"Every month, on which day should the automation run?"}),(0,s.jsxs)(l.Ph,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(T.n,{className:"h-4 w-4 mr-2 inline"}),"On the"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:et.map(e=>(0,s.jsx)(l.Ql,{value:e,children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.dayOfMonth)||void 0===t?void 0:t.message})]})}}),("Day"===e.form.watch("everyBlah")||"Week"==e.form.watch("everyBlah")||"Month"==e.form.watch("everyBlah"))&&(0,s.jsx)(f.Wi,{control:e.form.control,name:"timeRecurrence",render:e=>{var t;let{field:a}=e;return(0,s.jsxs)(f.xJ,{className:"w-full space-y-1",children:[(0,s.jsx)(f.lX,{children:"Time"}),(0,s.jsx)(f.pf,{children:"On the days this automation runs, at what time should it run?"}),(0,s.jsxs)(l.Ph,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,s.jsx)(f.NI,{children:(0,s.jsxs)(l.i4,{className:"w-[200px]",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(I.u,{className:"h-4 w-4 mr-2 inline"}),"At"]}),(0,s.jsx)(l.ki,{placeholder:""})]})}),(0,s.jsx)(l.Bw,{children:es.map(e=>(0,s.jsx)(l.Ql,{value:e,children:e},e))})]}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(t=o.timeRecurrence)||void 0===t?void 0:t.message})]})}}),(0,s.jsx)(f.Wi,{control:e.form.control,name:"schedulingRequest",render:t=>{var a;let{field:n}=t;return(0,s.jsxs)(f.xJ,{className:"space-y-1",children:[(0,s.jsx)(f.lX,{children:"Instructions"}),(0,s.jsx)(f.pf,{children:"What do you want Khoj to do?"}),e.create&&(0,s.jsx)("div",{children:c.map(e=>{var t;return t=n.onChange,(0,s.jsxs)(i.z,{className:"text-xs bg-slate-50 dark:bg-slate-950 h-auto p-1.5 m-1 rounded-full",variant:"ghost",onClick:a=>{a.preventDefault(),t({target:{value:e}},a)},children:[e,"..."]},e)})}),(0,s.jsx)(f.NI,{children:(0,s.jsx)(y.g,{placeholder:"Create a summary of the latest news about AI in healthcare.",value:n.value,onChange:n.onChange})}),(0,s.jsx)(f.zG,{}),o.subject&&(0,s.jsx)(f.zG,{children:null===(a=o.schedulingRequest)||void 0===a?void 0:a.message})]})}}),(0,s.jsx)("fieldset",{disabled:n,children:e.isLoggedIn?n?(0,s.jsx)(i.z,{type:"submit",disabled:!0,children:"Saving..."}):(0,s.jsx)(i.z,{type:"submit",children:"Save"}):(0,s.jsx)(i.z,{onClick:t=>{t.preventDefault(),e.setShowLoginPrompt(!0)},variant:"default",children:"Login to Save"})})]})})}function ep(e){return e.isMobileWidth?(0,s.jsxs)(F.dy,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,s.jsx)(F.Qz,{asChild:!0,children:(0,s.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,s.jsx)(L.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,s.jsxs)(F.sc,{className:"p-2",children:[(0,s.jsx)(F.iI,{children:"Automation"}),(0,s.jsx)(ex,{createNew:e.createNew,automation:e.automation,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData,setToastMessage:e.setToastMessage})]})]}):(0,s.jsxs)(g.Vq,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,s.jsx)(g.hg,{asChild:!0,children:(0,s.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,s.jsx)(L.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,s.jsxs)(g.cZ,{className:"max-h-[98vh] overflow-y-auto",children:[(0,s.jsx)(j.$N,{children:"Automation"}),(0,s.jsx)(ex,{automation:e.automation,createNew:e.createNew,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData,setToastMessage:e.setToastMessage})]})]})}function eg(){let{data:e,error:t,isLoading:a}=(0,W.GW)(),{data:o,error:l,isLoading:c}=(0,n.ZP)(e?"automations":null,Q,{revalidateOnFocus:!1}),[d,u]=(0,x.useState)(!1),[m,h]=(0,x.useState)(null),[f,p]=(0,x.useState)([]),[g,j]=(0,x.useState)([]),[y,v]=(0,x.useState)(!1),b=(0,w.IC)(),{locationData:k,locationDataError:D,locationDataLoading:S}=(0,w.k6)(),[C,_]=(0,x.useState)(""),{toast:M}=(0,E.pm)();return((0,x.useEffect)(()=>{m&&(p([...f,m]),h(null))},[m,f]),(0,x.useEffect)(()=>{let e=o?o.concat(f):f;e&&j(ec.filter(t=>void 0===e.find(e=>t.subject===e.subject)))},[o,f]),(0,x.useEffect)(()=>{C&&(M({title:"Automation",description:C,action:(0,s.jsx)(U.gD,{altText:"Dismiss",children:"Ok"}),variant:C.includes("Sorry")?"destructive":"default"}),_(""))},[C]),l)?(0,s.jsx)(r.l,{message:"Oops, something went wrong. Please refresh the page."}):(0,s.jsxs)(B.Hn,{children:[(0,s.jsx)(G.S,{conversationId:""}),(0,s.jsxs)(B.kV,{children:[(0,s.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,s.jsx)(B.vP,{className:"-ml-1"}),(0,s.jsx)(Z.Z,{orientation:"vertical",className:"mr-2 h-4"}),b?(0,s.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,s.jsx)(J.VO,{className:"h-auto w-16"})}):(0,s.jsx)("h2",{className:"text-lg",children:"Automations"})]}),(0,s.jsx)("main",{className:"w-full mx-auto",children:(0,s.jsx)("div",{className:"grid w-full mx-auto",children:(0,s.jsxs)("div",{className:"".concat(N().pageLayout," w-full"),children:[(0,s.jsxs)("div",{className:"pt-6 md:pt-8 grid gap-1 md:flex md:justify-between",children:[(0,s.jsx)("h1",{className:"text-3xl flex items-center",children:"Automations"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[e?(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(R.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),e.email]}):null,k&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(z.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),k?"".concat(k.city,", ").concat(k.country):"Unknown"]}),k&&(0,s.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm dark:bg-muted",children:[(0,s.jsx)(P.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),k?"".concat(k.timezone):"Unknown"]})]})]}),y&&(0,s.jsx)(q.Z,{onOpenChange:v,isMobileWidth:b}),(0,s.jsx)(V.bZ,{className:"bg-secondary border-none my-4",children:(0,s.jsxs)(V.X,{children:[(0,s.jsx)(O.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,s.jsx)("span",{className:"font-bold",children:"How it works"})," Automations help you structure your time by automating tasks you do regularly. Build your own, or try out our presets. Get results straight to your inbox."]})}),(0,s.jsx)("div",{className:"flex justify-between items-center py-4",children:e?(0,s.jsx)(ep,{isMobileWidth:b,callToAction:"Create Automation",createNew:!0,setIsCreating:u,setShowLoginPrompt:v,setNewAutomationData:h,authenticatedData:e,isCreating:d,ipLocationData:k,setToastMessage:_}):(0,s.jsxs)(i.z,{className:"shadow-sm",onClick:()=>v(!0),variant:"outline",children:[(0,s.jsx)(L.v,{className:"h-4 w-4 mr-2"}),"Create Automation"]})}),(0,s.jsx)(x.Suspense,{children:(0,s.jsx)(em,{isMobileWidth:b,authenticatedData:e||null,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,setNewAutomationData:h,setToastMessage:_})}),c&&(0,s.jsx)(r.l,{message:"booting up your automations"}),(0,s.jsxs)("div",{className:"".concat(N().automationsLayout),children:[e&&o&&o.map(t=>(0,s.jsx)(eu,{isMobileWidth:b,authenticatedData:e,automation:t,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,setToastMessage:_},t.id)),e&&f.map(t=>(0,s.jsx)(eu,{isMobileWidth:b,authenticatedData:e,automation:t,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,setToastMessage:_},t.id))]}),(0,s.jsx)("h3",{className:"text-xl py-4",children:"Explore"}),(0,s.jsx)("div",{className:"".concat(N().automationsLayout),children:g.map(t=>(0,s.jsx)(eu,{isMobileWidth:b,setNewAutomationData:h,authenticatedData:e||null,automation:t,locationData:k,isLoggedIn:!!e,setShowLoginPrompt:v,suggestedCard:!0,setToastMessage:_},t.id))})]})})})]})]})}},97673:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var s=a(57437),n=a(26110),r=a(62869),o=a(95186),i=a(26815),l=a(92457);function c(e){var t;return(0,s.jsxs)(n.Vq,{children:[(0,s.jsx)(n.hg,{asChild:!0,onClick:e.onShare,children:(0,s.jsxs)(r.z,{size:"sm",className:"".concat(e.buttonClassName||"px-3"),variant:null!==(t=e.buttonVariant)&&void 0!==t?t:"default",children:[e.includeIcon&&(0,s.jsx)(l.m,{className:"w-4 h-4 mr-2"}),e.buttonTitle]})}),(0,s.jsxs)(n.cZ,{children:[(0,s.jsxs)(n.fK,{children:[(0,s.jsx)(n.$N,{children:e.title}),(0,s.jsx)(n.Be,{children:e.description})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,s.jsx)(i._,{htmlFor:"link",className:"sr-only",children:"Link"}),(0,s.jsx)(o.I,{id:"link",defaultValue:e.url,readOnly:!0})]}),(0,s.jsx)(r.z,{type:"submit",size:"sm",className:"px-3",onClick:()=>(function(e){let t=navigator.clipboard;t&&t.writeText(e)})(e.url),children:(0,s.jsx)("span",{children:"Copy"})})]})]})]})}},65613:function(e,t,a){"use strict";a.d(t,{X:function(){return c},bZ:function(){return l}});var s=a(57437),n=a(2265),r=a(90535),o=a(94508);let i=(0,r.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),l=n.forwardRef((e,t)=>{let{className:a,variant:n,...r}=e;return(0,s.jsx)("div",{ref:t,role:"alert",className:(0,o.cn)(i({variant:n}),a),...r})});l.displayName="Alert",n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)("h5",{ref:t,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",a),...n})}).displayName="AlertTitle";let c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)("div",{ref:t,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",a),...n})});c.displayName="AlertDescription"},15681:function(e,t,a){"use strict";a.d(t,{NI:function(){return p},Wi:function(){return u},l0:function(){return c},lX:function(){return f},pf:function(){return g},xJ:function(){return x},zG:function(){return j}});var s=a(57437),n=a(2265),r=a(37053),o=a(29501),i=a(94508),l=a(26815);let c=o.RV,d=n.createContext({}),u=e=>{let{...t}=e;return(0,s.jsx)(d.Provider,{value:{name:t.name},children:(0,s.jsx)(o.Qr,{...t})})},m=()=>{let e=n.useContext(d),t=n.useContext(h),{getFieldState:a,formState:s}=(0,o.Gc)(),r=a(e.name,s);if(!e)throw Error("useFormField should be used within <FormField>");let{id:i}=t;return{id:i,name:e.name,formItemId:"".concat(i,"-form-item"),formDescriptionId:"".concat(i,"-form-item-description"),formMessageId:"".concat(i,"-form-item-message"),...r}},h=n.createContext({}),x=n.forwardRef((e,t)=>{let{className:a,...r}=e,o=n.useId();return(0,s.jsx)(h.Provider,{value:{id:o},children:(0,s.jsx)("div",{ref:t,className:(0,i.cn)("space-y-2",a),...r})})});x.displayName="FormItem";let f=n.forwardRef((e,t)=>{let{className:a,...n}=e,{error:r,formItemId:o}=m();return(0,s.jsx)(l._,{ref:t,className:(0,i.cn)(r&&"text-destructive",a),htmlFor:o,...n})});f.displayName="FormLabel";let p=n.forwardRef((e,t)=>{let{...a}=e,{error:n,formItemId:o,formDescriptionId:i,formMessageId:l}=m();return(0,s.jsx)(r.g7,{ref:t,id:o,"aria-describedby":n?"".concat(i," ").concat(l):"".concat(i),"aria-invalid":!!n,...a})});p.displayName="FormControl";let g=n.forwardRef((e,t)=>{let{className:a,...n}=e,{formDescriptionId:r}=m();return(0,s.jsx)("p",{ref:t,id:r,className:(0,i.cn)("text-sm text-muted-foreground",a),...n})});g.displayName="FormDescription";let j=n.forwardRef((e,t)=>{let{className:a,children:n,...r}=e,{error:o,formMessageId:l}=m(),c=o?String(null==o?void 0:o.message):n;return c?(0,s.jsx)("p",{ref:t,id:l,className:(0,i.cn)("text-sm font-medium text-destructive",a),...r,children:c}):null});j.displayName="FormMessage"},26815:function(e,t,a){"use strict";a.d(t,{_:function(){return c}});var s=a(57437),n=a(2265),r=a(6394),o=a(90535),i=a(94508);let l=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.f,{ref:t,className:(0,i.cn)(l(),a),...n})});c.displayName=r.f.displayName},53647:function(e,t,a){"use strict";a.d(t,{Bw:function(){return f},Ph:function(){return d},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});var s=a(57437),n=a(2265),r=a(56873),o=a(40875),i=a(22135),l=a(30401),c=a(94508);let d=r.fC;r.ZA;let u=r.B4,m=n.forwardRef((e,t)=>{let{className:a,children:n,...i}=e;return(0,s.jsxs)(r.xz,{ref:t,className:(0,c.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",a),...i,children:[n,(0,s.jsx)(r.JO,{asChild:!0,children:(0,s.jsx)(o.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=r.xz.displayName;let h=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.u_,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});h.displayName=r.u_.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.$G,{ref:t,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",a),...n,children:(0,s.jsx)(o.Z,{className:"h-4 w-4"})})});x.displayName=r.$G.displayName;let f=n.forwardRef((e,t)=>{let{className:a,children:n,position:o="popper",...i}=e;return(0,s.jsx)(r.h_,{children:(0,s.jsxs)(r.VY,{ref:t,className:(0,c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:o,...i,children:[(0,s.jsx)(h,{}),(0,s.jsx)(r.l_,{className:(0,c.cn)("p-1","popper"===o&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,s.jsx)(x,{})]})})});f.displayName=r.VY.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.__,{ref:t,className:(0,c.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...n})}).displayName=r.__.displayName;let p=n.forwardRef((e,t)=>{let{className:a,children:n,...o}=e;return(0,s.jsxs)(r.ck,{ref:t,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...o,children:[(0,s.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,s.jsx)(r.wU,{children:(0,s.jsx)(l.Z,{className:"h-4 w-4"})})}),(0,s.jsx)(r.eT,{children:n})]})});p.displayName=r.ck.displayName,n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.Z0,{ref:t,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",a),...n})}).displayName=r.Z0.displayName},76818:function(e,t,a){"use strict";a.d(t,{g:function(){return o}});var s=a(57437),n=a(2265),r=a(94508);let o=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)("textarea",{className:(0,r.cn)("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...n})});o.displayName="Textarea"},89534:function(e,t,a){"use strict";a.d(t,{FN:function(){return m},Mi:function(){return f},VW:function(){return c},_i:function(){return d},gD:function(){return h},lj:function(){return p},sA:function(){return x}});var s=a(57437),n=a(2265),r=a(41915),o=a(90535),i=a(32489),l=a(94508);let c=r.zt,d=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.l_,{ref:t,className:(0,l.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",a),...n})});d.displayName=r.l_.displayName;let u=(0,o.j)("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),m=n.forwardRef((e,t)=>{let{className:a,variant:n,...o}=e;return(0,s.jsx)(r.fC,{ref:t,className:(0,l.cn)(u({variant:n}),a),...o})});m.displayName=r.fC.displayName;let h=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.aU,{ref:t,className:(0,l.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",a),...n})});h.displayName=r.aU.displayName;let x=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.x8,{ref:t,className:(0,l.cn)("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",a),"toast-close":"",...n,children:(0,s.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=r.x8.displayName;let f=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.Dx,{ref:t,className:(0,l.cn)("text-sm font-semibold",a),...n})});f.displayName=r.Dx.displayName;let p=n.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(r.dk,{ref:t,className:(0,l.cn)("text-sm opacity-90",a),...n})});p.displayName=r.dk.displayName},77992:function(e,t,a){"use strict";a.d(t,{pm:function(){return m}});var s=a(2265);let n=0,r=new Map,o=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?o(a):e.toasts.forEach(e=>{o(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===a||void 0===a?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=i(c,e),l.forEach(e=>{e(c)})}function u(e){let{...t}=e,a=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),s=()=>d({type:"DISMISS_TOAST",toastId:a});return d({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:e=>{e||s()}}}),{id:a,dismiss:s,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function m(){let[e,t]=s.useState(c);return s.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},30190:function(e){e.exports={automationsLayout:"automations_automationsLayout__Atoh_",automationCard:"automations_automationCard__BKidA",pageLayout:"automations_pageLayout__OaoYA"}}},function(e){e.O(0,[1607,9259,8667,849,1915,3224,5473,2327,2971,2117,1744],function(){return e(e.s=2743)}),_N_E=e.O()}]);
|
khoj-1.36.1.dev2/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-c967bbcceaf2a621.js
ADDED
@@ -0,0 +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 Y}});var a=t(57437),n=t(63136),i=t.n(n),o=t(2265),l=t(74986),r=t(99376),d=t(14308),c=t(59199);t(2446);var h=t(7436),u=t(5477),m=t(56937),x=t(55287),f=t(60729),g=t(34124),p=t(6512),j=t(37104),v=t(62869),b=t(632),N=t(36720),y=t(61563),_=t(36360),w=t(82123),S=t(76818),C=t(78299),O=t(38513),I=t(94508),k=t(23518),M=t(57054),E=t(16605);let T=E.fC,B=E.xz,z=o.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:i=4,...o}=e;return(0,a.jsx)(E.VY,{ref:s,align:n,sideOffset:i,className:(0,I.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),...o})});z.displayName=E.VY.displayName;var L=t(93022);function F(e){var s;let{...t}=e,[n,i]=o.useState(!1),[l,r]=(0,o.useState)(void 0),[d,c]=(0,o.useState)(void 0),{data:u,error:x,isLoading:f}=(0,m.h2)(!0),[g,p]=(0,o.useState)([]),j=(0,h.IC)();return((0,o.useEffect)(()=>{if(!f){if(u){p(u.chat_model_options),c(u.chat_model_options.find(e=>e.id===u.selected_chat_model_config));return}c(g[0])}},[g,t.selectedModel,u]),(0,o.useEffect)(()=>{t.selectedModel&&c(g.find(e=>e.name===t.selectedModel))},[t.selectedModel]),(0,o.useEffect)(()=>{if(d){let e=d.id!==(null==u?void 0:u.selected_chat_model_config);t.onSelect(d,e)}},[d]),f)?(0,a.jsx)(L.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)(M.J2,{open:n,onOpenChange:i,...t,children:[(0,a.jsx)(M.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)(C.K,{className:"opacity-50"})]})}),(0,a.jsx)(M.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(k.mY,{loop:!0,children:(0,a.jsxs)(k.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(k.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(k.rb,{children:"No Models found."}),(0,a.jsx)(k.fu,{heading:"Models",children:g&&g.length>0&&g.map(e=>(0,a.jsx)(R,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)}},e.id))},"models")]})})}):(0,a.jsxs)(T,{children:[(0,a.jsx)(z,{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==l?void 0:l.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==l?void 0:l.description}),(null==l?void 0:l.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:l.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(B,{}),(0,a.jsx)(k.mY,{loop:!0,children:(0,a.jsxs)(k.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(k.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(k.rb,{children:"No Models found."}),(0,a.jsx)(k.fu,{heading:"Models",children:g&&g.length>0&&g.map(e=>(0,a.jsx)(R,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)}},e.id))},"models")]})})]})]})})]})})}function R(e){let{model:s,isSelected:t,onSelect:n,onPeek:i}=e,l=o.useRef(null);return(0,h.Iy)(l,e=>{e.forEach(e=>{var t;"attributes"===e.type&&"aria-selected"===e.attributeName&&(null===(t=l.current)||void 0===t?void 0:t.getAttribute("aria-selected"))==="true"&&i(s)})}),(0,a.jsxs)(k.di,{onSelect:n,ref:l,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",children:[s.name,(0,a.jsx)(O.J,{className:(0,I.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var W=t(63861),D=t(69304),J=t(42225),K=t(26815),P=t(9270),Z=t(30401);let U=o.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(P.fC,{ref:s,className:(0,I.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)(P.z$,{className:(0,I.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(Z.Z,{className:"h-4 w-4"})})})});U.displayName=P.fC.displayName;var A=t(81103),H=t(61312);let Q=e=>fetch(e).then(e=>e.json());function V(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)(q,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(q,{...s})})}function q(e){var s,t,n;let{...i}=e,[l,r]=(0,o.useState)(!1),[d,c]=(0,o.useState)(!1),{data:h,error:u}=(0,W.ZP)("/api/agents/options",Q),{data:g,error:p}=(0,W.ZP)("/api/agents/conversation?conversation_id=".concat(i.conversationId),Q),{data:j,error:b,isLoading:C}=(0,m.GW)(),[O,I]=(0,o.useState)(""),[k,E]=(0,o.useState)(),[T,B]=(0,o.useState)(),[z,L]=(0,o.useState)(),[R,D]=(0,o.useState)(!1),[P,Z]=(0,o.useState)(!1);function V(){g&&(B(g.input_tools),(void 0===g.input_tools||0===g.input_tools.length)&&B((null==h?void 0:h.input_tools)?Object.keys(h.input_tools):[]),L(g.output_modes),(void 0===g.output_modes||0===g.output_modes.length)&&L((null==h?void 0:h.output_modes)?Object.keys(h.output_modes):[]),("khoj"===g.name.toLowerCase()||!0===g.is_hidden)&&r(!0),"khoj"===g.slug.toLowerCase()?(c(!0),E(void 0),I(void 0)):(I(g.persona),E(g.chat_model)))}function q(e,s){return(D(!0),s.includes(e))?s.filter(s=>s!==e):[...s,e]}return(0,o.useEffect)(()=>{V()},[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(i.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:g&&!l?(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(g.slug),children:[(0,J.TI)(g.icon,g.color),g.name]})}):(0,a.jsxs)("div",{className:"flex items-center relative text-sm",children:[(0,J.TI)("lightbulb","orange"),"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:g&&g.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)(N.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)(S.g,{className:"w-full h-32 resize-none hover:resize-y",value:O,onChange:e=>{I(e.target.value),D(!0)},readOnly:!l,disabled:!l})})})]})},"instructions"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!(null==j?void 0:j.is_active)&&(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)(F,{disabled:!l||!(null==j?void 0:j.is_active),onSelect:(e,s)=>(function(e){let s=!(arguments.length>1)||void 0===arguments[1]||arguments[1];E(e),s&&D(!0)})(e.name,s),selectedModel:k})},"model")})]})},"model"),(0,a.jsx)(M.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(M.xo,{children:["Tools",(0,a.jsx)(y._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(M.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(s=null==h?void 0:h.input_tools)&&void 0!==s?s:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(A.u,{children:[(0,a.jsx)(A.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(K._,{htmlFor:s,className:"flex items-center gap-2 text-accent-foreground p-1 cursor-pointer",children:[(0,J.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(U,{id:s,className:"".concat(l?"cursor-pointer":""),checked:(null!=T?T:[]).includes(s),onCheckedChange:()=>B(q(s,null!=T?T:[])),disabled:!l,children:s})]})},s),(0,a.jsx)(H._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!==(t=null==h?void 0:h.output_modes)&&void 0!==t?t:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(A.u,{children:[(0,a.jsx)(A.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(K._,{htmlFor:s,className:"flex items-center gap-2 p-1 rounded-lg cursor-pointer",children:[(0,J.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(U,{id:s,className:"".concat(l?"cursor-pointer":""),checked:(null!=z?z:[]).includes(s),onCheckedChange:()=>L(q(s,null!=z?z:[])),disabled:!l,children:s})]})},s),(0,a.jsx)(H._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:i.conversationId,uploadedFiles:[],isMobileWidth:null!==(n=i.isMobileWidth)&&void 0!==n&&n})},"files-conversation")})]})},"files")]}),i.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:g&&!l&&g.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==g?void 0:g.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(V(),D(!1)),variant:"ghost",disabled:!l||!R,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(R?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(R){if(!d&&(null==g?void 0:g.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";d&&(e="POST");let s={persona:O,chat_model:k,input_tools:T,output_modes:z,...d?{}:{slug:null==g?void 0:g.slug}};Z(!0),fetch(d?"/api/agents/hidden?conversation_id=".concat(i.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{Z(!1),e.json()}).then(e=>{(0,W.JG)("/api/agents/conversation?conversation_id=".concat(i.conversationId)),D(!1)}).catch(e=>{console.error("Error:",e),Z(!1)})}})(),disabled:!l||!R||P,children:[P?(0,a.jsx)(_.U,{className:"animate-spin"}):(0,a.jsx)(w.Z,{}),P?"Saving":"Save"]})})})]})})},"actions")]})}function G(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,o.useState)(""),[d,c]=(0,o.useState)([]),[h,m]=(0,o.useState)(!1),[x,f]=(0,o.useState)(null),[g,p]=(0,o.useState)(!1),j=(0,o.useRef)(null),v=e.setQueryToProcess,b=e.onConversationIdChange,N=e.isMobileWidth?"w-full":"w-4/6";if((0,o.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,o.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")&&p(!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,o.useEffect)(()=>{t&&(m(!0),v(t))},[t,v]),(0,o.useEffect)(()=>{s&&(null==b||b(s))},[s,b]),(0,o.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)(l.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:h?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:N,setIsChatSideBarOpen:e.setIsChatSideBarOpen})}),(0,a.jsx)("div",{className:"".concat(i().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(N," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(u.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:h,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:g,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)(V,{conversationId:s,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})]})}function Y(){let e="Khoj AI - Chat",[s,t]=(0,o.useState)(null),[n,l]=(0,o.useState)(!0),[r,u]=(0,o.useState)(e),[N,y]=(0,o.useState)(null),[_,w]=(0,o.useState)([]),[S,C]=(0,o.useState)(""),[O,I]=(0,o.useState)(!1),[k,M]=(0,o.useState)(void 0),[E,T]=(0,o.useState)([]),[B,z]=(0,o.useState)(null),[L,F]=(0,o.useState)(!1),{locationData:R,locationDataError:W,locationDataLoading:D}=(0,h.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:J,error:K,isLoading:P}=(0,m.GW)(),Z=(0,h.IC)(),[U,A]=(0,o.useState)(!1);async function H(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=[],o={},l={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),I(!1),T([]),N&&(0,c.tQ)(N,u);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=_.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:i,onlineContext:o,codeContext:l}=(0,c.VK)(s,e,i,o,l)),w([..._])}}}}async function Q(){if(localStorage.removeItem("message"),!S||!N)return;let e={q:S,conversation_id:N,stream:!0,...R&&{city:R.city,region:R.region,country:R.country,country_code:R.countryCode,timezone:R.timezone},...E.length>0&&{images:E},...k&&{files:k}},s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==B?void 0:B.signal});try{await H(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=_.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(""),I(!1)}}return(0,o.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{l(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,o.useEffect)(()=>{L&&(null==B||B.abort(),function(){let e=_.find(e=>!e.completed);e&&(e.completed=!0,w([..._]),C(""),I(!1))}(),F(!1))}),(0,o.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:k};w(s=>[...s,e]),I(!0),z(new AbortController)}},[S]),(0,o.useEffect)(()=>{O&&!D&&Q()},[O,D]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)(g.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",children:[(0,a.jsx)(f.vP,{className:"-ml-1"}),(0,a.jsx)(p.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:Z?(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:u,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",onClick:()=>A(!U),children:(0,a.jsx)(b.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)(o.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(G,{isLoggedIn:!!J,streamedMessages:_,setStreamedMessages:w,chatOptionsData:s,setTitle:u,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:Z,onConversationIdChange:e=>{y(e)},setImages:T,setTriggeredAbort:F,isChatSideBarOpen:U,setIsChatSideBarOpen:A})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),i=t(6394),o=t(90535),l=t(94508);let r=(0,o.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,l.cn)(r(),t),...n})});d.displayName=i.f.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"}}},function(e){e.O(0,[8255,1607,3954,1919,9259,8667,849,4357,8155,8580,2327,5477,4986,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|