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:
Vanessa0476c8d48da2
diff --git a/app/src/config/about.ts b/app/src/config/about.tsindex 16a8f9f1a2..359e070147 100644--- a/app/src/config/about.ts+++ b/app/src/config/about.ts@@ -317,8 +317,7 @@ export const about = {});about.element.querySelector("#purgeRepo").addEventListener("click", () => {confirmDialog("♻️ " + window.siyuan.languages.dataRepoPurge, window.siyuan.languages.dataRepoPurgeConfirm, () => {- fetchPost("/api/repo/purgeRepo", {}, () => {- });+ fetchPost("/api/repo/purgeRepo");});});const networkServeElement = about.element.querySelector("#networkServe") as HTMLInputElement;diff --git a/app/src/history/history.ts b/app/src/history/history.tsindex 0b25289d0b..0269ee23ed 100644--- a/app/src/history/history.ts+++ b/app/src/history/history.ts@@ -168,7 +168,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: stringif (item.typesCount) {item.typesCount.forEach(subItem => {statHTML += `<span class="fn__space"></span>${subItem.type} ${subItem.count}`;- })+ });}statHTML+="</div>";@@ -183,7 +183,7 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string<span class="fn__space"></span>${window.siyuan.languages.fileSize} ${item.hSize}</span>-</div>${statHTML}`+</div>${statHTML}`;/// #if MOBILErepoHTML += `<li class="b3-list-item" data-type="repoitem" data-id="${item.id}" data-tag="${item.tag}"><div class="fn__flex-1">@@ -204,7 +204,7 @@ ${actionHTML}};const renderRepo = (element: Element, currentPage: number) => {- const selectValue = (element.querySelector(".b3-select") as HTMLSelectElement).value+ const selectValue = (element.querySelector(".b3-select") as HTMLSelectElement).value;element.lastElementChild.innerHTML = '<li style="position: relative;height: 100%;"><div class="fn__loading"><img width="64px" src="/stage/loading-pure.svg"></div></li>';const previousElement = element.querySelector('[data-type="previous"]');const nextElement = element.querySelector('[data-type="next"]');diff --git a/app/src/layout/dock/Inbox.ts b/app/src/layout/dock/Inbox.tsindex f876890ebb..63bbd7e85b 100644--- a/app/src/layout/dock/Inbox.ts+++ b/app/src/layout/dock/Inbox.ts@@ -12,7 +12,6 @@ import {replaceFileName} from "../../editor/rename";import {escapeHtml} from "../../util/escape";import {unicode2Emoji} from "../../emoji";import {Constants} from "../../constants";-import {isMobile} from "../../util/functions";export class Inbox extends Model {private element: Element;diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.tsindex 4214bf2dd9..5716fb1e13 100644--- a/app/src/mobile/menu/search.ts+++ b/app/src/mobile/menu/search.ts@@ -217,7 +217,7 @@ const updateSearchResult = (config: ISearchOption, element: Element) => {});} else {if (!config.page) {- config.page = 1+ config.page = 1;}if (config.page > 1) {previousElement.removeAttribute("disabled");diff --git a/app/src/mobile/settings/about.ts b/app/src/mobile/settings/about.tsindex 536d69aef8..812e343aef 100644--- a/app/src/mobile/settings/about.ts+++ b/app/src/mobile/settings/about.ts@@ -253,8 +253,7 @@ export const initAbout = () => {break;} else if (target.id === "purgeRepo") {confirmDialog("♻️ " + window.siyuan.languages.dataRepoPurge, window.siyuan.languages.dataRepoPurgeConfirm, () => {- fetchPost("/api/repo/purgeRepo", {}, () => {- });+ fetchPost("/api/repo/purgeRepo");});event.preventDefault();event.stopPropagation();diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.tsindex ad5a31f27d..86c0097205 100644--- a/app/src/mobile/util/touch.ts+++ b/app/src/mobile/util/touch.ts@@ -24,7 +24,7 @@ const popSide = (render = true) => {};export const handleTouchEnd = (event: TouchEvent) => {- const editor = getCurrentEditor()+ const editor = getCurrentEditor();if (editor) {document.querySelectorAll(".protyle-breadcrumb__bar--hide").forEach(item => {item.classList.remove("protyle-breadcrumb__bar--hide");@@ -36,7 +36,7 @@ export const handleTouchEnd = (event: TouchEvent) => {target.tagName === "SPAN" && window.webkit?.messageHandlers &&!hasClosestByAttribute(target, "data-type", "NodeBlockQueryEmbed")) {// ios 长按行内元素弹出菜单- const types = (target.getAttribute("data-type") || "").split(" ")+ const types = (target.getAttribute("data-type") || "").split(" ");if (types.includes("inline-memo")) {editor.protyle.toolbar.showRender(editor.protyle, target);}diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.tsindex aa8a721874..0a76356767 100644--- a/app/src/protyle/hint/index.ts+++ b/app/src/protyle/hint/index.ts@@ -488,7 +488,7 @@ ${unicode2Emoji(emoji.unicode, true)}</button>`;tempElement.innerHTML = value.replace(/<mark>/g, "").replace(/<\/mark>/g, "");tempElement = tempElement.firstElementChild as HTMLDivElement;if (refIsS) {- const staticText = range.toString().replace(this.splitChar, "")+ const staticText = range.toString().replace(this.splitChar, "");if (staticText) {tempElement.setAttribute("data-subtype", "s");tempElement.innerText = staticText;diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 4e92741e28..df88e2b255 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -63,7 +63,6 @@ import {BlockPanel} from "../../block/Panel";import * as dayjs from "dayjs";import {highlightRender} from "../markdown/highlightRender";import {countBlockWord} from "../../layout/status";-import {openMobileFileById} from "../../mobile/editor";import {moveToDown, moveToUp} from "./move";import {pasteAsPlainText} from "../util/paste";import {preventScroll} from "../scroll/preventScroll";diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex d8e9b28422..b1f1d3dcad 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -286,7 +286,7 @@ export const genSearch = (config: ISearchOption, element: Element, closeCB?: ()let target = event.target as HTMLElement;const searchPathInputElement = element.querySelector("#searchPathInput");while (target && !target.isSameNode(element)) {- const type = target.getAttribute("data-type")+ const type = target.getAttribute("data-type");if (type === "next") {if (!target.getAttribute("disabled")) {config.page++;@@ -1074,7 +1074,7 @@ const inputEvent = (element: Element, config: ISearchOption, inputTimeout: numbepage: config.page || 1,}, (response) => {if (!config.page) {- config.page = 1+ config.page = 1;}if (config.page < response.data.pageCount) {nextElement.removeAttribute("disabled");