PageSourceSearch

https://gemkam-kstech.hf.space/assets/index-9e281cfc.js

js gemkam-kstech.hf.space collected 2026-10-03 16:53:23 UTC 8,969 bytes, 1 lines download raw bytes

1import{r as c,j as e,aC as j,aS as y,v,p as h,t as w,c as d,i as f,e as N,aT as x,_ as F,aB as _,M as S}from"../index.js";import{A as u}from"./admin-04b020fe.js";function L({enabled:t=!1,onToggle:l}){const[s,a]=c.useState(t);async function i(){if(!await w.experimentalFeatures.liveSync.toggleFeature(!s))return d("Failed to update status of feature.","error",{clear:!0}),!1;a(!s),d(`Live document content sync has been ${s?"disabled":"enabled"}.`,"success",{clear:!0}),l()}return e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex flex-col gap-y-6 max-w-[500px]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-theme-text-primary text-md font-bold",children:"Automatic Document Content Sync"}),e.jsx(j,{size:"lg",enabled:s,onChange:i})]}),e.jsxs("div",{className:"flex flex-col space-y-4",children:[e.jsx("p",{className:"text-theme-text-secondary text-sm",children:`Enable the ability to specify a document to be "watched". Watched document's content will be regularly fetched and updated in AnythingLLM.`}),e.jsx("p",{className:"text-theme-text-secondary text-sm",children:"Watched documents will automatically update in all workspaces they are referenced in at the same time of update."}),e.jsx("p",{className:"text-theme-text-secondary text-xs italic",children:"This feature only applies to web-based content, such as websites, Confluence, YouTube, and GitHub files."})]})]}),e.jsx("div",{className:"mt-8",children:e.jsxs("ul",{className:"space-y-2",children:[e.jsx("li",{children:e.jsxs("a",{href:"https://docs.anythingllm.com/beta-preview/active-features/live-document-sync",target:"_blank",className:"text-sm text-blue-400 light:text-blue-500 hover:underline flex items-center gap-x-1",rel:"noreferrer",children:[e.jsx(y,{size:14}),e.jsx("span",{children:"Feature Documentation and Warnings"})]})}),e.jsx("li",{children:e.jsx(v,{to:h.experimental.liveDocumentSync.manage(),className:"text-sm text-blue-400 light:text-blue-500 hover:underline",children:"Manage Watched Documents →"})})]})})]})}const o={experimental_live_file_sync:{title:"Live Document Sync",component:L,key:"experimental_live_file_sync"}};function z(){const[t,l]=c.useState({}),[s,a]=c.useState(!0),[i,m]=c.useState("experimental_live_file_sync");c.useEffect(()=>{async function n(){a(!0);const{settings:r}=await u.systemPreferencesByFields(["feature_flags"]);l((r==null?void 0:r.feature_flags)??{}),a(!1)}n()},[]);const p=async()=>{const{settings:n}=await u.systemPreferencesByFields(["feature_flags"]);l((n==null?void 0:n.feature_flags)??{})};return s?e.jsx("div",{style:{height:f?"100%":"calc(100% - 32px)"},className:"relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] w-full h-full flex justify-center items-center",children:e.jsx(N,{})}):e.jsx(T,{children:e.jsxs("div",{className:"flex-1 flex gap-x-6 p-4 mt-10",children:[e.jsxs("div",{className:"flex flex-col gap-y-[18px]",children:[e.jsxs("div",{className:"text-white flex items-center gap-x-2",children:[e.jsx(x,{size:24}),e.jsx("p",{className:"text-lg font-medium",children:"Experimental Features"})]}),e.jsx("div",{className:"bg-theme-bg-secondary text-white rounded-xl min-w-[360px] w-fit",children:Object.values(o).map((n,r)=>{const g=r===0,b=r===Object.values(o).length-1;return e.jsx(k,{feature:n,isSelected:i===n.key,isActive:t[n.key],handleClick:m,borderClass:[...g?["rounded-t-xl"]:[],...b?["rounded-b-xl"]:["border-b border-white/10"]].join(" ")},n.key)})})]}),e.jsx(E,{children:e.jsx("div",{className:"flex-[2] flex flex-col gap-y-[18px] mt-10",children:e.jsx("div",{className:"bg-theme-bg-secondary text-white rounded-xl flex-1 p-4",children:i?e.jsx(A,{feature:o[i],settings:t,refresh:p}):e.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-white/60",children:[e.jsx(x,{size:40}),e.jsx("p",{className:"font-medium",children:"Select an experimental feature"})]})})})})]})})}function T({children:t}){return e.jsxs("div",{id:"workspace-feature-settings-container",className:"w-screen h-screen overflow-hidden bg-theme-bg-container flex md:mt-0 mt-6",children:[e.jsx(F,{}),e.jsx("div",{style:{height:f?"100%":"calc(100% - 32px)"},className:"relative md:ml-[2px] md:mr-[16px] md:my-[16px] md:rounded-[16px] w-full h-full flex",children:t})]})}function k({feature:t={},isSelected:l=!1,isActive:s=!1,handleClick:a=()=>{},borderClass:i="border-b border-white/10"}){return e.jsxs("div",{className:`py-3 px-4 flex items-center justify-between cursor-pointer transition-all duration-300 hover:bg-white/5 ${i}
1 ${l?"bg-white/10 light:bg-theme-bg-sidebar":""}`,onClick:()=>{t!=null&&t.href?window.location=t.href:a==null||a(t.key)},children:[e.jsx("div",{className:"text-sm font-light",children:t.title}),e.jsx("div",{className:"flex items-center gap-x-2",children:t.autoEnabled?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-theme-text-secondary font-medium",children:"On"}),e.jsx("div",{className:"w-[14px]"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"text-sm text-theme-text-secondary font-medium",children:s?"On":"Off"}),e.jsx(_,{size:14,weight:"bold",className:"text-theme-text-secondary"})]})})]},t.key)}function A({feature:t,settings:l,refresh:s}){const a=t==null?void 0:t.component;return a?e.jsx(a,{enabled:l[t.key],feature:t.key,onToggle:s}):null}function E({children:t}){if(!window.localStorage.getItem("anythingllm_tos_experimental_feature_set")){let l=function(s){s.preventDefault(),window.localStorage.setItem("anythingllm_tos_experimental_feature_set","accepted"),d("Experimental Feature set enabled. Reloading the page.","success"),setTimeout(()=>{window.location.reload()},2500)};return e.jsxs(e.Fragment,{children:[e.jsx(S,{isOpen:!0,children:e.jsxs("div",{className:"w-full max-w-2xl bg-theme-bg-secondary rounded-lg shadow border-2 border-theme-modal-border overflow-hidden",children:[e.jsx("div",{className:"relative p-6 border-b rounded-t border-theme-modal-border",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{size:24,className:"text-theme-text-primary"}),e.jsx("h3",{className:"text-xl font-semibold text-white",children:"Terms of use for experimental features"})]})}),e.jsxs("form",{onSubmit:l,children:[e.jsx("div",{className:"py-7 px-9 space-y-4 flex-col",children:e.jsxs("div",{className:"w-full text-white text-md flex flex-col gap-y-4",children:[e.jsxs("p",{children:["Experimental features of AnythingLLM are features that we are piloting and are ",e.jsx("b",{children:"opt-in"}),". We proactively will condition or warn you on any potential concerns should any exist prior to approval of any feature."]}),e.jsxs("div",{children:[e.jsx("p",{children:"Use of any feature on this page can result in, but not limited to, the following possibilities."}),e.jsxs("ul",{className:"list-disc ml-6 text-sm font-mono mt-2",children:[e.jsx("li",{children:"Loss of data."}),e.jsx("li",{children:"Change in quality of results."}),e.jsx("li",{children:"Increased storage."}),e.jsx("li",{children:"Increased resource consumption."}),e.jsx("li",{children:"Increased cost or use of any connected LLM or embedding provider."}),e.jsx("li",{children:"Potential bugs or issues using AnythingLLM."})]})]}),e.jsxs("div",{children:[e.jsx("p",{children:"Use of an experimental feature also comes with the following list of non-exhaustive conditions."}),e.jsxs("ul",{className:"list-disc ml-6 text-sm font-mono mt-2",children:[e.jsx("li",{children:"Feature may not exist in future updates."}),e.jsx("li",{children:"The feature being used is not currently stable."}),e.jsx("li",{children:"The feature may not be available in future versions, configurations, or subscriptions of AnythingLLM."}),e.jsxs("li",{children:["Your privacy settings ",e.jsx("b",{children:"will be honored"})," with use of any beta feature."]}),e.jsx("li",{children:"These conditions may change in future updates."})]})]}),e.jsxs("p",{children:["Access to any features requires approval of this modal. If you would like to read more you can refer to"," ",e.jsx("a",{href:"https://docs.anythingllm.com/beta-preview/overview",className:"underline text-blue-500",children:"docs.anythingllm.com"})," ","or email"," ",e.jsx("a",{href:"mailto:[email protected]",className:"underline text-blue-500",children:"[email protected]"})]})]})}),e.jsxs("div",{className:"flex w-full justify-between items-center p-6 space-x-2 border-t border-theme-modal-border rounded-b",children:[e.jsx("a",{href:h.home(),className:"transition-all duration-300 bg-transparent text-white hover:bg-red-500/50 light:hover:bg-red-300/50 px-4 py-2 rounded-lg text-sm border border-theme-modal-border",children:"Reject & close"}),e.jsx("button",{type:"submit",className:"transition-all duration-300 bg-white text-black hover:opacity-60 px-4 py-2 rounded-lg text-sm border border-theme-modal-border",children:"I understand"})]})]})]})}),t]})}return e.jsx(e.Fragment,{children:t})}export{z as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.