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:
Vanessab1c3ccc9e482
diff --git a/app/src/search/spread.ts b/app/src/search/spread.tsindex eb47459c63..8aa187cdc2 100644--- a/app/src/search/spread.ts+++ b/app/src/search/spread.ts@@ -61,8 +61,8 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: striparagraph: window.siyuan.config.search.paragraph,};}- let hPath = ""- const idPath: string[] = []+ let hPath = "";+ const idPath: string[] = [];if (notebookId) {hPath = escapeHtml(getNotebookName(notebookId));idPath.push(notebookId);diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex f71162a62f..d5c5f5239a 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -199,7 +199,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()item.querySelector(".b3-list-item__arrow").classList.add("b3-list-item__arrow--open");item.nextElementSibling.classList.remove("fn__none");}- })+ });event.stopPropagation();event.preventDefault();break;@@ -209,23 +209,23 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()item.querySelector(".b3-list-item__arrow").classList.remove("b3-list-item__arrow--open");item.nextElementSibling.classList.add("fn__none");}- })+ });event.stopPropagation();event.preventDefault();break;} else if (target.id === "searchPath") {movePathTo((toPath, toNotebook) => {fetchPost("/api/filetree/getHPathsByPaths", {paths: toPath}, (response) => {- config.idPath = []- const hPathList: string[] = []+ config.idPath = [];+ const hPathList: string[] = [];toPath.forEach((item, index) => {if (item === "/") {- config.idPath.push(toNotebook[index])- hPathList.push(escapeHtml(getNotebookName(toNotebook[index])))+ config.idPath.push(toNotebook[index]);+ hPathList.push(escapeHtml(getNotebookName(toNotebook[index])));} else {config.idPath.push(pathPosix().join(toNotebook[index], item));}- })+ });if (response.data) {hPathList.push(...response.data);}@@ -285,10 +285,10 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()break;} else if (target.id === "searchFilter") {window.siyuan.menus.menu.remove();- let includeChild = true+ let includeChild = true;config.idPath.find(item => {if (!item.endsWith(".sy")) {- includeChild = false+ includeChild = false;return true;}});@@ -555,12 +555,12 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()};const addConfigGroupMenu = (config: ISearchOption, edit: Protyle, element: Element) => {- window.siyuan.menus.menu.remove()+ window.siyuan.menus.menu.remove();window.siyuan.menus.menu.append(new MenuItem({label: window.siyuan.languages.list1,current: config.group === 0,click() {- element.querySelector("#searchCollapse").parentElement.classList.add("fn__none")+ element.querySelector("#searchCollapse").parentElement.classList.add("fn__none");config.group = 0;inputEvent(element, config, undefined, edit);}@@ -569,7 +569,7 @@ const addConfigGroupMenu = (config: ISearchOption, edit: Protyle, element: Elemelabel: window.siyuan.languages.doc,current: config.group === 1,click() {- element.querySelector("#searchCollapse").parentElement.classList.remove("fn__none")+ element.querySelector("#searchCollapse").parentElement.classList.remove("fn__none");config.group = 1;inputEvent(element, config, undefined, edit);}@@ -579,7 +579,7 @@ const addConfigGroupMenu = (config: ISearchOption, edit: Protyle, element: Elemecurrent: config.layout === 0,click() {element.querySelector("#searchList").parentElement.style.flexDirection = "column";- setPadding(edit.protyle)+ setPadding(edit.protyle);}}).element);window.siyuan.menus.menu.append(new MenuItem({@@ -587,7 +587,7 @@ const addConfigGroupMenu = (config: ISearchOption, edit: Protyle, element: Elemecurrent: config.layout === 1,click() {element.querySelector("#searchList").parentElement.style.flexDirection = "row";- setPadding(edit.protyle)+ setPadding(edit.protyle);}}).element);};diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.tsindex 976bef9c36..e854009e0c 100644--- a/app/src/util/globalShortcut.ts+++ b/app/src/util/globalShortcut.ts@@ -941,7 +941,7 @@ const fileTreeKeydown = (event: KeyboardEvent) => {}if (isFile && matchHotKey(window.siyuan.config.keymap.general.move.custom, event)) {window.siyuan.menus.menu.remove();- const pathes = getTopPaths(liElements)+ const pathes = getTopPaths(liElements);movePathTo((toPath, toNotebook) => {moveToPath(pathes, toNotebook[0], toPath[0]);}, pathes);diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.tsindex f203af6956..c994bddd2a 100644--- a/app/src/util/pathName.ts+++ b/app/src/util/pathName.ts@@ -186,9 +186,9 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,if (event.key.startsWith("Arrow")) {currentItemElements.forEach((item, index) => {if (index !== 0) {- item.classList.remove("b3-list-item--focus")+ item.classList.remove("b3-list-item--focus");}- })+ });}if (searchListElement.classList.contains("fn__none")) {if ((event.key === "ArrowRight" && !currentItemElement.querySelector(".b3-list-item__arrow--open") && !currentItemElement.querySelector(".b3-list-item__toggle").classList.contains("fn__hidden")) ||@@ -320,12 +320,12 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,if (currentItemElements.length === 0) {return;}- const pathList: string[] = []- const notebookIdList: string[] = []+ const pathList: string[] = [];+ const notebookIdList: string[] = [];currentItemElements.forEach(item => {- pathList.push(item.getAttribute("data-path"))- notebookIdList.push(item.getAttribute("data-box"))- })+ pathList.push(item.getAttribute("data-path"));+ notebookIdList.push(item.getAttribute("data-box"));+ });cb(pathList, notebookIdList);dialog.destroy();event.preventDefault();@@ -345,12 +345,12 @@ export const movePathTo = (cb: (toPath: string[], toNotebook: string[]) => void,if (currentItemElements.length === 0) {return;}- const pathList: string[] = []- const notebookIdList: string[] = []+ const pathList: string[] = [];+ const notebookIdList: string[] = [];currentItemElements.forEach(item => {- pathList.push(item.getAttribute("data-path"))- notebookIdList.push(item.getAttribute("data-box"))- })+ pathList.push(item.getAttribute("data-path"));+ notebookIdList.push(item.getAttribute("data-box"));+ });cb(pathList, notebookIdList);dialog.destroy();event.preventDefault();