khoj 1.28.4.dev23__py3-none-any.whl → 1.28.4.dev77__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- khoj/configure.py +4 -6
- khoj/database/adapters/__init__.py +124 -34
- khoj/database/models/__init__.py +4 -0
- khoj/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/1603-2418b11d8e8dacb9.js +1 -0
- khoj/interface/compiled/_next/static/chunks/1970-c78f6acc8e16e30b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/3124-a4cea2eda163128d.js +1 -0
- khoj/interface/compiled/_next/static/chunks/5538-5c4f2271e9377b74.js +1 -0
- khoj/interface/compiled/_next/static/chunks/8423-db6dad6d44869097.js +1 -0
- khoj/interface/compiled/_next/static/chunks/9417-7a8a6da918d37750.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-36da67f03a173e52.js → page-4353b1a532795ad1.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-774ae3e033f938cd.js → page-c9f13c865e739607.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-97876b3bd3c5e69d.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/{page-322c37514a3a613a.js → page-c33ebe19a3b7b0b2.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-9b64f61caa5bd7f9.js → page-8e28deacb61f75aa.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-2fab613a557d3cc5.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-3ee3da7e8dfe3572.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{webpack-c9799fdebf88abb6.js → webpack-ff5eae43b8dba1d2.js} +1 -1
- khoj/interface/compiled/_next/static/css/23f801d22927d568.css +1 -0
- khoj/interface/compiled/_next/static/css/592ca99f5122e75a.css +1 -0
- khoj/interface/compiled/_next/static/css/af0f36f71f368260.css +25 -0
- khoj/interface/compiled/agents/index.html +1 -1
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +1 -1
- khoj/interface/compiled/automations/index.txt +2 -2
- khoj/interface/compiled/chat/index.html +1 -1
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +1 -1
- khoj/interface/compiled/index.txt +3 -3
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +2 -2
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +3 -3
- khoj/processor/content/docx/docx_to_entries.py +27 -21
- khoj/processor/content/github/github_to_entries.py +2 -2
- khoj/processor/content/images/image_to_entries.py +2 -2
- khoj/processor/content/markdown/markdown_to_entries.py +2 -2
- khoj/processor/content/notion/notion_to_entries.py +2 -2
- khoj/processor/content/org_mode/org_to_entries.py +2 -2
- khoj/processor/content/pdf/pdf_to_entries.py +37 -29
- khoj/processor/content/plaintext/plaintext_to_entries.py +2 -2
- khoj/processor/content/text_to_entries.py +2 -2
- khoj/processor/conversation/anthropic/anthropic_chat.py +7 -1
- khoj/processor/conversation/google/gemini_chat.py +15 -2
- khoj/processor/conversation/offline/chat_model.py +4 -0
- khoj/processor/conversation/openai/gpt.py +6 -1
- khoj/processor/conversation/prompts.py +48 -4
- khoj/processor/conversation/utils.py +69 -11
- khoj/processor/image/generate.py +2 -0
- khoj/processor/tools/online_search.py +19 -3
- khoj/processor/tools/run_code.py +4 -0
- khoj/routers/api.py +6 -1
- khoj/routers/api_agents.py +8 -10
- khoj/routers/api_chat.py +64 -13
- khoj/routers/api_content.py +80 -8
- khoj/routers/helpers.py +105 -34
- khoj/routers/notion.py +1 -1
- khoj/routers/research.py +9 -2
- khoj/search_type/text_search.py +1 -1
- khoj/utils/fs_syncer.py +2 -1
- khoj/utils/rawconfig.py +32 -0
- {khoj-1.28.4.dev23.dist-info → khoj-1.28.4.dev77.dist-info}/METADATA +1 -1
- {khoj-1.28.4.dev23.dist-info → khoj-1.28.4.dev77.dist-info}/RECORD +70 -70
- khoj/interface/compiled/_next/static/chunks/1603-c1568f45947e9f2c.js +0 -1
- khoj/interface/compiled/_next/static/chunks/1970-d44050bf658ae5cc.js +0 -1
- khoj/interface/compiled/_next/static/chunks/5538-bf582517a8dd3faa.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8423-a1f432e4a8d9a6b0.js +0 -1
- khoj/interface/compiled/_next/static/chunks/8840-b8d7b9f0923c6651.js +0 -1
- khoj/interface/compiled/_next/static/chunks/9417-0d0fc7eb49a86abb.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-a369e2bda9897794.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-10b288c103f19468.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/page-959d5f097cf38c93.js +0 -1
- khoj/interface/compiled/_next/static/css/4cae6c0e5c72fb2d.css +0 -1
- khoj/interface/compiled/_next/static/css/9d45de78fba367c1.css +0 -1
- khoj/interface/compiled/_next/static/css/d2bc549245313f26.css +0 -25
- /khoj/interface/compiled/_next/static/{s_mKS5kELaw2v4a7_yWNP → sE94pAZEifEKkz4WQtTNW}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{s_mKS5kELaw2v4a7_yWNP → sE94pAZEifEKkz4WQtTNW}/_ssgManifest.js +0 -0
- {khoj-1.28.4.dev23.dist-info → khoj-1.28.4.dev77.dist-info}/WHEEL +0 -0
- {khoj-1.28.4.dev23.dist-info → khoj-1.28.4.dev77.dist-info}/entry_points.txt +0 -0
- {khoj-1.28.4.dev23.dist-info → khoj-1.28.4.dev77.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9417],{58575:function(c,t,a){a.d(t,{Iu:function(){return r},Zc:function(){return o},oz:function(){return n},tp:function(){return e},xF:function(){return s}});let s=["red","yellow","green","blue","orange","purple","pink","teal","cyan","lime","indigo","fuchsia","rose","sky","amber","emerald"];function n(c){return s.includes(c)?"text-".concat(c,"-500"):"text-gray-500"}function e(c){return s.includes(c)?"bg-".concat(c,"-500 dark:bg-").concat(c,"-900 hover:bg-").concat(c,"-400 dark:hover:bg-").concat(c,"-800"):"bg-background"}function o(c){return"".concat(s.includes(c)?"bg-gradient-to-b from-[hsl(var(--background))] to-".concat(c,"-100/70 dark:from-[hsl(var(--background))] dark:to-").concat(c,"-950/30 "):"bg-gradient-to-b from-white to-orange-50"," dark:border dark:border-neutral-700")}function r(c){return s.includes(c)?"border-".concat(c,"-500"):"border-gray-500"}let l={};for(let c of s)l[c]=r(c)},89417:function(c,t,a){a.d(t,{BI:function(){return co},vH:function(){return cs},Le:function(){return ce},TI:function(){return cn}});var s=a(57437);a(2265);var n=a(58575),e=a(16288),o=a(55631),r=a(8589),l=a(82059),i=a(58410),m=a(81980),h=a(46503),d=a(32145),x=a(57421),u=a(56698),j=a(47483),f=a(14850),g=a(5989),v=a(63205),p=a(18444),N=a(39557),k=a(86545),w=a(88420),z=a(70177),b=a(41959),M=a(67267),C=a(48687),y=a(96185),W=a(8606),H=a(48855),L=a(67247),B=a(43743),q=a(11925),E=a(20908),A=a(84835),F=a(77514),T=a(8658),V=a(58573),_=a(42520),G=a(98743),I=a(92648),O=a(77574),S=a(89475),D=a(5198),Y=a(2861),P=a(359),R=a(52731),X=a(13493),Z=a(88145),J=a(58259),K=a(26100),U=a(12835);function $(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",width:"144.98",height:"160",viewBox:"-7.65 -13.389 144.98 160",children:[(0,s.jsx)("path",{fill:"#a04d32",stroke:"#000",strokeWidth:"3",d:"M133.399 46.067c-.205-3.15-2.842-4.366-5.993-2.125-7.22-1.297-14.305-.687-17.8-.981-7.662-1.073-14.041-5.128-14.041-5.128.932-1.239.486-3.917-5.498-4.101-1.646-.542-3.336-1.327-4.933-1.979.544-1.145-.133-2.836-.133-2.836 2.435-.672 2.808-3.842 1.848-5.709 3.106.084 2.612-4.718 2.183-6.381 2.435-.923 2.77-3.831 1.763-6.129 2.938-.671 3.022-4.114 2.77-6.548 3.023-.168 2.604-5.457 2.604-6.549 2.604-1.679 2.016-3.946 2.425-6.573 1.605-3.25-.577-4.173-2.116-.71-1.651 3.001-3.77 4.311-3.75 6.528.755 1.259-5.625 3.106-3.61 7.052-1.428 1.763-4.785 4.03-3.592 6.733-.606 1.326-4.888 4.433-3.041 7.371-4.03 2.687-3.79 3.335-2.938 5.793-1.147.736-2.318 1.862-2.995 3.094-1.32-1.568-2.603-4.429-2.584-8.294 0-3.275-6.1.318-6.1 6.784 0 .556-.056 1.061-.134 1.542-2.11.243-4.751.707-8.08 1.494-.106.073-.157.186-.182.316a8.704 8.704 0 01-.277-1.553c-.582-3.79-4.934-9.56-7.057-2.434-1.096 2.611-1.74 4.392-2.115 5.789v0s-.336.226-.957.61c-2.62 1.622-3.562 6.686-13.075 9.883-3.211 1.079-7.4 1.945-12.96 2.395-9.57.773-27.887 17.314-29.114 33.097-.283 3.964.31 13.737 3.596 22.31l.005.02c.015.042.032.081.048.122.052.134.103.267.156.398.28.718.579 1.405.895 2.062 1.885 4.028 4.46 7.59 7.934 9.882a25.252 25.252 0 004.372 2.762c5.907 9.749 18.442 22.252 42.075 14.859 36.255-10.284 56.263 13.809 58.568 15.5 3.399 3.433-8.786-29.835-34.587-44.788-15.253-8.322-5.678-22.656-4.585-27.718 0 0 12.227 8.557 21.087-4.52 8.004 2.062 13.367-1.462 20.25 1.03 4.184 1.833 21.77.726 15.235-9.104 4.11-2.683 4.544-1.815 6.6-5.9 1.104-4.952-1.403-6.012-2.167-7.366zM63.106 32.768c-.041.018-.086.04-.125.056.039-.034.075-.062.115-.102l.01.046zm-13.413 4.523c-.073.429-.143.829-.212 1.216.037-.832.085-1.714.143-2.646.024.435.05.904.069 1.43zm10.693-6.333c.746 1.124 1.662 2.179 1.662 2.179s-.875-.79-1.662-2.179z"}),(0,s.jsx)("path",{fill:"#7a9",stroke:"#000",strokeWidth:".5",d:"M6.448 104.253s10.02 36.105 46.549 24.68c36.255-10.284 56.263 13.809 58.568 15.5 3.399 3.433-8.786-29.835-34.587-44.788-15.253-8.322-5.678-22.656-4.585-27.718 0 0 12.227 8.557 21.087-4.52 8.004 2.062 13.367-1.462 20.25 1.03 4.184 1.833 21.77.726 15.235-9.104 4.11-2.683 4.544-1.815 6.6-5.9 1.105-4.952-1.402-6.011-2.166-7.366-.205-3.15-2.842-4.366-5.993-2.125-7.22-1.297-14.305-.687-17.8-.981-7.662-1.073-14.041-5.128-14.041-5.128.932-1.239.486-3.917-5.498-4.101-3.287-1.082-6.752-3.136-9.288-3.162-2.567 0-2.914-2.537-2.914-2.537-1.606-.87-3.924-4.252-3.9-9.438 0-3.275-6.098.318-6.098 6.784s-5.818 7.758-5.818 7.758-2.55-2.281-2.855-5.958c-.582-3.79-4.934-9.56-7.057-2.434-3.226 7.646-3.485 9.43-4.115 13.154-1.31 7.711-.345 8.012-.345 8.012l-32.824 23.43z"}),(0,s.jsx)("path",{fill:"#314b49",stroke:"#314b49",strokeWidth:".75",strokeLinecap:"round",strokeLinejoin:"round",d:"M84.11 42.833c1.549-.562.897-.415 1.153-.581-2.96.575-9.635.614-14.317-1.133.392.23 2.568.962 2.845 1.128.218.715.1 1.438 2.932 2.709 2.559.793 5.845.461 6.835-.529.109-1.684.126-1.065.553-1.594z"}),(0,s.jsx)("path",{fill:"#314b49",stroke:"#314b49",strokeWidth:".5",d:"M116.479 61.979c-2.83-2.085-4.881-.264-6.47-.413.99-.645 3.763-2.062 8.246-2.062 2.532 0 3.879 2.196 5.57 2.207 1.14.007 4.472-1.71 5.14-2.378-.97.838.454 1.755-.49 3.003-.281.359-.836 1.511-2.662 2.051-2.05.971-5.411 1.762-9.334-2.408z"}),(0,s.jsx)("path",{fill:"#314b49",d:"M54.932 24.033s-3.355 7.996.312 15.329.522-6.829 4.688-4.162c3.397.385-2.387-3.215-2.033-7.819-.176-2.892-1.77-5.194-2.967-3.348zM119.336 50.417c0 1.121-1.363 2.03-3.045 2.03 3.573-1.121-.201-4.653-3.045-2.03 0-1.121 1.363-2.03 3.045-2.03s3.045.909 3.045 2.03z"}),(0,s.jsx)("path",{fill:"#314b49",d:"M114.169 47.833c3.772-.231 6.336.323 5.536 3.138.548-1.126 1.292-2.83-1.046-3.507-1.746-.388-3.3-.378-4.49.369z"}),(0,s.jsx)("path",{fill:"#a04d32",stroke:"#000",strokeWidth:".5",d:"M59.929 69.234c0-3.521-1.51-7.166-7.04-14.583-1.635-2.192-2.62-4.336-3.211-6.275-1.401-3.295-3.426-8.019-.613-17.233 0 0 .62-.384 0 0-2.62 1.622-3.562 6.686-13.075 9.883-3.211 1.079-7.4 1.945-12.96 2.395-9.568.773-27.886 17.314-29.113 33.097-.283 3.964.31 13.737 3.596 22.31l.005.02c.015.042.032.081.048.122.052.134.103.267.156.398.28.718.579 1.405.895 2.062 1.885 4.028 4.46 7.59 7.934 9.882 3.084 2.404 5.606 3.306 5.606 3.306-2.588-3.578-3.77-7.562-2.263-12.32.65 2.637 1.903 4.162 3.646 4.777-.615-1.884-.827-3.549 0-4.651 2.567 6.734 5.353 9.031 8.17 10.686-2.63-4.914-4.031-10.005-3.77-15.337 2.569 6.028 6.596 9.945 10.56 13.954-3.78-5.966-6.911-12.104-6.977-19.046 1.693 2.778 3.935 4.932 6.6 6.601-1.683-2.709-2.505-5.51-2.263-8.423 4.424 4.945 9.36 6.607 14.332 8.046-5.197-3.625-9.843-7.537-12.32-12.572 2.972 1.464 5.948 1.693 8.926 1.383-3.706-1.872-5.07-5.252-5.783-9.052 5.177 5.279 10.587 8.827 16.09 11.692-5.455-5.26-9.478-10.65-11.565-16.218 2.1 1.18 4.157 1.736 6.16 1.509-2.766-3.124-3.465-6.182-4.211-9.241 2.637 3.916 4.959 6.022 7.103 7.103-2.19-4.482-2.034-8.432-.503-12.068 2.524 1.675 4.902 4.295 6.915 9.303.73-2.386-.447-6.364-1.886-10.56 2.175.622 4.779 3.351 8.17 9.932-.33-3.865-2.138-7.775-4.147-11.692 3.027 3.51 7.557 12.713 6.788 10.81z"}),(0,s.jsx)("path",{fill:"#796958",stroke:"#000",strokeWidth:".5",d:"M76.27 30.176s-.252 7.472 6.717 2.603c3.61.084 2.015-3.862 2.015-3.862 2.435-.672 2.808-3.842 1.848-5.709 3.106.084 2.612-4.718 2.183-6.381 2.435-.923 2.77-3.831 1.763-6.129 2.938-.671 3.022-4.114 2.77-6.548 3.023-.168 2.604-5.457 2.604-6.549 2.604-1.679 2.016-3.946 2.425-6.573 1.605-3.25-.577-4.173-2.116-.71-1.651 3.001-3.77 4.311-3.75 6.528.755 1.259-5.625 3.106-3.61 7.052-1.428 1.763-4.785 4.03-3.592 6.733-.606 1.326-4.888 4.433-3.041 7.371-4.03 2.687-3.79 3.335-2.938 5.793-2.155 1.38-4.41 4.131-3.278 6.381z"}),(0,s.jsx)("path",{fill:"#fff",d:"M94.094-5.087s-.735 1.324-.735 2.133c0 .809 2.185.568 2.927-.227-1.625.024-2.965.289-2.192-1.906zM89.833 1.183s-.812 1.068-.183 2.316c.392.98 2.807.962 3.549.167-1.625.024-4.14-.287-3.366-2.483zM86.698 7.638s-.998 1.346-.492 2.602c0 .809 2.838.956 3.58.161-1.625.022-3.645-.489-3.088-2.763zM83.62 14.8s-1.402 1.542-.148 2.945c1.438.809 3.744.049 4.486-.746-1.625.022-4.894.076-4.337-2.199zM80.616 20.521s-1.575 1.414-.02 3.312c1.438.809 4.57.198 5.312-.597-1.624.024-5.99-1.346-5.292-2.715zM77.469 27.262s-1.403 1.542-.15 2.945c1.439.809 6.037-.186 6.779-.981-1.625.023-7.185.311-6.63-1.964z"}),(0,s.jsx)("path",{fill:"#a04d32",stroke:"#000",strokeWidth:".5",d:"M76.352 30.29c-.45-.45-.534-.896-.367-1.718 0 0 .369-4.107-16.333-.158-1.072.74 2.396 4.722 2.396 4.722s.418.215 1.047-.415c.253 1.123.852 4.081.233 4.579 1.245-.771 1.868-1.946 1.676-4.125 2.122.461 3.742 1.64 4.692 3.779.304-1.4.603-2.799-.384-4.126 2.182.285 3.88 1.496 5.362 3.124.22-.933.354-1.883 0-2.931 1.39.473 2.587 1.607 3.71 2.988 0 0 .21-3.862-2.032-5.719z"}),(0,s.jsx)("path",{opacity:".26",d:"M60.33 57.936s6.76 13.59 17.595 13.991c10.834.401 10.834-2.73 10.834-2.73s-15.527 3.048-28.43-11.261zM63.485 65.63c2.279 3.104 4.856 5.221 7.722 6.382 0 0-7.365 11.108-3.611 20.023s13.125 11.053 23.32 21.249c7.943 7.942 17.159 24.961 17.159 24.961s-17.834-14.176-29.42-13.479c0 0-2.687-9.668-10.585-17.566-11.244-11.245-16.168-25.875-4.585-41.57z"}),(0,s.jsx)("path",{opacity:".18",fill:"#fff",d:"M44.717 38.245c-3.874 2.501-8.42 7.096-24.415 8.083C3.252 53.112-7.131 73.013-3.475 86.792c1.348 7.317 3.89 14.18 3.89 14.18C-.47 95.053-.966 89.575 1.45 87.373c1.435 2.384 2.969 2.468 4.507 2.479-1.59-2.404-1.788-4.808 0-7.212 1.489 1.525 2.992 1.881 4.507 1.353-2.128-2.449-1.867-4.848 0-7.211 1.388 5.022 4.462 7.453 7.662 9.689-2.208-4.333-4.166-8.672-2.93-13.07 1.323.729 2.595.644 3.83 0-1.256-1.576-.924-3.153 0-4.732 2.948 3.04 6.214 3.724 9.466 4.507-2.661-2.454-5.543-4.527-6.761-9.465 1.5-1.811 3.269-2.685 5.408-2.253-1.901-1.167-1.65-2.543 0-4.057 2.089 1.104 4.195 1.352 6.31 1.127-2.807-1.68-8.424-4.994 11.269-20.283z"}),(0,s.jsx)("path",{opacity:".27",fill:"#fff",d:"M71.278 19.389c.996-.963 1.146-.65.854.285-.982 2.36.353 4.647.797 6.206l-3.871.114c.108-2.271.247-4.794 2.22-6.605z"})]})}function Q(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",width:"208",height:"128",viewBox:"0 0 208 128",children:[(0,s.jsx)("rect",{width:"198",height:"118",x:"5",y:"5",ry:"10",stroke:"#000",strokeWidth:"10",fill:"none"}),(0,s.jsx)("path",{d:"M30 98V30h20l20 25 20-25h20v68H90V59L70 84 50 59v39zm125 0l-30-33h20V30h20v35h20z"})]})}function cc(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",enableBackground:"new 0 0 334.371 380.563",version:"1.1",viewBox:"0 0 14 16",children:[(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",children:[(0,s.jsx)("polygon",{points:"51.791 356.65 51.791 23.99 204.5 23.99 282.65 102.07 282.65 356.65",fill:"#fff",strokeWidth:"212.65"}),(0,s.jsx)("path",{d:"m201.19 31.99 73.46 73.393v243.26h-214.86v-316.66h141.4m6.623-16h-164.02v348.66h246.85v-265.9z",strokeWidth:"21.791"})]}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",children:[(0,s.jsx)("polygon",{points:"282.65 356.65 51.791 356.65 51.791 23.99 204.5 23.99 206.31 25.8 206.31 100.33 280.9 100.33 282.65 102.07",fill:"#fff",strokeWidth:"212.65"}),(0,s.jsx)("path",{d:"m198.31 31.99v76.337h76.337v240.32h-214.86v-316.66h138.52m9.5-16h-164.02v348.66h246.85v-265.9l-6.43-6.424h-69.907v-69.842z",strokeWidth:"21.791"})]}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",strokeWidth:"21.791",children:[(0,s.jsx)("polygon",{points:"258.31 87.75 219.64 87.75 219.64 48.667 258.31 86.38"}),(0,s.jsx)("path",{d:"m227.64 67.646 12.41 12.104h-12.41v-12.104m-5.002-27.229h-10.998v55.333h54.666v-12.742z"})]}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 -.66877 -.73379)",fill:"#ed1c24",strokeWidth:"212.65",children:[(0,s.jsx)("polygon",{points:"311.89 284.49 22.544 284.49 22.544 167.68 37.291 152.94 37.291 171.49 297.15 171.49 297.15 152.94 311.89 167.68"}),(0,s.jsx)("path",{d:"m303.65 168.63 1.747 1.747v107.62h-276.35v-107.62l1.747-1.747v9.362h272.85v-9.362m-12.999-31.385v27.747h-246.86v-27.747l-27.747 27.747v126h302.35v-126z"})]}),(0,s.jsx)("rect",{x:"1.7219",y:"7.9544",width:"10.684",height:"4.0307",fill:"none"}),(0,s.jsxs)("g",{transform:"matrix(.04589 0 0 .04589 1.7219 11.733)",fill:"#fff",strokeWidth:"21.791",children:[(0,s.jsx)("path",{d:"m9.216 0v-83.2h30.464q6.784 0 12.928 1.408 6.144 1.28 10.752 4.608 4.608 3.2 7.296 8.576 2.816 5.248 2.816 13.056 0 7.68-2.816 13.184-2.688 5.504-7.296 9.088-4.608 3.456-10.624 5.248-6.016 1.664-12.544 1.664h-8.96v26.368zm22.016-43.776h7.936q6.528 0 9.6-3.072 3.2-3.072 3.2-8.704t-3.456-7.936-9.856-2.304h-7.424z"}),(0,s.jsx)("path",{d:"m87.04 0v-83.2h24.576q9.472 0 17.28 2.304 7.936 2.304 13.568 7.296t8.704 12.8q3.2 7.808 3.2 18.816t-3.072 18.944-8.704 13.056q-5.504 5.12-13.184 7.552-7.552 2.432-16.512 2.432zm22.016-17.664h1.28q4.48 0 8.448-1.024 3.968-1.152 6.784-3.84 2.944-2.688 4.608-7.424t1.664-12.032-1.664-11.904-4.608-7.168q-2.816-2.56-6.784-3.456-3.968-1.024-8.448-1.024h-1.28z"}),(0,s.jsx)("path",{d:"m169.22 0v-83.2h54.272v18.432h-32.256v15.872h27.648v18.432h-27.648v30.464z"})]})]})}function ct(c){let{className:t}=c;return(0,s.jsxs)("svg",{className:"".concat(null!=t?t:"w-6 h-6 text-muted-foreground inline-flex mr-1"),xmlns:"http://www.w3.org/2000/svg",fill:"#FFF","stroke-miterlimit":"10",strokeWidth:"2",viewBox:"0 0 96 96",children:[(0,s.jsx)("path",{stroke:"#979593",d:"M67.1716 7H27c-1.1046 0-2 .8954-2 2v78c0 1.1046.8954 2 2 2h58c1.1046 0 2-.8954 2-2V26.8284c0-.5304-.2107-1.0391-.5858-1.4142L68.5858 7.5858C68.2107 7.2107 67.702 7 67.1716 7z"}),(0,s.jsx)("path",{fill:"none",stroke:"#979593",d:"M67 7v18c0 1.1046.8954 2 2 2h18"}),(0,s.jsx)("path",{fill:"#C8C6C4",d:"M79 61H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0-6H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0-6H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0-6H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1zm0 24H48v-2h31c.5523 0 1 .4477 1 1s-.4477 1-1 1z"}),(0,s.jsx)("path",{fill:"#185ABD",d:"M12 74h32c2.2091 0 4-1.7909 4-4V38c0-2.2091-1.7909-4-4-4H12c-2.2091 0-4 1.7909-4 4v32c0 2.2091 1.7909 4 4 4z"}),(0,s.jsx)("path",{d:"M21.6245 60.6455c.0661.522.109.9769.1296 1.3657h.0762c.0306-.3685.0889-.8129.1751-1.3349.0862-.5211.1703-.961.2517-1.319L25.7911 44h4.5702l3.6562 15.1272c.183.7468.3353 1.6973.457 2.8532h.0608c.0508-.7979.1777-1.7184.3809-2.7615L37.8413 44H42l-5.1183 22h-4.86l-3.4885-14.5744c-.1016-.4197-.2158-.9663-.3428-1.6417-.127-.6745-.2057-1.1656-.236-1.4724h-.0608c-.0407.358-.1195.8896-.2364 1.595-.1169.7062-.211 1.2273-.2819 1.565L24.1 66h-4.9357L14 44h4.2349l3.1843 15.3882c.0709.3165.1392.7362.2053 1.2573z"})]})}let ca={Lightbulb:(c,t,a)=>(0,s.jsx)(e.v,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Robot:(c,t,a)=>(0,s.jsx)(o.H,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Aperture:(c,t,a)=>(0,s.jsx)(r.u,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),GraduationCap:(c,t,a)=>(0,s.jsx)(l.X,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Jeep:(c,t,a)=>(0,s.jsx)(i.s,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Island:(c,t,a)=>(0,s.jsx)(m.W,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),MathOperations:(c,t,a)=>(0,s.jsx)(h.M,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Asclepius:(c,t,a)=>(0,s.jsx)(d.N,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Couch:(c,t,a)=>(0,s.jsx)(x.v,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Code:(c,t,a)=>(0,s.jsx)(u.E,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Atom:(c,t,a)=>(0,s.jsx)(j.h,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),ClockCounterClockwise:(c,t,a)=>(0,s.jsx)(f.y,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Globe:(c,t,a)=>(0,s.jsx)(g.T,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Palette:(c,t,a)=>(0,s.jsx)(v.Y,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Book:(c,t,a)=>(0,s.jsx)(p.f,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Confetti:(c,t,a)=>(0,s.jsx)(N.D,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),House:(c,t,a)=>(0,s.jsx)(k.T,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Translate:(c,t,a)=>(0,s.jsx)(w.v,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),BowlFood:(c,t,a)=>(0,s.jsx)(z.a,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Lectern:(c,t,a)=>(0,s.jsx)(b.G,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Wallet:(c,t,a)=>(0,s.jsx)(M.w,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),PencilLine:(c,t,a)=>(0,s.jsx)(C.z,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Chalkboard:(c,t,a)=>(0,s.jsx)(y.a,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Cigarette:(c,t,a)=>(0,s.jsx)(W.m,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),CraneTower:(c,t,a)=>(0,s.jsx)(H.E,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Heart:(c,t,a)=>(0,s.jsx)(L.X,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Leaf:(c,t,a)=>(0,s.jsx)(B.B,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),NewspaperClipping:(c,t,a)=>(0,s.jsx)(q.g,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),OrangeSlice:(c,t,a)=>(0,s.jsx)(E.R,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),SmileyMelting:(c,t,a)=>(0,s.jsx)(A.N,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),YinYang:(c,t,a)=>(0,s.jsx)(F.x,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),SneakerMove:(c,t,a)=>(0,s.jsx)(T.D,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Student:(c,t,a)=>(0,s.jsx)(V.Z,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Oven:(c,t,a)=>(0,s.jsx)(_.o,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Gavel:(c,t,a)=>(0,s.jsx)(G._,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")}),Broadcast:(c,t,a)=>(0,s.jsx)(I.z,{className:"".concat(t," ").concat(a," ").concat(c," mr-2")})};function cs(c){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=null!=t?t:"h-4 w-4";return c.includes("summarize")?(0,s.jsx)(O.U,{className:a}):c.includes("help")?(0,s.jsx)(S.H,{className:a}):c.includes("automation")?(0,s.jsx)(o.H,{className:a}):c.includes("webpage")?(0,s.jsx)(D.A,{className:a}):c.includes("notes")?(0,s.jsx)(Y.a,{className:a}):c.includes("image")?(0,s.jsx)(P.E,{className:a}):c.includes("default")?(0,s.jsx)(R.E,{className:a}):c.includes("diagram")?(0,s.jsx)(X.j,{className:a}):c.includes("general")?(0,s.jsx)(Z.K,{className:a}):c.includes("online")?(0,s.jsx)(J.u,{className:a}):c.includes("text")?(0,s.jsx)(C.z,{className:a}):(0,s.jsx)(K.o,{className:a})}function cn(c){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"gray",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"w-6",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"h-6",e=ca[c],o=t.toLowerCase(),r=(0,n.oz)(o);return e?e(r,a,s):null}function ce(c){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"w-6 h-6 text-muted-foreground inline-flex mr-1";switch(c.split(".").pop()){case"org":return(0,s.jsx)($,{className:t});case"markdown":case"md":return(0,s.jsx)(Q,{className:t});case"pdf":return(0,s.jsx)(cc,{className:t});case"doc":return(0,s.jsx)(ct,{className:t});case"jpg":case"jpeg":case"png":case"webp":return(0,s.jsx)(P.E,{className:t,weight:"fill"});default:return(0,s.jsx)(U.$,{className:t,weight:"fill"})}}function co(){return Object.keys(ca)}}}]);
|
@@ -1 +0,0 @@
|
|
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(55538),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)([]),[u,h]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),[p,x]=(0,i.useState)(!1),_=(0,i.useRef)(null),w=e.setQueryToProcess,y=e.onConversationIdChange,I=e.isMobileWidth?"w-full":"w-4/6";if((0,i.useEffect)(()=>{if(r.length>0){let t=r.map(e=>encodeURIComponent(e));e.setImages(t)}},[r,e.setImages]),(0,i.useEffect)(()=>{let t=localStorage.getItem("images");if(t){let s=JSON.parse(t);d(s);let a=s.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let s=localStorage.getItem("message");s&&(h(!0),w(s),s.trim().startsWith("/research")&&x(!0))},[w,e.setImages]),(0,i.useEffect)(()=>{s&&(h(!0),w(s))},[s,w]),(0,i.useEffect)(()=>{t&&(null==y||y(t))},[t,y]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(h(!1),d([])):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,setIncomingMessages:e.setStreamedMessages,customClassName:I})}),(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 ").concat(I," mr-auto ml-auto"),children:(0,a.jsx)(m.a,{agentColor:null==g?void 0:g.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>o(e),sendImage:e=>d(t=>[...t,e]),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:t,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:_,isResearchModeEnabled:p})})]})}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),[_,w]=(0,i.useState)([]),[y,I]=(0,i.useState)(""),[S,b]=(0,i.useState)(!1),[v,j]=(0,i.useState)([]),[B,C]=(0,i.useState)([]),M=(0,h.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},E=(0,g.GW)(),T=(0,h.IC)();async function k(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={},r={};for(;;){let e;let{done:c,value:l}=await t.read();if(c){I(""),b(!1),C([]);break}for(o+=s.decode(l,{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,codeContext:r}=(0,u.VK)(t,e,n,i,r)),w([..._])}}}}async function R(){if(localStorage.removeItem("message"),!y||!p)return;let e={q:y,conversation_id:p,stream:!0,...M&&{city:M.city,region:M.region,country:M.country,country_code:M.countryCode,timezone:M.timezone},...B.length>0&&{images:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await k(t)}catch(o){let e=await t.json();console.error(e);let s=_.find(e=>!e.completed);if(!s)return;let a=o.message;a.includes("Error in input stream")?s.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?":429===t.status?"detail"in e?s.rawResponse="".concat(e.detail):s.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":s.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),s.completed=!0,w([..._]),I(""),b(!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(y){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:y||"",images:B};w(t=>[...t,e]),b(!0)}},[y]),(0,i.useEffect)(()=>{S&&R()},[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:v,isMobileWidth:T})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!T&&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!==E,streamedMessages:_,setStreamedMessages:w,chatOptionsData:t,setTitle:m,setQueryToProcess:I,setUploadedFiles:j,isMobileWidth:T,onConversationIdChange:e=>{x(e)},setImages:C})})]})})]})}},16463:function(e,t,s){"use strict";var a=s(71169);s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),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,9848,4836,3954,9001,3062,8840,3803,2261,9434,1603,9417,8423,5538,2971,7023,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,95982))},95982:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ed}});var a,n,r=s(57437),i=s(55268),l=s.n(i);s(80541);var o=s(2265),c=s(35657),d=s(79306),h=s(69591),u=s(19748),m=s(50495),x=s(66431),p=s(32309),f=s(37440);let j=o.forwardRef((e,t)=>{let{className:s,containerClassName:a,...n}=e;return(0,r.jsx)(x.uZ,{ref:t,containerClassName:(0,f.cn)("flex items-center gap-2 has-[:disabled]:opacity-50",a),className:(0,f.cn)("disabled:cursor-not-allowed",s),...n})});j.displayName="InputOTP";let g=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{ref:t,className:(0,f.cn)("flex items-center",s),...a})});g.displayName="InputOTPGroup";let b=o.forwardRef((e,t)=>{let{index:s,className:a,...n}=e,{char:i,hasFakeCaret:l,isActive:c}=o.useContext(x.VM).slots[s];return(0,r.jsxs)("div",{ref:t,className:(0,f.cn)("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",c&&"z-10 ring-2 ring-ring ring-offset-background",a),...n,children:[i,l&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});b.displayName="InputOTPSlot",o.forwardRef((e,t)=>{let{...s}=e;return(0,r.jsx)("div",{ref:t,role:"separator",...s,children:(0,r.jsx)(p.Z,{})})}).displayName="InputOTPSeparator";var y=s(83102),N=s(36013),w=s(46910);let v=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("div",{className:"relative w-full overflow-auto",children:(0,r.jsx)("table",{ref:t,className:(0,f.cn)("w-full caption-bottom text-sm",s),...a})})});v.displayName="Table",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,f.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let _=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,f.cn)("[&_tr:last-child]:border-0",s),...a})});_.displayName="TableBody",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,f.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let k=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,f.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});k.displayName="TableRow",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,f.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let S=o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,f.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});S.displayName="TableCell",o.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,f.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var C=s(42491),T=s(9950),D=s(35418),E=s(15340),F=s(84120),P=s(55362),O=s(48252),I=s(60787),A=s(26058),z=s(95616),R=s(11961),Y=s(76782),Z=s(98325),K=s(96917),M=s(10813),W=s(56194),U=s(9476),L=s(43010),B=s(72151),V=s(53876),G=s(90445),H=s(63205),J=s(49806),$=s(67722),q=s(57087),X=s(27082),Q=s(26100),ee=s(48861),et=s(58485),es=s(47947),ea=s(9557),en=s(6780),er=s(70571),ei=s(87138);let el=e=>{let{onClose:t}=e,[s,a]=(0,o.useState)([]),[n,i]=(0,o.useState)([]),[l,c]=(0,o.useState)(""),[d,h]=(0,o.useState)(!1),[u,x]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[j,g]=(0,o.useState)(!1),[b,y]=(0,o.useState)(0),[N,w]=(0,o.useState)([]),v=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(j||y(0),j){let e=setInterval(()=>{y(e=>{let t=e+(Math.floor(5*Math.random())+1);return t<100?t:100})},800);return()=>clearInterval(e)}},[j]),(0,o.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/content/computer");if(!e.ok)throw Error("Failed to fetch files");let t=await e.json();Array.isArray(t)?a(t.toSorted()):console.error("Unexpected data format from API")}catch(e){console.error("Error fetching files:",e)}})()},[N]);let _=s.filter(e=>e.toLowerCase().includes(l.toLowerCase())),k=async()=>{let e=n.length>0?n:_;if(console.log("Delete selected files",e),0===e.length){console.log("No files to delete");return}try{if(!(await fetch("/api/content/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:e})})).ok)throw Error("Failed to delete files");a(t=>t.filter(t=>!e.includes(t))),i([]),console.log("Deleted files:",e)}catch(e){console.error("Error deleting files:",e)}},S=async e=>{console.log("Delete selected file",e);try{if(!(await fetch("/api/content/file?filename=".concat(encodeURIComponent(e)),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to delete file");a(t=>t.filter(t=>t!==e)),i(t=>t.filter(t=>t!==e)),console.log("Deleted file:",e)}catch(e){console.error("Error deleting file:",e)}};function O(e){(0,ea.ko)(e,x,g,f,w)}return(0,r.jsxs)(C.m5,{open:!0,onOpenChange:t,children:[(0,r.jsx)(en.aR,{open:null!==u||null!=p,children:(0,r.jsxs)(en._T,{children:[(0,r.jsx)(en.fY,{children:(0,r.jsx)(en.f$,{children:"Alert"})}),(0,r.jsx)(en.yT,{children:u||p}),(0,r.jsx)(en.OL,{className:"bg-slate-400 hover:bg-slate-500",onClick:()=>{x(null),f(null),g(!1)},children:"Close"})]})}),(0,r.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),h(!0)},onDragLeave:function(e){e.preventDefault(),h(!1)},onDrop:function(e){e.preventDefault(),h(!1),e.dataTransfer.files&&O(e.dataTransfer.files)},onClick:function(){v&&v.current&&v.current.click()},children:[(0,r.jsx)("input",{type:"file",multiple:!0,ref:v,style:{display:"none"},onChange:function(e){e.target.files&&O(e.target.files)}}),(0,r.jsxs)("div",{className:"flex-none p-4",children:["Upload files",j&&(0,r.jsx)(er.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:b})]}),(0,r.jsx)("div",{className:"flex-none p-4 bg-secondary border-b ".concat(d?"animate-pulse":""," rounded-lg"),children:(0,r.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:d?(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(T.u,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drop files to upload"})]}):(0,r.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,r.jsx)(D.v,{className:"h-6 w-6 mr-2"}),(0,r.jsx)("span",{children:"Drag and drop files here"})]})})})]}),(0,r.jsxs)("div",{className:"flex flex-col h-full",children:[(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-b",children:(0,r.jsx)(C.sZ,{placeholder:"Find synced files",value:l,onValueChange:c})}),(0,r.jsx)("div",{className:"flex-grow overflow-auto",children:(0,r.jsxs)(C.e8,{children:[(0,r.jsx)(C.rb,{children:0===s.length?(0,r.jsxs)("div",{className:"flex items-center justify-center",children:[(0,r.jsx)(E.C,{className:"h-4 w-4 mr-2",weight:"bold"}),"No files synced"]}):(0,r.jsxs)("div",{children:["Could not find a good match.",(0,r.jsx)(ei.default,{href:"/search",className:"block",children:"Need advanced search? Click here."})]})}),(0,r.jsx)(C.fu,{heading:"Synced files",children:_.map(e=>(0,r.jsx)(C.di,{value:e,onSelect:e=>{i(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},children:(0,r.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,r.jsxs)("div",{className:"flex items-center ".concat(n.includes(e)?"font-semibold":""),children:[n.includes(e)&&(0,r.jsx)(F.J,{className:"h-4 w-4 mr-2"}),(0,r.jsx)("span",{className:"break-all",children:e})]}),(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>S(e),className:"ml-auto",children:(0,r.jsx)(P.r,{className:"h-4 w-4"})})]})},e))})]})}),(0,r.jsx)("div",{className:"flex-none p-4 bg-background border-t",children:(0,r.jsx)("div",{className:"flex justify-between",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:k,className:"mr-2",children:[(0,r.jsx)(P.r,{className:"h-4 w-4 mr-2"}),n.length>0?"Delete Selected (".concat(n.length,")"):"Delete All"]})})})]})]})},eo=e=>{var t,s;let{items:a,selected:n,callbackFunc:i}=e,[l,c]=(0,o.useState)(null!==(s=null==n?void 0:n.toString())&&void 0!==s?s:"0");return!!n&&(0,r.jsx)("div",{className:"overflow-hidden shadow-md rounded-lg",children:(0,r.jsxs)(w.h_,{children:[(0,r.jsx)(w.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(m.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===l))||void 0===t?void 0:t.name," ",(0,r.jsx)(O.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(w.AW,{children:(0,r.jsx)(w._x,{value:l,onValueChange:async e=>{c(e),await i(e)},children:a.map(e=>(0,r.jsx)(w.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},ec=()=>{let[e,t]=(0,o.useState)([]),{toast:s}=(0,c.pm)(),a=async()=>{try{let e=await fetch("/auth/token",{method:"POST",headers:{"Content-Type":"application/json"}}),s=await e.json();t(e=>[...e,s])}catch(e){console.error("Error generating API key:",e)}},n=async e=>{try{await navigator.clipboard.writeText(e),s({title:"\uD83D\uDD11 API Key",description:"Copied to clipboard"})}catch(e){console.error("Error copying API key:",e)}},r=async e=>{try{(await fetch("/auth/token?token=".concat(e),{method:"DELETE"})).ok&&t(t=>t.filter(t=>t.token!==e))}catch(e){console.error("Error deleting API key:",e)}},i=async()=>{try{let e=await fetch("/auth/token"),s=await e.json();(null==s?void 0:s.length)>0&&t(s)}catch(e){console.error("Error listing API keys:",e)}};return(0,o.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function ed(){let[e,t]=(0,o.useState)("Settings"),{apiKeys:s,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:i}=ec(),{userConfig:x}=(0,d.h2)(!0),[p,f]=(0,o.useState)(null),[w,C]=(0,o.useState)(void 0),[F,O]=(0,o.useState)(null),[ea,en]=(0,o.useState)(void 0),[er,ei]=(0,o.useState)(""),[ed,eh]=(0,o.useState)("verified"),[eu,em]=(0,o.useState)(!1),{toast:ex}=(0,c.pm)(),ep=(0,h.IC)(),ef="w-full lg:w-1/3 grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950 border border-opacity-50";(0,o.useEffect)(()=>{var e;f(x),en(null==x?void 0:x.phone_number),eh((null==x?void 0:x.is_phone_number_verified)?"verified":(null==x?void 0:x.phone_number)?"otp":"setup"),C(null==x?void 0:x.given_name),O(null!==(e=null==x?void 0:x.notion_token)&&void 0!==e?e:null)},[x]);let ej=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(ea),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");eh("verify")}catch(e){console.error("Error sending OTP:",e),ex({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},eg=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(er),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");eh("verified"),ex({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),ex({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},eb=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");en(void 0),eh("setup"),ex({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),ex({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},ey=async e=>{try{let t="/api/subscription?email=".concat(null==p?void 0:p.username,"&operation=").concat(e);if(!(await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");p&&(p.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,f(p)),ex({title:"\uD83D\uDCB3 Subscription",description:(null==p?void 0:p.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),ex({title:"\uD83D\uDCB3 Subscription",description:"cancel"===e?"Failed to cancel subscription. Try again or contact us at team@khoj.dev":"Failed to renew subscription. Try again or contact us at team@khoj.dev"})}},eN=async()=>{try{let e=await fetch("/api/subscription/trial",{method:"POST"});if(!e.ok)throw Error("Failed to enable free trial");if((await e.json()).trial_enabled&&p){p.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*p.length_of_free_trial);p.subscription_renewal_date=(e=>{let t=new Date(e);return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(t)})(e),p.subscription_enabled_trial_at=new Date().toISOString(),f(p),ex({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(p.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),ex({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},ew=async()=>{if(w)try{if(!(await fetch("/api/user/name?name=".concat(w),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");p&&(p.given_name=w,f(p)),ex({title:"✅ Updated Profile",description:"You name has been updated to ".concat(w)})}catch(e){console.error("Error updating name:",e),ex({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},ev=e=>async t=>{if(!(null==p?void 0:p.is_active)){ex({title:"Model Update",description:"You need to be subscribed to update ".concat(e," models"),variant:"destructive"});return}try{if(!(await fetch("/api/model/".concat(e,"?id=")+t,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");ex({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(t){console.error("Failed to update ".concat(e," model:"),t),ex({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},e_=async()=>{if(F)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:F})})).ok)throw Error("Failed to save Notion API key");p&&(p.notion_token=F,f(p)),ex({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),ex({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ek=async e=>{try{if(!(await fetch("/api/content?t=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to sync content from ".concat(e));ex({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),ex({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eS=async e=>{try{if(!(await fetch("/api/content/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));p&&("computer"===e?p.enabled_content_source.computer=!1:"notion"===e?(p.enabled_content_source.notion=!1,p.notion_token=null,O(p.notion_token)):"github"===e&&(p.enabled_content_source.github=!1),f(p)),"computer"===e?ex({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):ex({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),ex({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return p?(0,r.jsxs)("div",{className:l().page,children:[(0,r.jsx)("title",{children:e}),(0,r.jsx)("div",{className:l().sidePanel,children:(0,r.jsx)(ee.ZP,{conversationId:null,uploadedFiles:[],isMobileWidth:ep})}),(0,r.jsx)("div",{className:l().content,children:(0,r.jsx)("div",{className:"".concat(l().contentBody," mx-10 my-2"),children:(0,r.jsx)(o.Suspense,{fallback:(0,r.jsx)(et.Z,{}),children:(0,r.jsxs)("div",{id:"content",className:"grid grid-flow-column sm:grid-flow-row gap-16 m-8",children:[(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Profile"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(I.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden",children:[(0,r.jsx)("p",{className:"pb-4 text-gray-400",children:"What should Khoj refer to you as?"}),(0,r.jsx)(y.I,{type:"text",onChange:e=>C(e.target.value),value:w,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:ew,disabled:w===p.given_name,children:[(0,r.jsx)(A.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(N.Zb,{id:"subscription",className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(z.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(N.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist (Trial)"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["You are on a"," ",p.length_of_free_trial," day trial of the Khoj Futurist plan. Your trial ends on ",p.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl text-primary/80",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"renews"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"unsubscribed"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Futurist"}),(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"ends"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})]})||"expired"===p.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),p.subscription_renewal_date&&(0,r.jsxs)("p",{className:"text-gray-400",children:["Subscription ",(0,r.jsx)("b",{children:"expired"})," on"," ",(0,r.jsx)("b",{children:p.subscription_renewal_date})]})||(0,r.jsxs)("p",{className:"text-gray-400",children:["Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>ey("cancel"),children:[(0,r.jsx)(R.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==p.subscription_state&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>ey("resubscribe"),children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||p.subscription_enabled_trial_at&&(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(p.khoj_cloud_subscription_url,"?prefilled_email=").concat(p.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(m.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:eN,children:[(0,r.jsx)(Y.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),eu&&(0,r.jsx)(el,{onClose:()=>em(!1)}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Content"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[(0,r.jsxs)(N.Zb,{id:"computer",className:ef,children:[(0,r.jsxs)(N.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(Z.I,{className:"h-8 w-8 mr-2"}),"Files",p.enabled_content_source.computer&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(N.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage your synced files"}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",onClick:()=>em(!0),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.computer||"hidden"),onClick:()=>eS("computer"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(N.Zb,{id:"github",className:"".concat(ef," hidden"),children:[(0,r.jsxs)(N.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(U.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(N.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(m.z,{variant:"outline",size:"sm",children:p.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(M.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(N.Zb,{id:"notion",className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(B.F,{className:"h-7 w-7 mr-2"}),"Notion",p.enabled_content_source.notion&&(0,r.jsx)(K.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(N.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!p.notion_oauth_url&&(0,r.jsx)(y.I,{onChange:e=>O(e.target.value),value:F||"",placeholder:"Enter API Key of your Khoj integration on Notion",className:"w-full border border-gray-300 rounded-lg px-4 py-6"})]}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:[p.notion_oauth_url&&!p.enabled_content_source.notion?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>{window.open(p.notion_oauth_url)},children:[(0,r.jsx)(L.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):p.enabled_content_source.notion&&F===p.notion_token?(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:()=>ek("notion"),children:[(0,r.jsx)(V.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):p.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(m.z,{variant:"outline",size:"sm",onClick:e_,disabled:F===p.notion_token,children:[(0,r.jsx)(A.B,{className:"h-5 w-5 inline mr-1"}),p.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(m.z,{variant:"outline",size:"sm",className:"".concat(p.notion_token||"hidden"),onClick:()=>eS("notion"),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 inline mr-1"}),"Disconnect"]})]})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{className:"text-2xl",children:"Models"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-16",children:[p.chat_model_options.length>0&&(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(G.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the chat model to generate text responses"}),(0,r.jsx)(eo,{items:p.chat_model_options,selected:p.selected_chat_model_config,callbackFunc:ev("chat")})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.paint_model_options.length>0&&(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the paint model to generate image responses"}),(0,r.jsx)(eo,{items:p.paint_model_options,selected:p.selected_paint_model_config,callbackFunc:ev("paint")})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),p.voice_model_options.length>0&&(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(T.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden pb-12 grid gap-8 h-fit",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Pick the voice model to generate speech responses"}),(0,r.jsx)(eo,{items:p.voice_model_options,selected:p.selected_voice_model_config,callbackFunc:ev("voice")})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4",children:!p.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]})]})]}),(0,r.jsxs)("div",{className:"section grid gap-8",children:[(0,r.jsx)("div",{id:"clients",className:"text-2xl",children:"Clients"}),(0,r.jsxs)("div",{className:"cards flex flex-wrap gap-8",children:[!p.anonymous_mode&&(0,r.jsxs)(N.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg bg-gradient-to-b from-background to-gray-50 dark:to-gray-950",children:[(0,r.jsxs)(N.Ol,{className:"text-xl grid grid-flow-col grid-cols-[1fr_auto] pb-0",children:[(0,r.jsxs)("span",{className:"flex flex-wrap",children:[(0,r.jsx)(J.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(m.z,{variant:"secondary",className:"!mt-0",onClick:a,children:[(0,r.jsx)(D.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(N.aY,{className:"overflow-hidden grid gap-6",children:[(0,r.jsxs)("p",{className:"text-md text-gray-400",children:["Access Khoj from the"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Desktop",target:"_blank",children:"Desktop"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Obsidian",children:"Obsidian"}),","," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/Emacs",children:"Emacs"})," ","apps and more."]}),(0,r.jsx)(v,{children:(0,r.jsx)(_,{children:s.map(e=>(0,r.jsxs)(k,{children:[(0,r.jsx)(S,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(S,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{children:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[(0,r.jsx)($.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{ex({title:"\uD83D\uDD11 Copied API Key: ".concat(e.name),description:"Set this API key in the Khoj apps you want to connect to this Khoj account"}),n(e.token)}}),(0,r.jsx)(P.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{ex({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),i(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(N.eW,{className:"flex flex-wrap gap-4"})]}),(0,r.jsxs)(N.Zb,{className:ef,children:[(0,r.jsxs)(N.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(q.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===ed&&(0,r.jsx)(K.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==ed&&(0,r.jsx)(E.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(N.aY,{className:"grid gap-4",children:[(0,r.jsxs)("p",{className:"text-gray-400",children:["Connect your number to chat with Khoj on WhatsApp. Learn more about the integration"," ",(0,r.jsx)("a",{href:"https://docs.khoj.dev/clients/whatsapp",children:"here"}),"."]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(es.Z,{initialValue:ea||"",onChangeNumber:en,disabled:"verify"===ed,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(l().phoneInput)}}),"verify"===ed&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(ea)}),(0,r.jsx)(j,{autoFocus:!0,maxLength:6,value:er||"",onChange:ei,onComplete:()=>eh("verify"),children:(0,r.jsxs)(g,{children:[(0,r.jsx)(b,{index:0}),(0,r.jsx)(b,{index:1}),(0,r.jsx)(b,{index:2}),(0,r.jsx)(b,{index:3}),(0,r.jsx)(b,{index:4}),(0,r.jsx)(b,{index:5})]})})]})]})]}),(0,r.jsxs)(N.eW,{className:"flex flex-wrap gap-4",children:["verify"===ed&&(0,r.jsx)(m.z,{variant:"outline",onClick:eg,children:"Verify"})||(0,r.jsx)(m.z,{variant:"outline",disabled:!ea||ea===p.phone_number&&"verified"===ed||!(0,u.y)(ea),onClick:ej,children:p.phone_number?ea&&(ea!==p.phone_number||"verified"!==ed)&&(0,u.y)(ea)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(Q.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(X.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===ed&&(0,r.jsxs)(m.z,{variant:"outline",onClick:()=>eb(),children:[(0,r.jsx)(W.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]}):(0,r.jsx)(et.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},70571:function(e,t,s){"use strict";s.d(t,{E:function(){return l}});var a=s(57437),n=s(2265),r=s(52431),i=s(37440);let l=n.forwardRef((e,t)=>{let{className:s,value:n,indicatorColor:l,...o}=e;return(0,a.jsx)(r.fC,{ref:t,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",s),...o,children:(0,a.jsx)(r.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(l),style:{transform:"translateX(-".concat(100-(n||0),"%)")}})})});l.displayName=r.fC.displayName},35657:function(e,t,s){"use strict";s.d(t,{pm:function(){return u}});var a=s(2265);let n=0,r=new Map,i=e=>{if(r.has(e))return;let t=setTimeout(()=>{r.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);r.set(e,t)},l=(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:s}=t;return s?i(s):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===s||void 0===s?{...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)}}},o=[],c={toasts:[]};function d(e){c=l(c,e),o.forEach(e=>{e(c)})}function h(e){let{...t}=e,s=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),a=()=>d({type:"DISMISS_TOAST",toastId:s});return d({type:"ADD_TOAST",toast:{...t,id:s,open:!0,onOpenChange:e=>{e||a()}}}),{id:s,dismiss:a,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:s}})}}function u(){let[e,t]=a.useState(c);return a.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},55268:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN",sidePanel:"settings_sidePanel__osdez"}}},function(e){e.O(0,[4229,9848,9001,3062,7883,1603,2971,7023,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3111],{91955:function(e,t,s){Promise.resolve().then(s.bind(s,5506))},5506:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return p}});var a=s(57437),o=s(11930),n=s.n(o),i=s(2265),r=s(48861),l=s(55538),c=s(58485);s(7395);var d=s(69591),h=s(79306),u=s(38423),g=s(9557);function m(e){let[t,s]=(0,i.useState)(""),[o,r]=(0,i.useState)([]),[c,d]=(0,i.useState)(!1),[h,g]=(0,i.useState)(null),m=(0,i.useRef)(null),p=e.setQueryToProcess,f=e.streamedMessages,x=e.isMobileWidth?"w-full":"w-4/6";return((0,i.useEffect)(()=>{if(o.length>0){let t=o.map(e=>encodeURIComponent(e));e.setImages(t)}},[o,e.setImages]),(0,i.useEffect)(()=>{let t=localStorage.getItem("images");if(t){let s=JSON.parse(t);r(s);let a=s.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let s=localStorage.getItem("message");s&&(d(!0),p(s))},[p,e.setImages]),(0,i.useEffect)(()=>{t&&(d(!0),p(t))},[t,p]),(0,i.useEffect)(()=>{f&&f.length>0&&f[f.length-1].completed?d(!1):s("")},[f]),e.publicConversationSlug||e.conversationId)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:n().chatBodyFull,children:(0,a.jsx)(l.Z,{publicConversationSlug:e.publicConversationSlug,conversationId:e.conversationId||"",setAgent:g,setTitle:e.setTitle,pendingMessage:c?t:"",incomingMessages:e.streamedMessages,customClassName:x})}),(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 ").concat(x," mr-auto ml-auto"),children:(0,a.jsx)(u.a,{isLoggedIn:e.isLoggedIn,sendMessage:e=>s(e),sendImage:e=>r(t=>[...t,e]),sendDisabled:c,chatOptionsData:e.chatOptionsData,conversationId:e.conversationId,agentColor:null==h?void 0:h.color,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:m})})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}function p(){let[e,t]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[l,u]=(0,i.useState)("Khoj AI - Chat"),[p,f]=(0,i.useState)(void 0),[x,_]=(0,i.useState)([]),[v,y]=(0,i.useState)(""),[C,S]=(0,i.useState)(!1),[b,I]=(0,i.useState)([]),[j,w]=(0,i.useState)(void 0),[B,N]=(0,i.useState)([]),O=(0,d.k6)()||{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},k=(0,h.GW)(),T=(0,d.IC)();async function E(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="";for(;;){let e;let{done:n,value:i}=await t.read();if(n){y(""),S(!1),N([]);break}for(o+=s.decode(i,{stream:!0});-1!==(e=o.indexOf(a));){let t=o.slice(0,e);if(o=o.slice(e+a.length),t){let e=x.find(e=>!e.completed);if(!e){console.error("No current message found");return}(0,g.VK)(t,e),_([...x])}}}}async function D(){if(!v||!p)return;let e={q:v,conversation_id:p,stream:!0,...O&&{region:O.region,country:O.country,city:O.city,country_code:O.countryCode,timezone:O.timezone},...B.length>0&&{image:B}},t=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});try{await E(t)}catch(e){console.error(e)}}return((0,i.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,d.EK)(),w(window.location.pathname.split("/").pop()||"")},[]),(0,i.useEffect)(()=>{if(v&&!p){fetch("/api/chat/share/fork?public_conversation_slug=".concat(j),{method:"POST",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{f(e.conversation_id)}).catch(e=>{console.error(e)});return}if(v){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:v||"",images:B};_(t=>[...t,e]),S(!0)}},[v,p,j]),(0,i.useEffect)(()=>{C&&D()},[C]),s)?(0,a.jsx)(c.Z,{}):j?(0,a.jsxs)("div",{className:"".concat(n().main," ").concat(n().chatLayout),children:[(0,a.jsx)("title",{children:l}),(0,a.jsx)("div",{className:n().sidePanel,children:(0,a.jsx)(r.ZP,{conversationId:null!=p?p:null,uploadedFiles:b,isMobileWidth:T})}),(0,a.jsx)("div",{className:n().chatBox,children:(0,a.jsxs)("div",{className:n().chatBoxBody,children:[!T&&l&&(0,a.jsx)("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)(i.Suspense,{fallback:(0,a.jsx)(c.Z,{}),children:(0,a.jsx)(m,{conversationId:p,streamedMessages:x,setQueryToProcess:y,isLoggedIn:null!==k,publicConversationSlug:j,chatOptionsData:e,setTitle:u,setUploadedFiles:I,isMobileWidth:T,setImages:N})})]})})]}):(0,a.jsx)("div",{className:n().suggestions,children:"Whoops, nothing to see here!"})}},11930:function(e){e.exports={main:"sharedChat_main__7Nayy",suggestions:"sharedChat_suggestions__V8kr_",inputBox:"sharedChat_inputBox__wRW5A",chatBodyFull:"sharedChat_chatBodyFull__O1MOv",chatBody:"sharedChat_chatBody__OnHDL",chatLayout:"sharedChat_chatLayout__gutlc",chatBox:"sharedChat_chatBox__PmAPg",titleBar:"sharedChat_titleBar__vOHp_",chatBoxBody:"sharedChat_chatBoxBody__ef2Nl",agentIndicator:"sharedChat_agentIndicator__ORCl4"}}},function(e){e.O(0,[7849,9848,4836,3954,9001,3062,8840,3803,2261,9434,1603,9417,8423,5538,2971,7023,1744],function(){return e(e.s=91955)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
div.automations_automationsLayout__Atoh_{display:grid;grid-template-columns:1fr 1fr;gap:1rem}div.automations_automationCard__BKidA{display:grid;grid-template-rows:auto 1fr auto}div.automations_pageLayout__OaoYA{max-width:60vw;margin:auto auto 2rem}div.automations_sidePanel__MPciO{position:fixed;height:100%;z-index:1}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}div.automations_sidePanel__MPciO{position:relative;height:100%}}
|
@@ -1 +0,0 @@
|
|
1
|
-
div.agents_titleBar__FzYbY{padding:16px 0;text-align:left}.agents_agentPersonality__o0Ysz p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agents_agentPersonality__o0Ysz{text-align:left;grid-column:span 3;overflow:hidden}div.agents_pageLayout__gR3S3{max-width:60vw;margin:auto auto 2rem}div.agents_sidePanel__wGVGc{position:fixed;height:100%;z-index:1}button.agents_infoButton__NqI7E{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.agents_agentList__XVx4A{display:grid;gap:20px;padding-top:30px;margin-right:auto;grid-auto-flow:row;grid-template-columns:1fr 1fr;margin-left:auto}@media only screen and (max-width:768px){div.agents_agentList__XVx4A{width:100%;padding:0;margin-right:auto;margin-left:auto;grid-template-columns:1fr}div.agents_pageLayout__gR3S3{max-width:90vw}div.agents_sidePanel__wGVGc{position:relative;height:100%}}div.sidePanel_session__R9wgH{padding:.5rem;margin-bottom:.25rem;border-radius:.5rem;cursor:pointer;max-width:14rem;font-size:medium;display:grid;grid-template-columns:minmax(auto,400px) 1fr;gap:0}div.sidePanel_compressed__YBPtM{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__iwfo8,div.sidePanel_session__R9wgH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__R9wgH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__R9wgH a{text-decoration:none}button.sidePanel_button__ihOfG{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__dt9Zw{border-radius:.5rem;padding:8px}div.sidePanel_panel__VZ8ye{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__ZjTHo{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__OjVmG{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__R9wgH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}div.sidePanel_header__d5cGA{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__x0w58{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__k_lal{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList__nKe2n{position:fixed;top:0;left:0;width:100%;height:100%;background-color:hsla(var(--frosted-background-color));z-index:1;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}div.sidePanel_modalSessionsList__nKe2n div.sidePanel_content__Wq20_{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList__nKe2n div.sidePanel_session__R9wgH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__VZ8ye{padding:.25rem;width:100%}div.sidePanel_expanded__ZjTHo{z-index:1}div.sidePanel_singleReference__r9z1n{padding:4px}div.sidePanel_panelWrapper__k_lal{width:100%;padding:0 1rem}div.sidePanel_session__R9wgH.sidePanel_compressed__YBPtM{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__R9wgH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}menu.navMenu_menu__fqlFF a{text-decoration:none;font-size:medium;font-weight:400;padding:0 4px;border-radius:4px;display:flex;justify-self:center;margin:0;align-items:center;gap:4px}a.navMenu_selected__A__aP{background-color:hsl(var(--accent))}div.navMenu_titleBar__HJoio{display:flex;justify-content:space-between;align-content:space-evenly;align-items:start}div.navMenu_titleBar__HJoio menu{padding:0;margin:0;border-radius:.5rem;display:grid;grid-auto-flow:column;gap:32px}div.navMenu_settingsMenuProfile__3npiK img{border-radius:50%;width:32px;height:32px;margin:0}div.navMenu_settingsMenu__X2i2U{padding:0 4px;border-radius:4px;display:flex;justify-self:center;margin:0;align-items:center}div.navMenu_settingsMenuOptions__KWnLv{display:block;grid-auto-flow:row;position:absolute;background-color:var(--background-color);box-shadow:0 8px 16px 0 rgba(0,0,0,.2);top:64px;text-align:left;padding:8px;border-radius:8px}@media screen and (max-width:600px){menu.navMenu_menu__fqlFF span{display:none}div.navMenu_settingsMenuOptions__KWnLv{right:4px}div.navMenu_titleBar__HJoio{padding:8px}}div.chatHistory_chatHistory__CoaVT{display:flex;flex-direction:column;height:100%;margin:auto}div.chatHistory_agentIndicator__wOU1f a{display:flex;text-align:center;align-content:center;align-items:center}div.chatHistory_trainOfThought__mMWSR{border:1px solid var(--border-color);border-radius:16px;padding:8px 16px;margin:12px}div.chatMessage_chatMessageContainer__sAivf{display:flex;flex-direction:column;margin:12px;border-radius:16px;padding:8px 16px 0;word-break:break-word}div.chatMessage_chatMessageWrapper__u5m8A{padding-left:1rem;padding-bottom:1rem;max-width:80vw}div.chatMessage_chatMessageWrapper__u5m8A ol,div.chatMessage_chatMessageWrapper__u5m8A p:not(:last-child),div.chatMessage_chatMessageWrapper__u5m8A ul{margin-bottom:16px}div.chatMessage_chatMessageWrapper__u5m8A a span{display:revert!important}div.chatMessage_khojfullHistory__NPu2l{border-width:1px;padding-left:4px}div.chatMessage_youfullHistory__ioyfH{max-width:100%}div.chatMessage_chatMessageContainer__sAivf.chatMessage_youfullHistory__ioyfH{padding-left:0}div.chatMessage_you__6GUC4{background-color:hsla(var(--secondary));align-self:flex-end;border-radius:16px}div.chatMessage_khoj__cjWON{background-color:transparent;color:hsl(var(--accent-foreground));align-self:flex-start}div.chatMessage_khojChatMessage__BabQz{padding-top:8px;padding-left:16px}div.chatMessage_emptyChatMessage__J9JRn{display:none}div.chatMessage_imagesContainer__HTRjT{display:flex;overflow-x:auto;padding-bottom:8px;margin-bottom:8px}div.chatMessage_imageWrapper__DF92M{flex:0 0 auto;margin-right:8px}div.chatMessage_imageWrapper__DF92M img{width:auto;height:128px;-o-object-fit:cover;object-fit:cover;border-radius:8px}div.chatMessage_chatMessageContainer__sAivf>img{width:auto;height:auto;max-width:100%;max-height:80vh;-o-object-fit:contain;object-fit:contain;display:block;margin-top:.25rem;margin-right:auto}div.chatMessage_chatMessageContainer__sAivf h3 img{width:24px}div.chatMessage_you__6GUC4{color:hsla(var(--secondary-foreground))}div.chatMessage_author__muRtC{font-size:.75rem;color:grey;text-align:right}div.chatMessage_chatFooter__0vR8s{display:flex;justify-content:space-between;min-height:28px}div.chatMessage_chatButtons__Lbk8T{display:flex;justify-content:flex-end;width:-moz-min-content;width:min-content;border:1px solid var(--border-color);border-radius:16px;position:relative;bottom:-12px;background-color:hsla(var(--secondary))}div.chatMessage_chatFooter__0vR8s button{cursor:pointer;color:hsl(var(--muted-foreground));border:none;border-radius:16px;padding:4px;margin-left:4px;margin-right:4px}div.chatMessage_chatFooter__0vR8s button:hover{background-color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv{cursor:pointer;float:right;border-radius:8px}button.chatMessage_codeCopyButton__Y_Ujv:hover{color:hsla(var(--frosted-background-color))}button.chatMessage_codeCopyButton__Y_Ujv img,button.chatMessage_copyButton__jd7q7 img,div.chatMessage_feedbackButtons___Brdy img{width:24px}div.chatMessage_trainOfThought__mR2Gg strong{font-weight:500}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb strong{font-weight:500;color:hsla(var(--secondary-foreground))}div.chatMessage_trainOfThought__mR2Gg.chatMessage_primary__WYPEb p{color:inherit}div.chatMessage_trainOfThoughtElement__le_bC{display:grid;grid-template-columns:auto 1fr;align-items:start}div.chatMessage_trainOfThoughtElement__le_bC ol,div.chatMessage_trainOfThoughtElement__le_bC ul{margin:auto;word-break:break-word}@media screen and (max-width:768px){div.chatMessage_youfullHistory__ioyfH{max-width:90%}}div.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}.agentCard_agentPersonality__MmRlN p{white-space:inherit;overflow:hidden;height:77px;line-height:1.5}div.agentCard_agentPersonality__MmRlN{text-align:left;grid-column:span 3;overflow:hidden}button.agentCard_infoButton__heh_w{border:none;background-color:transparent!important;text-align:left;font-family:inherit;font-size:medium}div.search_searchLayout__fP3m0{display:grid;grid-template-columns:1fr;gap:1rem;height:100vh}div.search_sidePanel__myfc9{position:fixed;height:100%;z-index:1}@media screen and (max-width:768px){div.search_searchLayout__fP3m0{gap:0}div.search_sidePanel__myfc9{position:relative;height:100%}}
|