Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/7643

Vanessa119ec5177011
diff --git a/app/src/ai/actions.ts b/app/src/ai/actions.ts
index 94b98ef643..1059775ccd 100644
--- a/app/src/ai/actions.ts
+++ b/app/src/ai/actions.ts
@@ -5,11 +5,17 @@ import {insertHTML} from "../protyle/util/insertHTML";
import {Dialog} from "../dialog";
import {isMobile} from "../util/functions";
import {getContenteditableElement} from "../protyle/wysiwyg/getBlock";
+import {blockRender} from "../protyle/markdown/blockRender";
+import {processRender} from "../protyle/util/processCode";
+import {highlightRender} from "../protyle/markdown/highlightRender";
export const fillContent = (protyle:IProtyle, data:string, elements:Element[]) => {
setLastNodeRange(getContenteditableElement(elements[elements.length - 1]), protyle.toolbar.range);
protyle.toolbar.range.collapse(true);
insertHTML(data, protyle, true, true);
+ blockRender(protyle, protyle.wysiwyg.element);
+ processRender(protyle.wysiwyg.element);
+ highlightRender(protyle.wysiwyg.element);
};
export const AIActions = (elements: Element[], protyle: IProtyle) => {