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:
Vanessa5987b0cea70d
diff --git a/app/src/boot/globalShortcut.ts b/app/src/boot/globalShortcut.tsindex a7a703cb4a..e5f88acfc2 100644--- a/app/src/boot/globalShortcut.ts+++ b/app/src/boot/globalShortcut.ts@@ -365,7 +365,7 @@ export const globalShortcut = () => {const currentType = currentLiElement.getAttribute("data-type");if (currentType) {if (currentType === "riffCard") {- openCard()+ openCard();} else {getDockByType(currentType as TDockType).toggleModel(currentType as TDockType, true);}@@ -931,7 +931,7 @@ const dialogArrow = (element: HTMLElement, event: KeyboardEvent) => {const currentType = currentLiElement.getAttribute("data-type");if (currentType) {if (currentType === "riffCard") {- openCard()+ openCard();} else {getDockByType(currentType as TDockType).toggleModel(currentType as TDockType, true);}diff --git a/app/src/boot/openChangelog.ts b/app/src/boot/openChangelog.tsindex 94303753d6..6f8c039138 100644--- a/app/src/boot/openChangelog.ts+++ b/app/src/boot/openChangelog.ts@@ -12,8 +12,8 @@ export const openChangelog = () => {const dialog = new Dialog({title: `v${Constants.SIYUAN_VERSION} ${window.siyuan.languages.update}`,width: isMobile() ? "80vw" : "520px",- content: `<div class="b3-dialog__content b3-typography b3-typography--default">${response.data.html}</div>`+ content: `<div style="overflow:auto;height: ${isMobile() ? "80" : "70"}vh;" class="b3-dialog__content b3-typography b3-typography--default">${response.data.html}</div>`});highlightRender(dialog.element);});-}+};diff --git a/app/src/mobile/util/keyboardToolbar.ts b/app/src/mobile/util/keyboardToolbar.tsindex b033dc7e0f..ecdfb5925d 100644--- a/app/src/mobile/util/keyboardToolbar.ts+++ b/app/src/mobile/util/keyboardToolbar.ts@@ -162,7 +162,7 @@ const showKeyboardToolbarUtil = (oldScrollTop: number) => {};const hideKeyboardToolbarUtil = () => {- const toolbarElement = document.getElementById("keyboardToolbar")+ const toolbarElement = document.getElementById("keyboardToolbar");toolbarElement.style.height = "";window.siyuan.mobile.editor.protyle.element.style.marginBottom = "42px";toolbarElement.querySelector('.keyboard__action[data-type="add"]').classList.remove("protyle-toolbar__item--current");diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.tsindex f8e5ccdfd1..f9b54e0462 100644--- a/app/src/mobile/util/touch.ts+++ b/app/src/mobile/util/touch.ts@@ -50,9 +50,9 @@ export const handleTouchEnd = (event: TouchEvent) => {hasClosestByAttribute(target, "data-type", "NodeTable");if (scrollElement) {if (scrollElement.classList.contains("table")) {- scrollElement = scrollElement.firstElementChild as HTMLElement+ scrollElement = scrollElement.firstElementChild as HTMLElement;} else if (scrollElement.classList.contains("code-block")) {- scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement+ scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement;}if ((xDiff <= 0 && scrollElement.scrollLeft > 0) ||(xDiff >= 0 && scrollElement.clientWidth + scrollElement.scrollLeft < scrollElement.scrollWidth)) {@@ -196,9 +196,9 @@ export const handleTouchMove = (event: TouchEvent) => {hasClosestByAttribute(target, "data-type", "NodeTable");if (scrollElement) {if (scrollElement.classList.contains("table")) {- scrollElement = scrollElement.firstElementChild as HTMLElement+ scrollElement = scrollElement.firstElementChild as HTMLElement;} else if (scrollElement.classList.contains("code-block")) {- scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement+ scrollElement = scrollElement.firstElementChild.nextElementSibling as HTMLElement;}if ((xDiff < 0 && scrollElement.scrollLeft > 0) ||(xDiff > 0 && scrollElement.clientWidth + scrollElement.scrollLeft < scrollElement.scrollWidth)) {diff --git a/app/src/protyle/util/setEditMode.ts b/app/src/protyle/util/setEditMode.tsindex 42760637c4..bd0e9c4a17 100644--- a/app/src/protyle/util/setEditMode.ts+++ b/app/src/protyle/util/setEditMode.ts@@ -12,7 +12,7 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {if (protyle.options.render.breadcrumb) {protyle.breadcrumb?.element.classList.add("fn__none");if (protyle.block.showAll) {- const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')+ const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]');exitFocusElement.classList.add("fn__none");exitFocusElement.nextElementSibling.classList.add("fn__none");}@@ -32,7 +32,7 @@ export const setEditMode = (protyle: IProtyle, type: TEditorMode) => {if (protyle.options.render.breadcrumb) {protyle.breadcrumb?.element.classList.remove("fn__none");if (protyle.block.showAll) {- const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]')+ const exitFocusElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="exit-focus"]');exitFocusElement.classList.remove("fn__none");exitFocusElement.nextElementSibling.classList.remove("fn__none");}diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex 14fe2bc3fa..1fda62a1bd 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -98,7 +98,7 @@ export const openGlobalSearch = (text: string, replace: boolean) => {};const newEmptyFileByInput = (value: string) => {- const newData = getNewFilePath(true)+ const newData = getNewFilePath(true);fetchPost("/api/filetree/getHPathByPath", {notebook: newData.notebookId,path: newData.currentPath,@@ -552,7 +552,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()replaceInputElement.value = target.textContent;replaceHistoryElement.classList.add("fn__none");} else if (target.getAttribute("data-type") === "search-new") {- newEmptyFileByInput(searchInputElement.value)+ newEmptyFileByInput(searchInputElement.value);} else if (target.getAttribute("data-type") === "search-item") {if (event.detail === 1) {clickTimeout = window.setTimeout(() => {@@ -635,7 +635,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()if (!currentList || event.isComposing) {return;}- const focusIsNew = currentList.getAttribute("data-type") === "search-new"+ const focusIsNew = currentList.getAttribute("data-type") === "search-new";if (focusIsNew && matchHotKey(window.siyuan.config.keymap.general.newFile.custom, event)) {newEmptyFileByInput(searchInputElement.value);event.preventDefault();@@ -644,7 +644,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()}if (event.key === "Enter") {if (focusIsNew) {- newEmptyFileByInput(searchInputElement.value)+ newEmptyFileByInput(searchInputElement.value);} else {const id = currentList.getAttribute("data-node-id");fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {@@ -1334,7 +1334,7 @@ const replace = (element: Element, config: ISearchOption, edit: Protyle, isAll:if (currentList.nextElementSibling || currentList.previousElementSibling) {currentList.remove();} else {- const nextDocElement = currentList.parentElement.nextElementSibling || currentList.parentElement.previousElementSibling.previousElementSibling?.previousElementSibling+ const nextDocElement = currentList.parentElement.nextElementSibling || currentList.parentElement.previousElementSibling.previousElementSibling?.previousElementSibling;if (nextDocElement) {nextDocElement.nextElementSibling.firstElementChild.classList.add("b3-list-item--focus");nextDocElement.nextElementSibling.classList.remove("fn__none");diff --git a/app/src/util/newFile.ts b/app/src/util/newFile.tsindex b487f61777..2aa15c67a4 100644--- a/app/src/util/newFile.ts+++ b/app/src/util/newFile.ts@@ -12,8 +12,8 @@ import {Constants} from "../constants";import {validateName} from "../editor/rename";export const getNewFilePath = (useSavePath: boolean) => {- let notebookId = ""- let currentPath = ""+ let notebookId = "";+ let currentPath = "";/// #if !MOBILEgetAllModels().editor.find((item) => {const currentElement = item.parent.headElement;@@ -57,8 +57,8 @@ export const getNewFilePath = (useSavePath: boolean) => {}});}- return {notebookId, currentPath}-}+ return {notebookId, currentPath};+};export const newFile = (notebookId?: string, currentPath?: string, paths?: string[], useSavePath = false) => {if (getOpenNotebookCount() === 0) {@@ -66,7 +66,7 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strinreturn;}if (!notebookId) {- const resultData = getNewFilePath(useSavePath)+ const resultData = getNewFilePath(useSavePath);notebookId = resultData.notebookId;currentPath = resultData.currentPath;}