An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
import {Constants} from "../../constants";
import {addScriptSync} from "./addScript";
// 创建编辑器或执行依赖 Lute 的扩展脚本前,等待引擎加载完成。
export const ensureLute = async (options: {reloadOnFailure?: boolean} = {}) => {
if (typeof Lute !== "undefined") {
return;
}
await addScriptSync(`${Constants.PROTYLE_CDN}/js/lute/lute.min.js?v=${Constants.SIYUAN_VERSION}`,
"protyleLuteScript", options);
if (typeof Lute === "undefined") {
throw new Error("Could not load Lute");
}
};