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: AI
Vanessa68679fa90a3b
diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.tsindex 5dcf74ced0..4264f013e3 100644--- a/app/src/ai/actions.ts+++ b/app/src/ai/actions.ts@@ -4,9 +4,10 @@ import {focusByRange, setLastNodeRange} from "../protyle/util/selection";import {insertHTML} from "../protyle/util/insertHTML";import {Dialog} from "../dialog";import {isMobile} from "../util/functions";+import {getContenteditableElement} from "../protyle/wysiwyg/getBlock";export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) => {- setLastNodeRange(elements[elements.length - 1], protyle.toolbar.range);+ setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range);protyle.toolbar.range.collapse(true);insertHTML(data, protyle, true, true);}