An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:rotating_light:
Vanessa63eab3c5c11d
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex 44a306139f..8a6e0854d7 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -70,8 +70,8 @@ export class Gutter {selectElements.forEach(item => {if (item.getAttribute("data-type") === "NodeIFrame") {const embedElement = genEmptyElement();- embedElement.classList.add("protyle-wysiwyg--select")- getContenteditableElement(embedElement).innerHTML = `<svg class="svg"><use xlink:href="#iconLanguage"></use></svg> IFrame`+ embedElement.classList.add("protyle-wysiwyg--select");+ getContenteditableElement(embedElement).innerHTML = "<svg class=\"svg\"><use xlink:href=\"#iconLanguage\"></use></svg> IFrame";ghostElement.append(embedElement);} else {ghostElement.append(item.cloneNode(true));diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.tsindex d9bb785b2a..0262c53eed 100644--- a/app/src/protyle/util/onGet.ts+++ b/app/src/protyle/util/onGet.ts@@ -359,7 +359,7 @@ export const enableProtyle = (protyle: IProtyle) => {const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScrollAttr) => {let focusElement: Element;if (scrollAttr && scrollAttr.focusId) {- focusElement = protyle.wysiwyg.element.querySelector(`[data-node-id="${scrollAttr.focusId}"]`)+ focusElement = protyle.wysiwyg.element.querySelector(`[data-node-id="${scrollAttr.focusId}"]`);} else {Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${protyle.block.id}"]`)).find((item: HTMLElement) => {if (!hasClosestByAttribute(item, "data-type", "block-render", true)) {@@ -372,7 +372,7 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScrpreventScroll(protyle);focusElement = protyle.wysiwyg.element.lastElementChild;} else if (!focusElement || action.includes(Constants.CB_GET_FOCUSFIRST)) {- focusElement = protyle.wysiwyg.element.firstElementChild+ focusElement = protyle.wysiwyg.element.firstElementChild;}if (action.includes(Constants.CB_GET_HL)) {preventScroll(protyle); // 搜索页签滚动会导致再次请求@@ -397,7 +397,7 @@ const focusElementById = (protyle: IProtyle, action: string[], scrollAttr?: IScrprotyle.contentElement.scrollTop = scrollAttr.scrollTop;}// 加强定位- protyle.observerLoad = new ResizeObserver((entries) => {+ protyle.observerLoad = new ResizeObserver(() => {if (action.includes(Constants.CB_GET_FOCUS) || action.includes(Constants.CB_GET_HL) || action.includes(Constants.CB_GET_FOCUSFIRST)) {focusElement.scrollIntoView();} else if (scrollAttr && scrollAttr.scrollTop) {diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 05538bfffc..2088e91a7b 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -1052,7 +1052,7 @@ export class WYSIWYG {private bindEvent(protyle: IProtyle) {// 删除块时,av 头尾需重新计算位置- protyle.observer = new ResizeObserver((entries) => {+ protyle.observer = new ResizeObserver(() => {const contentRect = protyle.contentElement.getBoundingClientRect();protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {if (item.querySelector(".av__title")) {