import System from "@/models/system"; import paths from "@/utils/paths"; import showToast from "@/utils/toast"; import { ArrowSquareOut } from "@phosphor-icons/react"; import { useState } from "react"; import { Link } from "react-router-dom"; export default function LiveSyncToggle({ enabled = false, onToggle }) { const [status, setStatus] = useState(enabled); async function toggleFeatureFlag() { const updated = await System.experimentalFeatures.liveSync.toggleFeature( !status ); if (!updated) { showToast("Failed to update status of feature.", "error", { clear: true, }); return false; } setStatus(!status); showToast( `Live document content sync has been ${ !status ? "enabled" : "disabled" }.`, "success", { clear: true } ); onToggle(); } return (
Enable the ability to specify a document to be "watched". Watched document's content will be regularly fetched and updated in AnythingLLM.
Watched documents will automatically update in all workspaces they are referenced in at the same time of update.
This feature only applies to web-based content, such as websites, Confluence, YouTube, and GitHub files.