khoj 1.24.2.dev2__tar.gz → 1.24.2.dev3__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.24.2.dev2 → khoj-1.24.2.dev3}/PKG-INFO +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/404/index.html +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/9178-409f672ab573b8fd.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/9178-7e815211edcb3657.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/agents/page-a3db5b3869f83937.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/agents/page-d302911777a3e027.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/automations/page-e68cb1eba3cc41de.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/automations/page-0a5de8c254c29a1c.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-5b1626fc2882c1f9.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/chat/page-d96bf6a84bb05290.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/factchecker/page-b01f8a9b9107ecbe.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/factchecker/page-32e61af29e6b431d.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/page-ee9ee504f0d5ace6.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/page-96cab08c985716f4.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/search/page-53c2494182551684.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/search/page-b3193d46c65571c5.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/settings/page-2a7e60e3782ed95e.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/settings/page-0db9b708366606ec.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/page-9d9faa4a155bbf58.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/page-f06ac16cfe5b5a16.js +1 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/chunks/webpack-878fd47921816d3c.js → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/chunks/webpack-d4781cada9b58e75.js +1 -1
- khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css +1 -0
- khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/css/f768dddada62459d.css +1 -0
- khoj-1.24.2.dev3/src/khoj/interface/compiled/agents/index.html +1 -0
- khoj-1.24.2.dev3/src/khoj/interface/compiled/agents/index.txt +7 -0
- khoj-1.24.2.dev3/src/khoj/interface/compiled/automations/index.html +1 -0
- khoj-1.24.2.dev3/src/khoj/interface/compiled/automations/index.txt +8 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/chat/index.html +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/chat/index.txt +2 -2
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/factchecker/index.html +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/factchecker/index.txt +2 -2
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/index.html +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/index.txt +2 -2
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/search/index.html +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/search/index.txt +2 -2
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/settings/index.html +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/settings/index.txt +2 -2
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/share/chat/index.html +1 -1
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css +0 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/css/60fc94dfe42ddfe9.css +0 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/agents/index.html +0 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/agents/index.txt +0 -7
- khoj-1.24.2.dev2/src/khoj/interface/compiled/automations/index.html +0 -1
- khoj-1.24.2.dev2/src/khoj/interface/compiled/automations/index.txt +0 -8
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/.gitignore +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/LICENSE +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/README.md +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/pyproject.toml +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/app/README.md +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/app/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/app/asgi.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/app/settings.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/app/urls.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/configure.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/adapters/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/admin.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/apps.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/management/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/management/commands/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/management/commands/change_generated_images_url.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/management/commands/convert_images_png_to_webp.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0001_khojuser.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0002_googleuser.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0003_vector_extension.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0004_content_types_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0005_embeddings_corpus_id.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0006_embeddingsdates.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0007_add_conversation.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0008_alter_conversation_conversation_log.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0009_khojapiuser.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0010_chatmodeloptions_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0010_rename_embeddings_entry_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0011_merge_20231102_0138.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0012_entry_file_source.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0013_subscription.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0014_alter_googleuser_picture.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0015_alter_subscription_user.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0016_alter_subscription_renewal_date.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0017_searchmodel.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0018_searchmodelconfig_delete_searchmodel.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0019_alter_googleuser_family_name_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0020_reflectivequestion.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0021_speechtotextmodeloptions_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0022_texttoimagemodelconfig.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0023_usersearchmodelconfig.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0024_alter_entry_embeddings.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0025_clientapplication_khojuser_phone_number_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0025_searchmodelconfig_embeddings_inference_endpoint_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0026_searchmodelconfig_cross_encoder_inference_endpoint_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0027_merge_20240118_1324.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0028_khojuser_verified_phone_number.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0029_userrequests.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0030_conversation_slug_and_title.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0031_agent_conversation_agent.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0031_alter_googleuser_locale.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0032_merge_20240322_0427.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0033_rename_tuning_agent_personality.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0034_alter_chatmodeloptions_chat_model.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0035_processlock.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0036_alter_processlock_name.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0036_delete_offlinechatprocessorconversationconfig.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0036_publicconversation.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0037_chatmodeloptions_openai_config_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0037_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0038_merge_20240425_0857.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0038_merge_20240426_1640.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0039_merge_20240501_0301.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0040_alter_processlock_name.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0040_merge_20240504_1010.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0041_merge_20240505_1234.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0042_serverchatsettings.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0043_alter_chatmodeloptions_model_type.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0044_conversation_file_filters.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0045_fileobject.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0046_khojuser_email_verification_code_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0047_alter_entry_file_type.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0048_voicemodeloption_uservoicemodelconfig.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0049_datastore.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0049_texttoimagemodelconfig_api_key_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0050_alter_processlock_name.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0051_merge_20240702_1220.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0052_alter_searchmodelconfig_bi_encoder_docs_encode_config_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0053_agent_style_color_agent_style_icon.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0054_alter_agent_style_color.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0055_alter_agent_style_icon.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0056_chatmodeloptions_vision_enabled.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0056_searchmodelconfig_cross_encoder_model_config.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0057_merge_20240816_1409.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0057_remove_serverchatsettings_default_model_and_more.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0058_alter_chatmodeloptions_chat_model.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0059_searchmodelconfig_bi_encoder_confidence_threshold.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0060_merge_20240905_1828.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0061_alter_chatmodeloptions_model_type.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0061_alter_texttoimagemodelconfig_model_type.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0062_merge_20240913_0222.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0063_conversation_temp_id.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/0064_remove_conversation_temp_id_alter_conversation_id.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/migrations/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/models/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/database/tests.py +0 -0
- {khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/sXEsDJ1Vi3HypDes8jcxW → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/_29ceahp81LhuIHo5QgOD}/_buildManifest.js +0 -0
- {khoj-1.24.2.dev2/src/khoj/interface/compiled/_next/static/sXEsDJ1Vi3HypDes8jcxW → khoj-1.24.2.dev3/src/khoj/interface/compiled/_next/static/_29ceahp81LhuIHo5QgOD}/_ssgManifest.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/121-7024f479c297aef0.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/1603-3e2e1528e3b6ea1d.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/2697-a29cb9191a9e339c.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/3062-71ed4b46ac2bb87c.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/3678-ef0d20e267e9f010.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/4051-2cf66369d6ca0f1d.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/4504-1629487c8bc82203.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/6297-d1c842ed3f714ab0.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/6648-ee109f4ea33a74e2.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/7023-a5bf5744d19b3bd3.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/7071-b4711cecca6619a8.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/743-1a64254447cda71f.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/8423-62ac6c832be2461b.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/9001-3b27af6d5f21df44.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/9162-0be016519a18568b.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/9417-5d14ac74aaab2c66.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/9984-e410179c6fac7cf1.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/_not-found/page-07ff4ab42b07845e.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/agents/layout-e71c8e913cccf792.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/automations/layout-27c28e923c9b1ff0.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/chat/layout-8102549127db3067.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/factchecker/layout-7b30c541c05fb904.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/layout-f3e40d346da53112.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/search/layout-3720f1362310bebb.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/settings/layout-6f9314b0d7a26046.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-39f03f9e32399f0f.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/d3ac728e-a9e3522eef9b6b28.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/fd9d1056-2b978342deb60015.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/framework-8e0e0f4a6b83a956.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/main-app-6d6ee3495efe03d4.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/main-f84cd3c1873cd842.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/pages/_app-f870474a17b7f2fd.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/pages/_error-c66a4e8afc46f17b.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/1538cedb321e3a97.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/2272c73fc7a3b571.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/24f141a6e37cd204.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/3e1f1fdd70775091.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/553f9cdcc7a2bcd6.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/5a400c87d295e68a.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/css/c808691c459e3887.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/0e790e04fd40ad16-s.p.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/4221e1667cd19c7d-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/6c276159aa0eb14b-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/6cc0b9500e4f9168-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/9d9319a7a2ac39c6-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.1608a09b.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.4aafdb68.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_AMS-Regular.a79f1c31.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.b6770918.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.cce5b8ec.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Bold.ec17d132.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.07ef19e7.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.55fac258.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Caligraphic-Regular.dad44a7f.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.9f256b85.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.b18f59e1.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Bold.d42a5579.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.7c187121.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.d3c882a6.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Fraktur-Regular.ed38e79f.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.b74a1a8b.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.c3fb5ac2.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Bold.d181c465.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.6f2bb1df.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.70d8b0a5.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-BoldItalic.e3f82f9d.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.47373d1e.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.8916142b.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Italic.9024d815.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.0462f03b.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.7f51fe03.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Main-Regular.b7f8fe9b.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.572d331f.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.a879cf83.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-BoldItalic.f1035d8d.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.5295ba48.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.939bc644.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Math-Italic.f28c23ac.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.8c5b5494.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.94e1e8dc.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Bold.bf59d231.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.3b1e59b3.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.7c9bc82b.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Italic.b4c20c84.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.74048478.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.ba21ed5f.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_SansSerif-Regular.d4d7ba48.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.03e9641d.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.07505710.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Script-Regular.fe9cbbe1.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.e1e279cb.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.eae34984.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size1-Regular.fabc004a.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.57727022.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.5916a24f.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size2-Regular.d6b476ec.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.9acaf01c.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.a144ef58.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size3-Regular.b4230e7e.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.10d95fd3.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.7a996c9d.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Size4-Regular.fbccdabe.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.6258592b.woff +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.a8709e36.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/KaTeX_Typewriter-Regular.d97aaf4a.ttf +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/a75c8ea86756d52d-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/abce7c400ca31a51-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/f759c939737fb668-s.woff2 +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/flags.3afdda2f.webp +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/flags@2x.5fbe9fc1.webp +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/globe.98e105ca.webp +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/_next/static/media/globe@2x.974df6f8.webp +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/agents.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/icons/khoj_lantern.ico +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/icons/khoj_lantern_128x128.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/icons/khoj_lantern_256x256.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/icons/khoj_lantern_logomarktype_1200x630.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/samples/desktop-browse-draw-sample.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/samples/desktop-plain-chat-sample.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/samples/desktop-remember-plan-sample.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/samples/phone-browse-draw-sample.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/samples/phone-plain-chat-sample.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/assets/samples/phone-remember-plan-sample.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/automation.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/chat.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/close.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/copy-button-success.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/copy-button.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/khoj.webmanifest +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/logo.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/send.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/share.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/thumbs-down.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/compiled/thumbs-up.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/email/feedback.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/email/magic_link.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/email/task.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/email/welcome.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/agents.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/automation.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/favicon-128x128.ico +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/github.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/khoj-logo-sideways-200.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/khoj-logo-sideways-500.png +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/khoj-logo-sideways.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/khoj.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/logotype.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/search.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/icons/sync.svg +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/khoj.css +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/assets/utils.js +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/base_config.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/content_source_github_input.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/login.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/interface/web/utils.html +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/main.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/manage.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_offline_chat_default_model.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_offline_chat_default_model_2.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_offline_chat_schema.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_offline_model.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_processor_config_openai.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_server_pg.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/migrations/migrate_version.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/docx/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/docx/docx_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/github/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/github/github_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/images/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/images/image_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/markdown/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/markdown/markdown_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/notion/notion_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/org_mode/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/org_mode/org_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/org_mode/orgnode.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/pdf/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/pdf/pdf_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/plaintext/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/plaintext/plaintext_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/content/text_to_entries.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/anthropic/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/anthropic/anthropic_chat.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/anthropic/utils.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/google/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/google/gemini_chat.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/google/utils.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/offline/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/offline/chat_model.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/offline/utils.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/offline/whisper.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/openai/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/openai/gpt.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/openai/utils.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/openai/whisper.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/prompts.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/conversation/utils.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/embeddings.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/image/generate.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/speech/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/speech/text_to_speech.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/tools/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/processor/tools/online_search.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/api.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/api_agents.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/api_chat.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/api_content.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/api_model.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/api_phone.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/auth.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/email.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/helpers.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/notion.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/storage.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/subscription.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/twilio.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/routers/web_client.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_filter/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_filter/base_filter.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_filter/date_filter.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_filter/file_filter.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_filter/word_filter.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_type/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/search_type/text_search.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/__init__.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/cli.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/config.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/constants.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/fs_syncer.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/helpers.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/initialization.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/jsonl.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/models.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/rawconfig.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/state.py +0 -0
- {khoj-1.24.2.dev2 → khoj-1.24.2.dev3}/src/khoj/utils/yaml.py +0 -0
@@ -1 +1 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/0e790e04fd40ad16-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/1538cedb321e3a97.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/24f141a6e37cd204.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-878fd47921816d3c.js"/><script src="/_next/static/chunks/fd9d1056-2b978342deb60015.js" async=""></script><script src="/_next/static/chunks/7023-a5bf5744d19b3bd3.js" async=""></script><script src="/_next/static/chunks/main-app-6d6ee3495efe03d4.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 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"/><title>404: This page could not be found.</title><title>Khoj AI - Home</title><meta name="description" content="Your Second Brain."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta property="og:title" content="Khoj AI - Home"/><meta property="og:description" content="Your Second Brain."/><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_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 - Home"/><meta name="twitter:description" content="Your Second Brain."/><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-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_90df87"><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-878fd47921816d3c.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/0e790e04fd40ad16-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/1538cedb321e3a97.css\",\"style\"]\n3:HL[\"/_next/static/css/24f141a6e37cd204.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[39275,[],\"\"]\n7:I[61343,[],\"\"]\nd:I[76130,[],\"\"]\n8:{\"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\"}\n9:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\na:{\"display\":\"inline-block\"}\nb:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L4\",null,{\"buildId\":\"sXEsDJ1Vi3HypDes8jcxW\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"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,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/1538cedb321e3a97.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/24f141a6e37cd204.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"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 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';\"}],[\"$\",\"body\",null,{\"className\":\"__className_90df87\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$8\",\"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\":\"$9\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$b\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Home\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:title\",\"content\":\"Khoj AI - Home\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"16\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"17\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI - Home\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"25\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"26\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"5:null\n"])</script></body></html>
|
1
|
+
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/0e790e04fd40ad16-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/1538cedb321e3a97.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/24f141a6e37cd204.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-d4781cada9b58e75.js"/><script src="/_next/static/chunks/fd9d1056-2b978342deb60015.js" async=""></script><script src="/_next/static/chunks/7023-a5bf5744d19b3bd3.js" async=""></script><script src="/_next/static/chunks/main-app-6d6ee3495efe03d4.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 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';"/><title>404: This page could not be found.</title><title>Khoj AI - Home</title><meta name="description" content="Your Second Brain."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta property="og:title" content="Khoj AI - Home"/><meta property="og:description" content="Your Second Brain."/><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_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 - Home"/><meta name="twitter:description" content="Your Second Brain."/><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-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__className_90df87"><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-d4781cada9b58e75.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/0e790e04fd40ad16-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/css/1538cedb321e3a97.css\",\"style\"]\n3:HL[\"/_next/static/css/24f141a6e37cd204.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[95751,[],\"\"]\n6:I[39275,[],\"\"]\n7:I[61343,[],\"\"]\nd:I[76130,[],\"\"]\n8:{\"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\"}\n9:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\na:{\"display\":\"inline-block\"}\nb:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\ne:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L4\",null,{\"buildId\":\"_29ceahp81LhuIHo5QgOD\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\",\"\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"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,[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/1538cedb321e3a97.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/24f141a6e37cd204.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"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 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; child-src 'none'; object-src 'none';\"}],[\"$\",\"body\",null,{\"className\":\"__className_90df87\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$8\",\"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\":\"$9\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$a\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$b\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lc\"],\"globalErrorComponent\":\"$d\",\"missingSlots\":\"$We\"}]\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Home\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:title\",\"content\":\"Khoj AI - Home\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"16\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"17\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI - Home\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:description\",\"content\":\"Your Second Brain.\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_logomarktype_1200x630.png\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:height\",\"content\":\"630\"}],[\"$\",\"link\",\"25\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"26\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"27\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"5:null\n"])</script></body></html>
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9178],{89178:function(e,t,a){"use strict";a.d(t,{H:function(){return ee},Z:function(){return ea}});var s=a(57437),n=a(34531),l=a.n(n),r=a(14944),o=a(39952),c=a.n(o),i=a(2265),d=a(34040);a(7395);var h=a(26100),u=a(36013),m=a(13304),g=a(12218),p=a(74697),f=a(37440);let x=m.fC,w=m.xz;m.x8;let j=m.h_,y=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.aV,{className:(0,f.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n,ref:t})});y.displayName=m.aV.displayName;let b=(0,g.j)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),N=i.forwardRef((e,t)=>{let{side:a="right",className:n,children:l,...r}=e;return(0,s.jsxs)(j,{children:[(0,s.jsx)(y,{}),(0,s.jsxs)(m.VY,{ref:t,className:(0,f.cn)(b({side:a}),n),...r,children:[l,(0,s.jsxs)(m.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,s.jsx)(p.Z,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});N.displayName=m.VY.displayName;let k=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,f.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};k.displayName="SheetHeader";let C=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.Dx,{ref:t,className:(0,f.cn)("text-lg font-semibold text-foreground",a),...n})});C.displayName=m.Dx.displayName;let M=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.dk,{ref:t,className:(0,f.cn)("text-sm text-muted-foreground",a),...n})});M.displayName=m.dk.displayName;var v=a(19573),_=a(11838),R=a.n(_),E=a(89417);let T=new r.Z({html:!0,linkify:!0,typographer:!0});function D(e){let t=(0,E.L)(e.title||".txt","w-6 h-6 text-muted-foreground inline-flex mr-2"),a=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?R().sanitize(T.render(t)):R().sanitize(t)}(e),[n,l]=(0,i.useState)(!1);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(v.J2,{open:n&&!e.showFullContent,onOpenChange:l,children:[(0,s.jsx)(v.xo,{asChild:!0,children:(0,s.jsxs)(u.Zb,{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words text-balance rounded-lg p-2 bg-muted border-none"),children:[(0,s.jsxs)("h3",{className:"".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground}"),children:[t,e.title]}),(0,s.jsx)("p",{className:"".concat(e.showFullContent?"block":"overflow-hidden line-clamp-2"),dangerouslySetInnerHTML:{__html:a}})]})}),(0,s.jsx)(v.yk,{className:"w-[400px] mx-2",children:(0,s.jsxs)(u.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg p-2 border-none",children:[(0,s.jsxs)("h3",{className:"line-clamp-2 text-muted-foreground}",children:[t,e.title]}),(0,s.jsx)("p",{className:"overflow-hidden line-clamp-3",dangerouslySetInnerHTML:{__html:a}})]})})]})})}function L(e){let[t,a]=(0,i.useState)(!1);if(!e.link||e.link.split(" ").length>1)return null;let n="https://www.google.com/s2/favicons?domain=globe",l="unknown";try{l=new URL(e.link).hostname,n="https://www.google.com/s2/favicons?domain=".concat(l)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(v.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,s.jsx)(v.xo,{asChild:!0,children:(0,s.jsx)(u.Zb,{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words rounded-lg text-balance p-2 bg-muted border-none"),children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline p-2",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("img",{src:n,alt:"",className:"!w-4 h-4 mr-2"}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground"),children:l})]}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," font-bold"),children:e.title}),(0,s.jsx)("p",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"),children:e.description})]})})})}),(0,s.jsx)(v.yk,{className:"w-[400px] mx-2",children:(0,s.jsx)(u.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none",children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline p-2",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("img",{src:n,alt:"",className:"!w-4 h-4 mr-2"}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," text-muted-foreground"),children:l})]}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," font-bold"),children:e.title}),(0,s.jsx)("p",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-3"),children:e.description})]})})})})]})})}function F(e){let[t,a]=(0,i.useState)(3);(0,i.useEffect)(()=>{a(e.isMobileWidth?1:3)},[e.isMobileWidth]);let n=e.notesReferenceCardData.slice(0,t),l=n.length<t?e.onlineReferenceCardData.slice(0,t-n.length):[],r=e.notesReferenceCardData.length>0||e.onlineReferenceCardData.length>0,o=e.notesReferenceCardData.length+e.onlineReferenceCardData.length;return 0===o?null:(0,s.jsxs)("div",{className:"pt-0 px-4 pb-4 md:px-6",children:[(0,s.jsxs)("h3",{className:"inline-flex items-center",children:["References",(0,s.jsxs)("p",{className:"text-gray-400 m-2",children:[o," sources"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[n.map((e,t)=>(0,i.createElement)(D,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),l.map((e,t)=>(0,i.createElement)(L,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r&&(0,s.jsx)(S,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData})]})]})}function S(e){return e.notesReferenceCardData||e.onlineReferenceCardData?(0,s.jsxs)(x,{children:[(0,s.jsxs)(w,{className:"text-balance w-auto md:w-[200px] justify-start overflow-hidden break-words p-0 bg-transparent border-none text-gray-400 align-middle items-center !m-2 inline-flex",children:["View references",(0,s.jsx)(h.o,{className:"m-1"})]}),(0,s.jsxs)(N,{className:"overflow-y-scroll",children:[(0,s.jsxs)(k,{children:[(0,s.jsx)(C,{children:"References"}),(0,s.jsx)(M,{children:"View all references for this response"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[e.notesReferenceCardData.map((e,t)=>(0,i.createElement)(D,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,i.createElement)(L,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]}):null}var B=a(34149),H=a(29386),O=a(31784),A=a(60665),Z=a(96006),q=a(18444),$=a(35304),z=a(8589),I=a(63205),P=a(32970),W=a(92880),G=a(48408),U=a(67722),V=a(58485),J=a(58575),Y=a(25800);let K=new r.Z({html:!0,linkify:!0,typographer:!0});function Q(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function X(e){let{uquery:t,kquery:a}=e,[n,r]=(0,i.useState)(null);return(0,i.useEffect)(()=>{null!==n&&setTimeout(()=>{r(null)},2e3)},[n]),(0,s.jsxs)("div",{className:"".concat(l().feedbackButtons," flex align-middle justify-center items-center"),children:[(0,s.jsx)("button",{title:"Like",className:l().thumbsUpButton,disabled:null!==n,onClick:()=>{Q(t,a,"positive"),r(!0)},children:!0===n?(0,s.jsx)(B.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,s.jsx)(B.V,{alt:"Like Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),(0,s.jsx)("button",{title:"Dislike",className:l().thumbsDownButton,disabled:null!==n,onClick:()=>{Q(t,a,"negative"),r(!1)},children:!1===n?(0,s.jsx)(H.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,s.jsx)(H.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function ee(e){let t=e.message.match(/\*\*(.*)\*\*/),a=function(e,t){let a=e.toLowerCase(),n="inline mt-1 mr-2 ".concat(t," h-4 w-4");return a.includes("understanding")?(0,s.jsx)(O.a,{className:"".concat(n)}):a.includes("generating")?(0,s.jsx)(A.Z,{className:"".concat(n)}):a.includes("data sources")||a.includes("notes")?(0,s.jsx)(Z.g,{className:"".concat(n)}):a.includes("read")?(0,s.jsx)(q.f,{className:"".concat(n)}):a.includes("search")?(0,s.jsx)($.Y,{className:"".concat(n)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,s.jsx)(z.u,{className:"".concat(n)}):a.includes("paint")?(0,s.jsx)(I.Y,{className:"".concat(n)}):(0,s.jsx)(O.a,{className:"".concat(n)})}(t?t[1]:"",e.primary?(0,J.oz)(e.agentColor):"text-gray-500"),n=R().sanitize(K.render(e.message));return(0,s.jsxs)("div",{className:"".concat(l().trainOfThoughtElement," break-all items-center ").concat(e.primary?"text-gray-400":"text-gray-300"," ").concat(l().trainOfThought," ").concat(e.primary?l().primary:""),children:[a,(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})]})}K.use(c(),{inline:!0,code:!0});let et=(0,i.forwardRef)((e,t)=>{var a,n;let r,o,c,h,u;let[m,g]=(0,i.useState)(!1),[p,f]=(0,i.useState)(!1),[x,w]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[b,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)(!1),M=(0,i.useRef)(!1),v=(0,i.useRef)(null);async function _(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;N(!0);let a=E(t[0]);for(let e=0;e<t.length&&!M.current;e++){let s=a;e<t.length-1&&(a=E(t[e+1]));try{let e=await s,t=URL.createObjectURL(e);await function(e){return new Promise((t,a)=>{let s=new Audio(e);s.onended=t,s.onerror=a,s.play()})}(t)}catch(e){console.error("Error:",e);break}}N(!1),C(!1)}async function E(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,i.useEffect)(()=>{M.current=k},[k]),(0,i.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(v.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,Y.Z)(v.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1}]})});return v.current&&e.observe(v.current,{childList:!0}),()=>e.disconnect()},[v.current]),(0,i.useEffect)(()=>{var t;let a=e.chatMessage.message;a=a.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),e.chatMessage.uploadedImageData&&(a="\n\n").concat(a)),e.chatMessage.intent&&"text-to-image"==e.chatMessage.intent.type?a=""):e.chatMessage.intent&&"text-to-image2"==e.chatMessage.intent.type?a=""):e.chatMessage.intent&&"text-to-image-v3"==e.chatMessage.intent.type&&(a="")),e.chatMessage.intent&&e.chatMessage.intent.type.includes("text-to-image")&&(null===(t=e.chatMessage.intent["inferred-queries"])||void 0===t?void 0:t.length)>0&&(a+="\n\n".concat(e.chatMessage.intent["inferred-queries"][0])),w(a);let s=K.render(a);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),y(R().sanitize(s))},[e.chatMessage.message,e.chatMessage.intent]),(0,i.useEffect)(()=>{m&&setTimeout(()=>{g(!1)},2e3)},[m]),(0,i.useEffect)(()=>{v.current&&(v.current.querySelectorAll("pre > .hljs").forEach(e=>{let t=document.createElement("button"),a=(0,s.jsx)(P.w,{size:24,weight:"bold"});(0,d.createRoot)(t).render(a),t.className="hljs ".concat(l().codeCopyButton),t.addEventListener("click",()=>{let t=e.textContent||"";t=(t=(t=t.replace(/^\$+/,"")).replace(/^Copy/,"")).trim(),navigator.clipboard.writeText(t)}),e.prepend(t)}),(0,Y.Z)(v.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1}]}))},[j,p,v]);let T=function(e,t){let a=[],s=[];if(t){let e=[];for(let[a,s]of Object.entries(t)){if(s.answerBox&&e.push({title:s.answerBox.title,description:s.answerBox.answer,link:s.answerBox.source}),s.knowledgeGraph&&e.push({title:s.knowledgeGraph.title,description:s.knowledgeGraph.description,link:s.knowledgeGraph.descriptionLink}),s.webpages){if(s.webpages instanceof Array){let t=s.webpages.map(e=>({title:e.query,description:e.snippet,link:e.link}));e.push(...t)}else{let t=s.webpages;e.push({title:t.query,description:t.snippet,link:t.link})}}if(s.organic){let t=s.organic.map(e=>({title:e.title,description:e.snippet,link:e.link}));e.push(...t)}}a.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:a}}(e.chatMessage.context,e.chatMessage.onlineContext);return(0,s.jsxs)("div",{ref:t,className:(a=e.chatMessage,(r=[l().chatMessageContainer,"shadow-md"]).push(l()[a.by]),a.message||r.push(l().emptyChatMessage),e.customClassName&&r.push(l()["".concat(a.by).concat(e.customClassName)]),r.join(" ")),onMouseLeave:e=>f(!1),onMouseEnter:e=>f(!0),children:[(0,s.jsx)("div",{className:(n=e.chatMessage,(o=[l().chatMessageWrapper]).push(l()[n.by]),"khoj"===n.by&&o.push("border-l-4 border-opacity-50 ".concat("border-l-"+e.borderLeftColor)),o.join(" ")),children:(0,s.jsx)("div",{ref:v,className:l().chatMessage,dangerouslySetInnerHTML:{__html:j}})}),(0,s.jsx)("div",{className:l().teaserReferencesContainer,children:(0,s.jsx)(F,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:T.notesReferenceCardData,onlineReferenceCardData:T.onlineReferenceCardData})}),(0,s.jsx)("div",{className:l().chatFooter,children:(p||e.isMobileWidth||e.isLastMessage||b)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{title:(h=(c=new Date(e.chatMessage.created+"Z")).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),u=c.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(h," on ").concat(u)),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,s.jsxs)("div",{className:"".concat(l().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(b?k?(0,s.jsx)(V.l,{iconClassName:"p-0",className:"m-0"}):(0,s.jsx)("button",{title:"Pause Speech",onClick:e=>C(!0),children:(0,s.jsx)(W.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,s.jsx)("button",{title:"Speak",onClick:e=>_(),children:(0,s.jsx)(G.j,{alt:"Speak Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})})),(0,s.jsx)("button",{title:"Copy",className:"".concat(l().copyButton),onClick:()=>{navigator.clipboard.writeText(x),g(!0)},children:m?(0,s.jsx)(U.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,s.jsx)(U.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,s.jsx)(X,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,s.jsx)(X,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});et.displayName="ChatMessage";var ea=et},34531: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",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
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9178],{89178:function(e,t,a){"use strict";a.d(t,{H:function(){return ee},Z:function(){return ea}});var s=a(57437),n=a(34531),l=a.n(n),r=a(14944),o=a(39952),c=a.n(o),i=a(2265),d=a(34040);a(7395);var h=a(26100),u=a(36013),m=a(13304),g=a(12218),p=a(74697),f=a(37440);let x=m.fC,w=m.xz;m.x8;let j=m.h_,y=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.aV,{className:(0,f.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...n,ref:t})});y.displayName=m.aV.displayName;let b=(0,g.j)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),N=i.forwardRef((e,t)=>{let{side:a="right",className:n,children:l,...r}=e;return(0,s.jsxs)(j,{children:[(0,s.jsx)(y,{}),(0,s.jsxs)(m.VY,{ref:t,className:(0,f.cn)(b({side:a}),n),...r,children:[l,(0,s.jsxs)(m.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,s.jsx)(p.Z,{className:"h-4 w-4"}),(0,s.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});N.displayName=m.VY.displayName;let k=e=>{let{className:t,...a}=e;return(0,s.jsx)("div",{className:(0,f.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...a})};k.displayName="SheetHeader";let C=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.Dx,{ref:t,className:(0,f.cn)("text-lg font-semibold text-foreground",a),...n})});C.displayName=m.Dx.displayName;let M=i.forwardRef((e,t)=>{let{className:a,...n}=e;return(0,s.jsx)(m.dk,{ref:t,className:(0,f.cn)("text-sm text-muted-foreground",a),...n})});M.displayName=m.dk.displayName;var v=a(19573),_=a(11838),R=a.n(_),E=a(89417);let T=new r.Z({html:!0,linkify:!0,typographer:!0});function D(e){let t=(0,E.L)(e.title||".txt","w-6 h-6 text-muted-foreground inline-flex mr-2"),a=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?R().sanitize(T.render(t)):R().sanitize(t)}(e),[n,l]=(0,i.useState)(!1);return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(v.J2,{open:n&&!e.showFullContent,onOpenChange:l,children:[(0,s.jsx)(v.xo,{asChild:!0,children:(0,s.jsxs)(u.Zb,{onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words text-balance rounded-lg p-2 bg-muted border-none"),children:[(0,s.jsxs)("h3",{className:"".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground}"),children:[t,e.title]}),(0,s.jsx)("p",{className:"".concat(e.showFullContent?"block":"overflow-hidden line-clamp-2"),dangerouslySetInnerHTML:{__html:a}})]})}),(0,s.jsx)(v.yk,{className:"w-[400px] mx-2",children:(0,s.jsxs)(u.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg p-2 border-none",children:[(0,s.jsxs)("h3",{className:"line-clamp-2 text-muted-foreground}",children:[t,e.title]}),(0,s.jsx)("p",{className:"overflow-hidden line-clamp-3",dangerouslySetInnerHTML:{__html:a}})]})})]})})}function L(e){let[t,a]=(0,i.useState)(!1);if(!e.link||e.link.split(" ").length>1)return null;let n="https://www.google.com/s2/favicons?domain=globe",l="unknown";try{l=new URL(e.link).hostname,n="https://www.google.com/s2/favicons?domain=".concat(l)}catch(t){return console.warn("Error parsing domain from link: ".concat(e.link)),null}return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(v.J2,{open:t&&!e.showFullContent,onOpenChange:a,children:[(0,s.jsx)(v.xo,{asChild:!0,children:(0,s.jsx)(u.Zb,{onMouseEnter:()=>{a(!0)},onMouseLeave:()=>{a(!1)},className:"".concat(e.showFullContent?"w-auto":"w-[200px]"," overflow-hidden break-words rounded-lg text-balance p-2 bg-muted border-none"),children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline p-2",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("img",{src:n,alt:"",className:"!w-4 h-4 mr-2"}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," text-muted-foreground"),children:l})]}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-1"," font-bold"),children:e.title}),(0,s.jsx)("p",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"),children:e.description})]})})})}),(0,s.jsx)(v.yk,{className:"w-[400px] mx-2",children:(0,s.jsx)(u.Zb,{className:"w-auto overflow-hidden break-words text-balance rounded-lg border-none",children:(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsxs)("a",{href:e.link,target:"_blank",rel:"noreferrer",className:"!no-underline p-2",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("img",{src:n,alt:"",className:"!w-4 h-4 mr-2"}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," text-muted-foreground"),children:l})]}),(0,s.jsx)("h3",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-2"," font-bold"),children:e.title}),(0,s.jsx)("p",{className:"overflow-hidden ".concat(e.showFullContent?"block":"line-clamp-3"),children:e.description})]})})})})]})})}function F(e){let[t,a]=(0,i.useState)(3);(0,i.useEffect)(()=>{a(e.isMobileWidth?1:3)},[e.isMobileWidth]);let n=e.notesReferenceCardData.slice(0,t),l=n.length<t?e.onlineReferenceCardData.slice(0,t-n.length):[],r=e.notesReferenceCardData.length>0||e.onlineReferenceCardData.length>0,o=e.notesReferenceCardData.length+e.onlineReferenceCardData.length;return 0===o?null:(0,s.jsxs)("div",{className:"pt-0 px-4 pb-4 md:px-6",children:[(0,s.jsxs)("h3",{className:"inline-flex items-center",children:["References",(0,s.jsxs)("p",{className:"text-gray-400 m-2",children:[o," sources"]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[n.map((e,t)=>(0,i.createElement)(D,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),l.map((e,t)=>(0,i.createElement)(L,{showFullContent:!1,...e,key:"".concat(e.title,"-").concat(t)})),r&&(0,s.jsx)(S,{notesReferenceCardData:e.notesReferenceCardData,onlineReferenceCardData:e.onlineReferenceCardData})]})]})}function S(e){return e.notesReferenceCardData||e.onlineReferenceCardData?(0,s.jsxs)(x,{children:[(0,s.jsxs)(w,{className:"text-balance w-auto md:w-[200px] justify-start overflow-hidden break-words p-0 bg-transparent border-none text-gray-400 align-middle items-center !m-2 inline-flex",children:["View references",(0,s.jsx)(h.o,{className:"m-1"})]}),(0,s.jsxs)(N,{className:"overflow-y-scroll",children:[(0,s.jsxs)(k,{children:[(0,s.jsx)(C,{children:"References"}),(0,s.jsx)(M,{children:"View all references for this response"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 w-auto mt-2",children:[e.notesReferenceCardData.map((e,t)=>(0,i.createElement)(D,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)})),e.onlineReferenceCardData.map((e,t)=>(0,i.createElement)(L,{showFullContent:!0,...e,key:"".concat(e.title,"-").concat(t)}))]})]})]}):null}var B=a(34149),H=a(29386),O=a(31784),A=a(60665),Z=a(96006),q=a(18444),z=a(35304),I=a(8589),P=a(63205),W=a(32970),$=a(92880),G=a(48408),U=a(67722),V=a(58485),J=a(58575),Y=a(25800);let K=new r.Z({html:!0,linkify:!0,typographer:!0});function Q(e,t,a){fetch("/api/chat/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uquery:e,kquery:t,sentiment:a})})}function X(e){let{uquery:t,kquery:a}=e,[n,r]=(0,i.useState)(null);return(0,i.useEffect)(()=>{null!==n&&setTimeout(()=>{r(null)},2e3)},[n]),(0,s.jsxs)("div",{className:"".concat(l().feedbackButtons," flex align-middle justify-center items-center"),children:[(0,s.jsx)("button",{title:"Like",className:l().thumbsUpButton,disabled:null!==n,onClick:()=>{Q(t,a,"positive"),r(!0)},children:!0===n?(0,s.jsx)(B.V,{alt:"Liked Message",className:"text-green-500",weight:"fill"}):(0,s.jsx)(B.V,{alt:"Like Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),(0,s.jsx)("button",{title:"Dislike",className:l().thumbsDownButton,disabled:null!==n,onClick:()=>{Q(t,a,"negative"),r(!1)},children:!1===n?(0,s.jsx)(H.L,{alt:"Disliked Message",className:"text-red-500",weight:"fill"}):(0,s.jsx)(H.L,{alt:"Dislike Message",className:"hsl(var(--muted-foreground)) hover:text-red-500"})})]})}function ee(e){let t=e.message.match(/\*\*(.*)\*\*/),a=function(e,t){let a=e.toLowerCase(),n="inline mt-1 mr-2 ".concat(t," h-4 w-4");return a.includes("understanding")?(0,s.jsx)(O.a,{className:"".concat(n)}):a.includes("generating")?(0,s.jsx)(A.Z,{className:"".concat(n)}):a.includes("data sources")||a.includes("notes")?(0,s.jsx)(Z.g,{className:"".concat(n)}):a.includes("read")?(0,s.jsx)(q.f,{className:"".concat(n)}):a.includes("search")?(0,s.jsx)(z.Y,{className:"".concat(n)}):a.includes("summary")||a.includes("summarize")||a.includes("enhanc")?(0,s.jsx)(I.u,{className:"".concat(n)}):a.includes("paint")?(0,s.jsx)(P.Y,{className:"".concat(n)}):(0,s.jsx)(O.a,{className:"".concat(n)})}(t?t[1]:"",e.primary?(0,J.oz)(e.agentColor):"text-gray-500"),n=R().sanitize(K.render(e.message));return(0,s.jsxs)("div",{className:"".concat(l().trainOfThoughtElement," break-all items-center ").concat(e.primary?"text-gray-400":"text-gray-300"," ").concat(l().trainOfThought," ").concat(e.primary?l().primary:""),children:[a,(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})]})}K.use(c(),{inline:!0,code:!0});let et=(0,i.forwardRef)((e,t)=>{var a,n;let r,o,c,h,u;let[m,g]=(0,i.useState)(!1),[p,f]=(0,i.useState)(!1),[x,w]=(0,i.useState)(""),[j,y]=(0,i.useState)(""),[b,N]=(0,i.useState)(!1),[k,C]=(0,i.useState)(!1),M=(0,i.useRef)(!1),v=(0,i.useRef)(null);async function _(){let t=e.chatMessage.message.match(/[^.!?]+[.!?]*/g)||[];if(!t||0===t.length||!t[0])return;N(!0);let a=E(t[0]);for(let e=0;e<t.length&&!M.current;e++){let s=a;e<t.length-1&&(a=E(t[e+1]));try{let e=await s,t=URL.createObjectURL(e);await function(e){return new Promise((t,a)=>{let s=new Audio(e);s.onended=t,s.onerror=a,s.play()})}(t)}catch(e){console.error("Error:",e);break}}N(!1),C(!1)}async function E(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,i.useEffect)(()=>{M.current=k},[k]),(0,i.useEffect)(()=>{let e=new MutationObserver((e,t)=>{if(v.current)for(let t of e)"childList"===t.type&&t.addedNodes.length>0&&(0,Y.Z)(v.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!1}]})});return v.current&&e.observe(v.current,{childList:!0}),()=>e.disconnect()},[v.current]),(0,i.useEffect)(()=>{var t;let a=e.chatMessage.message;a=a.replace(/\\\(/g,"LEFTPAREN").replace(/\\\)/g,"RIGHTPAREN").replace(/\\\[/g,"LEFTBRACKET").replace(/\\\]/g,"RIGHTBRACKET"),e.chatMessage.uploadedImageData&&(a="\n\n").concat(a)),e.chatMessage.intent&&"text-to-image"==e.chatMessage.intent.type?a=""):e.chatMessage.intent&&"text-to-image2"==e.chatMessage.intent.type?a=""):e.chatMessage.intent&&"text-to-image-v3"==e.chatMessage.intent.type&&(a="")),e.chatMessage.intent&&e.chatMessage.intent.type.includes("text-to-image")&&(null===(t=e.chatMessage.intent["inferred-queries"])||void 0===t?void 0:t.length)>0&&(a+="\n\n".concat(e.chatMessage.intent["inferred-queries"][0])),w(a);let s=K.render(a);s=s.replace(/LEFTPAREN/g,"\\(").replace(/RIGHTPAREN/g,"\\)").replace(/LEFTBRACKET/g,"\\[").replace(/RIGHTBRACKET/g,"\\]"),y(R().sanitize(s))},[e.chatMessage.message,e.chatMessage.intent]),(0,i.useEffect)(()=>{m&&setTimeout(()=>{g(!1)},2e3)},[m]),(0,i.useEffect)(()=>{v.current&&(v.current.querySelectorAll("pre > .hljs").forEach(e=>{let t=document.createElement("button"),a=(0,s.jsx)(W.w,{size:24,weight:"bold"});(0,d.createRoot)(t).render(a),t.className="hljs ".concat(l().codeCopyButton),t.addEventListener("click",()=>{let t=e.textContent||"";t=(t=(t=t.replace(/^\$+/,"")).replace(/^Copy/,"")).trim(),navigator.clipboard.writeText(t)}),e.prepend(t)}),(0,Y.Z)(v.current,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1}]}))},[j,p,v]);let T=function(e,t){let a=[],s=[];if(t){let e=[];for(let[a,s]of Object.entries(t)){if(s.answerBox&&e.push({title:s.answerBox.title,description:s.answerBox.answer,link:s.answerBox.source}),s.knowledgeGraph&&e.push({title:s.knowledgeGraph.title,description:s.knowledgeGraph.description,link:s.knowledgeGraph.descriptionLink}),s.webpages){if(s.webpages instanceof Array){let t=s.webpages.map(e=>({title:e.query,description:e.snippet,link:e.link}));e.push(...t)}else{let t=s.webpages;e.push({title:t.query,description:t.snippet,link:t.link})}}if(s.organic){let t=s.organic.map(e=>({title:e.title,description:e.snippet,link:e.link}));e.push(...t)}}a.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:a}}(e.chatMessage.context,e.chatMessage.onlineContext);return(0,s.jsxs)("div",{ref:t,className:(a=e.chatMessage,(r=[l().chatMessageContainer,"shadow-md"]).push(l()[a.by]),a.message||r.push(l().emptyChatMessage),e.customClassName&&r.push(l()["".concat(a.by).concat(e.customClassName)]),r.join(" ")),onMouseLeave:e=>f(!1),onMouseEnter:e=>f(!0),children:[(0,s.jsx)("div",{className:(n=e.chatMessage,(o=[l().chatMessageWrapper]).push(l()[n.by]),"khoj"===n.by&&o.push("border-l-4 border-opacity-50 ".concat("border-l-"+e.borderLeftColor)),o.join(" ")),children:(0,s.jsx)("div",{ref:v,className:l().chatMessage,dangerouslySetInnerHTML:{__html:j}})}),(0,s.jsx)("div",{className:l().teaserReferencesContainer,children:(0,s.jsx)(F,{isMobileWidth:e.isMobileWidth,notesReferenceCardData:T.notesReferenceCardData,onlineReferenceCardData:T.onlineReferenceCardData})}),(0,s.jsx)("div",{className:l().chatFooter,children:(p||e.isMobileWidth||e.isLastMessage||b)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{title:(h=(c=new Date(e.chatMessage.created+"Z")).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).toUpperCase(),u=c.toLocaleString("en-US",{year:"numeric",month:"short",day:"2-digit"}).replaceAll("-"," "),"".concat(h," on ").concat(u)),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,s.jsxs)("div",{className:"".concat(l().chatButtons," shadow-sm"),children:["khoj"===e.chatMessage.by&&(b?k?(0,s.jsx)(V.l,{iconClassName:"p-0",className:"m-0"}):(0,s.jsx)("button",{title:"Pause Speech",onClick:e=>C(!0),children:(0,s.jsx)($.d,{alt:"Pause Message",className:"hsl(var(--muted-foreground))"})}):(0,s.jsx)("button",{title:"Speak",onClick:e=>_(),children:(0,s.jsx)(G.j,{alt:"Speak Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})})),(0,s.jsx)("button",{title:"Copy",className:"".concat(l().copyButton),onClick:()=>{navigator.clipboard.writeText(x),g(!0)},children:m?(0,s.jsx)(U.C,{alt:"Copied Message",weight:"fill",className:"text-green-500"}):(0,s.jsx)(U.C,{alt:"Copy Message",className:"hsl(var(--muted-foreground)) hover:text-green-500"})}),"khoj"===e.chatMessage.by&&(e.chatMessage.intent?(0,s.jsx)(X,{uquery:e.chatMessage.intent.query,kquery:e.chatMessage.message}):(0,s.jsx)(X,{uquery:e.chatMessage.rawQuery||e.chatMessage.message,kquery:e.chatMessage.message}))]})]})})]})});et.displayName="ChatMessage";var ea=et},34531: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",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,87529))},87529:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return R}});var n=t(57437),r=t(15283),l=t.n(r),s=t(66648),o=t(29039),c=t(2265),i=t(79306),d=t(50495),h=t(19666),u=t(52195);let m=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),c.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]);var g=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,b=(e,a,t)=>a in e?g(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,w=(e,a)=>{for(var t in a||(a={}))j.call(a,t)&&b(e,t,a[t]);if(x)for(var t of x(a))v.call(a,t)&&b(e,t,a[t]);return e},y=(e,a)=>p(e,f(a));let N=(0,c.forwardRef)((e,a)=>c.createElement(u.Z,y(w({ref:a},e),{weights:m})));N.displayName="PaperPlaneTilt";var L=t(35418),E=t(64945),Z=t(36013),A=t(90837),O=t(7951),M=t(66820),k=t(58485),P=t(48861),_=t(89417),F=t(58575),z=t(47412),C=t(69591);async function V(e,a){let t="/login?next=/agents?agent=".concat(e);if(!a){window.location.href=t;return}let n=await fetch("/api/chat/sessions?agent_slug=".concat(e),{method:"POST"}),r=await n.json();200==n.status?window.location.href="/chat?conversationId=".concat(r.conversation_id):403==n.status||401==n.status?window.location.href=t:alert("Failed to start chat session")}let S=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e));function H(e){let a=new URLSearchParams(window.location.search).get("agent"),[t,r]=(0,c.useState)(a===e.data.slug),[o,i]=(0,c.useState)(!1),h=e.userProfile;t&&window.history.pushState({},"Khoj AI - Agent ".concat(e.data.slug),"/agents?agent=".concat(e.data.slug));let u=(0,F.oz)(e.data.color);return(0,n.jsxs)(Z.Zb,{className:"shadow-sm bg-gradient-to-b from-white 20% to-".concat(e.data.color?e.data.color:"gray","-100/50 dark:from-[hsl(var(--background))] dark:to-").concat(e.data.color?e.data.color:"gray","-950/50 rounded-xl hover:shadow-md"),children:[o&&(0,n.jsx)(M.Z,{loginRedirectMessage:"Sign in to start chatting with ".concat(e.data.name),onOpenChange:i}),(0,n.jsx)(Z.Ol,{children:(0,n.jsx)(Z.ll,{children:e.isMobileWidth?(0,n.jsxs)(O.dy,{open:t,onOpenChange:e=>{r(e),window.history.pushState({},"Khoj AI - Agents","/agents")},children:[(0,n.jsx)(O.Qz,{children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,_.T)(e.data.icon,e.data.color)||(0,n.jsx)(s.default,{src:e.data.avatar,alt:e.data.name,width:50,height:50}),e.data.name]})}),(0,n.jsx)("div",{className:"float-right",children:e.userProfile?(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100",onClick:()=>V(e.data.slug,h),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})}):(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm",onClick:()=>i(!0),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})})}),(0,n.jsxs)(O.sc,{className:"whitespace-pre-line p-2",children:[(0,n.jsxs)(O.OX,{children:[(0,n.jsx)(O.iI,{children:e.data.name}),(0,n.jsx)(O.u6,{children:"Full Prompt"})]}),e.data.persona,(0,n.jsx)(O.ze,{children:(0,n.jsx)(O.uh,{children:"Done"})})]})]}):(0,n.jsxs)(A.Vq,{open:t,onOpenChange:()=>{r(!t),window.history.pushState({},"Khoj AI - Agents","/agents")},children:[(0,n.jsx)(A.hg,{children:(0,n.jsxs)("div",{className:"flex items-center relative top-2",children:[(0,_.T)(e.data.icon,e.data.color)||(0,n.jsx)(s.default,{src:e.data.avatar,alt:e.data.name,width:50,height:50}),e.data.name]})}),(0,n.jsx)("div",{className:"float-right",children:e.userProfile?(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>V(e.data.slug,h),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})}):(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>i(!0),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})})}),(0,n.jsxs)(A.cZ,{className:"whitespace-pre-line max-h-[80vh]",children:[(0,n.jsx)(A.fK,{children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,_.T)(e.data.icon,e.data.color)||(0,n.jsx)(s.default,{src:e.data.avatar,alt:e.data.name,width:32,height:50}),(0,n.jsx)("p",{className:"font-bold text-lg",children:e.data.name})]})}),(0,n.jsx)("div",{className:"max-h-[60vh] overflow-y-scroll text-neutral-500 dark:text-white",children:e.data.persona}),(0,n.jsx)(A.cN,{children:(0,n.jsxs)(d.z,{className:"pt-6 pb-6 ".concat(u," bg-white dark:bg-[hsl(var(--background))] text-neutral-500 dark:text-white border-2 border-stone-100 shadow-sm rounded-xl hover:bg-stone-100 dark:hover:bg-neutral-900 dark:border-neutral-700"),onClick:()=>{V(e.data.slug,h),r(!1)},children:[(0,n.jsx)(N,{className:"w-6 h-6 m-2 ".concat((0,F.oz)(e.data.color))}),"Start Chatting"]})})]})]})})}),(0,n.jsx)(Z.aY,{children:(0,n.jsx)("div",{className:l().agentPersonality,children:(0,n.jsx)("button",{className:"".concat(l().infoButton," text-neutral-500 dark:text-white"),onClick:()=>r(!0),children:(0,n.jsx)("p",{children:e.data.persona})})})})]})}function R(){let{data:e,error:a}=(0,o.ZP)("agents",S,{revalidateOnFocus:!1}),t=(0,i.G)(),[r,s]=(0,c.useState)(!1),d=(0,C.IC)();return a?(0,n.jsxs)("main",{className:l().main,children:[(0,n.jsx)("div",{className:"".concat(l().titleBar," text-5xl"),children:"Agents"}),(0,n.jsx)("div",{className:l().agentList,children:"Error loading agents"})]}):e?(0,n.jsx)("main",{className:"w-full mx-auto",children:(0,n.jsxs)("div",{className:"grid w-full mx-auto",children:[(0,n.jsx)("div",{className:"".concat(l().sidePanel," top-0"),children:(0,n.jsx)(P.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:d})}),(0,n.jsxs)("div",{className:"".concat(l().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)(h.pn,{children:(0,n.jsxs)(h.u,{delayDuration:10,children:[(0,n.jsx)(h.aJ,{children:(0,n.jsxs)("div",{className:"flex flex-row",children:[(0,n.jsx)(L.v,{className:"pr-2 w-6 h-6"}),(0,n.jsx)("p",{className:"pr-2",children:"Create Agent"})]})}),(0,n.jsx)(h._v,{children:(0,n.jsx)("p",{children:"Coming Soon!"})})]})})})]}),r&&(0,n.jsx)(M.Z,{loginRedirectMessage:"Sign in to start chatting with a specialized agent",onOpenChange:s}),(0,n.jsx)(z.bZ,{className:"bg-secondary border-none my-4",children:(0,n.jsxs)(z.X,{children:[(0,n.jsx)(E.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:"".concat(l().agentList),children:e.map(e=>(0,n.jsx)(H,{data:e,userProfile:t,isMobileWidth:d},e.slug))})]})]})}):(0,n.jsx)("main",{className:l().main,children:(0,n.jsxs)("div",{className:l().agentList,children:[(0,n.jsx)(k.l,{})," booting up your agents"]})})}},66820:function(e,a,t){"use strict";t.d(a,{Z:function(){return s}});var n=t(57437),r=t(6780),l=t(87138);function s(e){return(0,n.jsx)(r.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,n.jsxs)(r._T,{children:[(0,n.jsx)(r.fY,{children:(0,n.jsx)(r.f$,{children:"Sign in to Khoj to continue"})}),(0,n.jsxs)(r.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,n.jsx)(l.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,n.jsxs)(r.xo,{children:[(0,n.jsx)(r.le,{children:"Dismiss"}),(0,n.jsx)(r.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,n.jsxs)(l.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},47412:function(e,a,t){"use strict";t.d(a,{X:function(){return i},bZ:function(){return c}});var n=t(57437),r=t(2265),l=t(12218),s=t(37440);let o=(0,l.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),c=r.forwardRef((e,a)=>{let{className:t,variant:r,...l}=e;return(0,n.jsx)("div",{ref:a,role:"alert",className:(0,s.cn)(o({variant:r}),t),...l})});c.displayName="Alert",r.forwardRef((e,a)=>{let{className:t,...r}=e;return(0,n.jsx)("h5",{ref:a,className:(0,s.cn)("mb-1 font-medium leading-none tracking-tight",t),...r})}).displayName="AlertTitle";let i=r.forwardRef((e,a)=>{let{className:t,...r}=e;return(0,n.jsx)("div",{ref:a,className:(0,s.cn)("text-sm [&_p]:leading-relaxed",t),...r})});i.displayName="AlertDescription"},19666:function(e,a,t){"use strict";t.d(a,{_v:function(){return d},aJ:function(){return i},pn:function(){return o},u:function(){return c}});var n=t(57437),r=t(2265),l=t(27071),s=t(37440);let o=l.zt,c=l.fC,i=l.xz,d=r.forwardRef((e,a)=>{let{className:t,sideOffset:r=4,...o}=e;return(0,n.jsx)(l.VY,{ref:a,sideOffset:r,className:(0,s.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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})});d.displayName=l.VY.displayName},27158:function(e,a,t){"use strict";function n(e){let{src:a,width:t,quality:n}=e;return a.startsWith("http")?a:(a.startsWith("/")&&(a=a.slice(1)),"/static/".concat(a))}t.r(a),t.d(a,{default:function(){return n}})},15283:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",sidePanel:"agents_sidePanel__wGVGc",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}},64945:function(e,a,t){"use strict";t.d(a,{B:function(){return p}});var n=t(2265),r=t(52195);let l=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 s=Object.defineProperty,o=Object.defineProperties,c=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,u=(e,a,t)=>a in e?s(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)&&u(e,t,a[t]);if(i)for(var t of i(a))h.call(a,t)&&u(e,t,a[t]);return e},g=(e,a)=>o(e,c(a));let p=(0,n.forwardRef)((e,a)=>n.createElement(r.Z,g(m({ref:a},e),{weights:l})));p.displayName="Lightning"},35418:function(e,a,t){"use strict";t.d(a,{v:function(){return p}});var n=t(2265),r=t(52195);let l=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]);var s=Object.defineProperty,o=Object.defineProperties,c=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,u=(e,a,t)=>a in e?s(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)&&u(e,t,a[t]);if(i)for(var t of i(a))h.call(a,t)&&u(e,t,a[t]);return e},g=(e,a)=>o(e,c(a));let p=(0,n.forwardRef)((e,a)=>n.createElement(r.Z,g(m({ref:a},e),{weights:l})));p.displayName="Plus"}},function(e){e.O(0,[9460,9427,9001,3062,743,7071,6648,1603,9417,2971,7023,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,87529))},87529:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return R}});var n=t(57437),r=t(15283),l=t.n(r),s=t(66648),o=t(29039),c=t(2265),i=t(79306),d=t(50495),h=t(19666),u=t(52195);let m=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),c.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]);var g=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,b=(e,a,t)=>a in e?g(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,w=(e,a)=>{for(var t in a||(a={}))j.call(a,t)&&b(e,t,a[t]);if(x)for(var t of x(a))v.call(a,t)&&b(e,t,a[t]);return e},y=(e,a)=>p(e,f(a));let N=(0,c.forwardRef)((e,a)=>c.createElement(u.Z,y(w({ref:a},e),{weights:m})));N.displayName="PaperPlaneTilt";var L=t(35418),E=t(64945),Z=t(36013),A=t(90837),O=t(7951),M=t(66820),k=t(58485),P=t(48861),_=t(89417),F=t(58575),z=t(47412),C=t(69591);async function V(e,a){let t="/login?next=/agents?agent=".concat(e);if(!a){window.location.href=t;return}let n=await fetch("/api/chat/sessions?agent_slug=".concat(e),{method:"POST"}),r=await n.json();200==n.status?window.location.href="/chat?conversationId=".concat(r.conversation_id):403==n.status||401==n.status?window.location.href=t:alert("Failed to start chat session")}let S=()=>window.fetch("/api/agents").then(e=>e.json()).catch(e=>console.log(e));function H(e){let a=new URLSearchParams(window.location.search).get("agent"),[t,r]=(0,c.useState)(a===e.data.slug),[o,i]=(0,c.useState)(!1),h=e.userProfile;t&&window.history.pushState({},"Khoj AI - Agent ".concat(e.data.slug),"/agents?agent=".concat(e.data.slug));let u=(0,F.oz)(e.data.color);return(0,n.jsxs)(Z.Zb,{className:"shadow-sm bg-gradient-to-b from-white 20% to-".concat(e.data.color?e.data.color:"gray","-100/50 dark:from-[hsl(var(--background))] dark:to-").concat(e.data.color?e.data.color:"gray","-950/50 rounded-xl hover:shadow-md"),children:[o&&(0,n.jsx)(M.Z,{loginRedirectMessage:"Sign in to start chatting with ".concat(e.data.name),onOpenChange:i}),(0,n.jsx)(Z.Ol,{children:(0,n.jsx)(Z.ll,{children:e.isMobileWidth?(0,n.jsxs)(O.dy,{open:t,onOpenChange:e=>{r(e),window.history.pushState({},"Khoj AI - Agents","/agents")},children:[(0,n.jsx)(O.Qz,{children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,_.T)(e.data.icon,e.data.color)||(0,n.jsx)(s.default,{src:e.data.avatar,alt:e.data.name,width:50,height:50}),e.data.name]})}),(0,n.jsx)("div",{className:"float-right",children:e.userProfile?(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100",onClick:()=>V(e.data.slug,h),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})}):(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm",onClick:()=>i(!0),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})})}),(0,n.jsxs)(O.sc,{className:"whitespace-pre-line p-2",children:[(0,n.jsxs)(O.OX,{children:[(0,n.jsx)(O.iI,{children:e.data.name}),(0,n.jsx)(O.u6,{children:"Full Prompt"})]}),e.data.persona,(0,n.jsx)(O.ze,{children:(0,n.jsx)(O.uh,{children:"Done"})})]})]}):(0,n.jsxs)(A.Vq,{open:t,onOpenChange:()=>{r(!t),window.history.pushState({},"Khoj AI - Agents","/agents")},children:[(0,n.jsx)(A.hg,{children:(0,n.jsxs)("div",{className:"flex items-center relative top-2",children:[(0,_.T)(e.data.icon,e.data.color)||(0,n.jsx)(s.default,{src:e.data.avatar,alt:e.data.name,width:50,height:50}),e.data.name]})}),(0,n.jsx)("div",{className:"float-right",children:e.userProfile?(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>V(e.data.slug,h),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})}):(0,n.jsx)(d.z,{className:"bg-[hsl(var(--background))] w-14 h-14 rounded-xl border dark:border-neutral-700 shadow-sm hover:bg-stone-100 dark:hover:bg-neutral-900",onClick:()=>i(!0),children:(0,n.jsx)(N,{className:"w-6 h-6 ".concat((0,F.oz)(e.data.color))})})}),(0,n.jsxs)(A.cZ,{className:"whitespace-pre-line max-h-[80vh]",children:[(0,n.jsx)(A.fK,{children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,_.T)(e.data.icon,e.data.color)||(0,n.jsx)(s.default,{src:e.data.avatar,alt:e.data.name,width:32,height:50}),(0,n.jsx)("p",{className:"font-bold text-lg",children:e.data.name})]})}),(0,n.jsx)("div",{className:"max-h-[60vh] overflow-y-scroll text-neutral-500 dark:text-white",children:e.data.persona}),(0,n.jsx)(A.cN,{children:(0,n.jsxs)(d.z,{className:"pt-6 pb-6 ".concat(u," bg-white dark:bg-[hsl(var(--background))] text-neutral-500 dark:text-white border-2 border-stone-100 shadow-sm rounded-xl hover:bg-stone-100 dark:hover:bg-neutral-900 dark:border-neutral-700"),onClick:()=>{V(e.data.slug,h),r(!1)},children:[(0,n.jsx)(N,{className:"w-6 h-6 m-2 ".concat((0,F.oz)(e.data.color))}),"Start Chatting"]})})]})]})})}),(0,n.jsx)(Z.aY,{children:(0,n.jsx)("div",{className:l().agentPersonality,children:(0,n.jsx)("button",{className:"".concat(l().infoButton," text-neutral-500 dark:text-white"),onClick:()=>r(!0),children:(0,n.jsx)("p",{children:e.data.persona})})})})]})}function R(){let{data:e,error:a}=(0,o.ZP)("agents",S,{revalidateOnFocus:!1}),t=(0,i.G)(),[r,s]=(0,c.useState)(!1),d=(0,C.IC)();return a?(0,n.jsxs)("main",{className:l().main,children:[(0,n.jsx)("div",{className:"".concat(l().titleBar," text-5xl"),children:"Agents"}),(0,n.jsx)("div",{className:l().agentList,children:"Error loading agents"})]}):e?(0,n.jsx)("main",{className:"w-full mx-auto",children:(0,n.jsxs)("div",{className:"grid w-full mx-auto",children:[(0,n.jsx)("div",{className:"".concat(l().sidePanel," top-0"),children:(0,n.jsx)(P.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:d})}),(0,n.jsxs)("div",{className:"".concat(l().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)(h.pn,{children:(0,n.jsxs)(h.u,{delayDuration:10,children:[(0,n.jsx)(h.aJ,{children:(0,n.jsxs)("div",{className:"flex flex-row",children:[(0,n.jsx)(L.v,{className:"pr-2 w-6 h-6"}),(0,n.jsx)("p",{className:"pr-2",children:"Create Agent"})]})}),(0,n.jsx)(h._v,{children:(0,n.jsx)("p",{children:"Coming Soon!"})})]})})})]}),r&&(0,n.jsx)(M.Z,{loginRedirectMessage:"Sign in to start chatting with a specialized agent",onOpenChange:s}),(0,n.jsx)(z.bZ,{className:"bg-secondary border-none my-4",children:(0,n.jsxs)(z.X,{children:[(0,n.jsx)(E.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:"".concat(l().agentList),children:e.map(e=>(0,n.jsx)(H,{data:e,userProfile:t,isMobileWidth:d},e.slug))})]})]})}):(0,n.jsx)("main",{className:l().main,children:(0,n.jsxs)("div",{className:l().agentList,children:[(0,n.jsx)(k.l,{})," booting up your agents"]})})}},66820:function(e,a,t){"use strict";t.d(a,{Z:function(){return s}});var n=t(57437),r=t(6780),l=t(87138);function s(e){return(0,n.jsx)(r.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,n.jsxs)(r._T,{children:[(0,n.jsx)(r.fY,{children:(0,n.jsx)(r.f$,{children:"Sign in to Khoj to continue"})}),(0,n.jsxs)(r.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,n.jsx)(l.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,n.jsxs)(r.xo,{children:[(0,n.jsx)(r.le,{children:"Dismiss"}),(0,n.jsx)(r.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,n.jsxs)(l.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},47412:function(e,a,t){"use strict";t.d(a,{X:function(){return i},bZ:function(){return c}});var n=t(57437),r=t(2265),l=t(12218),s=t(37440);let o=(0,l.j)("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),c=r.forwardRef((e,a)=>{let{className:t,variant:r,...l}=e;return(0,n.jsx)("div",{ref:a,role:"alert",className:(0,s.cn)(o({variant:r}),t),...l})});c.displayName="Alert",r.forwardRef((e,a)=>{let{className:t,...r}=e;return(0,n.jsx)("h5",{ref:a,className:(0,s.cn)("mb-1 font-medium leading-none tracking-tight",t),...r})}).displayName="AlertTitle";let i=r.forwardRef((e,a)=>{let{className:t,...r}=e;return(0,n.jsx)("div",{ref:a,className:(0,s.cn)("text-sm [&_p]:leading-relaxed",t),...r})});i.displayName="AlertDescription"},19666:function(e,a,t){"use strict";t.d(a,{_v:function(){return d},aJ:function(){return i},pn:function(){return o},u:function(){return c}});var n=t(57437),r=t(2265),l=t(27071),s=t(37440);let o=l.zt,c=l.fC,i=l.xz,d=r.forwardRef((e,a)=>{let{className:t,sideOffset:r=4,...o}=e;return(0,n.jsx)(l.VY,{ref:a,sideOffset:r,className:(0,s.cn)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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})});d.displayName=l.VY.displayName},27158:function(e,a,t){"use strict";function n(e){let{src:a,width:t,quality:n}=e;return a.startsWith("http")?a:(a.startsWith("/")&&(a=a.slice(1)),"/static/".concat(a))}t.r(a),t.d(a,{default:function(){return n}})},15283:function(e){e.exports={titleBar:"agents_titleBar__FzYbY",agentPersonality:"agents_agentPersonality__o0Ysz",pageLayout:"agents_pageLayout__gR3S3",sidePanel:"agents_sidePanel__wGVGc",infoButton:"agents_infoButton__NqI7E",agentList:"agents_agentList__XVx4A"}},64945:function(e,a,t){"use strict";t.d(a,{B:function(){return p}});var n=t(2265),r=t(52195);let l=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 s=Object.defineProperty,o=Object.defineProperties,c=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,u=(e,a,t)=>a in e?s(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)&&u(e,t,a[t]);if(i)for(var t of i(a))h.call(a,t)&&u(e,t,a[t]);return e},g=(e,a)=>o(e,c(a));let p=(0,n.forwardRef)((e,a)=>n.createElement(r.Z,g(m({ref:a},e),{weights:l})));p.displayName="Lightning"},35418:function(e,a,t){"use strict";t.d(a,{v:function(){return p}});var n=t(2265),r=t(52195);let l=new Map([["bold",n.createElement(n.Fragment,null,n.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",n.createElement(n.Fragment,null,n.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",n.createElement(n.Fragment,null,n.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",n.createElement(n.Fragment,null,n.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",n.createElement(n.Fragment,null,n.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",n.createElement(n.Fragment,null,n.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]);var s=Object.defineProperty,o=Object.defineProperties,c=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,u=(e,a,t)=>a in e?s(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)&&u(e,t,a[t]);if(i)for(var t of i(a))h.call(a,t)&&u(e,t,a[t]);return e},g=(e,a)=>o(e,c(a));let p=(0,n.forwardRef)((e,a)=>n.createElement(r.Z,g(m({ref:a},e),{weights:l})));p.displayName="Plus"}},function(e){e.O(0,[647,9001,3062,743,7071,6648,1603,9417,2971,7023,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,40393))},40393:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eO}});var n=a(57437),s=a(29039),r=a(58485),o=a(36013),i=a(50495),l=a(2265),c=a(77539),d=a(42421),u=a(14392),m=a(22468),h=a(37440);let x=c.fC;c.ZA;let f=c.B4,p=l.forwardRef((e,t)=>{let{className:a,children:s,...r}=e;return(0,n.jsxs)(c.xz,{ref:t,className:(0,h.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),...r,children:[s,(0,n.jsx)(c.JO,{asChild:!0,children:(0,n.jsx)(d.Z,{className:"h-4 w-4 opacity-50"})})]})});p.displayName=c.xz.displayName;let g=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",a),...s,children:(0,n.jsx)(u.Z,{className:"h-4 w-4"})})});g.displayName=c.u_.displayName;let j=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",a),...s,children:(0,n.jsx)(d.Z,{className:"h-4 w-4"})})});j.displayName=c.$G.displayName;let y=l.forwardRef((e,t)=>{let{className:a,children:s,position:r="popper",...o}=e;return(0,n.jsx)(c.h_,{children:(0,n.jsxs)(c.VY,{ref:t,className:(0,h.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"===r&&"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:r,...o,children:[(0,n.jsx)(g,{}),(0,n.jsx)(c.l_,{className:(0,h.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,n.jsx)(j,{})]})})});y.displayName=c.VY.displayName,l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...s})}).displayName=c.__.displayName;let w=l.forwardRef((e,t)=>{let{className:a,children:s,...r}=e;return(0,n.jsxs)(c.ck,{ref:t,className:(0,h.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),...r,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(c.wU,{children:(0,n.jsx)(m.Z,{className:"h-4 w-4"})})}),(0,n.jsx)(c.eT,{children:s})]})});w.displayName=c.ck.displayName,l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",a),...s})}).displayName=c.Z0.displayName;var v=a(18760),b=a.n(v),N=a(31014),D=a(39343),C=a(59772),S=a(71538),k=a(67135);let _=D.RV,A=l.createContext({}),I=e=>{let{...t}=e;return(0,n.jsx)(A.Provider,{value:{name:t.name},children:(0,n.jsx)(D.Qr,{...t})})},M=()=>{let e=l.useContext(A),t=l.useContext(R),{getFieldState:a,formState:n}=(0,D.Gc)(),s=a(e.name,n);if(!e)throw Error("useFormField should be used within <FormField>");let{id:r}=t;return{id:r,name:e.name,formItemId:"".concat(r,"-form-item"),formDescriptionId:"".concat(r,"-form-item-description"),formMessageId:"".concat(r,"-form-item-message"),...s}},R=l.createContext({}),T=l.forwardRef((e,t)=>{let{className:a,...s}=e,r=l.useId();return(0,n.jsx)(R.Provider,{value:{id:r},children:(0,n.jsx)("div",{ref:t,className:(0,h.cn)("space-y-2",a),...s})})});T.displayName="FormItem";let L=l.forwardRef((e,t)=>{let{className:a,...s}=e,{error:r,formItemId:o}=M();return(0,n.jsx)(k._,{ref:t,className:(0,h.cn)(r&&"text-destructive",a),htmlFor:o,...s})});L.displayName="FormLabel";let P=l.forwardRef((e,t)=>{let{...a}=e,{error:s,formItemId:r,formDescriptionId:o,formMessageId:i}=M();return(0,n.jsx)(S.g7,{ref:t,id:r,"aria-describedby":s?"".concat(o," ").concat(i):"".concat(o),"aria-invalid":!!s,...a})});P.displayName="FormControl";let O=l.forwardRef((e,t)=>{let{className:a,...s}=e,{formDescriptionId:r}=M();return(0,n.jsx)("p",{ref:t,id:r,className:(0,h.cn)("text-sm text-muted-foreground",a),...s})});O.displayName="FormDescription";let z=l.forwardRef((e,t)=>{let{className:a,children:s,...r}=e,{error:o,formMessageId:i}=M(),l=o?String(null==o?void 0:o.message):s;return l?(0,n.jsx)("p",{ref:t,id:i,className:(0,h.cn)("text-sm font-medium text-destructive",a),...r,children:l}):null});z.displayName="FormMessage";var q=a(83102),W=a(90837),E=a(13304),U=a(93146),F=a(69591),V=a(23611),Z=a.n(V),B=a(18642),G=a(16463),Y=a(19573),$=a(20319),H=a(22049),K=a(55362),Q=a(13537),X=a(76082),J=a(52674),ee=a(23751),et=a(83522),ea=a(8837),en=a(21819),es=a(35418),er=a(64945),eo=a(79306),ei=a(66820),el=a(35657),ec=a(50151),ed=a(47412),eu=a(48861),em=a(7951);let eh=()=>window.fetch("/api/automations").then(e=>e.json()).catch(e=>console.log(e));function ex(e){let t=e.split(" "),a=t[2],n=t[4];return"*"===a&&"*"===n?"Day":"*"!==n?"Week":"*"!==a?"Month":"Day"}function ef(e){let t=e.split(" ");if("*"===t[3]&&"*"!==t[4])return Number(t[4])}function ep(e){let t=e.split(" "),a=t[1],n=t[0],s=Number(a)>=12?"PM":"AM",r=Number(a)>12?Number(a)-12:a;"00"===r&&(r="12");let o=n;return 10>Number(o)&&"00"!==o&&(o="0".concat(o)),"".concat(r,":").concat(o," ").concat(s)}function eg(e){return String(e.split(" ")[2])}function ej(e){return b().toString(e)}let ey=["Day","Week","Month"],ew=Array.from({length:31},(e,t)=>String(t+1)),ev=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eb=[],eN=["AM","PM"];for(var eD=0;eD<eN.length;eD++)for(var eC=0;eC<12;eC++)for(var eS=0;eS<60;eS+=15){let e=String(eS).padStart(2,"0"),t=0===eC?12:eC;eb.push("".concat(t,":").concat(e," ").concat(eN[eD]))}let ek=Date.now(),e_=[{subject:"Weekly Newsletter",query_to_run:"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:ek,scheduling_request:""},{subject:"Daily Bedtime Story",query_to_run:"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:ek+1,scheduling_request:""},{subject:"Front Page of Hacker News",query_to_run:"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:ek+2,scheduling_request:""},{subject:"Market Summary",query_to_run:"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:ek+3,scheduling_request:""},{subject:"Market Crash Notification",query_to_run:"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:ek+5,scheduling_request:""},{subject:"Round-up of research papers about AI in healthcare",query_to_run:"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:ek+4,scheduling_request:""}];function eA(e){let t=encodeURIComponent(e.subject),a=encodeURIComponent(e.query_to_run),n=encodeURIComponent(e.crontime);return"".concat(window.location.origin,"/automations?subject=").concat(t,"&query=").concat(a,"&crontime=").concat(n)}function eI(e){let[t,a]=(0,l.useState)(!1),[s,r]=(0,l.useState)(null),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(""),{toast:h}=(0,el.pm)(),x=e.automation,[f,p]=(0,l.useState)(""),[g,j]=(0,l.useState)("");return((0,l.useEffect)(()=>{let e=s||x;p(ep(e.crontime));let t=ex(e.crontime);if("Day"===t)j("Daily");else if("Week"===t){let t=ef(e.crontime);void 0===t?j("Weekly"):j("".concat(ev[t]))}else if("Month"===t){let t=eg(e.crontime);j("Monthly on the ".concat(t))}},[s,x]),(0,l.useEffect)(()=>{let e="Automation: ".concat((null==s?void 0:s.subject)||x.subject);u&&(h({title:e,description:u,action:(0,n.jsx)(ec.gD,{altText:"Dismiss",children:"Ok"})}),m(""))},[u,s,x,h]),c)?null:(0,n.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg bg-gradient-to-b from-background to-slate-50 dark:to-gray-950 border ".concat(Z().automationCard),children:[(0,n.jsx)(o.Ol,{children:(0,n.jsxs)(o.ll,{className:"line-clamp-2 leading-normal flex justify-between",children:[(null==s?void 0:s.subject)||x.subject,(0,n.jsxs)(Y.J2,{children:[(0,n.jsx)(Y.xo,{asChild:!0,children:(0,n.jsx)(i.z,{className:"bg-background",variant:"ghost",children:(0,n.jsx)($.F,{className:"h-4 w-4"})})}),(0,n.jsxs)(Y.yk,{className:"w-auto grid gap-2 text-left bg-secondary",children:[!e.suggestedCard&&e.locationData&&(0,n.jsx)(eP,{isMobileWidth:e.isMobileWidth,callToAction:"Edit",createNew:!1,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:r,authenticatedData:e.authenticatedData,isCreating:t,automation:s||x,ipLocationData:e.locationData}),(0,n.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:eA(x),onShare:()=>{navigator.clipboard.writeText(eA(x))}}),!e.suggestedCard&&(0,n.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.")})}(x.id.toString(),m)},children:[(0,n.jsx)(H.s,{className:"h-4 w-4 mr-2"}),"Run Now"]}),(0,n.jsxs)(i.z,{variant:"destructive",className:"justify-start",onClick:()=>{if(e.suggestedCard){d(!0);return}!function(e,t){fetch("/api/automation?automation_id=".concat(e),{method:"DELETE"}).then(e=>e.json()).then(e=>{t(!0)})}(x.id.toString(),d)},children:[(0,n.jsx)(K.r,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),(0,n.jsx)(o.aY,{className:"text-secondary-foreground break-all",children:(null==s?void 0:s.query_to_run)||x.query_to_run}),(0,n.jsxs)(o.eW,{className:"flex flex-col items-start md:flex-row md:justify-between md:items-center gap-2",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center bg-blue-50 rounded-lg p-1.5 border-blue-200 border dark:bg-blue-800 dark:border-blue-500",children:[(0,n.jsx)(Q.T,{className:"h-4 w-4 mr-2 text-blue-700 dark:text-blue-300"}),(0,n.jsx)("div",{className:"text-s text-blue-700 dark:text-blue-300",children:f})]}),(0,n.jsxs)("div",{className:"flex items-center bg-purple-50 rounded-lg p-1.5 border-purple-200 border dark:bg-purple-800 dark:border-purple-500",children:[(0,n.jsx)(X.u,{className:"h-4 w-4 mr-2 text-purple-700 dark:text-purple-300"}),(0,n.jsx)("div",{className:"text-s text-purple-700 dark:text-purple-300",children:g})]})]}),e.suggestedCard&&e.setNewAutomationData&&(0,n.jsx)(eP,{isMobileWidth:e.isMobileWidth,callToAction:"Add",createNew:!0,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:t,automation:x,ipLocationData:e.locationData})]})]})}function eM(e){let t=(0,G.useSearchParams)(),[a,s]=(0,l.useState)(!0),r=t.get("subject"),o=t.get("query"),i=t.get("crontime");if(!r||!o||!i)return null;let c={id:0,subject:decodeURIComponent(r),query_to_run:decodeURIComponent(o),scheduling_request:"",schedule:ej(decodeURIComponent(i)),crontime:decodeURIComponent(i),next:""};return a?(0,n.jsx)(eP,{isMobileWidth:e.isMobileWidth,callToAction:"Shared",createNew:!0,setIsCreating:s,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:a,automation:c,ipLocationData:e.locationData}):null}let eR=C.z.object({subject:C.z.optional(C.z.string()),everyBlah:C.z.string({required_error:"Every is required"}),dayOfWeek:C.z.optional(C.z.number()),dayOfMonth:C.z.optional(C.z.string()),timeRecurrence:C.z.string({required_error:"Time Recurrence is required"}),queryToRun:C.z.string({required_error:"Query to Run is required"})});function eT(e){let t=e.automation,a=(0,D.cI)({resolver:(0,N.F)(eR),defaultValues:{subject:null==t?void 0:t.subject,everyBlah:(null==t?void 0:t.crontime)?ex(t.crontime):"Day",dayOfWeek:(null==t?void 0:t.crontime)?ef(t.crontime):void 0,timeRecurrence:(null==t?void 0:t.crontime)?ep(t.crontime):"12:00 PM",dayOfMonth:(null==t?void 0:t.crontime)?eg(t.crontime):"1",queryToRun:null==t?void 0:t.query_to_run}});return(0,n.jsx)(eL,{authenticatedData:e.authenticatedData,locationData:e.locationData||null,form:a,onSubmit:a=>{let n=function(e,t,a,n){let s="",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":s="".concat(r," ").concat(l," * * *");break;case"Week":s="".concat(r," ").concat(l," * * ").concat(void 0!==a?7===a?0:a:"*");break;case"Month":s="".concat(r," ").concat(l," ").concat(n," * *")}return s}(a.everyBlah,a.timeRecurrence,a.dayOfWeek,a.dayOfMonth),s="/api/automation?";s+="q=".concat(encodeURIComponent(a.queryToRun)),(null==t?void 0:t.id)&&!e.createNew&&(s+="&automation_id=".concat(encodeURIComponent(t.id))),a.subject&&(s+="&subject=".concat(encodeURIComponent(a.subject))),s+="&crontime=".concat(encodeURIComponent(n)),e.locationData&&e.locationData.city&&(s+="&city=".concat(encodeURIComponent(e.locationData.city))),e.locationData&&e.locationData.region&&(s+="®ion=".concat(encodeURIComponent(e.locationData.region))),e.locationData&&e.locationData.country&&(s+="&country=".concat(encodeURIComponent(e.locationData.country))),e.locationData&&e.locationData.timezone&&(s+="&timezone=".concat(encodeURIComponent(e.locationData.timezone))),fetch(s,{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:ej(t.crontime),crontime:t.crontime,next:t.next})})},create:e.createNew,isLoggedIn:e.isLoggedIn,setShowLoginPrompt:e.setShowLoginPrompt})}function eL(e){var t,a;let[s,r]=(0,l.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,n.jsx)(_,{...e.form,children:(0,n.jsxs)("form",{onSubmit:e.form.handleSubmit(t=>{e.onSubmit(t),r(!0)}),className:"space-y-6",children:[(0,n.jsx)(T,{className:"space-y-1",children:(0,n.jsxs)(O,{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,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[a?(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(et.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),a.email]}):null,t&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(ea.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),t?"".concat(t.city,", ").concat(t.country):"Unknown"]}),t&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(en.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),t?"".concat(t.timezone):"Unknown"]})]}))]})}),!e.create&&(0,n.jsx)(I,{control:e.form.control,name:"subject",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"space-y-1",children:[(0,n.jsx)(L,{children:"Subject"}),(0,n.jsx)(O,{children:"This is the subject of the email you will receive."}),(0,n.jsx)(P,{children:(0,n.jsx)(q.I,{placeholder:"Digest of Healthcare AI trends",...a})}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.subject)||void 0===t?void 0:t.message})]})}}),(0,n.jsx)(I,{control:e.form.control,name:"everyBlah",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(L,{children:"Frequency"}),(0,n.jsx)(O,{children:"How often should this automation run?"}),(0,n.jsxs)(x,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(J.W,{className:"h-4 w-4 mr-2 inline"}),"Every"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:ey.map(e=>(0,n.jsx)(w,{value:e,children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.everyBlah)||void 0===t?void 0:t.message})]})}}),"Week"===e.form.watch("everyBlah")&&(0,n.jsx)(I,{control:e.form.control,name:"dayOfWeek",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(O,{children:"Every week, on which day should this automation run?"}),(0,n.jsxs)(x,{onValueChange:e=>a.onChange(Number(e)),defaultValue:String(a.value),children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(ee.n,{className:"h-4 w-4 mr-2 inline"}),"On"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:ev.map((e,t)=>(0,n.jsx)(w,{value:String(t),children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.dayOfWeek)||void 0===t?void 0:t.message})]})}}),"Month"===e.form.watch("everyBlah")&&(0,n.jsx)(I,{control:e.form.control,name:"dayOfMonth",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(O,{children:"Every month, on which day should the automation run?"}),(0,n.jsxs)(x,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(ee.n,{className:"h-4 w-4 mr-2 inline"}),"On the"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:ew.map(e=>(0,n.jsx)(w,{value:e,children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{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,n.jsx)(I,{control:e.form.control,name:"timeRecurrence",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(L,{children:"Time"}),(0,n.jsx)(O,{children:"On the days this automation runs, at what time should it run?"}),(0,n.jsxs)(x,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(X.u,{className:"h-4 w-4 mr-2 inline"}),"At"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:eb.map(e=>(0,n.jsx)(w,{value:e,children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.timeRecurrence)||void 0===t?void 0:t.message})]})}}),(0,n.jsx)(I,{control:e.form.control,name:"queryToRun",render:t=>{var a;let{field:s}=t;return(0,n.jsxs)(T,{className:"space-y-1",children:[(0,n.jsx)(L,{children:"Instructions"}),(0,n.jsx)(O,{children:"What do you want Khoj to do?"}),e.create&&(0,n.jsx)("div",{children:c.map(e=>{var t;return t=s.onChange,(0,n.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,n.jsx)(P,{children:(0,n.jsx)(U.g,{placeholder:"Create a summary of the latest news about AI in healthcare.",value:s.value,onChange:s.onChange})}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(a=o.queryToRun)||void 0===a?void 0:a.message})]})}}),(0,n.jsx)("fieldset",{disabled:s,children:e.isLoggedIn?s?(0,n.jsx)(i.z,{type:"submit",disabled:!0,children:"Saving..."}):(0,n.jsx)(i.z,{type:"submit",children:"Save"}):(0,n.jsx)(i.z,{onClick:t=>{t.preventDefault(),e.setShowLoginPrompt(!0)},variant:"default",children:"Login to Save"})})]})})}function eP(e){return e.isMobileWidth?(0,n.jsxs)(em.dy,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,n.jsx)(em.Qz,{asChild:!0,children:(0,n.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,n.jsx)(es.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,n.jsxs)(em.sc,{className:"p-2",children:[(0,n.jsx)(em.iI,{children:"Automation"}),(0,n.jsx)(eT,{createNew:e.createNew,automation:e.automation,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData})]})]}):(0,n.jsxs)(W.Vq,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,n.jsx)(W.hg,{asChild:!0,children:(0,n.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,n.jsx)(es.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,n.jsxs)(W.cZ,{className:"max-h-[98vh] overflow-y-auto",children:[(0,n.jsx)(E.$N,{children:"Automation"}),(0,n.jsx)(eT,{automation:e.automation,createNew:e.createNew,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData})]})]})}function eO(){let e=(0,eo.G)(),{data:t,error:a,isLoading:o}=(0,s.ZP)(e?"automations":null,eh,{revalidateOnFocus:!1}),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(null),[h,x]=(0,l.useState)([]),[f,p]=(0,l.useState)([]),[g,j]=(0,l.useState)(!1),y=(0,F.IC)(),w=(0,F.k6)();return((0,l.useEffect)(()=>{u&&(x([...h,u]),m(null))},[u,h]),(0,l.useEffect)(()=>{let e=t?t.concat(h):h;e&&p(e_.filter(t=>void 0===e.find(e=>t.subject===e.subject)))},[t,h]),a)?(0,n.jsx)(r.l,{message:"Oops, something went wrong. Please refresh the page."}):(0,n.jsx)("main",{className:"w-full mx-auto",children:(0,n.jsxs)("div",{className:"grid w-full mx-auto",children:[(0,n.jsx)("div",{className:"".concat(Z().sidePanel," top-0"),children:(0,n.jsx)(eu.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:y})}),(0,n.jsxs)("div",{className:"".concat(Z().pageLayout," w-full"),children:[(0,n.jsxs)("div",{className:"pt-6 md:pt-8 grid gap-1 md:flex md:justify-between",children:[(0,n.jsx)("h1",{className:"text-3xl flex items-center",children:"Automations"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[e?(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(et.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),e.email]}):null,w&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(ea.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),w?"".concat(w.city,", ").concat(w.country):"Unknown"]}),w&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(en.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),w?"".concat(w.timezone):"Unknown"]})]})]}),g&&(0,n.jsx)(ei.Z,{loginRedirectMessage:"Create an account to make your own automation",onOpenChange:j}),(0,n.jsx)(ed.bZ,{className:"bg-secondary border-none my-4",children:(0,n.jsxs)(ed.X,{children:[(0,n.jsx)(er.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,n.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,n.jsxs)("div",{className:"flex justify-between items-center py-4",children:[(0,n.jsx)("h3",{className:"text-xl",children:"Your Creations"}),e?(0,n.jsx)(eP,{isMobileWidth:y,callToAction:"Create Automation",createNew:!0,setIsCreating:d,setShowLoginPrompt:j,setNewAutomationData:m,authenticatedData:e,isCreating:c,ipLocationData:w}):(0,n.jsxs)(i.z,{className:"shadow-sm",onClick:()=>j(!0),variant:"outline",children:[(0,n.jsx)(es.v,{className:"h-4 w-4 mr-2"}),"Create Automation"]})]}),(0,n.jsx)(l.Suspense,{children:(0,n.jsx)(eM,{isMobileWidth:y,authenticatedData:e,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j,setNewAutomationData:m})}),(!t||0===t.length)&&0==h.length&&!o&&(0,n.jsxs)("div",{className:"px-4",children:["So empty! Create your own automation to get started.",(0,n.jsx)("div",{className:"mt-4",children:e?(0,n.jsx)(eP,{isMobileWidth:y,callToAction:"Design Automation",createNew:!0,setIsCreating:d,setShowLoginPrompt:j,setNewAutomationData:m,authenticatedData:e,isCreating:c,ipLocationData:w}):(0,n.jsx)(i.z,{onClick:()=>j(!0),variant:"default",children:"Design"})})]}),o&&(0,n.jsx)(r.l,{message:"booting up your automations"}),(0,n.jsxs)("div",{className:"".concat(Z().automationsLayout),children:[t&&t.map(t=>(0,n.jsx)(eI,{isMobileWidth:y,authenticatedData:e,automation:t,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j},t.id)),h.map(t=>(0,n.jsx)(eI,{isMobileWidth:y,authenticatedData:e,automation:t,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j},t.id))]}),(0,n.jsx)("h3",{className:"text-xl py-4",children:"Try these out"}),(0,n.jsx)("div",{className:"".concat(Z().automationsLayout),children:f.map(t=>(0,n.jsx)(eI,{isMobileWidth:y,setNewAutomationData:m,authenticatedData:e,automation:t,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j,suggestedCard:!0},t.id))})]})]})})}},66820:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var n=a(57437),s=a(6780),r=a(87138);function o(e){return(0,n.jsx)(s.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,n.jsxs)(s._T,{children:[(0,n.jsx)(s.fY,{children:(0,n.jsx)(s.f$,{children:"Sign in to Khoj to continue"})}),(0,n.jsxs)(s.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,n.jsx)(r.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,n.jsxs)(s.xo,{children:[(0,n.jsx)(s.le,{children:"Dismiss"}),(0,n.jsx)(s.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,n.jsxs)(r.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},18642:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var n=a(57437),s=a(90837),r=a(50495),o=a(83102),i=a(67135),l=a(34797);function c(e){var t;return(0,n.jsxs)(s.Vq,{children:[(0,n.jsx)(s.hg,{asChild:!0,onClick:e.onShare,children:(0,n.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,n.jsx)(l.m,{className:"w-4 h-4 mr-2"}),e.buttonTitle]})}),(0,n.jsxs)(s.cZ,{children:[(0,n.jsxs)(s.fK,{children:[(0,n.jsx)(s.$N,{children:e.title}),(0,n.jsx)(s.Be,{children:e.description})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,n.jsx)(i._,{htmlFor:"link",className:"sr-only",children:"Link"}),(0,n.jsx)(o.I,{id:"link",defaultValue:e.url,readOnly:!0})]}),(0,n.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,n.jsx)("span",{children:"Copy"})})]})]})]})}},47412:function(e,t,a){"use strict";a.d(t,{X:function(){return c},bZ:function(){return l}});var n=a(57437),s=a(2265),r=a(12218),o=a(37440);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=s.forwardRef((e,t)=>{let{className:a,variant:s,...r}=e;return(0,n.jsx)("div",{ref:t,role:"alert",className:(0,o.cn)(i({variant:s}),a),...r})});l.displayName="Alert",s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)("h5",{ref:t,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",a),...s})}).displayName="AlertTitle";let c=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",a),...s})});c.displayName="AlertDescription"},67135:function(e,t,a){"use strict";a.d(t,{_:function(){return c}});var n=a(57437),s=a(2265),r=a(38364),o=a(12218),i=a(37440);let l=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.f,{ref:t,className:(0,i.cn)(l(),a),...s})});c.displayName=r.f.displayName},93146:function(e,t,a){"use strict";a.d(t,{g:function(){return o}});var n=a(57437),s=a(2265),r=a(37440);let o=s.forwardRef((e,t)=>{let{className:a,...s}=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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...s})});o.displayName="Textarea"},50151: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 n=a(57437),s=a(2265),r=a(44504),o=a(12218),i=a(74697),l=a(37440);let c=r.zt,d=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.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),...s})});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=s.forwardRef((e,t)=>{let{className:a,variant:s,...o}=e;return(0,n.jsx)(r.fC,{ref:t,className:(0,l.cn)(u({variant:s}),a),...o})});m.displayName=r.fC.displayName;let h=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.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),...s})});h.displayName=r.aU.displayName;let x=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.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":"",...s,children:(0,n.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=r.x8.displayName;let f=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,l.cn)("text-sm font-semibold",a),...s})});f.displayName=r.Dx.displayName;let p=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,l.cn)("text-sm opacity-90",a),...s})});p.displayName=r.dk.displayName},35657:function(e,t,a){"use strict";a.d(t,{pm:function(){return m}});var n=a(2265);let s=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=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),n=()=>d({type:"DISMISS_TOAST",toastId:a});return d({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:e=>{e||n()}}}),{id:a,dismiss:n,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function m(){let[e,t]=n.useState(c);return n.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})}}},23611:function(e){e.exports={automationsLayout:"automations_automationsLayout__Atoh_",automationCard:"automations_automationCard__BKidA",pageLayout:"automations_pageLayout__OaoYA",sidePanel:"automations_sidePanel__MPciO"}}},function(e){e.O(0,[9427,9001,3062,4504,9162,1603,2971,7023,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,40393))},40393:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eO}});var n=a(57437),s=a(29039),r=a(58485),o=a(36013),i=a(50495),l=a(2265),c=a(77539),d=a(42421),u=a(14392),m=a(22468),h=a(37440);let x=c.fC;c.ZA;let f=c.B4,p=l.forwardRef((e,t)=>{let{className:a,children:s,...r}=e;return(0,n.jsxs)(c.xz,{ref:t,className:(0,h.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),...r,children:[s,(0,n.jsx)(c.JO,{asChild:!0,children:(0,n.jsx)(d.Z,{className:"h-4 w-4 opacity-50"})})]})});p.displayName=c.xz.displayName;let g=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.u_,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",a),...s,children:(0,n.jsx)(u.Z,{className:"h-4 w-4"})})});g.displayName=c.u_.displayName;let j=l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.$G,{ref:t,className:(0,h.cn)("flex cursor-default items-center justify-center py-1",a),...s,children:(0,n.jsx)(d.Z,{className:"h-4 w-4"})})});j.displayName=c.$G.displayName;let y=l.forwardRef((e,t)=>{let{className:a,children:s,position:r="popper",...o}=e;return(0,n.jsx)(c.h_,{children:(0,n.jsxs)(c.VY,{ref:t,className:(0,h.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"===r&&"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:r,...o,children:[(0,n.jsx)(g,{}),(0,n.jsx)(c.l_,{className:(0,h.cn)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:s}),(0,n.jsx)(j,{})]})})});y.displayName=c.VY.displayName,l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.__,{ref:t,className:(0,h.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",a),...s})}).displayName=c.__.displayName;let w=l.forwardRef((e,t)=>{let{className:a,children:s,...r}=e;return(0,n.jsxs)(c.ck,{ref:t,className:(0,h.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),...r,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(c.wU,{children:(0,n.jsx)(m.Z,{className:"h-4 w-4"})})}),(0,n.jsx)(c.eT,{children:s})]})});w.displayName=c.ck.displayName,l.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(c.Z0,{ref:t,className:(0,h.cn)("-mx-1 my-1 h-px bg-muted",a),...s})}).displayName=c.Z0.displayName;var v=a(18760),b=a.n(v),N=a(31014),D=a(39343),C=a(59772),S=a(71538),k=a(67135);let _=D.RV,A=l.createContext({}),I=e=>{let{...t}=e;return(0,n.jsx)(A.Provider,{value:{name:t.name},children:(0,n.jsx)(D.Qr,{...t})})},M=()=>{let e=l.useContext(A),t=l.useContext(R),{getFieldState:a,formState:n}=(0,D.Gc)(),s=a(e.name,n);if(!e)throw Error("useFormField should be used within <FormField>");let{id:r}=t;return{id:r,name:e.name,formItemId:"".concat(r,"-form-item"),formDescriptionId:"".concat(r,"-form-item-description"),formMessageId:"".concat(r,"-form-item-message"),...s}},R=l.createContext({}),T=l.forwardRef((e,t)=>{let{className:a,...s}=e,r=l.useId();return(0,n.jsx)(R.Provider,{value:{id:r},children:(0,n.jsx)("div",{ref:t,className:(0,h.cn)("space-y-2",a),...s})})});T.displayName="FormItem";let L=l.forwardRef((e,t)=>{let{className:a,...s}=e,{error:r,formItemId:o}=M();return(0,n.jsx)(k._,{ref:t,className:(0,h.cn)(r&&"text-destructive",a),htmlFor:o,...s})});L.displayName="FormLabel";let P=l.forwardRef((e,t)=>{let{...a}=e,{error:s,formItemId:r,formDescriptionId:o,formMessageId:i}=M();return(0,n.jsx)(S.g7,{ref:t,id:r,"aria-describedby":s?"".concat(o," ").concat(i):"".concat(o),"aria-invalid":!!s,...a})});P.displayName="FormControl";let O=l.forwardRef((e,t)=>{let{className:a,...s}=e,{formDescriptionId:r}=M();return(0,n.jsx)("p",{ref:t,id:r,className:(0,h.cn)("text-sm text-muted-foreground",a),...s})});O.displayName="FormDescription";let z=l.forwardRef((e,t)=>{let{className:a,children:s,...r}=e,{error:o,formMessageId:i}=M(),l=o?String(null==o?void 0:o.message):s;return l?(0,n.jsx)("p",{ref:t,id:i,className:(0,h.cn)("text-sm font-medium text-destructive",a),...r,children:l}):null});z.displayName="FormMessage";var q=a(83102),W=a(90837),E=a(13304),U=a(93146),F=a(69591),V=a(23611),Z=a.n(V),B=a(18642),G=a(16463),Y=a(19573),$=a(20319),H=a(22049),K=a(55362),Q=a(13537),X=a(76082),J=a(52674),ee=a(23751),et=a(83522),ea=a(8837),en=a(21819),es=a(35418),er=a(64945),eo=a(79306),ei=a(66820),el=a(35657),ec=a(50151),ed=a(47412),eu=a(48861),em=a(7951);let eh=()=>window.fetch("/api/automations").then(e=>e.json()).catch(e=>console.log(e));function ex(e){let t=e.split(" "),a=t[2],n=t[4];return"*"===a&&"*"===n?"Day":"*"!==n?"Week":"*"!==a?"Month":"Day"}function ef(e){let t=e.split(" ");if("*"===t[3]&&"*"!==t[4])return Number(t[4])}function ep(e){let t=e.split(" "),a=t[1],n=t[0],s=Number(a)>=12?"PM":"AM",r=Number(a)>12?Number(a)-12:a;"00"===r&&(r="12");let o=n;return 10>Number(o)&&"00"!==o&&(o="0".concat(o)),"".concat(r,":").concat(o," ").concat(s)}function eg(e){return String(e.split(" ")[2])}function ej(e){return b().toString(e)}let ey=["Day","Week","Month"],ew=Array.from({length:31},(e,t)=>String(t+1)),ev=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eb=[],eN=["AM","PM"];for(var eD=0;eD<eN.length;eD++)for(var eC=0;eC<12;eC++)for(var eS=0;eS<60;eS+=15){let e=String(eS).padStart(2,"0"),t=0===eC?12:eC;eb.push("".concat(t,":").concat(e," ").concat(eN[eD]))}let ek=Date.now(),e_=[{subject:"Weekly Newsletter",query_to_run:"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:ek,scheduling_request:""},{subject:"Daily Bedtime Story",query_to_run:"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:ek+1,scheduling_request:""},{subject:"Front Page of Hacker News",query_to_run:"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:ek+2,scheduling_request:""},{subject:"Market Summary",query_to_run:"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:ek+3,scheduling_request:""},{subject:"Market Crash Notification",query_to_run:"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:ek+5,scheduling_request:""},{subject:"Round-up of research papers about AI in healthcare",query_to_run:"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:ek+4,scheduling_request:""}];function eA(e){let t=encodeURIComponent(e.subject),a=encodeURIComponent(e.query_to_run),n=encodeURIComponent(e.crontime);return"".concat(window.location.origin,"/automations?subject=").concat(t,"&query=").concat(a,"&crontime=").concat(n)}function eI(e){let[t,a]=(0,l.useState)(!1),[s,r]=(0,l.useState)(null),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(""),{toast:h}=(0,el.pm)(),x=e.automation,[f,p]=(0,l.useState)(""),[g,j]=(0,l.useState)("");return((0,l.useEffect)(()=>{let e=s||x;p(ep(e.crontime));let t=ex(e.crontime);if("Day"===t)j("Daily");else if("Week"===t){let t=ef(e.crontime);void 0===t?j("Weekly"):j("".concat(ev[t]))}else if("Month"===t){let t=eg(e.crontime);j("Monthly on the ".concat(t))}},[s,x]),(0,l.useEffect)(()=>{let e="Automation: ".concat((null==s?void 0:s.subject)||x.subject);u&&(h({title:e,description:u,action:(0,n.jsx)(ec.gD,{altText:"Dismiss",children:"Ok"})}),m(""))},[u,s,x,h]),c)?null:(0,n.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg bg-gradient-to-b from-background to-slate-50 dark:to-gray-950 border ".concat(Z().automationCard),children:[(0,n.jsx)(o.Ol,{children:(0,n.jsxs)(o.ll,{className:"line-clamp-2 leading-normal flex justify-between",children:[(null==s?void 0:s.subject)||x.subject,(0,n.jsxs)(Y.J2,{children:[(0,n.jsx)(Y.xo,{asChild:!0,children:(0,n.jsx)(i.z,{className:"bg-background",variant:"ghost",children:(0,n.jsx)($.F,{className:"h-4 w-4"})})}),(0,n.jsxs)(Y.yk,{className:"w-auto grid gap-2 text-left bg-secondary",children:[!e.suggestedCard&&e.locationData&&(0,n.jsx)(eP,{isMobileWidth:e.isMobileWidth,callToAction:"Edit",createNew:!1,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:r,authenticatedData:e.authenticatedData,isCreating:t,automation:s||x,ipLocationData:e.locationData}),(0,n.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:eA(x),onShare:()=>{navigator.clipboard.writeText(eA(x))}}),!e.suggestedCard&&(0,n.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.")})}(x.id.toString(),m)},children:[(0,n.jsx)(H.s,{className:"h-4 w-4 mr-2"}),"Run Now"]}),(0,n.jsxs)(i.z,{variant:"destructive",className:"justify-start",onClick:()=>{if(e.suggestedCard){d(!0);return}!function(e,t){fetch("/api/automation?automation_id=".concat(e),{method:"DELETE"}).then(e=>e.json()).then(e=>{t(!0)})}(x.id.toString(),d)},children:[(0,n.jsx)(K.r,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),(0,n.jsx)(o.aY,{className:"text-secondary-foreground break-all",children:(null==s?void 0:s.query_to_run)||x.query_to_run}),(0,n.jsxs)(o.eW,{className:"flex flex-col items-start md:flex-row md:justify-between md:items-center gap-2",children:[(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center bg-blue-50 rounded-lg p-1.5 border-blue-200 border dark:bg-blue-800 dark:border-blue-500",children:[(0,n.jsx)(Q.T,{className:"h-4 w-4 mr-2 text-blue-700 dark:text-blue-300"}),(0,n.jsx)("div",{className:"text-s text-blue-700 dark:text-blue-300",children:f})]}),(0,n.jsxs)("div",{className:"flex items-center bg-purple-50 rounded-lg p-1.5 border-purple-200 border dark:bg-purple-800 dark:border-purple-500",children:[(0,n.jsx)(X.u,{className:"h-4 w-4 mr-2 text-purple-700 dark:text-purple-300"}),(0,n.jsx)("div",{className:"text-s text-purple-700 dark:text-purple-300",children:g})]})]}),e.suggestedCard&&e.setNewAutomationData&&(0,n.jsx)(eP,{isMobileWidth:e.isMobileWidth,callToAction:"Add",createNew:!0,setIsCreating:a,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:t,automation:x,ipLocationData:e.locationData})]})]})}function eM(e){let t=(0,G.useSearchParams)(),[a,s]=(0,l.useState)(!0),r=t.get("subject"),o=t.get("query"),i=t.get("crontime");if(!r||!o||!i)return null;let c={id:0,subject:decodeURIComponent(r),query_to_run:decodeURIComponent(o),scheduling_request:"",schedule:ej(decodeURIComponent(i)),crontime:decodeURIComponent(i),next:""};return a?(0,n.jsx)(eP,{isMobileWidth:e.isMobileWidth,callToAction:"Shared",createNew:!0,setIsCreating:s,setShowLoginPrompt:e.setShowLoginPrompt,setNewAutomationData:e.setNewAutomationData,authenticatedData:e.authenticatedData,isCreating:a,automation:c,ipLocationData:e.locationData}):null}let eR=C.z.object({subject:C.z.optional(C.z.string()),everyBlah:C.z.string({required_error:"Every is required"}),dayOfWeek:C.z.optional(C.z.number()),dayOfMonth:C.z.optional(C.z.string()),timeRecurrence:C.z.string({required_error:"Time Recurrence is required"}),queryToRun:C.z.string({required_error:"Query to Run is required"})});function eT(e){let t=e.automation,a=(0,D.cI)({resolver:(0,N.F)(eR),defaultValues:{subject:null==t?void 0:t.subject,everyBlah:(null==t?void 0:t.crontime)?ex(t.crontime):"Day",dayOfWeek:(null==t?void 0:t.crontime)?ef(t.crontime):void 0,timeRecurrence:(null==t?void 0:t.crontime)?ep(t.crontime):"12:00 PM",dayOfMonth:(null==t?void 0:t.crontime)?eg(t.crontime):"1",queryToRun:null==t?void 0:t.query_to_run}});return(0,n.jsx)(eL,{authenticatedData:e.authenticatedData,locationData:e.locationData||null,form:a,onSubmit:a=>{let n=function(e,t,a,n){let s="",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":s="".concat(r," ").concat(l," * * *");break;case"Week":s="".concat(r," ").concat(l," * * ").concat(void 0!==a?7===a?0:a:"*");break;case"Month":s="".concat(r," ").concat(l," ").concat(n," * *")}return s}(a.everyBlah,a.timeRecurrence,a.dayOfWeek,a.dayOfMonth),s="/api/automation?";s+="q=".concat(encodeURIComponent(a.queryToRun)),(null==t?void 0:t.id)&&!e.createNew&&(s+="&automation_id=".concat(encodeURIComponent(t.id))),a.subject&&(s+="&subject=".concat(encodeURIComponent(a.subject))),s+="&crontime=".concat(encodeURIComponent(n)),e.locationData&&e.locationData.city&&(s+="&city=".concat(encodeURIComponent(e.locationData.city))),e.locationData&&e.locationData.region&&(s+="®ion=".concat(encodeURIComponent(e.locationData.region))),e.locationData&&e.locationData.country&&(s+="&country=".concat(encodeURIComponent(e.locationData.country))),e.locationData&&e.locationData.timezone&&(s+="&timezone=".concat(encodeURIComponent(e.locationData.timezone))),fetch(s,{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:ej(t.crontime),crontime:t.crontime,next:t.next})})},create:e.createNew,isLoggedIn:e.isLoggedIn,setShowLoginPrompt:e.setShowLoginPrompt})}function eL(e){var t,a;let[s,r]=(0,l.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,n.jsx)(_,{...e.form,children:(0,n.jsxs)("form",{onSubmit:e.form.handleSubmit(t=>{e.onSubmit(t),r(!0)}),className:"space-y-6",children:[(0,n.jsx)(T,{className:"space-y-1",children:(0,n.jsxs)(O,{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,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[a?(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(et.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),a.email]}):null,t&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(ea.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),t?"".concat(t.city,", ").concat(t.country):"Unknown"]}),t&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(en.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),t?"".concat(t.timezone):"Unknown"]})]}))]})}),!e.create&&(0,n.jsx)(I,{control:e.form.control,name:"subject",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"space-y-1",children:[(0,n.jsx)(L,{children:"Subject"}),(0,n.jsx)(O,{children:"This is the subject of the email you will receive."}),(0,n.jsx)(P,{children:(0,n.jsx)(q.I,{placeholder:"Digest of Healthcare AI trends",...a})}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.subject)||void 0===t?void 0:t.message})]})}}),(0,n.jsx)(I,{control:e.form.control,name:"everyBlah",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(L,{children:"Frequency"}),(0,n.jsx)(O,{children:"How often should this automation run?"}),(0,n.jsxs)(x,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(J.W,{className:"h-4 w-4 mr-2 inline"}),"Every"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:ey.map(e=>(0,n.jsx)(w,{value:e,children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.everyBlah)||void 0===t?void 0:t.message})]})}}),"Week"===e.form.watch("everyBlah")&&(0,n.jsx)(I,{control:e.form.control,name:"dayOfWeek",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(O,{children:"Every week, on which day should this automation run?"}),(0,n.jsxs)(x,{onValueChange:e=>a.onChange(Number(e)),defaultValue:String(a.value),children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(ee.n,{className:"h-4 w-4 mr-2 inline"}),"On"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:ev.map((e,t)=>(0,n.jsx)(w,{value:String(t),children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.dayOfWeek)||void 0===t?void 0:t.message})]})}}),"Month"===e.form.watch("everyBlah")&&(0,n.jsx)(I,{control:e.form.control,name:"dayOfMonth",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(O,{children:"Every month, on which day should the automation run?"}),(0,n.jsxs)(x,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(ee.n,{className:"h-4 w-4 mr-2 inline"}),"On the"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:ew.map(e=>(0,n.jsx)(w,{value:e,children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{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,n.jsx)(I,{control:e.form.control,name:"timeRecurrence",render:e=>{var t;let{field:a}=e;return(0,n.jsxs)(T,{className:"w-full space-y-1",children:[(0,n.jsx)(L,{children:"Time"}),(0,n.jsx)(O,{children:"On the days this automation runs, at what time should it run?"}),(0,n.jsxs)(x,{onValueChange:a.onChange,defaultValue:a.value,children:[(0,n.jsx)(P,{children:(0,n.jsxs)(p,{className:"w-[200px]",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(X.u,{className:"h-4 w-4 mr-2 inline"}),"At"]}),(0,n.jsx)(f,{placeholder:""})]})}),(0,n.jsx)(y,{children:eb.map(e=>(0,n.jsx)(w,{value:e,children:e},e))})]}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(t=o.timeRecurrence)||void 0===t?void 0:t.message})]})}}),(0,n.jsx)(I,{control:e.form.control,name:"queryToRun",render:t=>{var a;let{field:s}=t;return(0,n.jsxs)(T,{className:"space-y-1",children:[(0,n.jsx)(L,{children:"Instructions"}),(0,n.jsx)(O,{children:"What do you want Khoj to do?"}),e.create&&(0,n.jsx)("div",{children:c.map(e=>{var t;return t=s.onChange,(0,n.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,n.jsx)(P,{children:(0,n.jsx)(U.g,{placeholder:"Create a summary of the latest news about AI in healthcare.",value:s.value,onChange:s.onChange})}),(0,n.jsx)(z,{}),o.subject&&(0,n.jsx)(z,{children:null===(a=o.queryToRun)||void 0===a?void 0:a.message})]})}}),(0,n.jsx)("fieldset",{disabled:s,children:e.isLoggedIn?s?(0,n.jsx)(i.z,{type:"submit",disabled:!0,children:"Saving..."}):(0,n.jsx)(i.z,{type:"submit",children:"Save"}):(0,n.jsx)(i.z,{onClick:t=>{t.preventDefault(),e.setShowLoginPrompt(!0)},variant:"default",children:"Login to Save"})})]})})}function eP(e){return e.isMobileWidth?(0,n.jsxs)(em.dy,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,n.jsx)(em.Qz,{asChild:!0,children:(0,n.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,n.jsx)(es.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,n.jsxs)(em.sc,{className:"p-2",children:[(0,n.jsx)(em.iI,{children:"Automation"}),(0,n.jsx)(eT,{createNew:e.createNew,automation:e.automation,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData})]})]}):(0,n.jsxs)(W.Vq,{open:e.isCreating,onOpenChange:t=>{e.setIsCreating(t)},children:[(0,n.jsx)(W.hg,{asChild:!0,children:(0,n.jsxs)(i.z,{className:"shadow-sm justify-start",variant:"outline",children:[(0,n.jsx)(es.v,{className:"h-4 w-4 mr-2"}),e.callToAction]})}),(0,n.jsxs)(W.cZ,{className:"max-h-[98vh] overflow-y-auto",children:[(0,n.jsx)(E.$N,{children:"Automation"}),(0,n.jsx)(eT,{automation:e.automation,createNew:e.createNew,setIsEditing:e.setIsCreating,isLoggedIn:!!e.authenticatedData,authenticatedData:e.authenticatedData,setShowLoginPrompt:e.setShowLoginPrompt,setUpdatedAutomationData:e.setNewAutomationData,locationData:e.ipLocationData})]})]})}function eO(){let e=(0,eo.G)(),{data:t,error:a,isLoading:o}=(0,s.ZP)(e?"automations":null,eh,{revalidateOnFocus:!1}),[c,d]=(0,l.useState)(!1),[u,m]=(0,l.useState)(null),[h,x]=(0,l.useState)([]),[f,p]=(0,l.useState)([]),[g,j]=(0,l.useState)(!1),y=(0,F.IC)(),w=(0,F.k6)();return((0,l.useEffect)(()=>{u&&(x([...h,u]),m(null))},[u,h]),(0,l.useEffect)(()=>{let e=t?t.concat(h):h;e&&p(e_.filter(t=>void 0===e.find(e=>t.subject===e.subject)))},[t,h]),a)?(0,n.jsx)(r.l,{message:"Oops, something went wrong. Please refresh the page."}):(0,n.jsx)("main",{className:"w-full mx-auto",children:(0,n.jsxs)("div",{className:"grid w-full mx-auto",children:[(0,n.jsx)("div",{className:"".concat(Z().sidePanel," top-0"),children:(0,n.jsx)(eu.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:y})}),(0,n.jsxs)("div",{className:"".concat(Z().pageLayout," w-full"),children:[(0,n.jsxs)("div",{className:"pt-6 md:pt-8 grid gap-1 md:flex md:justify-between",children:[(0,n.jsx)("h1",{className:"text-3xl flex items-center",children:"Automations"}),(0,n.jsxs)("div",{className:"flex flex-wrap gap-2 items-center justify-start",children:[e?(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(et.w,{className:"h-4 w-4 mr-2 inline text-orange-500 shadow-sm"}),e.email]}):null,w&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(ea.x,{className:"h-4 w-4 mr-2 inline text-purple-500"}),w?"".concat(w.city,", ").concat(w.country):"Unknown"]}),w&&(0,n.jsxs)("span",{className:"rounded-lg text-sm border-secondary border p-1 flex items-center shadow-sm",children:[(0,n.jsx)(en.S,{className:"h-4 w-4 mr-2 inline text-green-500"}),w?"".concat(w.timezone):"Unknown"]})]})]}),g&&(0,n.jsx)(ei.Z,{loginRedirectMessage:"Create an account to make your own automation",onOpenChange:j}),(0,n.jsx)(ed.bZ,{className:"bg-secondary border-none my-4",children:(0,n.jsxs)(ed.X,{children:[(0,n.jsx)(er.B,{weight:"fill",className:"h-4 w-4 text-purple-400 inline"}),(0,n.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,n.jsxs)("div",{className:"flex justify-between items-center py-4",children:[(0,n.jsx)("h3",{className:"text-xl",children:"Your Creations"}),e?(0,n.jsx)(eP,{isMobileWidth:y,callToAction:"Create Automation",createNew:!0,setIsCreating:d,setShowLoginPrompt:j,setNewAutomationData:m,authenticatedData:e,isCreating:c,ipLocationData:w}):(0,n.jsxs)(i.z,{className:"shadow-sm",onClick:()=>j(!0),variant:"outline",children:[(0,n.jsx)(es.v,{className:"h-4 w-4 mr-2"}),"Create Automation"]})]}),(0,n.jsx)(l.Suspense,{children:(0,n.jsx)(eM,{isMobileWidth:y,authenticatedData:e,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j,setNewAutomationData:m})}),(!t||0===t.length)&&0==h.length&&!o&&(0,n.jsxs)("div",{className:"px-4",children:["So empty! Create your own automation to get started.",(0,n.jsx)("div",{className:"mt-4",children:e?(0,n.jsx)(eP,{isMobileWidth:y,callToAction:"Design Automation",createNew:!0,setIsCreating:d,setShowLoginPrompt:j,setNewAutomationData:m,authenticatedData:e,isCreating:c,ipLocationData:w}):(0,n.jsx)(i.z,{onClick:()=>j(!0),variant:"default",children:"Design"})})]}),o&&(0,n.jsx)(r.l,{message:"booting up your automations"}),(0,n.jsxs)("div",{className:"".concat(Z().automationsLayout),children:[t&&t.map(t=>(0,n.jsx)(eI,{isMobileWidth:y,authenticatedData:e,automation:t,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j},t.id)),h.map(t=>(0,n.jsx)(eI,{isMobileWidth:y,authenticatedData:e,automation:t,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j},t.id))]}),(0,n.jsx)("h3",{className:"text-xl py-4",children:"Try these out"}),(0,n.jsx)("div",{className:"".concat(Z().automationsLayout),children:f.map(t=>(0,n.jsx)(eI,{isMobileWidth:y,setNewAutomationData:m,authenticatedData:e,automation:t,locationData:w,isLoggedIn:!!e,setShowLoginPrompt:j,suggestedCard:!0},t.id))})]})]})})}},66820:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var n=a(57437),s=a(6780),r=a(87138);function o(e){return(0,n.jsx)(s.aR,{open:!0,onOpenChange:e.onOpenChange,children:(0,n.jsxs)(s._T,{children:[(0,n.jsx)(s.fY,{children:(0,n.jsx)(s.f$,{children:"Sign in to Khoj to continue"})}),(0,n.jsxs)(s.yT,{children:[e.loginRedirectMessage,". By logging in, you agree to our"," ",(0,n.jsx)(r.default,{href:"https://khoj.dev/terms-of-service",children:"Terms of Service."})]}),(0,n.jsxs)(s.xo,{children:[(0,n.jsx)(s.le,{children:"Dismiss"}),(0,n.jsx)(s.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{window.location.href="/login?next=".concat(encodeURIComponent(window.location.pathname))},children:(0,n.jsxs)(r.default,{href:"/login?next=".concat(encodeURIComponent(window.location.pathname)),children:[" ","Login"]})})]})]})})}},18642:function(e,t,a){"use strict";a.d(t,{Z:function(){return c}});var n=a(57437),s=a(90837),r=a(50495),o=a(83102),i=a(67135),l=a(34797);function c(e){var t;return(0,n.jsxs)(s.Vq,{children:[(0,n.jsx)(s.hg,{asChild:!0,onClick:e.onShare,children:(0,n.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,n.jsx)(l.m,{className:"w-4 h-4 mr-2"}),e.buttonTitle]})}),(0,n.jsxs)(s.cZ,{children:[(0,n.jsxs)(s.fK,{children:[(0,n.jsx)(s.$N,{children:e.title}),(0,n.jsx)(s.Be,{children:e.description})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,n.jsxs)("div",{className:"grid flex-1 gap-2",children:[(0,n.jsx)(i._,{htmlFor:"link",className:"sr-only",children:"Link"}),(0,n.jsx)(o.I,{id:"link",defaultValue:e.url,readOnly:!0})]}),(0,n.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,n.jsx)("span",{children:"Copy"})})]})]})]})}},47412:function(e,t,a){"use strict";a.d(t,{X:function(){return c},bZ:function(){return l}});var n=a(57437),s=a(2265),r=a(12218),o=a(37440);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=s.forwardRef((e,t)=>{let{className:a,variant:s,...r}=e;return(0,n.jsx)("div",{ref:t,role:"alert",className:(0,o.cn)(i({variant:s}),a),...r})});l.displayName="Alert",s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)("h5",{ref:t,className:(0,o.cn)("mb-1 font-medium leading-none tracking-tight",a),...s})}).displayName="AlertTitle";let c=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)("div",{ref:t,className:(0,o.cn)("text-sm [&_p]:leading-relaxed",a),...s})});c.displayName="AlertDescription"},67135:function(e,t,a){"use strict";a.d(t,{_:function(){return c}});var n=a(57437),s=a(2265),r=a(38364),o=a(12218),i=a(37440);let l=(0,o.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.f,{ref:t,className:(0,i.cn)(l(),a),...s})});c.displayName=r.f.displayName},93146:function(e,t,a){"use strict";a.d(t,{g:function(){return o}});var n=a(57437),s=a(2265),r=a(37440);let o=s.forwardRef((e,t)=>{let{className:a,...s}=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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),ref:t,...s})});o.displayName="Textarea"},50151: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 n=a(57437),s=a(2265),r=a(44504),o=a(12218),i=a(74697),l=a(37440);let c=r.zt,d=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.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),...s})});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=s.forwardRef((e,t)=>{let{className:a,variant:s,...o}=e;return(0,n.jsx)(r.fC,{ref:t,className:(0,l.cn)(u({variant:s}),a),...o})});m.displayName=r.fC.displayName;let h=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.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),...s})});h.displayName=r.aU.displayName;let x=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.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":"",...s,children:(0,n.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=r.x8.displayName;let f=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,l.cn)("text-sm font-semibold",a),...s})});f.displayName=r.Dx.displayName;let p=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,l.cn)("text-sm opacity-90",a),...s})});p.displayName=r.dk.displayName},35657:function(e,t,a){"use strict";a.d(t,{pm:function(){return m}});var n=a(2265);let s=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=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),n=()=>d({type:"DISMISS_TOAST",toastId:a});return d({type:"ADD_TOAST",toast:{...t,id:a,open:!0,onOpenChange:e=>{e||n()}}}),{id:a,dismiss:n,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function m(){let[e,t]=n.useState(c);return n.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})}}},23611:function(e){e.exports={automationsLayout:"automations_automationsLayout__Atoh_",automationCard:"automations_automationCard__BKidA",pageLayout:"automations_pageLayout__OaoYA",sidePanel:"automations_sidePanel__MPciO"}}},function(e){e.O(0,[2734,647,9001,3062,4504,9162,1603,2971,7023,1744],function(){return e(e.s=2743)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,t,s){Promise.resolve().then(s.bind(s,38874))},38874:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(65104),n=s.n(o),i=s(2265),r=s(48861),c=s(82697),l=s(16463),d=s(58485),u=s(9557);s(7395);var h=s(69591),m=s(38423),g=s(79306);function f(e){let t=(0,l.useSearchParams)().get("conversationId"),[s,o]=(0,i.useState)(""),[r,d]=(0,i.useState)(null),[u,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),p=e.setQueryToProcess,x=e.onConversationIdChange;if((0,i.useEffect)(()=>{r&&e.setImage64(encodeURIComponent(r))},[r,e.setImage64]),(0,i.useEffect)(()=>{let t=localStorage.getItem("image");t&&(d(t),e.setImage64(encodeURIComponent(t)),localStorage.removeItem("image"));let s=localStorage.getItem("message");s&&(h(!0),p(s))},[p]),(0,i.useEffect)(()=>{s&&(h(!0),p(s))},[s,p]),(0,i.useEffect)(()=>{t&&(null==x||x(t))},[t,x]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?h(!1):o("")},[e.streamedMessages]),!t){window.location.href="/";return}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(c.Z,{conversationId:t,setTitle:e.setTitle,setAgent:f,pendingMessage:u?s:"",incomingMessages:e.streamedMessages})}),(0,a.jsx)("div",{className:"".concat(n().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-t-2xl rounded-b-none md:rounded-xl h-fit"),children:(0,a.jsx)(m.Z,{agentColor:null==g?void 0:g.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>o(e),sendImage:e=>d(e),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:t,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]})}function p(){let e="Khoj AI - Chat",[t,s]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[l,m]=(0,i.useState)(e),[p,x]=(0,i.useState)(null),[_,y]=(0,i.useState)([]),[w,I]=(0,i.useState)(""),[S,v]=(0,i.useState)(!1),[b,j]=(0,i.useState)([]),[B,C]=(0,i.useState)(""),E=(0,h.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},T=(0,g.G)(),k=(0,h.IC)();async function M(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,a="␃\uD83D\uDD1A␗",o="",n=[],i={};for(;;){let e;let{done:r,value:c}=await t.read();if(r){I(""),v(!1),C("");break}for(o+=s.decode(c,{stream:!0});-1!==(e=o.indexOf(a));){let t=o.slice(0,e);if(o=o.slice(e+a.length),t){let e=_.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:n,onlineContext:i}=(0,u.VK)(t,e,n,i)),y([..._])}}}}async function D(){if(localStorage.removeItem("message"),!w||!p)return;let e={q:w,conversation_id:p,stream:!0,...E&&{city:E.city,region:E.region,country:E.country,country_code:E.countryCode,timezone:E.timezone},...B&&{image:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await M(t)}catch(s){console.error(s);let e=_.find(e=>!e.completed);if(!e)return;let t=s.message;t.includes("Error in input stream")?e.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.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(t,". Could you try again or dislike this message if the issue persists?"),e.completed=!0,y([..._]),I(""),v(!1)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{c(!1),e&&s(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,i.useEffect)(()=>{if(w){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:w||"",uploadedImageData:decodeURIComponent(B)};y(t=>[...t,e]),v(!0)}},[w]),(0,i.useEffect)(()=>{S&&D()},[S]),o)?(0,a.jsx)(d.Z,{}):(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(l&&l!==e?": ".concat(l):"")}),(0,a.jsx)("div",{children:(0,a.jsx)(r.ZP,{conversationId:p,uploadedFiles:b,isMobileWidth:k})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!k&&p&&(0,a.jsxs)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mr-8 pt-6 col-auto h-fit"),children:[l&&(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden",children:l}),(0,a.jsx)(r.En,{conversationId:p,setTitle:m,sizing:"md"})]}),(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(f,{isLoggedIn:null!==T,streamedMessages:_,chatOptionsData:t,setTitle:m,setQueryToProcess:I,setUploadedFiles:j,isMobileWidth:k,onConversationIdChange:e=>{x(e)},setImage64:C})})]})})]})}},16463:function(e,t,s){"use strict";var a=s(71169);s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},65104: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,[7812,
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,t,s){Promise.resolve().then(s.bind(s,38874))},38874:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(65104),n=s.n(o),i=s(2265),r=s(48861),c=s(82697),l=s(16463),d=s(58485),u=s(9557);s(7395);var h=s(69591),m=s(38423),g=s(79306);function f(e){let t=(0,l.useSearchParams)().get("conversationId"),[s,o]=(0,i.useState)(""),[r,d]=(0,i.useState)(null),[u,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),p=e.setQueryToProcess,x=e.onConversationIdChange;if((0,i.useEffect)(()=>{r&&e.setImage64(encodeURIComponent(r))},[r,e.setImage64]),(0,i.useEffect)(()=>{let t=localStorage.getItem("image");t&&(d(t),e.setImage64(encodeURIComponent(t)),localStorage.removeItem("image"));let s=localStorage.getItem("message");s&&(h(!0),p(s))},[p]),(0,i.useEffect)(()=>{s&&(h(!0),p(s))},[s,p]),(0,i.useEffect)(()=>{t&&(null==x||x(t))},[t,x]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?h(!1):o("")},[e.streamedMessages]),!t){window.location.href="/";return}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(c.Z,{conversationId:t,setTitle:e.setTitle,setAgent:f,pendingMessage:u?s:"",incomingMessages:e.streamedMessages})}),(0,a.jsx)("div",{className:"".concat(n().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-t-2xl rounded-b-none md:rounded-xl h-fit"),children:(0,a.jsx)(m.Z,{agentColor:null==g?void 0:g.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>o(e),sendImage:e=>d(e),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:t,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles})})]})}function p(){let e="Khoj AI - Chat",[t,s]=(0,i.useState)(null),[o,c]=(0,i.useState)(!0),[l,m]=(0,i.useState)(e),[p,x]=(0,i.useState)(null),[_,y]=(0,i.useState)([]),[w,I]=(0,i.useState)(""),[S,v]=(0,i.useState)(!1),[b,j]=(0,i.useState)([]),[B,C]=(0,i.useState)(""),E=(0,h.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},T=(0,g.G)(),k=(0,h.IC)();async function M(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let t=e.body.getReader(),s=new TextDecoder,a="␃\uD83D\uDD1A␗",o="",n=[],i={};for(;;){let e;let{done:r,value:c}=await t.read();if(r){I(""),v(!1),C("");break}for(o+=s.decode(c,{stream:!0});-1!==(e=o.indexOf(a));){let t=o.slice(0,e);if(o=o.slice(e+a.length),t){let e=_.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:n,onlineContext:i}=(0,u.VK)(t,e,n,i)),y([..._])}}}}async function D(){if(localStorage.removeItem("message"),!w||!p)return;let e={q:w,conversation_id:p,stream:!0,...E&&{city:E.city,region:E.region,country:E.country,country_code:E.countryCode,timezone:E.timezone},...B&&{image:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await M(t)}catch(s){console.error(s);let e=_.find(e=>!e.completed);if(!e)return;let t=s.message;t.includes("Error in input stream")?e.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.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(t,". Could you try again or dislike this message if the issue persists?"),e.completed=!0,y([..._]),I(""),v(!1)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{c(!1),e&&s(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,i.useEffect)(()=>{if(w){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:w||"",uploadedImageData:decodeURIComponent(B)};y(t=>[...t,e]),v(!0)}},[w]),(0,i.useEffect)(()=>{S&&D()},[S]),o)?(0,a.jsx)(d.Z,{}):(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(l&&l!==e?": ".concat(l):"")}),(0,a.jsx)("div",{children:(0,a.jsx)(r.ZP,{conversationId:p,uploadedFiles:b,isMobileWidth:k})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!k&&p&&(0,a.jsxs)("div",{className:"".concat(n().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mr-8 pt-6 col-auto h-fit"),children:[l&&(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden",children:l}),(0,a.jsx)(r.En,{conversationId:p,setTitle:m,sizing:"md"})]}),(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(f,{isLoggedIn:null!==T,streamedMessages:_,chatOptionsData:t,setTitle:m,setQueryToProcess:I,setUploadedFiles:j,isMobileWidth:k,onConversationIdChange:e=>{x(e)},setImage64:C})})]})})]})}},16463:function(e,t,s){"use strict";var a=s(71169);s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},65104: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,[7812,647,929,3954,9001,3062,743,121,7071,4051,9984,1603,9417,9178,8423,2697,2971,7023,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|