khoj 1.36.7.dev1__py3-none-any.whl → 1.36.7.dev7__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/database/adapters/__init__.py +14 -0
- khoj/interface/compiled/404/index.html +2 -2
- khoj/interface/compiled/_next/static/chunks/{2327-36d17f2483e80f60.js → 2327-02e86a50c65e575a.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/{layout-447b58869479276c.js → layout-64b81f8eeac13427.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{layout-4d0b1ba93124fccb.js → layout-9e151fb837f53026.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-9c0a2df3e33c029b.js → page-53ba9f1424043383.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/settings/page-c961681e308a334b.js +1 -0
- khoj/interface/compiled/_next/static/chunks/{webpack-63715907cbdf16c6.js → webpack-f813971dd4615afd.js} +1 -1
- khoj/interface/compiled/agents/index.html +2 -2
- khoj/interface/compiled/agents/index.txt +3 -3
- khoj/interface/compiled/automations/index.html +2 -2
- khoj/interface/compiled/automations/index.txt +2 -2
- khoj/interface/compiled/chat/index.html +2 -2
- khoj/interface/compiled/chat/index.txt +3 -3
- khoj/interface/compiled/index.html +2 -2
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +2 -2
- khoj/interface/compiled/search/index.txt +2 -2
- khoj/interface/compiled/settings/index.html +2 -2
- khoj/interface/compiled/settings/index.txt +2 -2
- khoj/interface/compiled/share/chat/index.html +2 -2
- khoj/interface/compiled/share/chat/index.txt +2 -2
- khoj/routers/api_content.py +37 -3
- {khoj-1.36.7.dev1.dist-info → khoj-1.36.7.dev7.dist-info}/METADATA +1 -1
- {khoj-1.36.7.dev1.dist-info → khoj-1.36.7.dev7.dist-info}/RECORD +31 -31
- khoj/interface/compiled/_next/static/chunks/app/settings/page-9939a20613b25901.js +0 -1
- /khoj/interface/compiled/_next/static/{ft5KXHI1GLT3L6pQPfg8R → bzWTm19u6qe1y98Xfrqoo}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{ft5KXHI1GLT3L6pQPfg8R → bzWTm19u6qe1y98Xfrqoo}/_ssgManifest.js +0 -0
- {khoj-1.36.7.dev1.dist-info → khoj-1.36.7.dev7.dist-info}/WHEEL +0 -0
- {khoj-1.36.7.dev1.dist-info → khoj-1.36.7.dev7.dist-info}/entry_points.txt +0 -0
- {khoj-1.36.7.dev1.dist-info → khoj-1.36.7.dev7.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8459,3317,244
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8459,3317,7138,244],{34780:function(e,t,n){Promise.resolve().then(n.bind(n,85147))},7436:function(e,t,n){"use strict";n.d(t,{EK:function(){return i},Gv:function(){return l},IC:function(){return _},Iy:function(){return s},LF:function(){return u},Nr:function(){return m},k6:function(){return a},o0:function(){return f},xq:function(){return d}});var r=n(2265),o=n(63861);let c=()=>window.fetch("https://ipapi.co/json").then(e=>e.json()).catch(e=>console.log(e)),u=e=>e.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function i(){console.log("%c %s","font-family:monospace",'\n __ __ __ __ ______ __ _____ __\n/\\ \\/ / /\\ \\_\\ \\ /\\ __ \\ /\\ \\ /\\ __ \\ /\\ \\\n\\ \\ _"-. \\ \\ __ \\ \\ \\ \\/\\ \\ _\\_\\ \\ \\ \\ __ \\ \\ \\ \\\n \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\ \\_____\\ /\\_____\\ \\ \\_\\ \\_\\ \\ \\_\\\n \\/_/\\/_/ \\/_/\\/_/ \\/_____/ \\/_____/ \\/_/\\/_/ \\/_/\n\n\nGreetings traveller,\n\nI am ✨Khoj✨, your open-source, personal AI copilot.\n\nSee my source code at https://github.com/khoj-ai/khoj\nRead my operating manual at https://docs.khoj.dev\n')}function a(){let{data:e,error:t,isLoading:n}=(0,o.ZP)("/api/ip",c,{revalidateOnFocus:!1});return{locationData:e,locationDataError:t,locationDataLoading:n}}function _(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>{window.innerWidth<=768?t(!0):t(!1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{attributes:!0,characterData:!0,childList:!0,subtree:!0};r.useEffect(()=>{if(e.current){let r=new MutationObserver(t);return r.observe(e.current,n),()=>r.disconnect()}},[e,t,n])};function l(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{"dark"===localStorage.getItem("theme")?(document.documentElement.classList.add("dark"),t(!0)):"light"===localStorage.getItem("theme")?(document.documentElement.classList.remove("dark"),t(!1)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(document.documentElement.classList.add("dark"),t(!0)),o(!0)},[]),(0,r.useEffect)(()=>{n&&(e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",e?"dark":"light"))},[e,n]),[e,t]}let d=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB");function m(e,t){let[n,o]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let n=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}let f=e=>{try{let t=new Date(e),n=new Date,r=Math.floor((n.getTime()-t.getTime())/6e4);if(r<1)return"just now";if(r<60)return"".concat(r," minutes ago");if(r<120)return"1 hour ago";if(r<1440)return"".concat(Math.floor(r/60)," hours ago");return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"}).format(t)}catch(t){return console.error("Error formatting date:",t),e}}},85147:function(e,t,n){"use strict";n.d(t,{ThemeProvider:function(){return c}});var r=n(57437),o=n(7436);function c(e){let{children:t}=e,[n,c]=(0,o.Gv)();return(0,r.jsx)(r.Fragment,{children:t})}}},function(e){e.O(0,[3861,2971,2117,1744],function(){return e(e.s=34780)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3317,8459,244
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3317,8459,7138,244],{34780:function(e,t,n){Promise.resolve().then(n.bind(n,85147))},7436:function(e,t,n){"use strict";n.d(t,{EK:function(){return i},Gv:function(){return l},IC:function(){return _},Iy:function(){return s},LF:function(){return u},Nr:function(){return m},k6:function(){return a},o0:function(){return f},xq:function(){return d}});var r=n(2265),o=n(63861);let c=()=>window.fetch("https://ipapi.co/json").then(e=>e.json()).catch(e=>console.log(e)),u=e=>e.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase());function i(){console.log("%c %s","font-family:monospace",'\n __ __ __ __ ______ __ _____ __\n/\\ \\/ / /\\ \\_\\ \\ /\\ __ \\ /\\ \\ /\\ __ \\ /\\ \\\n\\ \\ _"-. \\ \\ __ \\ \\ \\ \\/\\ \\ _\\_\\ \\ \\ \\ __ \\ \\ \\ \\\n \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\ \\_____\\ /\\_____\\ \\ \\_\\ \\_\\ \\ \\_\\\n \\/_/\\/_/ \\/_/\\/_/ \\/_____/ \\/_____/ \\/_/\\/_/ \\/_/\n\n\nGreetings traveller,\n\nI am ✨Khoj✨, your open-source, personal AI copilot.\n\nSee my source code at https://github.com/khoj-ai/khoj\nRead my operating manual at https://docs.khoj.dev\n')}function a(){let{data:e,error:t,isLoading:n}=(0,o.ZP)("/api/ip",c,{revalidateOnFocus:!1});return{locationData:e,locationDataError:t,locationDataLoading:n}}function _(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=()=>{window.innerWidth<=768?t(!0):t(!1)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{attributes:!0,characterData:!0,childList:!0,subtree:!0};r.useEffect(()=>{if(e.current){let r=new MutationObserver(t);return r.observe(e.current,n),()=>r.disconnect()}},[e,t,n])};function l(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{"dark"===localStorage.getItem("theme")?(document.documentElement.classList.add("dark"),t(!0)):"light"===localStorage.getItem("theme")?(document.documentElement.classList.remove("dark"),t(!1)):window.matchMedia("(prefers-color-scheme: dark)").matches&&(document.documentElement.classList.add("dark"),t(!0)),o(!0)},[]),(0,r.useEffect)(()=>{n&&(e?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),localStorage.setItem("theme",e?"dark":"light"))},[e,n]),[e,t]}let d=e=>e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB");function m(e,t){let[n,o]=(0,r.useState)(e);return(0,r.useEffect)(()=>{let n=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}let f=e=>{try{let t=new Date(e),n=new Date,r=Math.floor((n.getTime()-t.getTime())/6e4);if(r<1)return"just now";if(r<60)return"".concat(r," minutes ago");if(r<120)return"1 hour ago";if(r<1440)return"".concat(Math.floor(r/60)," hours ago");return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",hour12:!0,timeZoneName:"short"}).format(t)}catch(t){return console.error("Error formatting date:",t),e}}},85147:function(e,t,n){"use strict";n.d(t,{ThemeProvider:function(){return c}});var r=n(57437),o=n(7436);function c(e){let{children:t}=e,[n,c]=(0,o.Gv)();return(0,r.jsx)(r.Fragment,{children:t})}}},function(e){e.O(0,[3861,2971,2117,1744],function(){return e(e.s=34780)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,s,t){Promise.resolve().then(t.bind(t,42780))},42780:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return eo}});var a=t(57437),n=t(63136),l=t.n(n),i=t(2265),o=t(74986),r=t(99376),d=t(14308),c=t(59199);t(2446);var u=t(7436),m=t(5477),h=t(56937),x=t(55287),f=t(60729),p=t(34124),g=t(6512),j=t(37104),v=t(62869),N=t(632),b=t(47615),y=t(96108),w=t(36360),_=t(60906),S=t(36720),C=t(61563),k=t(82123),O=t(76818),I=t(78299),M=t(38513),E=t(94508),T=t(23518),z=t(57054),B=t(16605);let R=B.fC,L=B.xz,F=i.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:l=4,...i}=e;return(0,a.jsx)(B.VY,{ref:s,align:n,sideOffset:l,className:(0,E.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i})});F.displayName=B.VY.displayName;var Z=t(54036);function P(e){var s;let{...t}=e,[n,l]=i.useState(!1),[o,r]=(0,i.useState)(void 0),[d,c]=(0,i.useState)(void 0),{data:m,error:x,isLoading:f}=(0,h.h2)(!0),[p,g]=(0,i.useState)([]),j=(0,u.IC)();return((0,i.useEffect)(()=>{if(!f&&m){if(g(m.chat_model_options),t.initialModel)c(m.chat_model_options.find(e=>e.name===t.initialModel));else{let e=m.chat_model_options.find(e=>e.id===m.selected_chat_model_config);if(e)c(e);else{c(m.chat_model_options[0]);return}}}},[m,t.initialModel,f]),(0,i.useEffect)(()=>{if(t.selectedModel&&d&&t.selectedModel!==d.name)c(p.find(e=>e.name===t.selectedModel));else if(null===t.selectedModel&&m){let e=m.chat_model_options.find(e=>e.id===m.selected_chat_model_config);if(e)t.onSelect(e,!1);else{t.onSelect(m.chat_model_options[0],!1);return}}},[t.selectedModel,p]),(0,i.useEffect)(()=>{if(d){let e=d.id!==(null==m?void 0:m.selected_chat_model_config);t.selectedModel!==d.name&&t.onSelect(d,e)}},[d]),f)?(0,a.jsx)(Z.O,{className:"w-full h-10"}):x?(0,a.jsx)("div",{className:"text-sm text-error",children:x.message}):(0,a.jsx)("div",{className:"grid gap-2 w-[250px]",children:(0,a.jsxs)(z.J2,{open:n,onOpenChange:l,...t,children:[(0,a.jsx)(z.xo,{asChild:!0,children:(0,a.jsxs)(v.z,{variant:"outline",role:"combobox","aria-expanded":n,"aria-label":"Select a model",className:"w-full justify-between text-left",disabled:null!==(s=t.disabled)&&void 0!==s&&s,children:[(0,a.jsx)("p",{className:"truncate",children:d?d.name.substring(0,20):"Select a model..."}),(0,a.jsx)(I.K,{className:"opacity-50"})]})}),(0,a.jsx)(z.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(W,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),l(!1)}},e.id))},"models")]})})}):(0,a.jsxs)(R,{children:[(0,a.jsx)(F,{side:"left",align:"start",forceMount:!0,className:"min-h-[280px]",children:(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("h4",{className:"font-medium leading-none",children:null==o?void 0:o.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==o?void 0:o.description}),(null==o?void 0:o.strengths)?(0,a.jsxs)("div",{className:"mt-4 grid gap-2",children:[(0,a.jsx)("h5",{className:"text-sm font-medium leading-none",children:"Strengths"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:o.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{}),(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(W,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),l(!1)}},e.id))},"models")]})})]})]})})]})})}function W(e){let{model:s,isSelected:t,onSelect:n,onPeek:l}=e,o=i.useRef(null);return(0,u.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"&&l(s)})}),(0,a.jsxs)(T.di,{onSelect:n,ref:o,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",children:[s.name,(0,a.jsx)(M.J,{className:(0,E.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var A=t(63861),D=t(69304),J=t(42225),K=t(26815),U=t(9270),V=t(30401);let G=i.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(U.fC,{ref:s,className:(0,E.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-secondary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-500 data-[state=checked]:text-primary-foreground",t),...n,children:(0,a.jsx)(U.z$,{className:(0,E.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(V.Z,{className:"h-4 w-4"})})})});G.displayName=U.fC.displayName;var H=t(81103),Q=t(61312),Y=t(26110),$=t(53647),q=t(84671),X=t(95186),ee=t(27648),es=t(40521);let et=e=>fetch(e).then(e=>e.json());function ea(e){let{...s}=e;return s.isMobileWidth?(0,a.jsx)(D.yo,{open:s.isOpen,onOpenChange:s.onOpenChange,children:(0,a.jsx)(D.ue,{className:"w-[300px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:(0,a.jsx)(el,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(el,{...s})})}function en(e){let s=(0,J.BI)(),t=q.xF,[n,l]=(0,i.useState)(!1),[o,r]=(0,i.useState)(),[d,c]=(0,i.useState)(),[u,m]=(0,i.useState)(),[h,x]=(0,i.useState)(!1),[f,p]=(0,i.useState)(),[g,j]=(0,i.useState)(!1),[N,S]=(0,i.useState)();return(0,i.useEffect)(()=>{o&&d&&u?j(!0):j(!1)},[o,d,u]),(0,a.jsxs)(Y.Vq,{children:[(0,a.jsx)(Y.hg,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"secondary",children:"Create Agent"})}),(0,a.jsxs)(Y.cZ,{children:[(0,a.jsxs)(Y.fK,{children:[h&&f?(0,a.jsxs)(Y.$N,{children:["Created ",o]}):(0,a.jsx)(Y.$N,{children:"Create a New Agent"}),(0,a.jsx)(Y.GG,{}),(0,a.jsx)(Y.Be,{children:"If these settings have been helpful, create a dedicated agent you can re-use across conversations."})]}),(0,a.jsx)("div",{className:"py-4",children:h&&f?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 py-8",children:[(0,a.jsx)(es.E.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,a.jsx)(b.f,{className:"w-16 h-16 text-green-500",weight:"fill"})}),(0,a.jsx)(es.E.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-center text-lg font-medium text-accent-foreground",children:"Created successfully!"}),(0,a.jsx)(es.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},children:(0,a.jsx)(ee.default,{href:"/agents?agent=".concat(f),children:(0,a.jsx)(v.z,{variant:"secondary",className:"mt-2",children:"Manage Agent"})})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(K._,{htmlFor:"agent_name",children:"Name"}),(0,a.jsx)(X.I,{id:"agent_name",className:"w-full p-2 border mt-4 border-slate-500 rounded-lg",disabled:n,value:o,onChange:e=>r(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:m,defaultValue:u,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Color"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:t.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(y.C,{className:"w-6 h-6 mr-2 ".concat((0,q.oz)(e)),weight:"fill"}),e]})},e))})]})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:c,defaultValue:d,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Icon"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:s.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,J.TI)(e,null!=u?u:"gray","w-6","h-6"),e]})},e))})]})})]})]})}),(0,a.jsxs)(Y.cN,{children:[N&&(0,a.jsx)("div",{className:"text-red-500 text-sm",children:N}),!h&&(0,a.jsxs)(v.z,{type:"submit",onClick:()=>void(!n&&(l(!0),fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o,icon:d,color:u,persona:e.customPrompt,chat_model:e.selectedModel,input_tools:e.inputTools,output_modes:e.outputModes,privacy_level:"private"})}).then(e=>e.json()).then(e=>{if(console.log("Success:",e),"detail"in e){S("Error creating agent: ".concat(e.detail)),l(!1);return}x(!0),p(e.slug),l(!1)}).catch(e=>{console.error("Error:",e),S("Error creating agent: ".concat(e)),l(!1)}))),disabled:n||!g,children:[n?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(_.R,{}),"Create"]}),(0,a.jsx)(Y.GG,{})]})]})]})}function el(e){var s,t,n,l;let{...o}=e,[r,d]=(0,i.useState)(!1),{data:c,error:u}=(0,A.ZP)("/api/agents/options",et),{data:m,isLoading:p,error:g}=(0,A.ZP)("/api/agents/conversation?conversation_id=".concat(o.conversationId),et),{data:j,error:N,isLoading:b}=(0,h.GW)(),[y,_]=(0,i.useState)(""),[I,M]=(0,i.useState)(),[E,T]=(0,i.useState)(),[B,R]=(0,i.useState)(),[L,F]=(0,i.useState)(!1),[Z,W]=(0,i.useState)((null==m?void 0:m.slug.toLowerCase())==="khoj"),[D,U]=(0,i.useState)(!1),V=null!==(s=null==j?void 0:j.is_active)&&void 0!==s&&s;function Y(){m&&(T(m.input_tools),(void 0===m.input_tools||0===m.input_tools.length)&&T((null==c?void 0:c.input_tools)?Object.keys(c.input_tools):[]),R(m.output_modes),(void 0===m.output_modes||0===m.output_modes.length)&&R((null==c?void 0:c.output_modes)?Object.keys(c.output_modes):[]),("khoj"===m.name.toLowerCase()||!0===m.is_hidden)&&d(!0),"khoj"===m.slug.toLowerCase()?(M(void 0),_(void 0),W(!0)):(W(!1),_(m.persona),M(m.chat_model)))}function $(e,s){return(F(!0),s.includes(e))?s.filter(s=>s!==e):[...s,e]}return(0,i.useEffect)(()=>{Y()},[m]),(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(o.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:m&&!r?(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(m.slug),children:[(0,J.TI)(m.icon,m.color),m.name]})}):(0,a.jsx)("div",{className:"flex items-center relative text-sm justify-between",children:(0,a.jsx)("p",{children:"Chat Options"})})}),(0,a.jsx)(f.Hz,{className:"border-b last:border-none",children:(0,a.jsx)(f.Ks,{className:"gap-0",children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:m&&m.has_files?(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:(0,a.jsx)(S.J,{})}),(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:"Using custom knowledge base"})]})},"agent_knowledge"):null})})},"knowledge"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Instructions"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(O.g,{className:"w-full h-32 resize-none hover:resize-y",value:y,onChange:e=>{_(e.target.value),F(!0)},readOnly:!r,disabled:!r})})})]})},"instructions"),!p&&m&&(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!V&&(0,a.jsx)("a",{href:"/settings",className:"hover:font-bold text-accent-foreground m-2 bg-accent bg-opacity-10 p-1 rounded-lg",children:"Upgrade"})]}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(P,{disabled:!r||!V,onSelect:(e,s)=>(function(e){let s=!(arguments.length>1)||void 0===arguments[1]||arguments[1];M(e),s&&F(!0)})(e.name,s),initialModel:Z?void 0:null==m?void 0:m.chat_model,selectedModel:I})},"model")})]})},"model"),(0,a.jsx)(z.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(z.xo,{children:["Tools",(0,a.jsx)(C._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(z.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(t=null==c?void 0:c.input_tools)&&void 0!==t?t:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(H.u,{children:[(0,a.jsx)(H.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)(G,{id:s,className:"".concat(r?"cursor-pointer":""),checked:(null!=E?E:[]).includes(s),onCheckedChange:()=>T($(s,null!=E?E:[])),disabled:!r,children:s})]})},s),(0,a.jsx)(Q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)}),Object.entries(null!==(n=null==c?void 0:c.output_modes)&&void 0!==n?n:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(H.u,{children:[(0,a.jsx)(H.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)(G,{id:s,className:"".concat(r?"cursor-pointer":""),checked:(null!=B?B:[]).includes(s),onCheckedChange:()=>R($(s,null!=B?B:[])),disabled:!r,children:s})]})},s),(0,a.jsx)(Q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)})]})})})]})}),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Files"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(x.J_,{conversationId:o.conversationId,uploadedFiles:[],isMobileWidth:null!==(l=o.isMobileWidth)&&void 0!==l&&l})},"files-conversation")})]})},"files")]}),o.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:m&&!r&&m.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==m?void 0:m.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[!L&&r&&y&&!Z&&I&&(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(en,{customPrompt:y,selectedModel:I,inputTools:null!=E?E:[],outputModes:null!=B?B:[]})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(Y(),F(!1)),variant:"ghost",disabled:!r||!L,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(L?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(L){if(!Z&&(null==m?void 0:m.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";Z&&(e="POST");let s={persona:y,chat_model:I,input_tools:E,output_modes:B,...Z?{}:{slug:null==m?void 0:m.slug}};U(!0),fetch(Z?"/api/agents/hidden?conversation_id=".concat(o.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{U(!1),e.json()}).then(e=>{(0,A.JG)("/api/agents/conversation?conversation_id=".concat(o.conversationId)),F(!1)}).catch(e=>{console.error("Error:",e),U(!1)})}})(),disabled:!r||!L||D,children:[D?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(k.Z,{}),D?"Saving":"Save"]})})})]})})},"actions")]})}function ei(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,i.useState)(""),[d,c]=(0,i.useState)([]),[u,h]=(0,i.useState)(!1),[x,f]=(0,i.useState)(null),[p,g]=(0,i.useState)(!1),j=(0,i.useRef)(null),v=e.setQueryToProcess,N=e.onConversationIdChange,b=e.isMobileWidth?"w-full":"w-4/6";if((0,i.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,i.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&&(h(!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,i.useEffect)(()=>{t&&(h(!0),v(t))},[t,v]),(0,i.useEffect)(()=>{s&&(null==N||N(s))},[s,N]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(h(!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:l().chatBodyFull,children:(0,a.jsx)(o.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:u?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:b,setIsChatSideBarOpen:e.setIsChatSideBarOpen})}),(0,a.jsx)("div",{className:"".concat(l().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(b," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(m.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:p,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)(ea,{conversationId:s,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})]})}function eo(){let e="Khoj AI - Chat",[s,t]=(0,i.useState)(null),[n,o]=(0,i.useState)(!0),[r,m]=(0,i.useState)(e),[b,y]=(0,i.useState)(null),[w,_]=(0,i.useState)([]),[S,C]=(0,i.useState)(""),[k,O]=(0,i.useState)(!1),[I,M]=(0,i.useState)(void 0),[E,T]=(0,i.useState)([]),[z,B]=(0,i.useState)(null),[R,L]=(0,i.useState)(!1),{locationData:F,locationDataError:Z,locationDataLoading:P}=(0,u.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:W,error:A,isLoading:D}=(0,h.GW)(),J=(0,u.IC)(),[K,U]=(0,i.useState)(!1);async function V(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="",l=[],i={},o={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),O(!1),T([]),b&&(0,c.tQ)(b,m);break}for(n+=t.decode(d,{stream:!0});-1!==(e=n.indexOf(a));){let s=n.slice(0,e);if(n=n.slice(e+a.length),s){let e=w.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:l,onlineContext:i,codeContext:o}=(0,c.VK)(s,e,l,i,o)),_([...w])}}}}async function G(){if(localStorage.removeItem("message"),!S||!b)return;let e={q:S,conversation_id:b,stream:!0,...F&&{city:F.city,region:F.region,country:F.country,country_code:F.countryCode,timezone:F.timezone},...E.length>0&&{images:E},...I&&{files:I}},s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==z?void 0:z.signal});try{await V(s)}catch(l){let e;try{e=await s.json()}catch(s){e={streamError:"Error reading API error response stream. Expected JSON response."}}console.error(e);let t=w.find(e=>!e.completed);if(!t)return;let a=l.message,n=l.name;a.includes("Error in input stream")?t.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.streamError?t.rawResponse="Umm, not sure what just happened but I lost my train of thought. Could you try again or ask my developers to look into this if the issue persists? They can be contacted at the Khoj Github, Discord or team@khoj.dev.":429===s.status?"detail"in e?t.rawResponse="".concat(e.detail):t.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":"AbortError"===n?t.rawResponse="I've stopped processing this message. If you'd like to continue, please send the message again.":t.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),t.completed=!0,_([...w]),C(""),O(!1)}}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,u.EK)()},[]),(0,i.useEffect)(()=>{R&&(null==z||z.abort(),function(){let e=w.find(e=>!e.completed);e&&(e.completed=!0,_([...w]),C(""),O(!1))}(),L(!1))}),(0,i.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:I};_(s=>[...s,e]),O(!0),B(new AbortController)}},[S]),(0,i.useEffect)(()=>{k&&!P&&G()},[k,P]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)(p.S,{conversationId:b||""}),(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"}),b&&(0,a.jsx)("div",{className:"".concat(l().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:J?(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:b,setTitle:m,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:()=>U(!K),children:(0,a.jsx)(N.T,{className:"w-6 h-6"})})})]}),(0,a.jsxs)("div",{className:"".concat(l().main," ").concat(l().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(r&&r!==e?": ".concat(r):"")}),(0,a.jsx)("div",{className:l().chatBox,children:(0,a.jsx)("div",{className:l().chatBoxBody,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(ei,{isLoggedIn:!!W,streamedMessages:w,setStreamedMessages:_,chatOptionsData:s,setTitle:m,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:J,onConversationIdChange:e=>{y(e)},setImages:T,setTriggeredAbort:L,isChatSideBarOpen:K,setIsChatSideBarOpen:U})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),l=t(6394),i=t(90535),o=t(94508);let r=(0,i.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)(l.f,{ref:s,className:(0,o.cn)(r(),t),...n})});d.displayName=l.f.displayName},53647:function(e,s,t){"use strict";t.d(s,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});var a=t(57437),n=t(2265),l=t(56873),i=t(40875),o=t(22135),r=t(30401),d=t(94508);let c=l.fC;l.ZA;let u=l.B4,m=n.forwardRef((e,s)=>{let{className:t,children:n,...o}=e;return(0,a.jsxs)(l.xz,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[n,(0,a.jsx)(l.JO,{asChild:!0,children:(0,a.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=l.xz.displayName;let h=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.u_,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})});h.displayName=l.u_.displayName;let x=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.$G,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=l.$G.displayName;let f=n.forwardRef((e,s)=>{let{className:t,children:n,position:i="popper",...o}=e;return(0,a.jsx)(l.h_,{children:(0,a.jsxs)(l.VY,{ref:s,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:i,...o,children:[(0,a.jsx)(h,{}),(0,a.jsx)(l.l_,{className:(0,d.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,a.jsx)(x,{})]})})});f.displayName=l.VY.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.__,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n})}).displayName=l.__.displayName;let p=n.forwardRef((e,s)=>{let{className:t,children:n,...i}=e;return(0,a.jsxs)(l.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...i,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(l.wU,{children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(l.eT,{children:n})]})});p.displayName=l.ck.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",t),...n})}).displayName=l.Z0.displayName},63136:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq"}}},function(e){e.O(0,[8255,1607,3954,1919,3861,9259,8667,4363,4447,4357,8155,9334,2327,5477,4986,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1929],{39929:function(e,s,t){Promise.resolve().then(t.bind(t,42780))},42780:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return eo}});var a=t(57437),n=t(63136),l=t.n(n),i=t(2265),o=t(74986),r=t(99376),d=t(14308),c=t(59199);t(2446);var u=t(7436),m=t(5477),h=t(56937),x=t(55287),f=t(60729),p=t(34124),g=t(6512),j=t(37104),v=t(62869),N=t(632),b=t(47615),y=t(96108),w=t(36360),_=t(60906),S=t(36720),C=t(61563),k=t(82123),O=t(76818),I=t(78299),M=t(38513),E=t(94508),T=t(23518),z=t(57054),B=t(16605);let R=B.fC,L=B.xz,F=i.forwardRef((e,s)=>{let{className:t,align:n="center",sideOffset:l=4,...i}=e;return(0,a.jsx)(B.VY,{ref:s,align:n,sideOffset:l,className:(0,E.cn)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...i})});F.displayName=B.VY.displayName;var Z=t(93022);function P(e){var s;let{...t}=e,[n,l]=i.useState(!1),[o,r]=(0,i.useState)(void 0),[d,c]=(0,i.useState)(void 0),{data:m,error:x,isLoading:f}=(0,h.h2)(!0),[p,g]=(0,i.useState)([]),j=(0,u.IC)();return((0,i.useEffect)(()=>{if(!f&&m){if(g(m.chat_model_options),t.initialModel)c(m.chat_model_options.find(e=>e.name===t.initialModel));else{let e=m.chat_model_options.find(e=>e.id===m.selected_chat_model_config);if(e)c(e);else{c(m.chat_model_options[0]);return}}}},[m,t.initialModel,f]),(0,i.useEffect)(()=>{if(t.selectedModel&&d&&t.selectedModel!==d.name)c(p.find(e=>e.name===t.selectedModel));else if(null===t.selectedModel&&m){let e=m.chat_model_options.find(e=>e.id===m.selected_chat_model_config);if(e)t.onSelect(e,!1);else{t.onSelect(m.chat_model_options[0],!1);return}}},[t.selectedModel,p]),(0,i.useEffect)(()=>{if(d){let e=d.id!==(null==m?void 0:m.selected_chat_model_config);t.selectedModel!==d.name&&t.onSelect(d,e)}},[d]),f)?(0,a.jsx)(Z.O,{className:"w-full h-10"}):x?(0,a.jsx)("div",{className:"text-sm text-error",children:x.message}):(0,a.jsx)("div",{className:"grid gap-2 w-[250px]",children:(0,a.jsxs)(z.J2,{open:n,onOpenChange:l,...t,children:[(0,a.jsx)(z.xo,{asChild:!0,children:(0,a.jsxs)(v.z,{variant:"outline",role:"combobox","aria-expanded":n,"aria-label":"Select a model",className:"w-full justify-between text-left",disabled:null!==(s=t.disabled)&&void 0!==s&&s,children:[(0,a.jsx)("p",{className:"truncate",children:d?d.name.substring(0,20):"Select a model..."}),(0,a.jsx)(I.K,{className:"opacity-50"})]})}),(0,a.jsx)(z.yk,{align:"end",className:"w-[250px] p-0",children:j?(0,a.jsx)("div",{children:(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(W,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),l(!1)}},e.id))},"models")]})})}):(0,a.jsxs)(R,{children:[(0,a.jsx)(F,{side:"left",align:"start",forceMount:!0,className:"min-h-[280px]",children:(0,a.jsxs)("div",{className:"grid gap-2",children:[(0,a.jsx)("h4",{className:"font-medium leading-none",children:null==o?void 0:o.name}),(0,a.jsx)("div",{className:"text-sm text-muted-foreground",children:null==o?void 0:o.description}),(null==o?void 0:o.strengths)?(0,a.jsxs)("div",{className:"mt-4 grid gap-2",children:[(0,a.jsx)("h5",{className:"text-sm font-medium leading-none",children:"Strengths"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:o.strengths})]}):null]})}),(0,a.jsxs)("div",{children:[(0,a.jsx)(L,{}),(0,a.jsx)(T.mY,{loop:!0,children:(0,a.jsxs)(T.e8,{className:"h-[var(--cmdk-list-height)]",children:[(0,a.jsx)(T.sZ,{placeholder:"Search Models..."}),(0,a.jsx)(T.rb,{children:"No Models found."}),(0,a.jsx)(T.fu,{heading:"Models",children:p&&p.length>0&&p.map(e=>(0,a.jsx)(W,{model:e,isSelected:(null==d?void 0:d.id)===e.id,onPeek:e=>r(e),onSelect:()=>{c(e),l(!1)}},e.id))},"models")]})})]})]})})]})})}function W(e){let{model:s,isSelected:t,onSelect:n,onPeek:l}=e,o=i.useRef(null);return(0,u.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"&&l(s)})}),(0,a.jsxs)(T.di,{onSelect:n,ref:o,className:"data-[selected=true]:bg-muted data-[selected=true]:text-secondary-foreground",children:[s.name,(0,a.jsx)(M.J,{className:(0,E.cn)("ml-auto",t?"opacity-100":"opacity-0")})]},s.id)}var A=t(63861),D=t(69304),J=t(42225),K=t(26815),U=t(9270),V=t(30401);let G=i.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(U.fC,{ref:s,className:(0,E.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-secondary-foreground ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-gray-500 data-[state=checked]:text-primary-foreground",t),...n,children:(0,a.jsx)(U.z$,{className:(0,E.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(V.Z,{className:"h-4 w-4"})})})});G.displayName=U.fC.displayName;var H=t(81103),Q=t(61312),Y=t(26110),$=t(53647),q=t(84671),X=t(95186),ee=t(27648),es=t(40521);let et=e=>fetch(e).then(e=>e.json());function ea(e){let{...s}=e;return s.isMobileWidth?(0,a.jsx)(D.yo,{open:s.isOpen,onOpenChange:s.onOpenChange,children:(0,a.jsx)(D.ue,{className:"w-[300px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",children:(0,a.jsx)(el,{...s})})}):(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(el,{...s})})}function en(e){let s=(0,J.BI)(),t=q.xF,[n,l]=(0,i.useState)(!1),[o,r]=(0,i.useState)(),[d,c]=(0,i.useState)(),[u,m]=(0,i.useState)(),[h,x]=(0,i.useState)(!1),[f,p]=(0,i.useState)(),[g,j]=(0,i.useState)(!1),[N,S]=(0,i.useState)();return(0,i.useEffect)(()=>{o&&d&&u?j(!0):j(!1)},[o,d,u]),(0,a.jsxs)(Y.Vq,{children:[(0,a.jsx)(Y.hg,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",variant:"secondary",children:"Create Agent"})}),(0,a.jsxs)(Y.cZ,{children:[(0,a.jsxs)(Y.fK,{children:[h&&f?(0,a.jsxs)(Y.$N,{children:["Created ",o]}):(0,a.jsx)(Y.$N,{children:"Create a New Agent"}),(0,a.jsx)(Y.GG,{}),(0,a.jsx)(Y.Be,{children:"If these settings have been helpful, create a dedicated agent you can re-use across conversations."})]}),(0,a.jsx)("div",{className:"py-4",children:h&&f?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 py-8",children:[(0,a.jsx)(es.E.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:260,damping:20},children:(0,a.jsx)(b.f,{className:"w-16 h-16 text-green-500",weight:"fill"})}),(0,a.jsx)(es.E.p,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"text-center text-lg font-medium text-accent-foreground",children:"Created successfully!"}),(0,a.jsx)(es.E.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.4},children:(0,a.jsx)(ee.default,{href:"/agents?agent=".concat(f),children:(0,a.jsx)(v.z,{variant:"secondary",className:"mt-2",children:"Manage Agent"})})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(K._,{htmlFor:"agent_name",children:"Name"}),(0,a.jsx)(X.I,{id:"agent_name",className:"w-full p-2 border mt-4 border-slate-500 rounded-lg",disabled:n,value:o,onChange:e=>r(e.target.value)})]}),(0,a.jsxs)("div",{className:"flex gap-4",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:m,defaultValue:u,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Color"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:t.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(y.C,{className:"w-6 h-6 mr-2 ".concat((0,q.oz)(e)),weight:"fill"}),e]})},e))})]})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)($.Ph,{onValueChange:c,defaultValue:d,children:[(0,a.jsx)($.i4,{className:"w-full dark:bg-muted",disabled:n,children:(0,a.jsx)($.ki,{placeholder:"Icon"})}),(0,a.jsx)($.Bw,{className:"items-center space-y-1 inline-flex flex-col",children:s.map(e=>(0,a.jsx)($.Ql,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,J.TI)(e,null!=u?u:"gray","w-6","h-6"),e]})},e))})]})})]})]})}),(0,a.jsxs)(Y.cN,{children:[N&&(0,a.jsx)("div",{className:"text-red-500 text-sm",children:N}),!h&&(0,a.jsxs)(v.z,{type:"submit",onClick:()=>void(!n&&(l(!0),fetch("/api/agents",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o,icon:d,color:u,persona:e.customPrompt,chat_model:e.selectedModel,input_tools:e.inputTools,output_modes:e.outputModes,privacy_level:"private"})}).then(e=>e.json()).then(e=>{if(console.log("Success:",e),"detail"in e){S("Error creating agent: ".concat(e.detail)),l(!1);return}x(!0),p(e.slug),l(!1)}).catch(e=>{console.error("Error:",e),S("Error creating agent: ".concat(e)),l(!1)}))),disabled:n||!g,children:[n?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(_.R,{}),"Create"]}),(0,a.jsx)(Y.GG,{})]})]})]})}function el(e){var s,t,n,l;let{...o}=e,[r,d]=(0,i.useState)(!1),{data:c,error:u}=(0,A.ZP)("/api/agents/options",et),{data:m,isLoading:p,error:g}=(0,A.ZP)("/api/agents/conversation?conversation_id=".concat(o.conversationId),et),{data:j,error:N,isLoading:b}=(0,h.GW)(),[y,_]=(0,i.useState)(""),[I,M]=(0,i.useState)(),[E,T]=(0,i.useState)(),[B,R]=(0,i.useState)(),[L,F]=(0,i.useState)(!1),[Z,W]=(0,i.useState)((null==m?void 0:m.slug.toLowerCase())==="khoj"),[D,U]=(0,i.useState)(!1),V=null!==(s=null==j?void 0:j.is_active)&&void 0!==s&&s;function Y(){m&&(T(m.input_tools),(void 0===m.input_tools||0===m.input_tools.length)&&T((null==c?void 0:c.input_tools)?Object.keys(c.input_tools):[]),R(m.output_modes),(void 0===m.output_modes||0===m.output_modes.length)&&R((null==c?void 0:c.output_modes)?Object.keys(c.output_modes):[]),("khoj"===m.name.toLowerCase()||!0===m.is_hidden)&&d(!0),"khoj"===m.slug.toLowerCase()?(M(void 0),_(void 0),W(!0)):(W(!1),_(m.persona),M(m.chat_model)))}function $(e,s){return(F(!0),s.includes(e))?s.filter(s=>s!==e):[...s,e]}return(0,i.useEffect)(()=>{Y()},[m]),(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(o.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:m&&!r?(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(m.slug),children:[(0,J.TI)(m.icon,m.color),m.name]})}):(0,a.jsx)("div",{className:"flex items-center relative text-sm justify-between",children:(0,a.jsx)("p",{children:"Chat Options"})})}),(0,a.jsx)(f.Hz,{className:"border-b last:border-none",children:(0,a.jsx)(f.Ks,{className:"gap-0",children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:m&&m.has_files?(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 rounded-full",children:[(0,a.jsx)("div",{className:"text-muted-foreground",children:(0,a.jsx)(S.J,{})}),(0,a.jsx)("div",{className:"text-muted-foreground text-sm",children:"Using custom knowledge base"})]})},"agent_knowledge"):null})})},"knowledge"),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Instructions"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(O.g,{className:"w-full h-32 resize-none hover:resize-y",value:y,onChange:e=>{_(e.target.value),F(!0)},readOnly:!r,disabled:!r})})})]})},"instructions"),!p&&m&&(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsxs)(f.nO,{children:["Model",!V&&(0,a.jsx)("a",{href:"/settings",className:"hover:font-bold text-accent-foreground m-2 bg-accent bg-opacity-10 p-1 rounded-lg",children:"Upgrade"})]}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(P,{disabled:!r||!V,onSelect:(e,s)=>(function(e){let s=!(arguments.length>1)||void 0===arguments[1]||arguments[1];M(e),s&&F(!0)})(e.name,s),initialModel:Z?void 0:null==m?void 0:m.chat_model,selectedModel:I})},"model")})]})},"model"),(0,a.jsx)(z.J2,{defaultOpen:!1,children:(0,a.jsxs)(f.Hz,{children:[(0,a.jsx)(f.nO,{asChild:!0,children:(0,a.jsxs)(z.xo,{children:["Tools",(0,a.jsx)(C._,{className:"ml-auto transition-transform group-data-[state=open]/collapsible:rotate-180"})]})}),(0,a.jsx)(z.yk,{children:(0,a.jsx)(f.Ks,{children:(0,a.jsxs)(f.w3,{className:"p-1 m-0",children:[Object.entries(null!==(t=null==c?void 0:c.input_tools)&&void 0!==t?t:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(H.u,{children:[(0,a.jsx)(H.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)(G,{id:s,className:"".concat(r?"cursor-pointer":""),checked:(null!=E?E:[]).includes(s),onCheckedChange:()=>T($(s,null!=E?E:[])),disabled:!r,children:s})]})},s),(0,a.jsx)(Q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)}),Object.entries(null!==(n=null==c?void 0:c.output_modes)&&void 0!==n?n:{}).map(e=>{let[s,t]=e;return(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsxs)(H.u,{children:[(0,a.jsx)(H.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)(G,{id:s,className:"".concat(r?"cursor-pointer":""),checked:(null!=B?B:[]).includes(s),onCheckedChange:()=>R($(s,null!=B?B:[])),disabled:!r,children:s})]})},s),(0,a.jsx)(Q._v,{sideOffset:5,side:"left",align:"start",className:"text-sm bg-background text-foreground shadow-sm border border-slate-500 border-opacity-20 p-2 rounded-lg",children:t})]})},s)})]})})})]})}),(0,a.jsx)(f.Hz,{children:(0,a.jsxs)(f.Ks,{children:[(0,a.jsx)(f.nO,{children:"Files"}),(0,a.jsx)(f.w3,{className:"p-0 m-0",children:(0,a.jsx)(f.LO,{className:"list-none",children:(0,a.jsx)(x.J_,{conversationId:o.conversationId,uploadedFiles:[],isMobileWidth:null!==(l=o.isMobileWidth)&&void 0!==l&&l})},"files-conversation")})]})},"files")]}),o.isOpen&&(0,a.jsx)(f.ZW,{children:(0,a.jsx)(f.w3,{className:"p-0 m-0",children:m&&!r&&m.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==m?void 0:m.slug),children:"Manage"})})}):(0,a.jsxs)(a.Fragment,{children:[!L&&r&&y&&!Z&&I&&(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(en,{customPrompt:y,selectedModel:I,inputTools:null!=E?E:[],outputModes:null!=B?B:[]})})}),(0,a.jsx)(f.LO,{children:(0,a.jsx)(f.bb,{asChild:!0,children:(0,a.jsx)(v.z,{className:"w-full",onClick:()=>void(Y(),F(!1)),variant:"ghost",disabled:!r||!L,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(L?"bg-accent-foreground text-accent":""),variant:"secondary",onClick:()=>(function(){if(L){if(!Z&&(null==m?void 0:m.is_hidden)===!1){alert("This agent is not a hidden agent. It cannot be modified from this interface.");return}let e="PATCH";Z&&(e="POST");let s={persona:y,chat_model:I,input_tools:E,output_modes:B,...Z?{}:{slug:null==m?void 0:m.slug}};U(!0),fetch(Z?"/api/agents/hidden?conversation_id=".concat(o.conversationId):"/api/agents/hidden",{method:e,headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>{U(!1),e.json()}).then(e=>{(0,A.JG)("/api/agents/conversation?conversation_id=".concat(o.conversationId)),F(!1)}).catch(e=>{console.error("Error:",e),U(!1)})}})(),disabled:!r||!L||D,children:[D?(0,a.jsx)(w.U,{className:"animate-spin"}):(0,a.jsx)(k.Z,{}),D?"Saving":"Save"]})})})]})})},"actions")]})}function ei(e){let s=(0,r.useSearchParams)().get("conversationId"),[t,n]=(0,i.useState)(""),[d,c]=(0,i.useState)([]),[u,h]=(0,i.useState)(!1),[x,f]=(0,i.useState)(null),[p,g]=(0,i.useState)(!1),j=(0,i.useRef)(null),v=e.setQueryToProcess,N=e.onConversationIdChange,b=e.isMobileWidth?"w-full":"w-4/6";if((0,i.useEffect)(()=>{if(d.length>0){let s=d.map(e=>encodeURIComponent(e));e.setImages(s)}},[d,e.setImages]),(0,i.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&&(h(!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,i.useEffect)(()=>{t&&(h(!0),v(t))},[t,v]),(0,i.useEffect)(()=>{s&&(null==N||N(s))},[s,N]),(0,i.useEffect)(()=>{e.streamedMessages&&e.streamedMessages.length>0&&e.streamedMessages[e.streamedMessages.length-1].completed?(h(!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:l().chatBodyFull,children:(0,a.jsx)(o.Z,{conversationId:s,setTitle:e.setTitle,setAgent:f,pendingMessage:u?t:"",incomingMessages:e.streamedMessages,setIncomingMessages:e.setStreamedMessages,customClassName:b,setIsChatSideBarOpen:e.setIsChatSideBarOpen})}),(0,a.jsx)("div",{className:"".concat(l().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(b," mr-auto ml-auto mt-auto"),children:(0,a.jsx)(m.a,{agentColor:null==x?void 0:x.color,isLoggedIn:e.isLoggedIn,sendMessage:e=>n(e),sendImage:e=>c(s=>[...s,e]),sendDisabled:u,chatOptionsData:e.chatOptionsData,conversationId:s,isMobileWidth:e.isMobileWidth,setUploadedFiles:e.setUploadedFiles,ref:j,isResearchModeEnabled:p,setTriggeredAbort:e.setTriggeredAbort})})]}),(0,a.jsx)(ea,{conversationId:s,isOpen:e.isChatSideBarOpen,onOpenChange:e.setIsChatSideBarOpen,isMobileWidth:e.isMobileWidth})]})}function eo(){let e="Khoj AI - Chat",[s,t]=(0,i.useState)(null),[n,o]=(0,i.useState)(!0),[r,m]=(0,i.useState)(e),[b,y]=(0,i.useState)(null),[w,_]=(0,i.useState)([]),[S,C]=(0,i.useState)(""),[k,O]=(0,i.useState)(!1),[I,M]=(0,i.useState)(void 0),[E,T]=(0,i.useState)([]),[z,B]=(0,i.useState)(null),[R,L]=(0,i.useState)(!1),{locationData:F,locationDataError:Z,locationDataLoading:P}=(0,u.k6)()||{locationData:{timezone:Intl.DateTimeFormat().resolvedOptions().timeZone}},{data:W,error:A,isLoading:D}=(0,h.GW)(),J=(0,u.IC)(),[K,U]=(0,i.useState)(!1);async function V(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="",l=[],i={},o={};for(;;){let e;let{done:r,value:d}=await s.read();if(r){C(""),O(!1),T([]),b&&(0,c.tQ)(b,m);break}for(n+=t.decode(d,{stream:!0});-1!==(e=n.indexOf(a));){let s=n.slice(0,e);if(n=n.slice(e+a.length),s){let e=w.find(e=>!e.completed);if(!e){console.error("No current message found");return}({context:l,onlineContext:i,codeContext:o}=(0,c.VK)(s,e,l,i,o)),_([...w])}}}}async function G(){if(localStorage.removeItem("message"),!S||!b)return;let e={q:S,conversation_id:b,stream:!0,...F&&{city:F.city,region:F.region,country:F.country,country_code:F.countryCode,timezone:F.timezone},...E.length>0&&{images:E},...I&&{files:I}},s=await fetch("/api/chat?client=web",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:null==z?void 0:z.signal});try{await V(s)}catch(l){let e;try{e=await s.json()}catch(s){e={streamError:"Error reading API error response stream. Expected JSON response."}}console.error(e);let t=w.find(e=>!e.completed);if(!t)return;let a=l.message,n=l.name;a.includes("Error in input stream")?t.rawResponse="Woops! The connection broke while I was writing my thoughts down. Maybe try again in a bit or dislike this message if the issue persists?":e.streamError?t.rawResponse="Umm, not sure what just happened but I lost my train of thought. Could you try again or ask my developers to look into this if the issue persists? They can be contacted at the Khoj Github, Discord or team@khoj.dev.":429===s.status?"detail"in e?t.rawResponse="".concat(e.detail):t.rawResponse="I'm a bit overwhelmed at the moment. Could you try again in a bit or dislike this message if the issue persists?":"AbortError"===n?t.rawResponse="I've stopped processing this message. If you'd like to continue, please send the message again.":t.rawResponse="Umm, not sure what just happened. I see this error message: ".concat(a,". Could you try again or dislike this message if the issue persists?"),t.completed=!0,_([...w]),C(""),O(!1)}}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,u.EK)()},[]),(0,i.useEffect)(()=>{R&&(null==z||z.abort(),function(){let e=w.find(e=>!e.completed);e&&(e.completed=!0,_([...w]),C(""),O(!1))}(),L(!1))}),(0,i.useEffect)(()=>{if(S){let e={rawResponse:"",trainOfThought:[],context:[],onlineContext:{},codeContext:{},completed:!1,timestamp:new Date().toISOString(),rawQuery:S||"",images:E,queryFiles:I};_(s=>[...s,e]),O(!0),B(new AbortController)}},[S]),(0,i.useEffect)(()=>{k&&!P&&G()},[k,P]),n?(0,a.jsx)(d.Z,{}):(0,a.jsxs)(f.Hn,{children:[(0,a.jsx)(p.S,{conversationId:b||""}),(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"}),b&&(0,a.jsx)("div",{className:"".concat(l().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:J?(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:b,setTitle:m,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:()=>U(!K),children:(0,a.jsx)(N.T,{className:"w-6 h-6"})})})]}),(0,a.jsxs)("div",{className:"".concat(l().main," ").concat(l().chatLayout),children:[(0,a.jsx)("title",{children:"".concat(e).concat(r&&r!==e?": ".concat(r):"")}),(0,a.jsx)("div",{className:l().chatBox,children:(0,a.jsx)("div",{className:l().chatBoxBody,children:(0,a.jsx)(i.Suspense,{fallback:(0,a.jsx)(d.Z,{}),children:(0,a.jsx)(ei,{isLoggedIn:!!W,streamedMessages:w,setStreamedMessages:_,chatOptionsData:s,setTitle:m,setQueryToProcess:C,setUploadedFiles:M,isMobileWidth:J,onConversationIdChange:e=>{y(e)},setImages:T,setTriggeredAbort:L,isChatSideBarOpen:K,setIsChatSideBarOpen:U})})})})]})]})]})}},26815:function(e,s,t){"use strict";t.d(s,{_:function(){return d}});var a=t(57437),n=t(2265),l=t(6394),i=t(90535),o=t(94508);let r=(0,i.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)(l.f,{ref:s,className:(0,o.cn)(r(),t),...n})});d.displayName=l.f.displayName},53647:function(e,s,t){"use strict";t.d(s,{Bw:function(){return f},Ph:function(){return c},Ql:function(){return p},i4:function(){return m},ki:function(){return u}});var a=t(57437),n=t(2265),l=t(56873),i=t(40875),o=t(22135),r=t(30401),d=t(94508);let c=l.fC;l.ZA;let u=l.B4,m=n.forwardRef((e,s)=>{let{className:t,children:n,...o}=e;return(0,a.jsxs)(l.xz,{ref:s,className:(0,d.cn)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...o,children:[n,(0,a.jsx)(l.JO,{asChild:!0,children:(0,a.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});m.displayName=l.xz.displayName;let h=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.u_,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(o.Z,{className:"h-4 w-4"})})});h.displayName=l.u_.displayName;let x=n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.$G,{ref:s,className:(0,d.cn)("flex cursor-default items-center justify-center py-1",t),...n,children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})})});x.displayName=l.$G.displayName;let f=n.forwardRef((e,s)=>{let{className:t,children:n,position:i="popper",...o}=e;return(0,a.jsx)(l.h_,{children:(0,a.jsxs)(l.VY,{ref:s,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:i,...o,children:[(0,a.jsx)(h,{}),(0,a.jsx)(l.l_,{className:(0,d.cn)("p-1","popper"===i&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,a.jsx)(x,{})]})})});f.displayName=l.VY.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.__,{ref:s,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...n})}).displayName=l.__.displayName;let p=n.forwardRef((e,s)=>{let{className:t,children:n,...i}=e;return(0,a.jsxs)(l.ck,{ref:s,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...i,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(l.wU,{children:(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(l.eT,{children:n})]})});p.displayName=l.ck.displayName,n.forwardRef((e,s)=>{let{className:t,...n}=e;return(0,a.jsx)(l.Z0,{ref:s,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",t),...n})}).displayName=l.Z0.displayName},63136:function(e){e.exports={main:"chat_main__8xQu5",suggestions:"chat_suggestions__m8n2t",inputBox:"chat_inputBox__LOFws",chatBodyFull:"chat_chatBodyFull__FfKEK",chatBody:"chat_chatBody__sS1LX",chatLayout:"chat_chatLayout__pR203",chatBox:"chat_chatBox__FBct_",titleBar:"chat_titleBar__R5QlK",chatBoxBody:"chat_chatBoxBody__qT_SC",agentIndicator:"chat_agentIndicator__8V55w",chatTitleWrapper:"chat_chatTitleWrapper__6ChWq"}}},function(e){e.O(0,[8255,1607,3954,1919,3861,9259,8667,4363,4447,4357,8155,9334,2327,5477,4986,2971,2117,1744],function(){return e(e.s=39929)}),_N_E=e.O()}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6938],{62960:function(e,t,s){Promise.resolve().then(s.bind(s,31537))},31537:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return ei}});var a,n,r=s(57437),i=s(917),o=s.n(i);s(97510);var l=s(2265),c=s(77992),d=s(56937),h=s(7436),m=s(67341),x=s(62869),u=s(26371),p=s(95186),j=s(66070),f=s(84190),g=s(94508);let b=l.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,g.cn)("w-full caption-bottom text-sm",s),...a})})});b.displayName="Table",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("thead",{ref:t,className:(0,g.cn)("[&_tr]:border-b",s),...a})}).displayName="TableHeader";let w=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tbody",{ref:t,className:(0,g.cn)("[&_tr:last-child]:border-0",s),...a})});w.displayName="TableBody",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tfoot",{ref:t,className:(0,g.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...a})}).displayName="TableFooter";let N=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("tr",{ref:t,className:(0,g.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...a})});N.displayName="TableRow",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("th",{ref:t,className:(0,g.cn)("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",s),...a})}).displayName="TableHead";let y=l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("td",{ref:t,className:(0,g.cn)("p-4 align-middle [&:has([role=checkbox])]:pr-0",s),...a})});y.displayName="TableCell",l.forwardRef((e,t)=>{let{className:s,...a}=e;return(0,r.jsx)("caption",{ref:t,className:(0,g.cn)("mt-4 text-sm text-muted-foreground",s),...a})}).displayName="TableCaption";var v=s(3894),_=s(81228),k=s(89203),S=s(94018),T=s(13272),C=s(88435),D=s(19841),F=s(37295),E=s(2049),P=s(50525),O=s(5147),A=s(80438),I=s(2452),Y=s(47615),z=s(35099),K=s(22345),R=s(75216),W=s(47020),Z=s(90483),B=s(73925),M=s(54271),U=s(95656),V=s(58717),H=s(87296),L=s(56777),G=s(57466),q=s(97525),J=s(45178),X=s(14308),$=s(34688),Q=s(60729),ee=s(34124),et=s(6512),es=s(37104);let ea=e=>{var t,s;let{items:a,selected:n,callbackFunc:i}=e,[o,c]=(0,l.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)(f.h_,{children:[(0,r.jsx)(f.$F,{asChild:!0,className:"w-full rounded-lg",children:(0,r.jsxs)(x.z,{variant:"outline",className:"justify-start py-6 rounded-lg",children:[null===(t=a.find(e=>e.id.toString()===o))||void 0===t?void 0:t.name," ",(0,r.jsx)(v.p,{className:"h-4 w-4 ml-auto text-muted-foreground"})]})}),(0,r.jsx)(f.AW,{style:{maxHeight:"200px",overflowY:"auto",minWidth:"var(--radix-dropdown-menu-trigger-width)"},children:(0,r.jsx)(f._x,{value:o,onValueChange:async e=>{c(e),await i(e)},children:a.map(e=>(0,r.jsx)(f.qB,{value:e.id.toString(),children:e.name},e.id.toString()))})})]})})},en=()=>{let[e,t]=(0,l.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,l.useEffect)(()=>{i()},[]),{apiKeys:e,generateAPIKey:a,copyAPIKey:n,deleteAPIKey:r}};function er(){let{apiKeys:e,generateAPIKey:t,copyAPIKey:s,deleteAPIKey:a}=en(),[n,i]=(0,l.useState)(new Set),{toast:o}=(0,c.pm)();return(0,r.jsxs)(j.Zb,{className:"grid grid-flow-column border border-gray-300 shadow-md rounded-lg dark:bg-muted dark:border-none border-opacity-50 lg:w-2/3",children:[(0,r.jsxs)(j.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)(_.s,{className:"h-7 w-7 mr-2"}),"API Keys"]}),(0,r.jsxs)(x.z,{variant:"secondary",className:"!mt-0",onClick:t,children:[(0,r.jsx)(k.v,{weight:"bold",className:"h-5 w-5 mr-2"}),"Generate Key"]})]}),(0,r.jsxs)(j.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)(b,{children:(0,r.jsx)(w,{children:e.map(e=>(0,r.jsxs)(N,{children:[(0,r.jsx)(y,{className:"pl-0 py-3",children:e.name}),(0,r.jsxs)(y,{className:"grid grid-flow-col grid-cols-[1fr_auto] bg-secondary dark:bg-background rounded-xl p-3 m-1",children:[(0,r.jsx)("span",{className:"font-mono text-left w-[50px] md:w-[400px]",children:n.has(e.token)?e.token:"".concat(e.token.slice(0,6),"...").concat(e.token.slice(-4))}),(0,r.jsxs)("div",{className:"grid grid-flow-col",children:[n.has(e.token)?(0,r.jsx)(S.N,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(t=>{let s=new Set(t);return s.delete(e.token),s})}):(0,r.jsx)(T.b,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>i(new Set([...n,e.token]))}),(0,r.jsx)(C.C,{weight:"bold",className:"h-4 w-4 mr-2 hover:bg-primary/40",onClick:()=>{o({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"}),s(e.token)}}),(0,r.jsx)(D.r,{weight:"bold",className:"h-4 w-4 mr-2 md:ml-4 text-red-400 hover:bg-primary/40",onClick:()=>{o({title:"\uD83D\uDD11 Deleted API Key: ".concat(e.name),description:"Apps using this API key will no longer connect to this Khoj account"}),a(e.token)}})]})]})]},e.token))})})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4"})]})}function ei(){let{data:e}=(0,d.h2)(!0),[t,s]=(0,l.useState)(null),[a,n]=(0,l.useState)(void 0),[i,f]=(0,l.useState)(null),[g,b]=(0,l.useState)(void 0),[w,N]=(0,l.useState)(""),[y,v]=(0,l.useState)("verified"),{toast:_}=(0,c.pm)(),k=(0,h.IC)(),S="w-full lg:w-5/12 grid grid-flow-column border border-gray-300 shadow-md rounded-lg border dark:border-none border-opacity-50 dark:bg-muted";(0,l.useEffect)(()=>{var t;s(e),b(null==e?void 0:e.phone_number),v((null==e?void 0:e.is_phone_number_verified)?"verified":(null==e?void 0:e.phone_number)?"otp":"setup"),n(null==e?void 0:e.given_name),f(null!==(t=null==e?void 0:e.notion_token)&&void 0!==t?t:null)},[e]);let T=async()=>{try{if(!(await fetch("/api/phone?phone_number=".concat(g),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to send OTP");v("verify")}catch(e){console.error("Error sending OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to send OTP. Try again or contact us at team@khoj.dev"})}},C=async()=>{try{if(!(await fetch("/api/phone/verify?code=".concat(w),{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to verify OTP");v("verified"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number verified"})}catch(e){console.error("Error verifying OTP:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to verify OTP. Try again or contact us at team@khoj.dev"})}},D=async()=>{try{if(!(await fetch("/api/phone",{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect phone number");b(void 0),v("setup"),_({title:"\uD83D\uDCF1 Phone",description:"Phone number disconnected"})}catch(e){console.error("Error disconnecting phone number:",e),_({title:"\uD83D\uDCF1 Phone",description:"Failed to disconnect phone number. Try again or contact us at team@khoj.dev"})}},en=async e=>{try{if(!(await fetch("/api/subscription?operation=".concat(e),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to change subscription");t&&(t.subscription_state="cancel"===e?d.o9.UNSUBSCRIBED:d.o9.SUBSCRIBED,s(t)),_({title:"\uD83D\uDCB3 Subscription",description:(null==t?void 0:t.subscription_state)==="unsubscribed"?"Your subscription was cancelled":"Your Futurist subscription has been renewed"})}catch(t){console.error("Error changing subscription:",t),_({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"})}},ei=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&&t){t.subscription_state=d.o9.TRIAL;let e=new Date(Date.now()+864e5*t.length_of_free_trial);t.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),t.subscription_enabled_trial_at=new Date().toISOString(),s(t),_({title:"\uD83C\uDF89 Trial Enabled",description:"Your free trial will end on ".concat(t.subscription_renewal_date)})}}catch(e){console.error("Error enabling free trial:",e),_({title:"⚠️ Failed to Enable Free Trial",description:"Failed to enable free trial. Try again or contact us at team@khoj.dev"})}},eo=async()=>{if(a)try{if(!(await fetch("/api/user/name?name=".concat(a),{method:"PATCH",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update name");t&&(t.given_name=a,s(t)),_({title:"✅ Updated Profile",description:"You name has been updated to ".concat(a)})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Update Profile",description:"Failed to update name. Try again or contact team@khoj.dev"})}},el=e=>async s=>{if(!(null==t?void 0:t.is_active)){_({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=")+s,{method:"POST",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to update model");_({title:"✅ Updated ".concat((0,h.LF)(e)," Model")})}catch(t){console.error("Failed to update ".concat(e," model:"),t),_({description:"❌ Failed to update ".concat((0,h.LF)(e)," model. Try again."),variant:"destructive"})}},ec=async()=>{if(i)try{if(!(await fetch("/api/content/notion",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})})).ok)throw Error("Failed to save Notion API key");t&&(t.notion_token=i,s(t)),_({title:"✅ Saved Notion Settings",description:"You Notion API key has been saved."})}catch(e){console.error("Error updating name:",e),_({title:"⚠️ Failed to Save Notion Settings",description:"Failed to save Notion API key. Try again or contact team@khoj.dev"})}},ed=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));_({title:"\uD83D\uDD04 Syncing ".concat(e),description:"Your ".concat(e," content is being synced.")})}catch(t){console.error("Error syncing content:",t),_({title:"⚠️ Failed to Sync ".concat(e),description:"Failed to sync ".concat(e," content. Try again or contact team@khoj.dev")})}},eh=async e=>{try{if(!(await fetch("/api/content/source/".concat(e),{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok)throw Error("Failed to disconnect ".concat(e));t&&("computer"===e?t.enabled_content_source.computer=!1:"notion"===e?(t.enabled_content_source.notion=!1,t.notion_token=null,f(t.notion_token)):"github"===e&&(t.enabled_content_source.github=!1),s(t)),"computer"===e?_({title:"✅ Deleted Synced Files",description:"Your synced documents have been deleted."}):_({title:"✅ Disconnected ".concat(e),description:"Your ".concat(e," integration to Khoj has been disconnected.")})}catch(t){console.error("Error disconnecting ".concat(e,":"),t),_({title:"⚠️ Failed to Disconnect ".concat(e),description:"Failed to disconnect from ".concat(e,". Try again or contact team@khoj.dev")})}};return t?(0,r.jsxs)(Q.Hn,{children:[(0,r.jsx)(ee.S,{conversationId:""}),(0,r.jsxs)(Q.kV,{children:[(0,r.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,r.jsx)(Q.vP,{className:"-ml-1"}),(0,r.jsx)(et.Z,{orientation:"vertical",className:"mr-2 h-4"}),k?(0,r.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,r.jsx)(es.VO,{className:"h-auto w-16"})}):(0,r.jsx)("h2",{className:"text-lg",children:"Settings"})]}),(0,r.jsxs)("div",{className:o().page,children:[(0,r.jsx)("title",{children:"Settings"}),(0,r.jsx)("div",{className:o().content,children:(0,r.jsx)("div",{className:"".concat(o().contentBody," mx-10 my-2"),children:(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(X.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)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(F.Y,{className:"h-7 w-7 mr-2"}),"Name"]}),(0,r.jsxs)(j.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)(p.I,{type:"text",onChange:e=>n(e.target.value),value:a,className:"w-full border border-gray-300 rounded-lg p-4 py-6"})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:eo,disabled:a===t.given_name,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-2"}),"Save"]})})]}),(0,r.jsxs)(j.Zb,{id:"subscription",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(P.a,{className:"h-7 w-7 mr-2"}),"Subscription"]}),(0,r.jsxs)(j.aY,{className:"grid gap-2 overflow-hidden",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Current Plan"}),"trial"===t.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"," ",t.length_of_free_trial," ","day trial of the Khoj Futurist plan. Your trial ends on"," ",t.subscription_renewal_date,". Check"," ",(0,r.jsx)("a",{href:"https://khoj.dev/#pricing",target:"_blank",children:"pricing page"})," ","to compare plans."]})]})||"subscribed"===t.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:t.subscription_renewal_date})]})]})||"unsubscribed"===t.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:t.subscription_renewal_date})]})]})||"expired"===t.subscription_state&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"text-xl",children:"Humanist"}),t.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:t.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)(j.eW,{className:"flex flex-wrap gap-4",children:"subscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"hover:text-red-400",onClick:()=>en("cancel"),children:[(0,r.jsx)(O.b,{className:"h-5 w-5 mr-2"}),"Unsubscribe"]})||"unsubscribed"==t.subscription_state&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>en("resubscribe"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Resubscribe"]})||t.subscription_enabled_trial_at&&(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:()=>window.open("".concat(t.khoj_cloud_subscription_url,"?prefilled_email=").concat(t.username),"_blank","noopener,noreferrer"),children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Subscribe"]})||(0,r.jsxs)(x.z,{variant:"outline",className:"text-primary/80 hover:text-primary",onClick:ei,children:[(0,r.jsx)(A.e,{weight:"bold",className:"h-5 w-5 mr-2"}),"Enable Trial"]})})]})]})]}),(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)(j.Zb,{id:"computer",className:S,children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-xl",children:[(0,r.jsx)(I.a,{className:"h-8 w-8 mr-2"}),"Knowledge Base",t.enabled_content_source.computer&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Manage and search through your digital brain."}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsxs)(x.z,{variant:"outline",size:"sm",title:"Search thorugh files",onClick:()=>window.location.href="/search",children:[(0,r.jsx)(z.Y,{className:"h-5 w-5 inline mr-1"}),"Search"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.computer||"hidden"),onClick:()=>eh("computer"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Clear All"]})]})]}),(0,r.jsxs)(j.Zb,{id:"github",className:"".concat(S," hidden"),children:[(0,r.jsxs)(j.Ol,{className:"flex flex-row text-2xl",children:[(0,r.jsx)(R.b,{className:"h-8 w-8 mr-2"}),"Github"]}),(0,r.jsx)(j.aY,{className:"overflow-hidden pb-12 text-gray-400",children:"Set Github repositories to index"}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:[(0,r.jsx)(x.z,{variant:"outline",size:"sm",children:t.enabled_content_source.github&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(W.h,{className:"h-5 w-5 inline mr-1"}),"Manage"]})||(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]})}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.enabled_content_source.github||"hidden"),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 inline mr-1"}),"Disable"]})]})]}),(0,r.jsxs)(j.Zb,{id:"notion",className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(B.F,{className:"h-7 w-7 mr-2"}),"Notion",t.enabled_content_source.notion&&(0,r.jsx)(Y.f,{className:"h-6 w-6 ml-auto text-green-500",weight:"fill"})]}),(0,r.jsxs)(j.aY,{className:"grid gap-4",children:[(0,r.jsx)("p",{className:"text-gray-400",children:"Sync your Notion workspace."}),!t.notion_oauth_url&&(0,r.jsx)(p.I,{onChange:e=>f(e.target.value),value:i||"",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)(j.eW,{className:"flex flex-wrap gap-4",children:[t.notion_oauth_url&&!t.enabled_content_source.notion?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>{window.open(t.notion_oauth_url)},children:[(0,r.jsx)(Z.F,{className:"h-5 w-5 inline mr-1"}),"Connect"]}):t.enabled_content_source.notion&&i===t.notion_token?(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:()=>ed("notion"),children:[(0,r.jsx)(M.t,{className:"h-5 w-5 inline mr-1"}),"Sync"]}):t.notion_oauth_url?(0,r.jsx)(r.Fragment,{}):(0,r.jsxs)(x.z,{variant:"outline",size:"sm",onClick:ec,disabled:i===t.notion_token,children:[(0,r.jsx)(E.B,{className:"h-5 w-5 inline mr-1"}),t.enabled_content_source.notion&&"Update API Key"||"Set API Key"]}),(0,r.jsxs)(x.z,{variant:"outline",size:"sm",className:"".concat(t.notion_token||"hidden"),onClick:()=>eh("notion"),children:[(0,r.jsx)(K.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:[t.chat_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(U.G,{className:"h-7 w-7 mr-2"}),"Chat"]}),(0,r.jsxs)(j.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)(ea,{items:t.chat_model_options,selected:t.selected_chat_model_config,callbackFunc:el("chat")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.paint_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(V.Y,{className:"h-7 w-7 mr-2"}),"Paint"]}),(0,r.jsxs)(j.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)(ea,{items:t.paint_model_options,selected:t.selected_paint_model_config,callbackFunc:el("paint")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.is_active&&(0,r.jsx)("p",{className:"text-gray-400",children:"Subscribe to switch model"})})]}),t.voice_model_options.length>0&&(0,r.jsxs)(j.Zb,{className:S,children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(H.u,{className:"h-7 w-7 mr-2"}),"Voice"]}),(0,r.jsxs)(j.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)(ea,{items:t.voice_model_options,selected:t.selected_voice_model_config,callbackFunc:el("voice")})]}),(0,r.jsx)(j.eW,{className:"flex flex-wrap gap-4",children:!t.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-col flex-wrap gap-8",children:[!t.anonymous_mode&&(0,r.jsx)(er,{}),(0,r.jsxs)(j.Zb,{className:"".concat(S," lg:w-2/3"),children:[(0,r.jsxs)(j.Ol,{className:"text-xl flex flex-row",children:[(0,r.jsx)(L.V,{className:"h-7 w-7 mr-2"}),"Chat on Whatsapp","verified"===y&&(0,r.jsx)(Y.f,{weight:"bold",className:"h-4 w-4 ml-1 text-green-400"})||"setup"!==y&&(0,r.jsx)(G.C,{weight:"bold",className:"h-4 w-4 ml-1 text-yellow-400"})]}),(0,r.jsxs)(j.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)($.Z,{initialValue:g||"",onChangeNumber:b,disabled:"verify"===y,initOptions:{separateDialCode:!0,initialCountry:"af",utilsScript:"https://assets.khoj.dev/intl-tel-input%4023.8.0_build_js_utils.js",containerClass:"".concat(o().phoneInput)}}),"verify"===y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:"Enter the OTP sent to your number: ".concat(g)}),(0,r.jsx)(u.Zn,{autoFocus:!0,maxLength:6,value:w||"",onChange:N,onComplete:()=>v("verify"),children:(0,r.jsxs)(u.hf,{children:[(0,r.jsx)(u.cY,{index:0}),(0,r.jsx)(u.cY,{index:1}),(0,r.jsx)(u.cY,{index:2}),(0,r.jsx)(u.cY,{index:3}),(0,r.jsx)(u.cY,{index:4}),(0,r.jsx)(u.cY,{index:5})]})})]})]})]}),(0,r.jsxs)(j.eW,{className:"flex flex-wrap gap-4",children:["verify"===y&&(0,r.jsx)(x.z,{variant:"outline",onClick:C,children:"Verify"})||(0,r.jsx)(x.z,{variant:"outline",disabled:!g||g===t.phone_number&&"verified"===y||!(0,m.y)(g),onClick:T,children:t.phone_number?g&&(g!==t.phone_number||"verified"!==y)&&(0,m.y)(g)?(0,r.jsxs)(r.Fragment,{children:["Send OTP"," ",(0,r.jsx)(J.o,{className:"inline ml-2",weight:"bold"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(q.F,{className:"inline mr-2 text-green-400"}),"Switch Number"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Z.F,{className:"inline mr-2"}),"Setup Whatsapp"]})}),"verified"===y&&(0,r.jsxs)(x.z,{variant:"outline",onClick:()=>D(),children:[(0,r.jsx)(K.u,{className:"h-5 w-5 mr-2"}),"Disconnect"]})]})]})]})]})]})})})})]})]})]}):(0,r.jsx)(X.Z,{})}(a=n||(n={})).Setup="setup",a.SendOTP="otp",a.VerifyOTP="verify",a.Verified="verified"},77992:function(e,t,s){"use strict";s.d(t,{pm:function(){return m}});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)},o=(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)}}},l=[],c={toasts:[]};function d(e){c=o(c,e),l.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 m(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:h,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},917:function(e){e.exports={page:"settings_page__mP7qk",contentBody:"settings_contentBody__uZjue",phoneInput:"settings_phoneInput__j6xJN"}}},function(e){e.O(0,[6008,1607,3861,9259,8667,4363,6244,1199,2327,2971,2117,1744],function(){return e(e.s=62960)}),_N_E=e.O()}]);
|
@@ -1 +1 @@
|
|
1
|
-
!function(){"use strict";var e,t,n,r,o,c,a,f,u,i={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=i,e=[],b.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var a=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],f=!0,u=0;u<n.length;u++)a>=o&&Object.keys(b.O).every(function(e){return b.O[e](n[u])})?n.splice(u--,1):(f=!1,o<a&&(a=o));if(f){e.splice(c--,1);var i=r();void 0!==i&&(t=i)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);b.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},b.d(o,c),o},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return"static/chunks/"+(({1264:"90542734",4692:"0d8bff65",6555:"964ecbae",7293:"94ca1967"})[e]||e)+"."+({58:"f4bd8a3c9d88f5fe",133:"392ae90c3b2a67f2",1243:"ea2826fb35adb15a",1264:"fecd4dc1a89ed166",1592:"b069bdb7aaddd2eb",2069:"f060659791c0c484",2170:"45431769330fa5b7",3237:"c4754f02f1a388cb",3305:"1fc7297ba154ee95",3332:"6313db5217bb1b67",3451:"421db0b49fdbd881",3460:"39c2b9b6a3898384",3727:"dcea8f2193111552",4299:"2aaa569416cfc208",4327:"238d15c09a039b8b",4415:"e0c0da5eedae4dd7",4610:"a1e7f40a759ed2aa",4650:"41f041da0ad365ad",4692:"4b1018183a8be7c2",4872:"5422e8324272ab40",5061:"79a660faed0e16a9",5279:"85d537880b8041ae",5402:"b9460f1b16b57e92",5555:"f7cf9795d675de51",5978:"ddc72cd73130aadc",6434:"7afea9648e238ad5",6555:"51d6faf8801d15e6",7140:"4be689873f6a2d1f",7293:"1d9b42d929a1ee8c",7836:"86884157d53d23a1",7890:"f681eb1d1f83bea2",7953:"f6fc335a23efb959",8254:"3145a4fbdcfdca46",8400:"c95e4e79bcd79a56",8673:"be44c4d9e4f1d084",8698:"a088118fef40d302",9022:"33974a513a281fd2",9433:"b1b5f5d050c43e3c",9597:"83583248dfbf6e73",9822:"34f293973c4e9b04"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",b.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var a,f,u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var d=u[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){a=d;break}}a||(f=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,b.nc&&a.setAttribute("nonce",b.nc),a.setAttribute("data-webpack",o+n),a.src=b.tu(e)),r[e]=[t];var l=function(t,n){a.onerror=a.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),f&&document.head.appendChild(a)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/_next/",a={2272:0,3254:0,3587:0,6250:0,8255:0,1607:0,
|
1
|
+
!function(){"use strict";var e,t,n,r,o,c,a,f,u,i={},d={};function b(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}},r=!0;try{i[e].call(n.exports,n,n.exports,b),r=!1}finally{r&&delete d[e]}return n.exports}b.m=i,e=[],b.O=function(t,n,r,o){if(n){o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[n,r,o];return}for(var a=1/0,c=0;c<e.length;c++){for(var n=e[c][0],r=e[c][1],o=e[c][2],f=!0,u=0;u<n.length;u++)a>=o&&Object.keys(b.O).every(function(e){return b.O[e](n[u])})?n.splice(u--,1):(f=!1,o<a&&(a=o));if(f){e.splice(c--,1);var i=r();void 0!==i&&(t=i)}}return t},b.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(t,{a:t}),t},n=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},b.t=function(e,r){if(1&r&&(e=this(e)),8&r||"object"==typeof e&&e&&(4&r&&e.__esModule||16&r&&"function"==typeof e.then))return e;var o=Object.create(null);b.r(o);var c={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach(function(t){c[t]=function(){return e[t]}});return c.default=function(){return e},b.d(o,c),o},b.d=function(e,t){for(var n in t)b.o(t,n)&&!b.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},b.f={},b.e=function(e){return Promise.all(Object.keys(b.f).reduce(function(t,n){return b.f[n](e,t),t},[]))},b.u=function(e){return"static/chunks/"+(({1264:"90542734",4692:"0d8bff65",6555:"964ecbae",7293:"94ca1967"})[e]||e)+"."+({58:"f4bd8a3c9d88f5fe",133:"392ae90c3b2a67f2",1243:"ea2826fb35adb15a",1264:"fecd4dc1a89ed166",1592:"b069bdb7aaddd2eb",2069:"f060659791c0c484",2170:"45431769330fa5b7",3237:"c4754f02f1a388cb",3305:"1fc7297ba154ee95",3332:"6313db5217bb1b67",3451:"421db0b49fdbd881",3460:"39c2b9b6a3898384",3727:"dcea8f2193111552",4299:"2aaa569416cfc208",4327:"238d15c09a039b8b",4415:"e0c0da5eedae4dd7",4610:"a1e7f40a759ed2aa",4650:"41f041da0ad365ad",4692:"4b1018183a8be7c2",4872:"5422e8324272ab40",5061:"79a660faed0e16a9",5279:"85d537880b8041ae",5402:"b9460f1b16b57e92",5555:"f7cf9795d675de51",5978:"ddc72cd73130aadc",6434:"7afea9648e238ad5",6555:"51d6faf8801d15e6",7140:"4be689873f6a2d1f",7293:"1d9b42d929a1ee8c",7836:"86884157d53d23a1",7890:"f681eb1d1f83bea2",7953:"f6fc335a23efb959",8254:"3145a4fbdcfdca46",8400:"c95e4e79bcd79a56",8673:"be44c4d9e4f1d084",8698:"a088118fef40d302",9022:"33974a513a281fd2",9433:"b1b5f5d050c43e3c",9597:"83583248dfbf6e73",9822:"34f293973c4e9b04"})[e]+".js"},b.miniCssF=function(e){},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="_N_E:",b.l=function(e,t,n,c){if(r[e]){r[e].push(t);return}if(void 0!==n)for(var a,f,u=document.getElementsByTagName("script"),i=0;i<u.length;i++){var d=u[i];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==o+n){a=d;break}}a||(f=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,b.nc&&a.setAttribute("nonce",b.nc),a.setAttribute("data-webpack",o+n),a.src=b.tu(e)),r[e]=[t];var l=function(t,n){a.onerror=a.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),f&&document.head.appendChild(a)},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.tt=function(){return void 0===c&&(c={createScriptURL:function(e){return e}},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(c=trustedTypes.createPolicy("nextjs#bundler",c))),c},b.tu=function(e){return b.tt().createScriptURL(e)},b.p="/_next/",a={2272:0,3254:0,3587:0,6250:0,8255:0,1607:0,9346:0,6008:0,2026:0},b.f.j=function(e,t){var n=b.o(a,e)?a[e]:void 0;if(0!==n){if(n)t.push(n[2]);else if(/^(1607|2026|2272|3254|3587|6008|6250|8255|9346)$/.test(e))a[e]=0;else{var r=new Promise(function(t,r){n=a[e]=[t,r]});t.push(n[2]=r);var o=b.p+b.u(e),c=Error();b.l(o,function(t){if(b.o(a,e)&&(0!==(n=a[e])&&(a[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",c.name="ChunkLoadError",c.type=r,c.request=o,n[1](c)}},"chunk-"+e,e)}}},b.O.j=function(e){return 0===a[e]},f=function(e,t){var n,r,o=t[0],c=t[1],f=t[2],u=0;if(o.some(function(e){return 0!==a[e]})){for(n in c)b.o(c,n)&&(b.m[n]=c[n]);if(f)var i=f(b)}for(e&&e(t);u<o.length;u++)r=o[u],b.o(a,r)&&a[r]&&a[r][0](),a[r]=0;return b.O(i)},(u=self.webpackChunk_N_E=self.webpackChunk_N_E||[]).forEach(f.bind(null,0)),u.push=f.bind(null,u.push.bind(u)),b.nc=void 0}();
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="__variable_f36179 __variable_702545"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/1d8a05b60287ae6c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/77c207b095007c34-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/82ef96de0e8f4d8c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/a6ecd16fa044d500-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c4250770ab8708b6-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/e098aaaecc9cfbb2-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/089de1d8526b96e9.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/a3411982c232c7be.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/55d4a822f8d94b67.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-
|
1
|
+
<!DOCTYPE html><html lang="en" class="__variable_f36179 __variable_702545"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/1d8a05b60287ae6c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/77c207b095007c34-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/82ef96de0e8f4d8c-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/a6ecd16fa044d500-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/c4250770ab8708b6-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/e098aaaecc9cfbb2-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/089de1d8526b96e9.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/a3411982c232c7be.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/55d4a822f8d94b67.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-f813971dd4615afd.js"/><script src="/_next/static/chunks/fd9d1056-7454f5bbfcf5bd5b.js" async=""></script><script src="/_next/static/chunks/2117-ce1f0a4598f5e4fe.js" async=""></script><script src="/_next/static/chunks/main-app-de1f09df97a3cfc7.js" async=""></script><script src="/_next/static/chunks/3861-8662fce65c02717d.js" async=""></script><script src="/_next/static/chunks/9259-fa40e7cf2ca28e04.js" async=""></script><script src="/_next/static/chunks/8667-8136f74e9a086fca.js" async=""></script><script src="/_next/static/chunks/4363-9870bda67c2cf031.js" async=""></script><script src="/_next/static/chunks/4447-6e47461d1100c3cc.js" async=""></script><script src="/_next/static/chunks/6663-61c3f91791968671.js" async=""></script><script src="/_next/static/chunks/7647-469de84d236fc7fd.js" async=""></script><script src="/_next/static/chunks/2327-02e86a50c65e575a.js" async=""></script><script src="/_next/static/chunks/5427-61c33a2c35ffbde6.js" async=""></script><script src="/_next/static/chunks/app/agents/page-2f55f9d0da49bf31.js" async=""></script><script src="/_next/static/chunks/app/agents/layout-64b81f8eeac13427.js" async=""></script><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';"/><meta http-equiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';"/><title>Khoj AI - Agents</title><meta name="description" content="Find or create agents with custom knowledge, tools and personalities to help address your specific needs."/><link rel="manifest" href="/static/khoj.webmanifest" crossorigin="use-credentials"/><meta name="keywords" content="research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant"/><meta property="og:title" content="Khoj AI - Agents"/><meta property="og:description" content="Find or create agents with custom knowledge, tools and personalities to help address your specific needs."/><meta property="og:url" content="https://app.khoj.dev/agents/"/><meta property="og:site_name" content="Khoj AI"/><meta property="og:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta property="og:image:width" content="940"/><meta property="og:image:height" content="525"/><meta property="og:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta property="og:image:width" content="256"/><meta property="og:image:height" content="256"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Khoj AI - Agents"/><meta name="twitter:description" content="Find or create agents with custom knowledge, tools and personalities to help address your specific needs."/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_hero.png"/><meta name="twitter:image:width" content="940"/><meta name="twitter:image:height" content="525"/><meta name="twitter:image" content="https://assets.khoj.dev/khoj_lantern_256x256.png"/><meta name="twitter:image:width" content="256"/><meta name="twitter:image:height" content="256"/><link rel="icon" href="/static/assets/icons/khoj_lantern.ico"/><link rel="apple-touch-icon" href="/static/assets/icons/khoj_lantern_256x256.png"/><meta name="next-size-adjust"/><script>
|
2
2
|
try {
|
3
3
|
if (localStorage.getItem('theme') === 'dark' ||
|
4
4
|
(!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
@@ -12,4 +12,4 @@
|
|
12
12
|
document.documentElement.classList.add('dark');
|
13
13
|
}
|
14
14
|
} catch (e) {}
|
15
|
-
</script></head><body><main><div class="agents_agentList__XVx4A"><button class="undefined"><span> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 256 256" class="inline animate-spin h-5 w-5 mx-3"><path d="M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"></path></svg></span></button> booting up your agents</div></main><script src="/_next/static/chunks/webpack-63715907cbdf16c6.js" async=""></script></body></html><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/1d8a05b60287ae6c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/e098aaaecc9cfbb2-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/089de1d8526b96e9.css\",\"style\"]\n9:HL[\"/_next/static/css/a3411982c232c7be.css\",\"style\"]\na:HL[\"/_next/static/css/55d4a822f8d94b67.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"b:I[12846,[],\"\"]\nd:I[19107,[],\"ClientPageRoot\"]\ne:I[37335,[\"3861\",\"static/chunks/3861-8662fce65c02717d.js\",\"9259\",\"static/chunks/9259-fa40e7cf2ca28e04.js\",\"8667\",\"static/chunks/8667-8136f74e9a086fca.js\",\"4363\",\"static/chunks/4363-9870bda67c2cf031.js\",\"4447\",\"static/chunks/4447-6e47461d1100c3cc.js\",\"6663\",\"static/chunks/6663-61c3f91791968671.js\",\"7647\",\"static/chunks/7647-469de84d236fc7fd.js\",\"2327\",\"static/chunks/2327-36d17f2483e80f60.js\",\"5427\",\"static/chunks/5427-61c33a2c35ffbde6.js\",\"9718\",\"static/chunks/app/agents/page-2f55f9d0da49bf31.js\"],\"default\",1]\nf:I[85147,[\"3861\",\"static/chunks/3861-8662fce65c02717d.js\",\"8459\",\"static/chunks/app/agents/layout-447b58869479276c.js\"],\"ThemeProvider\"]\n10:I[4707,[],\"\"]\n11:I[36423,[],\"\"]\n13:I[61060,[],\"\"]\n14:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Lb\",null,{\"buildId\":\"ft5KXHI1GLT3L6pQPfg8R\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"agents\",\"\"],\"initialTree\":[\"\",{\"children\":[\"agents\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"agents\",{\"children\":[\"__PAGE__\",{},[[\"$Lc\",[\"$\",\"$Ld\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$e\"}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/55d4a822f8d94b67.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_702545\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"agents\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L11\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]}]}]]}]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/089de1d8526b96e9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a3411982c232c7be.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_702545\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L11\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L12\"],\"globalErrorComponent\":\"$13\",\"missingSlots\":\"$W14\"}]\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Agents\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Find or create agents with custom knowledge, tools and personalities to help address your specific needs.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"keywords\",\"content\":\"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"Khoj AI - Agents\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Find or create agents with custom knowledge, tools and personalities to help address your specific needs.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/agents/\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"17\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI - Agents\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:description\",\"content\":\"Find or create agents with custom knowledge, tools and personalities to help address your specific needs.\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"25\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"link\",\"26\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"27\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"28\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"c:null\n"])</script></body></html>
|
15
|
+
</script></head><body><main><div class="agents_agentList__XVx4A"><button class="undefined"><span> <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 256 256" class="inline animate-spin h-5 w-5 mx-3"><path d="M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z"></path></svg></span></button> booting up your agents</div></main><script src="/_next/static/chunks/webpack-f813971dd4615afd.js" async=""></script></body></html><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/1d8a05b60287ae6c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/77c207b095007c34-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/media/82ef96de0e8f4d8c-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n4:HL[\"/_next/static/media/a6ecd16fa044d500-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n5:HL[\"/_next/static/media/bd82c78e5b7b3fe9-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n6:HL[\"/_next/static/media/c4250770ab8708b6-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n7:HL[\"/_next/static/media/e098aaaecc9cfbb2-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n8:HL[\"/_next/static/css/089de1d8526b96e9.css\",\"style\"]\n9:HL[\"/_next/static/css/a3411982c232c7be.css\",\"style\"]\na:HL[\"/_next/static/css/55d4a822f8d94b67.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"b:I[12846,[],\"\"]\nd:I[19107,[],\"ClientPageRoot\"]\ne:I[37335,[\"3861\",\"static/chunks/3861-8662fce65c02717d.js\",\"9259\",\"static/chunks/9259-fa40e7cf2ca28e04.js\",\"8667\",\"static/chunks/8667-8136f74e9a086fca.js\",\"4363\",\"static/chunks/4363-9870bda67c2cf031.js\",\"4447\",\"static/chunks/4447-6e47461d1100c3cc.js\",\"6663\",\"static/chunks/6663-61c3f91791968671.js\",\"7647\",\"static/chunks/7647-469de84d236fc7fd.js\",\"2327\",\"static/chunks/2327-02e86a50c65e575a.js\",\"5427\",\"static/chunks/5427-61c33a2c35ffbde6.js\",\"9718\",\"static/chunks/app/agents/page-2f55f9d0da49bf31.js\"],\"default\",1]\nf:I[85147,[\"3861\",\"static/chunks/3861-8662fce65c02717d.js\",\"8459\",\"static/chunks/app/agents/layout-64b81f8eeac13427.js\"],\"ThemeProvider\"]\n10:I[4707,[],\"\"]\n11:I[36423,[],\"\"]\n13:I[61060,[],\"\"]\n14:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$Lb\",null,{\"buildId\":\"bzWTm19u6qe1y98Xfrqoo\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"agents\",\"\"],\"initialTree\":[\"\",{\"children\":[\"agents\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"agents\",{\"children\":[\"__PAGE__\",{},[[\"$Lc\",[\"$\",\"$Ld\",null,{\"props\":{\"params\":{},\"searchParams\":{}},\"Component\":\"$e\"}],[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/55d4a822f8d94b67.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]]],null],null]},[[null,[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_702545\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"agents\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L11\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]}]}]]}]],null],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/089de1d8526b96e9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/a3411982c232c7be.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"__variable_f36179 __variable_702545\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n try {\\n if (localStorage.getItem('theme') === 'dark' ||\\n (!localStorage.getItem('theme') \u0026\u0026 window.matchMedia('(prefers-color-scheme: dark)').matches)) {\\n document.documentElement.classList.add('dark');\\n }\\n } catch (e) {}\\n \"}}]}],[\"$\",\"meta\",null,{\"httpEquiv\":\"Content-Security-Policy\",\"content\":\"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';\"}],[\"$\",\"body\",null,{\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$L10\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L11\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$L12\"],\"globalErrorComponent\":\"$13\",\"missingSlots\":\"$W14\"}]\n"])</script><script>self.__next_f.push([1,"12:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Khoj AI - Agents\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Find or create agents with custom knowledge, tools and personalities to help address your specific needs.\"}],[\"$\",\"link\",\"4\",{\"rel\":\"manifest\",\"href\":\"/static/khoj.webmanifest\",\"crossOrigin\":\"use-credentials\"}],[\"$\",\"meta\",\"5\",{\"name\":\"keywords\",\"content\":\"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:title\",\"content\":\"Khoj AI - Agents\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:description\",\"content\":\"Find or create agents with custom knowledge, tools and personalities to help address your specific needs.\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:url\",\"content\":\"https://app.khoj.dev/agents/\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:site_name\",\"content\":\"Khoj AI\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"13\",{\"property\":\"og:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"14\",{\"property\":\"og:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"15\",{\"property\":\"og:image:height\",\"content\":\"256\"}],[\"$\",\"meta\",\"16\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"17\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"18\",{\"name\":\"twitter:title\",\"content\":\"Khoj AI - Agents\"}],[\"$\",\"meta\",\"19\",{\"name\":\"twitter:description\",\"content\":\"Find or create agents with custom knowledge, tools and personalities to help address your specific needs.\"}],[\"$\",\"meta\",\"20\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_hero.png\"}],[\"$\",\"meta\",\"21\",{\"name\":\"twitter:image:width\",\"content\":\"940\"}],[\"$\",\"meta\",\"22\",{\"name\":\"twitter:image:height\",\"content\":\"525\"}],[\"$\",\"meta\",\"23\",{\"name\":\"twitter:image\",\"content\":\"https://assets.khoj.dev/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"24\",{\"name\":\"twitter:image:width\",\"content\":\"256\"}],[\"$\",\"meta\",\"25\",{\"name\":\"twitter:image:height\",\"content\":\"256\"}],[\"$\",\"link\",\"26\",{\"rel\":\"icon\",\"href\":\"/static/assets/icons/khoj_lantern.ico\"}],[\"$\",\"link\",\"27\",{\"rel\":\"apple-touch-icon\",\"href\":\"/static/assets/icons/khoj_lantern_256x256.png\"}],[\"$\",\"meta\",\"28\",{\"name\":\"next-size-adjust\"}]]\n"])</script><script>self.__next_f.push([1,"c:null\n"])</script></body></html>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
2:I[19107,[],"ClientPageRoot"]
|
2
|
-
3:I[37335,["3861","static/chunks/3861-8662fce65c02717d.js","9259","static/chunks/9259-fa40e7cf2ca28e04.js","8667","static/chunks/8667-8136f74e9a086fca.js","4363","static/chunks/4363-9870bda67c2cf031.js","4447","static/chunks/4447-6e47461d1100c3cc.js","6663","static/chunks/6663-61c3f91791968671.js","7647","static/chunks/7647-469de84d236fc7fd.js","2327","static/chunks/2327-
|
3
|
-
4:I[85147,["3861","static/chunks/3861-8662fce65c02717d.js","8459","static/chunks/app/agents/layout-
|
2
|
+
3:I[37335,["3861","static/chunks/3861-8662fce65c02717d.js","9259","static/chunks/9259-fa40e7cf2ca28e04.js","8667","static/chunks/8667-8136f74e9a086fca.js","4363","static/chunks/4363-9870bda67c2cf031.js","4447","static/chunks/4447-6e47461d1100c3cc.js","6663","static/chunks/6663-61c3f91791968671.js","7647","static/chunks/7647-469de84d236fc7fd.js","2327","static/chunks/2327-02e86a50c65e575a.js","5427","static/chunks/5427-61c33a2c35ffbde6.js","9718","static/chunks/app/agents/page-2f55f9d0da49bf31.js"],"default",1]
|
3
|
+
4:I[85147,["3861","static/chunks/3861-8662fce65c02717d.js","8459","static/chunks/app/agents/layout-64b81f8eeac13427.js"],"ThemeProvider"]
|
4
4
|
5:I[4707,[],""]
|
5
5
|
6:I[36423,[],""]
|
6
|
-
0:["
|
6
|
+
0:["bzWTm19u6qe1y98Xfrqoo",[[["",{"children":["agents",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["agents",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/55d4a822f8d94b67.css","precedence":"next","crossOrigin":"$undefined"}]]],null],null]},[[null,["$","html",null,{"lang":"en","className":"__variable_f36179 __variable_702545","children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n try {\n if (localStorage.getItem('theme') === 'dark' ||\n (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {\n document.documentElement.classList.add('dark');\n }\n } catch (e) {}\n "}}]}],["$","meta",null,{"httpEquiv":"Content-Security-Policy","content":"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';"}],["$","body",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","agents","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]}]}]]}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/089de1d8526b96e9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/a3411982c232c7be.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","className":"__variable_f36179 __variable_702545","children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n try {\n if (localStorage.getItem('theme') === 'dark' ||\n (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {\n document.documentElement.classList.add('dark');\n }\n } catch (e) {}\n "}}]}],["$","meta",null,{"httpEquiv":"Content-Security-Policy","content":"default-src 'self' https://assets.khoj.dev; media-src * blob:; script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; frame-src 'self' https://accounts.google.com https://app.chatwoot.com; child-src 'self' https://app.chatwoot.com; object-src 'none';"}],["$","body",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]]}]],null],null],["$L7",null]]]]
|
7
7
|
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Khoj AI - Agents"}],["$","meta","3",{"name":"description","content":"Find or create agents with custom knowledge, tools and personalities to help address your specific needs."}],["$","link","4",{"rel":"manifest","href":"/static/khoj.webmanifest","crossOrigin":"use-credentials"}],["$","meta","5",{"name":"keywords","content":"research assistant, productivity, AI, Khoj, open source, model agnostic, research, productivity tool, personal assistant, personal research assistant, personal productivity assistant"}],["$","meta","6",{"property":"og:title","content":"Khoj AI - Agents"}],["$","meta","7",{"property":"og:description","content":"Find or create agents with custom knowledge, tools and personalities to help address your specific needs."}],["$","meta","8",{"property":"og:url","content":"https://app.khoj.dev/agents/"}],["$","meta","9",{"property":"og:site_name","content":"Khoj AI"}],["$","meta","10",{"property":"og:image","content":"https://assets.khoj.dev/khoj_hero.png"}],["$","meta","11",{"property":"og:image:width","content":"940"}],["$","meta","12",{"property":"og:image:height","content":"525"}],["$","meta","13",{"property":"og:image","content":"https://assets.khoj.dev/khoj_lantern_256x256.png"}],["$","meta","14",{"property":"og:image:width","content":"256"}],["$","meta","15",{"property":"og:image:height","content":"256"}],["$","meta","16",{"property":"og:type","content":"website"}],["$","meta","17",{"name":"twitter:card","content":"summary_large_image"}],["$","meta","18",{"name":"twitter:title","content":"Khoj AI - Agents"}],["$","meta","19",{"name":"twitter:description","content":"Find or create agents with custom knowledge, tools and personalities to help address your specific needs."}],["$","meta","20",{"name":"twitter:image","content":"https://assets.khoj.dev/khoj_hero.png"}],["$","meta","21",{"name":"twitter:image:width","content":"940"}],["$","meta","22",{"name":"twitter:image:height","content":"525"}],["$","meta","23",{"name":"twitter:image","content":"https://assets.khoj.dev/khoj_lantern_256x256.png"}],["$","meta","24",{"name":"twitter:image:width","content":"256"}],["$","meta","25",{"name":"twitter:image:height","content":"256"}],["$","link","26",{"rel":"icon","href":"/static/assets/icons/khoj_lantern.ico"}],["$","link","27",{"rel":"apple-touch-icon","href":"/static/assets/icons/khoj_lantern_256x256.png"}],["$","meta","28",{"name":"next-size-adjust"}]]
|
8
8
|
1:null
|