An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle:
Vanessacc9640833401
diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.tsindex f3af6ab801..3234974385 100644--- a/app/src/protyle/util/selection.ts+++ b/app/src/protyle/util/selection.ts@@ -298,7 +298,9 @@ export const getSelectionPosition = (nodeElement: Element, range?: Range, useDirconst rects = range.getClientRects(); // 由于长度过长折行,光标在行首时有多个 rects https://github.com/siyuan-note/siyuan/issues/6156if (range.toString()) {if (useDirect) {- const selection = window.getSelection();+ const selection = window.getSelection() as Selection & {+ direction: "forward" | "backward" | "none"+ };// 判断选择方向const isBackward = (selection && "direction" in selection && selection.direction !== "none") ?selection.direction === "backward"