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 {hintRef} from "../../hint/extend";
export const openAVBindBlock = (protyle: IProtyle, field: HTMLElement, query?: string) => {
if (!field.isConnected || !field.dataset.rowId || protyle.disabled || window.siyuan.isPublish ||
protyle.options.history?.created || protyle.options.history?.snapshot) {
return;
}
window.siyuan.menus.menu.remove();
protyle.toolbar.range = document.createRange();
protyle.toolbar.range.selectNodeContents(field);
hintRef(query ?? field.querySelector("input")?.value.trim() ?? "", protyle, "av");
return true;
};