khoj 1.36.2.dev2__py3-none-any.whl → 1.36.3.dev1__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/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/{2327-58b7a2181a0d9284.js → 2327-a7981502e8a28da5.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{8155-87b4d2ea2cf725cc.js → 8155-ad130153ddcc930f.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-5c32dfc2ab1d37c3.js → page-febae7715efd8a45.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-c6dee506ac1ef75c.js → page-efc1228b60c92eac.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/page-780bbb248645b8c3.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/{page-18c5514c09249e15.js → page-24121c5745243676.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/{page-dfbf62acab34d1f1.js → page-64342dabb599f37c.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-2a68279b34a434e3.js → page-619a628d69d3d36b.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-8b91b8adb4f04450.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-978928ef05d44a48.js → page-4ac88dde66d91663.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-da7c59cd5a62e17f.js → webpack-f813971dd4615afd.js} +1 -1
- khoj/interface/compiled/_next/static/css/{f29ee25d068f459b.css → 4b47946ec47fcb07.css} +1 -1
- khoj/interface/compiled/_next/static/css/55d4a822f8d94b67.css +1 -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 +3 -3
- 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 +2 -2
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +3 -3
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +4 -4
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- {khoj-1.36.2.dev2.dist-info → khoj-1.36.3.dev1.dist-info}/METADATA +1 -1
- {khoj-1.36.2.dev2.dist-info → khoj-1.36.3.dev1.dist-info}/RECORD +41 -41
- khoj/interface/compiled/_next/static/chunks/app/chat/page-3b058ffbc47f21e7.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6d7831aace573049.js +0 -1
- khoj/interface/compiled/_next/static/css/f29752d6e1be7624.css +0 -1
- /khoj/interface/compiled/_next/static/{tls_aqiz21IHf5jhuZ-ay → 2YqC42xEnuvGKoOhcBgWD}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{tls_aqiz21IHf5jhuZ-ay → 2YqC42xEnuvGKoOhcBgWD}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/chunks/{1915-4b7980a58fb630d6.js → 1915-233ac8a122732d6b.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2117-f99825f0a867a42d.js → 2117-ce1f0a4598f5e4fe.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{3224-09c2844a0885a301.js → 3224-34b5078830a51f42.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{849-aa69550db1c243e4.js → 849-bf52aa2736c7f253.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-adbe6017a66cef10.js → 8667-8136f74e9a086fca.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9259-5be50737cfe989bc.js → 9259-fa40e7cf2ca28e04.js} +0 -0
- {khoj-1.36.2.dev2.dist-info → khoj-1.36.3.dev1.dist-info}/WHEEL +0 -0
- {khoj-1.36.2.dev2.dist-info → khoj-1.36.3.dev1.dist-info}/entry_points.txt +0 -0
- {khoj-1.36.2.dev2.dist-info → khoj-1.36.3.dev1.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,s,t){Promise.resolve().then(t.bind(t,42780))},42780:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return Y}});var a=t(57437),n=t(63136),i=t.n(n),l=t(2265),o=t(74986),r=t(99376),d=t(14308),c=t(59199);t(2446);var h=t(7436),u=t(5477),m=t(56937),x=t(55287),f=t(60729),p=t(34124),g=t(6512),j=t(37104),v=t(62869),b=t(632),N=t(36720),_=t(61563),y=t(36360),w=t(82123),S=t(76818),C=t(78299),O=t(38513),I=t(94508),k=t(23518),M=t(57054),E=t(16605);let T=E.fC,B=E.xz,z=l.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:i=4,...l}=e;return(0,a.jsx)(E.VY,{ref:s,align:n,sideOffset:i,className:(0,I.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...l})});z.displayName=E.VY.displayName;var L=t(54036);function F(e){var s;let{...t}=e,[n,i]=l.useState(!1),[o,r]=(0,l.useState)(void 0),[d,c]=(0,l.useState)(void 0),{data:u,error:x,isLoading:f}=(0,m.h2)(!0),[p,g]=(0,l.useState)([]),j=(0,h.IC)();return((0,l.useEffect)(()=>{f||(u?(g(u.chat_model_options),t.initialModel?c(u.chat_model_options.find(e=>e.name===t.initialModel)):c(u.chat_model_options.find(e=>e.id===u.selected_chat_model_config))):c(p[0]))},[u,t.initialModel,f]),(0,l.useEffect)(()=>{t.selectedModel&&d&&t.selectedModel!==d.name&&c(p.find(e=>e.name===t.selectedModel))},[t.selectedModel,p]),(0,l.useEffect)(()=>{if(d){let e=d.id!==(null==u?void 0:u.selected_chat_model_config);t.selectedModel!==d.name&&t.onSelect(d,e)}},[d]),f)?(0,a.jsx)(L.O,{className:"w-full h-10"}):x?(0,a.jsx)("div",{className:"text-sm text-error",children:x.message}):(0,a.jsx)("div",{className:"grid gap-2 w-[250px]",children:(0,a.jsxs)(M.J2,{open:n,onOpenChange:i,...t,children:[(0,a.jsx)(M.xo,{asChild:!0,children:(0,a.jsxs)(v.z,{variant:"outline",role:"combobox","aria-expanded":n,"aria-label":"Select a model",className:"w-full justify-between text-left",disabled:null!==(s=t.disabled)&&void 0!==s&&s,children:[(0,a.jsx)("p",{className:"truncate",children:d?d.name.substring(0,20):"Select a model..."}),(0,a.jsx)(C.K,{className:"opacity-50"})]})}),(0,a.jsx)(M.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(k.mY,{loop:!0,children:(0,a.jsxs)(k.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(k.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(k.rb,{children:"No Models found."}),(0,a.jsx)(k.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(R,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)}},e.id))},"models")]})})}):(0,a.jsxs)(T,{children:[(0,a.jsx)(z,{side:"left",align:"start",forceMount:!0,className:"min-h-[280px]",children:(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("h4",{className:"font-medium leading-none",children:null==o?void 0:o.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==o?void 0:o.description}),(null==o?void 0:o.strengths)?(0,a.jsxs)("div",{className:"mt-4 grid gap-2",children:[(0,a.jsx)("h5",{className:"text-sm font-medium leading-none",children:"Strengths"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:o.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(B,{}),(0,a.jsx)(k.mY,{loop:!0,children:(0,a.jsxs)(k.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(k.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(k.rb,{children:"No Models found."}),(0,a.jsx)(k.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(R,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),i(!1)}},e.id))},"models")]})})]})]})})]})})}function R(e){let{model:s,isSelected:t,onSelect:n,onPeek:i}=e,o=l.useRef(null);return(0,h.Iy)(o,e=>{e.forEach(e=>{var t;"attributes"===e.type&&"aria-selected"===e.attributeName&&(null===(t=o.current)||void 0===t?void 0:t.getAttribute("aria-selected"))==="true"&&i(s)})}),(0,a.jsxs)(k.di,{onSelect:n,ref:o,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",children:[s.name,(0,a.jsx)(O.J,{className:(0,I.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var W=t(63861),D=t(69304),J=t(42225),K=t(26815),P=t(9270),Z=t(30401);let U=l.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(P.fC,{ref:s,className:(0,I.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-secondary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-500 data-[state=checked]:text-primary-foreground",t),...n,children:(0,a.jsx)(P.z$,{className:(0,I.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(Z.Z,{className:"h-4 w-4"})})})});U.displayName=P.fC.displayName;var A=t(81103),H=t(61312);let Q=e=>fetch(e).then(e=>e.json());function V(e){let{...s}=e;return s.isMobileWidth?(0,a.jsx)(D.yo,{open:s.isOpen,onOpenChange:s.onOpenChange,children:(0,a.jsx)(D.ue,{className:"w-[300px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:(0,a.jsx)(q,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(q,{...s})})}function q(e){var s,t,n;let{...i}=e,[o,r]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),{data:h,error:u}=(0,W.ZP)("/api/agents/options",Q),{data:p,error:g}=(0,W.ZP)("/api/agents/conversation?conversation_id=".concat(i.conversationId),Q),{data:j,error:b,isLoading:C}=(0,m.GW)(),[O,I]=(0,l.useState)(""),[k,E]=(0,l.useState)(),[T,B]=(0,l.useState)(),[z,L]=(0,l.useState)(),[R,D]=(0,l.useState)(!1),[P,Z]=(0,l.useState)(!1);function V(){p&&(B(p.input_tools),(void 0===p.input_tools||0===p.input_tools.length)&&B((null==h?void 0:h.input_tools)?Object.keys(h.input_tools):[]),L(p.output_modes),(void 0===p.output_modes||0===p.output_modes.length)&&L((null==h?void 0:h.output_modes)?Object.keys(h.output_modes):[]),("khoj"===p.name.toLowerCase()||!0===p.is_hidden)&&r(!0),"khoj"===p.slug.toLowerCase()?(c(!0),E(void 0),I(void 0)):(I(p.persona),E(p.chat_model)))}function q(e,s){return(D(!0),s.includes(e))?s.filter(s=>s!==e):[...s,e]}return(0,l.useEffect)(()=>{V()},[p]),(0,a.jsxs)(f.DD,{collapsible:"none",className:"ml-auto opacity-30 rounded-lg p-2 transition-all transform duration-300 ease-in-out\n ".concat(i.isOpen?"translate-x-0 opacity-100 w-[300px] relative":"translate-x-full opacity-100 w-0 p-0 m-0","\n "),variant:"floating",children:[(0,a.jsxs)(f.TZ,{children:[(0,a.jsx)(f.$l,{children:p&&!o?(0,a.jsx)("div",{className:"flex items-center relative text-sm",children:(0,a.jsxs)("a",{className:"text-lg font-bold flex flex-row items-center",href:"/agents?agent=".concat(p.slug),children:[(0,J.TI)(p.icon,p.color),p.name]})}):(0,a.jsxs)("div",{className:"flex items-center relative text-sm",children:[(0,J.TI)("lightbulb","orange"),"Chat Options"]})}),(0,a.jsx)(f.Hz,{className:"border-b last:border-none",children:(0,a.jsx)(f.Ks,{className:"gap-0",children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&p.has_files?(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:(0,a.jsx)(N.J,{})}),(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:"Using custom knowledge base"})]})},"agent_knowledge"):null})})},"knowledge"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Instructions"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(S.g,{className:"w-full h-32 resize-none hover:resize-y",value:O,onChange:e=>{I(e.target.value),D(!0)},readOnly:!o,disabled:!o})})})]})},"instructions"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!(null==j?void 0:j.is_active)&&(0,a.jsx)("a",{href:"/settings",className:"hover:font-bold text-accent-foreground m-2 bg-accent bg-opacity-10 p-1 rounded-lg",children:"Upgrade"})]}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(F,{disabled:!o||!(null==j?void 0:j.is_active),onSelect:(e,s)=>(function(e){let s=!(arguments.length>1)||void 0===arguments[1]||arguments[1];E(e),s&&D(!0)})(e.name,s),initialModel:null==p?void 0:p.chat_model,selectedModel:k})},"model")})]})},"model"),(0,a.jsx)(M.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(M.xo,{children:["Tools",(0,a.jsx)(_._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(M.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(s=null==h?void 0:h.input_tools)&&void 0!==s?s:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(A.u,{children:[(0,a.jsx)(A.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(K._,{htmlFor:s,className:"flex items-center gap-2 text-accent-foreground p-1 cursor-pointer",children:[(0,J.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(U,{id:s,className:"".concat(o?"cursor-pointer":""),checked:(null!=T?T:[]).includes(s),onCheckedChange:()=>B(q(s,null!=T?T:[])),disabled:!o,children:s})]})},s),(0,a.jsx)(H._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)}),Object.entries(null!==(t=null==h?void 0:h.output_modes)&&void 0!==t?t:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(A.u,{children:[(0,a.jsx)(A.aJ,{asChild:!0,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 py-1 justify-between",children:[(0,a.jsxs)(K._,{htmlFor:s,className:"flex items-center gap-2 p-1 rounded-lg cursor-pointer",children:[(0,J.vH)(s),(0,a.jsx)("p",{className:"text-sm my-auto flex items-center",children:s})]}),(0,a.jsx)(U,{id:s,className:"".concat(o?"cursor-pointer":""),checked:(null!=z?z:[]).includes(s),onCheckedChange:()=>L(q(s,null!=z?z:[])),disabled:!o,children:s})]})},s),(0,a.jsx)(H._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)})]})})})]})}),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Files"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(x.J_,{conversationId:i.conversationId,uploadedFiles:[],isMobileWidth:null!==(n=i.isMobileWidth)&&void 0!==n&&n})},"files-conversation")})]})},"files")]}),i.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:p&&!o&&p.is_creator?(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"ghost",onClick:()=>window.location.href="/agents?agent=".concat(null==p?void 0:p.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(V(),D(!1)),variant:"ghost",disabled:!o||!R,children:"Reset"})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsxs)(v.z,{className:"w-full ".concat(R?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(R){if(!d&&(null==p?void 0:p.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";d&&(e="POST");let s={persona:O,chat_model:k,input_tools:T,output_modes:z,...d?{}:{slug:null==p?void 0:p.slug}};Z(!0),fetch(d?"/api/agents/hidden?conversation_id=".concat(i.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{Z(!1),e.json()}).then(e=>{(0,W.JG)("/api/agents/conversation?conversation_id=".concat(i.conversationId)),D(!1)}).catch(e=>{console.error("Error:",e),Z(!1)})}})(),disabled:!o||!R||P,children:[P?(0,a.jsx)(y.U,{className:"animate-spin"}):(0,a.jsx)(w.Z,{}),P?"Saving":"Save"]})})})]})})},"actions")]})}function G(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,l.useState)(""),[d,c]=(0,l.useState)([]),[h,m]=(0,l.useState)(!1),[x,f]=(0,l.useState)(null),[p,g]=(0,l.useState)(!1),j=(0,l.useRef)(null),v=e.setQueryToProcess,b=e.onConversationIdChange,N=e.isMobileWidth?"w-full":"w-4/6";if((0,l.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,l.useEffect)(()=>{let s=localStorage.getItem("images");if(s){let t=JSON.parse(s);c(t);let a=t.map(e=>encodeURIComponent(e));e.setImages(a),localStorage.removeItem("images")}let t=localStorage.getItem("message");t&&(m(!0),v(t),t.trim().startsWith("/research")&&g(!0));let a=localStorage.getItem("uploadedFiles");if(a){let s=a?JSON.parse(a):[],t=[];for(let e of s)t.push({name:e.name,file_type:e.file_type,content:e.content,size:e.size});localStorage.removeItem("uploadedFiles"),e.setUploadedFiles(t)}},[v,e.setImages,s]),(0,l.useEffect)(()=>{t&&(m(!0),v(t))},[t,v]),(0,l.useEffect)(()=>{s&&(null==b||b(s))},[s,b]),(0,l.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(m(!1),c([]),e.setUploadedFiles(void 0)):n("")},[e.streamedMessages]),!s){window.location.href="/";return}return(0,a.jsxs)("div",{className:"flex flex-row h-full w-full",children:[(0,a.jsxs)("div",{className:"flex flex-col h-full w-full",children:[(0,a.jsx)("div",{className:i().chatBodyFull,children:(0,a.jsx)(o.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:h?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:N,setIsChatSideBarOpen:e.setIsChatSideBarOpen})}),(0,a.jsx)("div",{className:"".concat(i().inputBox," p-1 md:px-2 shadow-md bg-background align-middle items-center justify-center dark:bg-neutral-700 dark:border-0 dark:shadow-sm rounded-2xl md:rounded-xl h-fit ").concat(N," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(u.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:h,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:p,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)(V,{conversationId:s,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})]})}function Y(){let e="Khoj AI - Chat",[s,t]=(0,l.useState)(null),[n,o]=(0,l.useState)(!0),[r,u]=(0,l.useState)(e),[N,_]=(0,l.useState)(null),[y,w]=(0,l.useState)([]),[S,C]=(0,l.useState)(""),[O,I]=(0,l.useState)(!1),[k,M]=(0,l.useState)(void 0),[E,T]=(0,l.useState)([]),[B,z]=(0,l.useState)(null),[L,F]=(0,l.useState)(!1),{locationData:R,locationDataError:W,locationDataLoading:D}=(0,h.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:J,error:K,isLoading:P}=(0,m.GW)(),Z=(0,h.IC)(),[U,A]=(0,l.useState)(!1);async function H(e){if(!e.ok)throw Error(e.statusText);if(!e.body)throw Error("Response body is null");let s=e.body.getReader(),t=new TextDecoder,a="␃\uD83D\uDD1A␗",n="",i=[],l={},o={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),I(!1),T([]),N&&(0,c.tQ)(N,u);break}for(n+=t.decode(d,{stream:!0});-1!==(e=n.indexOf(a));){let s=n.slice(0,e);if(n=n.slice(e+a.length),s){let e=y.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:i,onlineContext:l,codeContext:o}=(0,c.VK)(s,e,i,l,o)),w([...y])}}}}async function Q(){if(localStorage.removeItem("message"),!S||!N)return;let e={q:S,conversation_id:N,stream:!0,...R&&{city:R.city,region:R.region,country:R.country,country_code:R.countryCode,timezone:R.timezone},...E.length>0&&{images:E},...k&&{files:k}},s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==B?void 0:B.signal});try{await H(s)}catch(i){let e;try{e=await s.json()}catch(s){e={streamError:"Error reading API error response stream. Expected JSON response."}}console.error(e);let t=y.find(e=>!e.completed);if(!t)return;let a=i.message,n=i.name;a.includes("Error in input stream")?t.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.streamError?t.rawResponse="Umm, not sure what just happened but I lost my train of thought. Could you try again or ask my developers to look into this if the issue persists? They can be contacted at the Khoj Github, Discord or team@khoj.dev.":429===s.status?"detail"in e?t.rawResponse="".concat(e.detail):t.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":"AbortError"===n?t.rawResponse="I've stopped processing this message. If you'd like to continue, please send the message again.":t.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),t.completed=!0,w([...y]),C(""),I(!1)}}return(0,l.useEffect)(()=>{fetch("/api/chat/options").then(e=>e.json()).then(e=>{o(!1),e&&t(e)}).catch(e=>{console.error(e)}),(0,h.EK)()},[]),(0,l.useEffect)(()=>{L&&(null==B||B.abort(),function(){let e=y.find(e=>!e.completed);e&&(e.completed=!0,w([...y]),C(""),I(!1))}(),F(!1))}),(0,l.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:k};w(s=>[...s,e]),I(!0),z(new AbortController)}},[S]),(0,l.useEffect)(()=>{O&&!D&&Q()},[O,D]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)(p.S,{conversationId:N||""}),(0,a.jsxs)(f.kV,{children:[(0,a.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,a.jsx)(f.vP,{className:"-ml-1"}),(0,a.jsx)(g.Z,{orientation:"vertical",className:"mr-2 h-4"}),N&&(0,a.jsx)("div",{className:"".concat(i().chatTitleWrapper," text-nowrap text-ellipsis overflow-hidden max-w-screen-md grid items-top font-bold mx-2 md:mr-8 col-auto h-fit"),children:Z?(0,a.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,a.jsx)(j.VO,{className:"h-auto w-16"})}):r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg text-ellipsis whitespace-nowrap overflow-x-hidden mr-4",children:r}),(0,a.jsx)(x.En,{conversationId:N,setTitle:u,sizing:"md"})]})}),(0,a.jsx)("div",{className:"flex justify-end items-start gap-2 text-sm ml-auto",children:(0,a.jsx)(v.z,{variant:"ghost",size:"icon",className:"h-12 w-12 data-[state=open]:bg-accent",onClick:()=>A(!U),children:(0,a.jsx)(b.T,{className:"w-6 h-6"})})})]}),(0,a.jsxs)("div",{className:"".concat(i().main," ").concat(i().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(r&&r!==e?": ".concat(r):"")}),(0,a.jsx)("div",{className:i().chatBox,children:(0,a.jsx)("div",{className:i().chatBoxBody,children:(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(G,{isLoggedIn:!!J,streamedMessages:y,setStreamedMessages:w,chatOptionsData:s,setTitle:u,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:Z,onConversationIdChange:e=>{_(e)},setImages:T,setTriggeredAbort:F,isChatSideBarOpen:U,setIsChatSideBarOpen:A})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),i=t(6394),l=t(90535),o=t(94508);let r=(0,l.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(i.f,{ref:s,className:(0,o.cn)(r(),t),...n})});d.displayName=i.f.displayName},63136:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq"}}},function(e){e.O(0,[4842,2663,3954,1919,9259,8667,849,4357,8155,8580,2327,5477,4986,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,8459,3317],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|
@@ -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}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.chatInputArea_actualInputArea__Ha6cN{display:grid;grid-template-columns:auto 1fr auto auto}.loginPrompt_gsiMaterialButton__8QVFH{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-appearance:none;background-image:none;border-radius:20px;box-sizing:border-box;color:#1f1f1f;cursor:pointer;font-family:Roboto,arial,sans-serif;font-size:14px;height:40px;letter-spacing:.25px;outline:none;overflow:hidden;padding:0;position:relative;text-align:center;transition:background-color .218s,border-color .218s,box-shadow .218s;vertical-align:middle;white-space:nowrap;width:40px;max-width:400px;min-width:-moz-min-content;min-width:min-content}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonIcon__6TSC5{height:100%;min-width:20px;width:100%;margin:0;padding:9px}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContentWrapper__9tahB{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;height:100%;justify-content:space-between;position:relative;width:100%}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonContents__3_YcB{flex-grow:1;font-family:Roboto,arial,sans-serif;font-weight:500;overflow:hidden;text-overflow:ellipsis;vertical-align:top}.loginPrompt_gsiMaterialButton__8QVFH .loginPrompt_gsiMaterialButtonState__CDGQm{transition:opacity .218s;bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.loginPrompt_gsiMaterialButton__8QVFH:disabled{cursor:default;background-color:#ffffff61;border-color:#1f1f1f1f}.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonContents__3_YcB,.loginPrompt_gsiMaterialButton__8QVFH:disabled .loginPrompt_gsiMaterialButtonIcon__6TSC5{opacity:38%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):active .loginPrompt_gsiMaterialButton-State__mAfCZ,.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):focus .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:12%}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover{box-shadow:0 1px 2px 0 rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15)}.loginPrompt_gsiMaterialButton__8QVFH:not(:disabled):hover .loginPrompt_gsiMaterialButtonState__CDGQm{background-color:#303030;opacity:8%}div.sidePanel_session__EeNjH{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__CUgIn{grid-template-columns:minmax(12rem,100%) 1fr 1fr}div.sidePanel_sessionHover__cf_VO,div.sidePanel_session__EeNjH:hover{background-color:hsla(var(--popover))}div.sidePanel_session__EeNjH:hover{color:hsla(var(--popover-foreground))}div.sidePanel_session__EeNjH a{text-decoration:none}button.sidePanel_button__NzdN_{border:none;outline:none;background-color:transparent;cursor:pointer;color:var(--main-text-color);width:24px}button.sidePanel_showMoreButton__nDt4Z{border-radius:.5rem;padding:8px}div.sidePanel_panel__9offQ{display:flex;flex-direction:column;padding:1rem;overflow-y:auto;max-width:auto;transition:background-color .5s}div.sidePanel_expanded__aHnYV{gap:1rem;background-color:hsla(var(--muted));height:100%}div.sidePanel_collapsed__ewO3e{display:grid;grid-template-columns:1fr;height:-moz-fit-content;height:fit-content;padding:1rem 0 0 1rem}p.sidePanel_session__EeNjH{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;text-align:left;font-size:small}p.sidePanel_compressed__CUgIn{width:11rem}p.sidePanel_expanded__aHnYV{max-width:20rem}div.sidePanel_header__NCT_v{display:grid;grid-template-columns:1fr auto}div.sidePanel_profile__pfAJU{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:center;margin-top:auto}div.sidePanel_panelWrapper__cDMvb{display:grid;grid-template-rows:1fr auto auto;height:100%}div.sidePanel_modalSessionsList___u3aa{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___u3aa div.sidePanel_content__z60YO{max-width:80%;max-height:80%;background-color:hsla(var(--frosted-background-color));overflow:auto;padding:20px;border-radius:10px}div.sidePanel_modalSessionsList___u3aa div.sidePanel_session__EeNjH{max-width:100%;text-overflow:ellipsis}@media screen and (max-width:768px){div.sidePanel_panel__9offQ{padding:.25rem;width:100%}div.sidePanel_expanded__aHnYV{z-index:1}div.sidePanel_singleReference__vmXZr{padding:4px}div.sidePanel_panelWrapper__cDMvb{width:100%;padding:0 1rem}div.sidePanel_session__EeNjH.sidePanel_compressed__CUgIn{max-width:100%;display:grid;grid-template-columns:70vw auto;justify-content:space-between}div.sidePanel_session__EeNjH{max-width:100%;grid-template-columns:minmax(auto,70vw) 1fr}}.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.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}@media screen and (max-width:768px){div.automations_automationsLayout__Atoh_{grid-template-columns:1fr}div.automations_pageLayout__OaoYA{max-width:90vw}}
|
File without changes
|
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{1915-4b7980a58fb630d6.js → 1915-233ac8a122732d6b.js}
RENAMED
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{2117-f99825f0a867a42d.js → 2117-ce1f0a4598f5e4fe.js}
RENAMED
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{3224-09c2844a0885a301.js → 3224-34b5078830a51f42.js}
RENAMED
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{849-aa69550db1c243e4.js → 849-bf52aa2736c7f253.js}
RENAMED
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{8667-adbe6017a66cef10.js → 8667-8136f74e9a086fca.js}
RENAMED
File without changes
|
/khoj/interface/compiled/_next/static/chunks/{9259-5be50737cfe989bc.js → 9259-fa40e7cf2ca28e04.js}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|