An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/14872
Vanessa3e301b8616a4
diff --cc app/src/protyle/util/selection.tsindex 4e9724315c,4e9724315c..2f44aaf194--- a/app/src/protyle/util/selection.ts+++ b/app/src/protyle/util/selection.ts@@@ -485,7 -485,7 +485,11 @@@ export const focusByOffset = (container};export const setInsertWbrHTML = (nodeElement: HTMLElement, range: Range, protyle: IProtyle) => {-- const offset = getSelectionOffset(getContenteditableElement(nodeElement), nodeElement, range);++ const editElement = getContenteditableElement(nodeElement);++ if (!editElement) {++ return;++ }++ const offset = getSelectionOffset(editElement, nodeElement, range);const cloneNode = nodeElement.cloneNode(true) as HTMLElement;const cloneRange = focusByOffset(cloneNode, offset.end, offset.end, false);if (cloneRange) {