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:
Vanessa2c9792c23910
diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.tsindex 424335d26d..f2bc1ca483 100644--- a/app/src/protyle/util/editorCommonEvent.ts+++ b/app/src/protyle/util/editorCommonEvent.ts@@ -909,7 +909,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {if (window.siyuan.dragElement.parentElement?.classList.contains("protyle-gutters") ||// 列表项之前的点window.siyuan.dragElement.getAttribute("data-type") === "NodeListItem") {- disabledPosition = ""+ disabledPosition = "";// gutter 文档内拖拽限制// 排除自己及子孙const selectedIdsData = window.siyuan.dragElement.getAttribute("data-selected-ids");@@ -938,11 +938,11 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {}if (window.siyuan.dragElement.getAttribute("data-type") === "NodeListItem" && targetElement.parentElement.classList.contains("li") && targetElement.previousElementSibling?.classList.contains("protyle-action")) {// 列表项不能拖入列表项中第一个元素之上- disabledPosition = "top"+ disabledPosition = "top";}if (window.siyuan.dragElement.getAttribute("data-type") === "NodeListItem" && targetElement.nextElementSibling?.classList.contains("list")) {// 列表项不能拖入列表上方块的下面- disabledPosition = "bottom"+ disabledPosition = "bottom";}dragoverElement = targetElement;}diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex b6a106764c..9081571233 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -206,13 +206,13 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}");if (config.layout === 1) {if (data.col) {- edit.protyle.element.style.width = data.col- edit.protyle.element.classList.remove("fn__flex-1")+ edit.protyle.element.style.width = data.col;+ edit.protyle.element.classList.remove("fn__flex-1");}} else {if (data.row) {- edit.protyle.element.classList.remove("fn__flex-1")- edit.protyle.element.style.height = data.row+ edit.protyle.element.classList.remove("fn__flex-1");+ edit.protyle.element.style.height = data.row;}}let clickTimeout: number;@@ -222,7 +222,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()replaceInputElement.value = config.r || "";searchInputElement.select();- const dragElement = element.querySelector(".search__drag")+ const dragElement = element.querySelector(".search__drag");dragElement.addEventListener("mousedown", (event: MouseEvent) => {const documentSelf = document;const nextElement = dragElement.nextElementSibling as HTMLElement;@@ -714,13 +714,13 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:current: config.layout === 0,click() {element.querySelector(".search__layout").classList.remove("search__layout--row");- edit.protyle.element.style.width = ""- const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}")+ edit.protyle.element.style.width = "";+ const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}");if (data.row) {- edit.protyle.element.style.height = data.row- edit.protyle.element.classList.remove("fn__flex-1")+ edit.protyle.element.style.height = data.row;+ edit.protyle.element.classList.remove("fn__flex-1");} else {- edit.protyle.element.classList.add("fn__flex-1")+ edit.protyle.element.classList.add("fn__flex-1");}setPadding(edit.protyle);config.layout = 0;@@ -730,13 +730,13 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:current: config.layout === 1,click() {element.querySelector(".search__layout").classList.add("search__layout--row");- edit.protyle.element.style.height = ""- const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}")+ edit.protyle.element.style.height = "";+ const data = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEKEYS) || "{}");if (data.col) {- edit.protyle.element.style.width = data.col- edit.protyle.element.classList.remove("fn__flex-1")+ edit.protyle.element.style.width = data.col;+ edit.protyle.element.classList.remove("fn__flex-1");} else {- edit.protyle.element.classList.add("fn__flex-1")+ edit.protyle.element.classList.add("fn__flex-1");}setPadding(edit.protyle);config.layout = 1;@@ -807,20 +807,20 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:if (item.layout === 0) {element.querySelector(".search__layout").classList.remove("search__layout--row");if (data.row) {- edit.protyle.element.classList.remove("fn__flex-1")- edit.protyle.element.style.height = data.row- edit.protyle.element.style.width = ""+ edit.protyle.element.classList.remove("fn__flex-1");+ edit.protyle.element.style.height = data.row;+ edit.protyle.element.style.width = "";} else {- edit.protyle.element.classList.add("fn__flex-1")+ edit.protyle.element.classList.add("fn__flex-1");}} else {element.querySelector(".search__layout").classList.add("search__layout--row");if (data.col) {- edit.protyle.element.style.width = data.col- edit.protyle.element.classList.remove("fn__flex-1")- edit.protyle.element.style.height = ""+ edit.protyle.element.style.width = data.col;+ edit.protyle.element.classList.remove("fn__flex-1");+ edit.protyle.element.style.height = "";} else {- edit.protyle.element.classList.add("fn__flex-1")+ edit.protyle.element.classList.add("fn__flex-1");}}setPadding(edit.protyle);diff --git a/app/src/util/history.ts b/app/src/util/history.tsindex e0a90b9505..6081350da1 100644--- a/app/src/util/history.ts+++ b/app/src/util/history.ts@@ -110,14 +110,14 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string<div><span class="ft__smaller ft__on-surface">${item.hCreated}</span><span class="b3-list-item__meta">${window.siyuan.languages.fileSize} ${item.hSize}</span>- <span class="b3-list-item__meta">${window.siyuan.languages.fileCount} ${item.count}</span>`+ <span class="b3-list-item__meta">${window.siyuan.languages.fileCount} ${item.count}</span>`;let statHTML = "";if (item.typesCount && 0 < item.typesCount.length) {statHTML += `<span class="b3-list-item__meta">${item.typesCount.map((type: { type: string, count: number }) => {return `${type.type} ${type.count}`;- }).join(" ")}`+ }).join(" ")}`;}repoHTML += `${statHTML}</span>