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/17877
Vanessae8d470df64f7
diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.tsindex ad24fe0602..79a5d0b7ff 100644--- a/app/src/protyle/hint/index.ts+++ b/app/src/protyle/hint/index.ts@@ -665,6 +665,13 @@ ${genHintItemHTML(item)}this.splitChar = value;this.lastIndex = 0;range.deleteContents();+ // 光标位于 block-ref 内末尾时,需调整到 block-ref 的外面,避免把标记符插入到引用内部+ const refElement = hasClosestByAttribute(range.startContainer, "data-type", "block-ref");+ if (refElement && range.startContainer.nodeType === 3 &&+ range.startOffset === (range.startContainer as Text).textContent.length) {+ range.setStartAfter(refElement);+ range.collapse(true);+ }const textNode = document.createTextNode(value);range.insertNode(textNode);range.setEnd(textNode, value.length);