khoj 1.34.1.dev42__py3-none-any.whl → 1.35.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- khoj/interface/compiled/404/index.html +1 -1
- khoj/interface/compiled/_next/static/chunks/app/agents/{page-13a2997a1d07088b.js → page-f03e7c53795ecdd6.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/automations/{page-f9741f52969fb8f7.js → page-b5d449fb82335d1e.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/chat/{page-1fdcaad519ca7b90.js → page-f1083b58c7fcd796.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/{page-62fd13b0a48494ac.js → page-22ee242485b15fbd.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/search/page-98386120cc6e46ea.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/settings/{page-f478749e6154f7e0.js → page-ac472ce74f507896.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-8b91b8adb4f04450.js +1 -0
- khoj/interface/compiled/_next/static/chunks/app/share/chat/{page-37328118de6cbefe.js → page-1be4ab533ff0422f.js} +1 -1
- khoj/interface/compiled/_next/static/chunks/{webpack-1fe14d57fd11afd4.js → webpack-6dfc16bcd76f1700.js} +1 -1
- khoj/interface/compiled/_next/static/css/9b0283970f411554.css +25 -0
- khoj/interface/compiled/_next/static/css/a85b8d56fc9ae551.css +1 -0
- khoj/interface/compiled/_next/static/css/{1b7f52b8da3a37bd.css → eff89937927ce00a.css} +1 -1
- khoj/interface/compiled/agents/index.html +1 -1
- khoj/interface/compiled/agents/index.txt +2 -2
- khoj/interface/compiled/automations/index.html +1 -1
- khoj/interface/compiled/automations/index.txt +3 -3
- khoj/interface/compiled/chat/index.html +1 -1
- khoj/interface/compiled/chat/index.txt +2 -2
- khoj/interface/compiled/index.html +1 -1
- khoj/interface/compiled/index.txt +2 -2
- khoj/interface/compiled/search/index.html +1 -1
- khoj/interface/compiled/search/index.txt +3 -3
- khoj/interface/compiled/settings/index.html +1 -1
- khoj/interface/compiled/settings/index.txt +4 -4
- khoj/interface/compiled/share/chat/index.html +1 -1
- khoj/interface/compiled/share/chat/index.txt +2 -2
- {khoj-1.34.1.dev42.dist-info → khoj-1.35.0.dist-info}/METADATA +1 -1
- {khoj-1.34.1.dev42.dist-info → khoj-1.35.0.dist-info}/RECORD +40 -40
- khoj/interface/compiled/_next/static/chunks/app/search/page-f76cb87c46c1faa4.js +0 -1
- khoj/interface/compiled/_next/static/chunks/app/share/chat/layout-6d7831aace573049.js +0 -1
- khoj/interface/compiled/_next/static/css/4fde4496bbffba77.css +0 -25
- khoj/interface/compiled/_next/static/css/d8518f90b895a246.css +0 -1
- /khoj/interface/compiled/_next/static/{oFHD__oKkrf6jufB6dTFF → BwldWzJw7wpFah0wi0pl6}/_buildManifest.js +0 -0
- /khoj/interface/compiled/_next/static/{oFHD__oKkrf6jufB6dTFF → BwldWzJw7wpFah0wi0pl6}/_ssgManifest.js +0 -0
- /khoj/interface/compiled/_next/static/chunks/{182-f1c48a203dc91e0e.js → 182-8cd8b17d40e6e989.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{1915-d3c36ad6ce697ce7.js → 1915-605f698f2573cfd4.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{2117-b8fc8005fb5af70b.js → 2117-2a54a27661a71b65.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{8667-b6bf63c72b2d76eb.js → 8667-d3e5bc726e4ff4e3.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9259-1172dbaca0515237.js → 9259-27d1ff42af9a43e0.js} +0 -0
- /khoj/interface/compiled/_next/static/chunks/{9665-391df1e5c51c960a.js → 9665-1ab5c8c667b74dca.js} +0 -0
- {khoj-1.34.1.dev42.dist-info → khoj-1.35.0.dist-info}/WHEEL +0 -0
- {khoj-1.34.1.dev42.dist-info → khoj-1.35.0.dist-info}/entry_points.txt +0 -0
- {khoj-1.34.1.dev42.dist-info → khoj-1.35.0.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{94114:function(e,s,l){Promise.resolve().then(l.bind(l,98537))},98537:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return et}});var t=l(57437),a=l(95186),n=l(2265),i=l(41816),r=l.n(i),c=l(19378),o=l(66070),d=l(73925),u=l(75216),h=l(91521),x=l(41648),m=l(41317),f=l(19841),j=l(45178),p=l(58619),N=l(2452),g=l(77168),v=l(87296),w=l(89203),b=l(11167),y=l(38513),S=l(35099),k=l(64697),E=l(74915),C=l(62869),_=l(27648),T=l(7436),D=l(85872),F=l(34124),O=l(6512),A=l(37104),I=l(14308),R=l(26110),z=l(77992),M=l(84190),L=l(92451),P=l(10407),Z=l(67782),W=l(94508);let U=e=>{let{className:s,...l}=e;return(0,t.jsx)("nav",{role:"navigation","aria-label":"pagination",className:(0,W.cn)("mx-auto flex w-full justify-center",s),...l})};U.displayName="Pagination";let Y=n.forwardRef((e,s)=>{let{className:l,...a}=e;return(0,t.jsx)("ul",{ref:s,className:(0,W.cn)("flex flex-row items-center gap-1",l),...a})});Y.displayName="PaginationContent";let K=n.forwardRef((e,s)=>{let{className:l,...a}=e;return(0,t.jsx)("li",{ref:s,className:(0,W.cn)("",l),...a})});K.displayName="PaginationItem";let B=e=>{let{className:s,isActive:l,size:a="icon",...n}=e;return(0,t.jsx)("a",{"aria-current":l?"page":void 0,className:(0,W.cn)((0,C.d)({variant:l?"outline":"ghost",size:a}),"no-underline",s),...n})};B.displayName="PaginationLink";let V=e=>{let{className:s,...l}=e;return(0,t.jsxs)(B,{"aria-label":"Go to previous page",size:"default",className:(0,W.cn)("gap-1 pl-2.5",s),...l,children:[(0,t.jsx)(L.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Previous"})]})};V.displayName="PaginationPrevious";let G=e=>{let{className:s,...l}=e;return(0,t.jsxs)(B,{"aria-label":"Go to next page",size:"default",className:(0,W.cn)("gap-1 pr-2.5",s),...l,children:[(0,t.jsx)("span",{children:"Next"}),(0,t.jsx)(P.Z,{className:"h-4 w-4"})]})};G.displayName="PaginationNext";let X=e=>{let{className:s,...l}=e;return(0,t.jsxs)("span",{"aria-hidden":!0,className:(0,W.cn)("flex h-9 w-9 items-center justify-center",s),...l,children:[(0,t.jsx)(Z.Z,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"More pages"})]})};X.displayName="PaginationEllipsis";var $=l(23518),q=l(57054),J=l(59199),H=l(32759);function Q(e){let{file:s,setSelectedFile:l,setSelectedFileFullText:a,handleDownload:n,handleDelete:i,isDeleting:r,selectedFileFullText:d}=e;return(0,t.jsxs)(o.Zb,{className:"animate-fade-in-up bg-secondary h-52",children:[(0,t.jsx)(o.Ol,{className:"p-2",children:(0,t.jsxs)(o.ll,{className:"flex items-center gap-2 justify-between",title:s.file_name,children:[(0,t.jsxs)(R.Vq,{children:[(0,t.jsx)(R.hg,{asChild:!0,children:(0,t.jsx)("div",{className:"text-sm font-medium truncate hover:text-clip hover:whitespace-normal cursor-pointer",onClick:()=>{a(""),l(s.file_name)},children:s.file_name.split("/").pop()})}),(0,t.jsxs)(R.cZ,{children:[(0,t.jsx)(R.fK,{children:(0,t.jsx)(R.$N,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s.file_name.split("/").pop(),(0,t.jsx)(C.z,{variant:"ghost",title:"Download as plaintext",onClick:()=>n(s.file_name,s.raw_text),children:(0,t.jsx)(x.U,{className:"h-4 w-4"})})]})})}),(0,t.jsx)(c.x,{className:"h-[50vh]",children:(0,t.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal",children:[!d&&(0,t.jsx)(I.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"}),d]})})]})]}),(0,t.jsxs)(M.h_,{children:[(0,t.jsx)(M.$F,{children:(0,t.jsx)(C.z,{variant:"ghost",children:(0,t.jsx)(m.F,{className:"h-4 w-4"})})}),(0,t.jsx)(M.AW,{className:"flex flex-col gap-0 w-fit",children:(0,t.jsx)(M.Xi,{className:"p-0",children:(0,t.jsxs)(C.z,{variant:"ghost",className:"flex items-center gap-2 p-1 text-sm",onClick:()=>{i(s.file_name)},children:[(0,t.jsx)(f.r,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"text-xs",children:r?"Deleting...":"Delete"})]})})})]})]})}),(0,t.jsx)(o.aY,{className:"p-2",children:(0,t.jsx)(c.x,{className:"h-24 bg-background rounded-lg",children:(0,t.jsxs)("p",{className:"whitespace-pre-wrap break-words text-sm font-normal text-muted-foreground p-2 h-full",children:[s.raw_text.slice(0,100),"..."]})})}),(0,t.jsx)(o.eW,{className:"flex justify-end gap-2 p-2",children:(0,t.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,T.o0)(s.updated_at)})})]})}function ee(e){var s;let l=e.note,a=(l.additional.file||"").startsWith("http"),n=a?l.additional.heading:l.additional.file.split("/").pop();return(0,t.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,t.jsx)(o.Ol,{children:(0,t.jsxs)(o.ll,{className:"inline-flex gap-2",children:["notion"===(s=l.additional.source)?(0,t.jsx)(d.F,{className:"text-muted-foreground"}):"github"===s?(0,t.jsx)(u.b,{className:"text-muted-foreground"}):(0,t.jsx)(h.S,{className:"text-muted-foreground"}),n]})}),(0,t.jsxs)(o.aY,{children:[(0,t.jsx)("div",{className:"line-clamp-4 text-muted-foreground",children:l.entry}),(0,t.jsxs)(C.z,{onClick:()=>e.setFocusSearchResult(l),variant:"ghost",className:"p-0 mt-2 text-orange-400 hover:bg-inherit",children:["See content",(0,t.jsx)(j.o,{className:"inline ml-2"})]})]}),a&&(0,t.jsx)(o.eW,{children:(0,t.jsxs)("a",{href:l.additional.file,target:"_blank",className:"underline text-sm bg-muted p-1 rounded-lg text-muted-foreground",children:[(0,t.jsx)(p.a,{className:"inline m-2"}),l.additional.file]})})]})}let es=e=>{let{setUploadedFiles:s}=e,[l,a]=(0,n.useState)(!1),[i,r]=(0,n.useState)(null),[c,o]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),[h,x]=(0,n.useState)(0),m=(0,n.useRef)(null);function f(e){(0,J.ko)(e,r,u,o,s)}return(0,n.useEffect)(()=>{if(!d&&(x(0),!i&&!c)){let e=new KeyboardEvent("keydown",{key:"Escape"});document.dispatchEvent(e)}if(d){let e=setInterval(()=>{x(e=>{let s=e+(Math.floor(5*Math.random())+1);return s<100?s:100})},800);return()=>clearInterval(e)}},[d]),(0,t.jsxs)(R.Vq,{children:[(0,t.jsx)(R.hg,{asChild:!0,children:(0,t.jsxs)(C.z,{variant:"secondary",className:"mt-4",children:[(0,t.jsx)(N.a,{className:"h-4 w-4 mr-2"}),"Add Documents"]})}),(0,t.jsxs)(R.cZ,{children:[(0,t.jsxs)(R.fK,{children:[(0,t.jsx)(R.$N,{children:"Build Your Knowledge Base"}),(0,t.jsx)(R.Be,{children:"Add context for your Khoj knowledge base. Quickly search and get personalized answers from your documents."})]}),(0,t.jsxs)("div",{className:"flex flex-col h-full",onDragOver:function(e){e.preventDefault(),a(!0)},onDragLeave:function(e){e.preventDefault(),a(!1)},onDrop:function(e){e.preventDefault(),a(!1),e.dataTransfer.files&&f(e.dataTransfer.files)},onClick:function(){m&&m.current&&m.current.click()},children:[(0,t.jsx)("input",{type:"file",multiple:!0,ref:m,style:{display:"none"},onChange:function(e){e.target.files&&f(e.target.files)}}),(0,t.jsx)("div",{className:"flex-none p-4",children:d&&(0,t.jsx)(H.E,{indicatorColor:"bg-slate-500",className:"w-full h-2 rounded-full",value:h})}),i&&(0,t.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.v,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:i})]}),(0,t.jsx)(C.z,{onClick:()=>r(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),c&&(0,t.jsxs)("div",{className:"flex-none p-4 border-b rounded-lg",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(g.v,{className:"h-6 w-6"}),(0,t.jsx)("span",{children:c})]}),(0,t.jsx)(C.z,{onClick:()=>o(null),className:"mt-2",variant:"ghost",children:"Dismiss"})]}),(0,t.jsx)("div",{className:"flex-none p-4 border-b ".concat(l?"animate-pulse border-blue-500 bg-blue-500 bg-opacity-25":"bg-secondary"," rounded-lg"),children:(0,t.jsx)("div",{className:"flex items-center justify-center w-full h-32 border-2 border-dashed border-gray-300 rounded-lg",children:l?(0,t.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,t.jsx)(v.u,{className:"h-6 w-6 mr-2"}),(0,t.jsx)("span",{children:"Drop files to upload"})]}):(0,t.jsxs)("div",{className:"flex items-center justify-center w-full h-full",children:[(0,t.jsx)(w.v,{className:"h-6 w-6 mr-2"}),(0,t.jsx)("span",{children:"Drag and drop files here"})]})})})]})]})]})};function el(e){let[s,l]=(0,n.useState)(!1),[a,i]=(0,n.useState)(e.explicitFile||"");return(0,n.useEffect)(()=>{e.explicitFile&&i(e.explicitFile)},[e.explicitFile]),(0,t.jsxs)(q.J2,{open:s,onOpenChange:l,children:[(0,t.jsx)(q.xo,{asChild:!0,children:(0,t.jsxs)(C.z,{variant:"outline",role:"combobox","aria-expanded":s,className:'justify-between" '.concat(e.isMobileWidth?"w-full":"w-[200px]"),children:[a?e.isMobileWidth?"✔️":"Selected":e.isMobileWidth?" ":"Select file",(0,t.jsx)(b.o,{className:"opacity-50"})]})}),(0,t.jsx)(q.yk,{className:"w-[200px] p-0",children:(0,t.jsxs)($.mY,{children:[(0,t.jsx)($.sZ,{placeholder:"Search files..."}),(0,t.jsxs)($.e8,{children:[(0,t.jsx)($.rb,{children:"No files found."}),(0,t.jsx)($.fu,{children:e.allFiles.map(s=>(0,t.jsxs)($.di,{value:s,onSelect:s=>{i(s===a?"":s),l(!1),e.onChooseFile(s)},children:[s,(0,t.jsx)(y.J,{className:(0,W.cn)("ml-auto",a===s?"opacity-100":"opacity-0")})]},s))})]})]})})]})}function et(){let[e,s]=(0,n.useState)(""),[l,i]=(0,n.useState)(null),[d,u]=(0,n.useState)(!1),h=(0,n.useRef)(null),[x,m]=(0,n.useState)(null),[f,j]=(0,n.useState)([]),[N,g]=(0,n.useState)(null),[v,w]=(0,n.useState)(!0),[b,y]=(0,n.useState)([]),R=(0,n.useRef)(null),[M,L]=(0,n.useState)(null),[P,Z]=(0,n.useState)(void 0),[W,$]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),[H,et]=(0,n.useState)([]),[ea,en]=(0,n.useState)(0),[ei,er]=(0,n.useState)(1),{toast:ec}=(0,z.pm)(),eo=(0,T.IC)();function ed(e){if(s(e),!e.trim()){i(null);return}R.current&&clearTimeout(R.current),e.trim()&&(R.current=setTimeout(()=>{eu()},750))}function eu(){!d&&e.trim()&&(u(!0),fetch("/api/search?q=".concat(encodeURIComponent(e),"&client=web"),{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{i(e),u(!1)}).catch(e=>{console.error("Error:",e)}))}(0,n.useEffect)(()=>{fetch("/api/content/computer",{method:"GET",headers:{"Content-Type":"application/json"}}).then(e=>e.json()).then(e=>{y(e)}).catch(e=>{console.error("Error loading files:",e)})},[]),(0,n.useEffect)(()=>{let s=e.match(/file:([^"\s]*|"[^"]*")?/);if(s){let e=s[1],l=null==e?void 0:e.replace(/"/g,"");l&&Z(l)}},[e]);let eh=async e=>{try{let s=await fetch("api/content/files?page=".concat(e));if(!s.ok)throw Error("Failed to fetch files");let l=await s.json(),t=l.files,a=l.num_pages;er(a),Array.isArray(t)&&j(t.toSorted())}catch(e){g("Failed to load files"),console.error("Error fetching files:",e)}finally{w(!1)}};(0,n.useEffect)(()=>{eh(ea)},[ea]);let ex=async e=>{try{let s=await fetch("/api/content/file?file_name=".concat(e));if(!s.ok)throw Error("Failed to fetch file");let l=await s.json();$(l.raw_text)}catch(e){g("Failed to load file"),console.error("Error fetching file:",e)}},em=(e,s)=>{let l=new Blob([s],{type:"text/plain"}),t=window.URL.createObjectURL(l),a=document.createElement("a");a.href=t,a.download="".concat(e.split("/").pop(),".txt"),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(t)};(0,n.useEffect)(()=>{M&&ex(M)},[M]),(0,n.useEffect)(()=>{eh(ea)},[]),(0,n.useEffect)(()=>{H.length>0&&(en(0),eh(0))},[H]);let ef=async e=>{J(!0);try{if(!(await fetch("/api/content/file?filename=".concat(e),{method:"DELETE"})).ok)throw Error("Failed to delete file");ec({title:"File deleted",description:"File ".concat(e," has been deleted"),variant:"default"}),eh(ea)}catch(s){ec({title:"Error deleting file",description:"Failed to delete file ".concat(e),variant:"destructive"})}finally{J(!1)}};return(0,t.jsxs)(D.Hn,{children:[(0,t.jsx)(F.S,{conversationId:""}),(0,t.jsxs)(D.kV,{children:[(0,t.jsxs)("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[(0,t.jsx)(D.vP,{className:"-ml-1"}),(0,t.jsx)(O.Z,{orientation:"vertical",className:"mr-2 h-4"}),eo?(0,t.jsx)("a",{className:"p-0 no-underline",href:"/",children:(0,t.jsx)(A.VO,{className:"h-auto w-16"})}):(0,t.jsx)("h2",{className:"text-lg",children:"Search Your Knowledge Base"})]}),(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"".concat(r().searchLayout),children:(0,t.jsx)("div",{className:"w-full md:w-5/6 mx-auto pt-6 md:pt-8",children:(0,t.jsxs)("div",{className:"p-4 w-full mx-auto",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center border-2 border-muted p-1 gap-1 rounded-lg flex-col md:flex-row",children:[(0,t.jsx)("div",{className:"relative flex-1 w-full",children:(0,t.jsx)(a.I,{autoFocus:!0,className:"border-none pl-4 focus-visible:ring-transparent focus-visible:ring-offset-transparent",onChange:e=>ed(e.currentTarget.value),onKeyDown:e=>{"Enter"===e.key&&eu()},ref:h,type:"search",placeholder:"Search Documents",value:e})}),(0,t.jsxs)("div",{id:"actions",className:"flex gap-2",children:[(0,t.jsx)(el,{allFiles:b,onChooseFile:l=>{var t;s('file:"'.concat(l,'" ').concat(e)),null===(t=h.current)||void 0===t||t.focus(),eu()},isMobileWidth:eo,explicitFile:P}),(0,t.jsxs)(C.z,{className:"px-2 gap-2 inline-flex rounded-none items-center border-l border-gray-300 hover:text-gray-500",variant:"ghost",onClick:()=>eu(),children:[(0,t.jsx)(S.Y,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:"Find"})]})]})]}),null===l&&(0,t.jsx)(es,{setUploadedFiles:et}),d&&(0,t.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,t.jsx)(I.l,{className:"mt-4",message:"Searching",iconClassName:"h-5 w-5"})}),x&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)(C.z,{onClick:()=>m(null),className:"mb-4",variant:"outline",children:[(0,t.jsx)(k.X,{className:"inline mr-2"}),"Back"]}),function(e){let s=(e.additional.file||"").startsWith("http"),l=s?e.additional.heading:e.additional.file.split("/").pop();return(0,t.jsxs)(o.Zb,{className:"bg-secondary h-full shadow-sm rounded-lg border border-muted mb-4 animate-fade-in-up",children:[(0,t.jsx)(o.Ol,{children:(0,t.jsx)(o.ll,{children:l})}),s&&(0,t.jsx)(o.eW,{children:(0,t.jsxs)("a",{href:e.additional.file,target:"_blank",className:"underline text-sm bg-muted p-3 rounded-lg text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(p.a,{className:"inline"}),e.additional.file]})}),(0,t.jsx)(o.aY,{children:(0,t.jsx)("div",{className:"text-m",children:e.entry})})]})}(x)]}),!x&&!d&&l&&l.length>0&&(0,t.jsxs)("div",{className:"mt-4 max-w-[92vw] break-all",children:[(0,t.jsxs)(C.z,{onClick:()=>ed(""),className:"mb-4",variant:"outline",children:[(0,t.jsx)(k.X,{className:"inline mr-2"}),"See All"]}),(0,t.jsx)(c.x,{className:"h-[80vh]",children:l.map((e,s)=>(0,t.jsx)(ee,{note:e,setFocusSearchResult:m},e["corpus-id"]))})]}),!d&&null===l&&!e.trim()&&(0,t.jsxs)("div",{className:"w-full mt-4",children:[v&&(0,t.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,t.jsx)(I.l,{className:"mt-4",message:"Loading",iconClassName:"h-5 w-5"})}),N&&(0,t.jsx)("div",{className:"text-red-500",children:N}),!l&&!v&&0===f.length&&(0,t.jsxs)(o.Zb,{className:"flex flex-col items-center justify-center border-none shadow-none",children:[(0,t.jsxs)(o.Ol,{className:"flex flex-col items-center justify-center",children:[(0,t.jsx)(o.SZ,{className:"border-muted-foreground border w-fit rounded-lg mb-2 text-center text-lg p-4",children:(0,t.jsx)(E.D,{weight:"fill",className:"text-muted-foreground h-10 w-10"})}),(0,t.jsx)(o.ll,{className:"text-center",children:"Let's get started!"})]}),(0,t.jsxs)(o.aY,{children:[(0,t.jsx)("div",{className:"text-muted-foreground items-center justify-center text-center flex",children:'To use search, upload docs via the "Add Documents" button.'}),(0,t.jsx)(_.default,{href:"https://docs.khoj.dev/data-sources/share_your_data",className:"no-underline",children:(0,t.jsx)("div",{className:"mt-4 text-center text-secondary-foreground bg-secondary w-fit m-auto p-2 rounded-lg",children:"Learn More"})})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:f.map((e,s)=>(0,t.jsx)(Q,{file:e,index:s,setSelectedFile:L,setSelectedFileFullText:$,handleDownload:em,handleDelete:ef,isDeleting:q,selectedFileFullText:W},s))}),(0,t.jsx)(U,{children:(0,t.jsxs)(Y,{className:"p-0",children:[ea>0&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(V,{onClick:()=>en(ea-1)})}),ea>1&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(B,{onClick:()=>en(0),children:"1"})}),ea>2&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(X,{})}),ea>0&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(B,{onClick:()=>en(ea-1),children:ea})}),(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(B,{isActive:!0,children:ea+1})}),ea<ei-1&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(B,{onClick:()=>en(ea+1),children:ea+2})}),ea<ei-3&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(X,{})}),ea<ei-2&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(B,{onClick:()=>en(ei-1),children:ei})}),ea<ei-1&&(0,t.jsx)(K,{className:"list-none",children:(0,t.jsx)(G,{onClick:()=>en(ea+1)})})]})})]})]})})})})]})]})}},32759:function(e,s,l){"use strict";l.d(s,{E:function(){return r}});var t=l(57437),a=l(2265),n=l(60610),i=l(94508);let r=a.forwardRef((e,s)=>{let{className:l,value:a,indicatorColor:r,...c}=e;return(0,t.jsx)(n.fC,{ref:s,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",l),...c,children:(0,t.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all ".concat(r),style:{transform:"translateX(-".concat(100-(a||0),"%)")}})})});r.displayName=n.fC.displayName},77992:function(e,s,l){"use strict";l.d(s,{pm:function(){return h}});var t=l(2265);let a=0,n=new Map,i=e=>{if(n.has(e))return;let s=setTimeout(()=>{n.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);n.set(e,s)},r=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:l}=s;return l?i(l):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===l||void 0===l?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},c=[],o={toasts:[]};function d(e){o=r(o,e),c.forEach(e=>{e(o)})}function u(e){let{...s}=e,l=(a=(a+1)%Number.MAX_SAFE_INTEGER).toString(),t=()=>d({type:"DISMISS_TOAST",toastId:l});return d({type:"ADD_TOAST",toast:{...s,id:l,open:!0,onOpenChange:e=>{e||t()}}}),{id:l,dismiss:t,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:l}})}}function h(){let[e,s]=t.useState(o);return t.useEffect(()=>(c.push(s),()=>{let e=c.indexOf(s);e>-1&&c.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},41816:function(e){e.exports={searchLayout:"search_searchLayout__fP3m0"}}},function(e){e.O(0,[2026,2663,9259,8667,182,6244,2509,2327,2971,2117,1744],function(){return e(e.s=94114)}),_N_E=e.O()}]);
|
@@ -1 +0,0 @@
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138,8459,3317],{63521:function(){}},function(n){n.O(0,[2971,2117,1744],function(){return n(n.s=63521)}),_N_E=n.O()}]);
|