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:
Vanessa6e9a953bf29d
diff --git a/app/src/config/repos.ts b/app/src/config/repos.tsindex ed7f791721..661d4bbce3 100644--- a/app/src/config/repos.ts+++ b/app/src/config/repos.ts@@ -42,7 +42,7 @@ const renderProvider = (provider: number) => {${window.siyuan.languages.featureBetaStage}<div class="fn__hr"></div>${window.siyuan.languages.syncThirdPartyProviderTip}-</div>`+</div>`;if (isMobile()) {return `${tip}<div class="b3-label b3-label--noborder">diff --git a/app/src/index.ts b/app/src/index.tsindex 4c6e35d5bf..b2544ecaf5 100644--- a/app/src/index.ts+++ b/app/src/index.ts@@ -50,9 +50,9 @@ class App {case "rename":getAllTabs().forEach((tab) => {if (tab.headElement) {- const initTab = tab.headElement.getAttribute("data-initdata")+ const initTab = tab.headElement.getAttribute("data-initdata");if (initTab) {- const initTabData = JSON.parse(initTab)+ const initTabData = JSON.parse(initTab);if (initTabData.rootId === data.data.id) {tab.updateTitle(data.data.title);}@@ -63,9 +63,9 @@ class App {case "unmount":getAllTabs().forEach((tab) => {if (tab.headElement) {- const initTab = tab.headElement.getAttribute("data-initdata")+ const initTab = tab.headElement.getAttribute("data-initdata");if (initTab) {- const initTabData = JSON.parse(initTab)+ const initTabData = JSON.parse(initTab);if (data.data.box === initTabData.notebookId) {tab.parent.removeTab(tab.id);}@@ -76,9 +76,9 @@ class App {case "removeDoc":getAllTabs().forEach((tab) => {if (tab.headElement) {- const initTab = tab.headElement.getAttribute("data-initdata")+ const initTab = tab.headElement.getAttribute("data-initdata");if (initTab) {- const initTabData = JSON.parse(initTab)+ const initTabData = JSON.parse(initTab);if (data.data.ids.includes(initTabData.rootId)) {tab.parent.removeTab(tab.id);}diff --git a/app/src/mobile/util/menu.ts b/app/src/mobile/util/menu.tsindex 8f1073b994..21cf8527fe 100644--- a/app/src/mobile/util/menu.ts+++ b/app/src/mobile/util/menu.ts@@ -6,7 +6,6 @@ import {closePanel} from "./closePanel";import {Constants} from "../../constants";import {setAccessAuthCode} from "../../config/util/setAccessAuthCode";import {mountHelp, newDailyNote, newNotebook} from "../../util/mount";-import {needSubscribe} from "../../util/needSubscribe";import {repos} from "../../config/repos";import * as md5 from "blueimp-md5";import {showMessage} from "../../dialog/message";diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.tsindex 54165bc81d..1ba23ec784 100644--- a/app/src/protyle/export/util.ts+++ b/app/src/protyle/export/util.ts@@ -46,7 +46,7 @@ export const exportImage = (id: string) => {id,keepFold: false,}, (response) => {- const previewElement = exportDialog.element.querySelector("#preview")+ const previewElement = exportDialog.element.querySelector("#preview");previewElement.innerHTML = response.data.content;processRender(previewElement);highlightRender(previewElement);@@ -70,14 +70,13 @@ export const exportImage = (id: string) => {const formData = new FormData();formData.append("file", blob, response.data.name + ".png");formData.append("type", "image/png");- fetchPost("/api/export/exportAsFile", formData, () => {- hideMessage(msgId);- exportDialog.destroy();- });+ fetchPost("/api/export/exportAsFile", formData);+ hideMessage(msgId);+ exportDialog.destroy();});});});- }, Constants.TIMEOUT_TRANSITION)+ }, Constants.TIMEOUT_TRANSITION);});});-}+};diff --git a/app/src/protyle/scroll/index.ts b/app/src/protyle/scroll/index.tsindex 2e86744985..40ecd44a35 100644--- a/app/src/protyle/scroll/index.ts+++ b/app/src/protyle/scroll/index.ts@@ -23,7 +23,7 @@ export class Scroll {</div><div class="b3-tooltips b3-tooltips__sw protyle-scroll__down" aria-label="${updateHotkeyTip("⌘End")}"><svg><use xlink:href="#iconDown"></use></svg>-</div>`+</div>`;this.element = this.parentElement.querySelector(".protyle-scroll__bar");this.keepLazyLoad = false;@@ -44,11 +44,11 @@ export class Scroll {});/// #endifthis.parentElement.addEventListener("click", (event) => {- const target = event.target as HTMLElement+ const target = event.target as HTMLElement;if (hasClosestByClassName(target, "protyle-scroll__up")) {- goHome(protyle)+ goHome(protyle);} else if (hasClosestByClassName(target, "protyle-scroll__down")) {- goEnd(protyle)+ goEnd(protyle);} else if (target.classList.contains("b3-slider")) {this.setIndex(protyle);}diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.tsindex b4d3fcb115..b3bad184e8 100644--- a/app/src/protyle/toolbar/index.ts+++ b/app/src/protyle/toolbar/index.ts@@ -544,7 +544,7 @@ export class Toolbar {currentNewNode.style.fontSize === nextNewNode.style.fontSize &¤tNewNode.style.backgroundColor === nextNewNode.style.backgroundColor) {// 合并相同的 node- const currentType = currentNewNode.getAttribute("data-type")+ const currentType = currentNewNode.getAttribute("data-type");if (currentType.indexOf("inline-math") > -1) {// 数学公式合并 data-content https://github.com/siyuan-note/siyuan/issues/6028nextNewNode.setAttribute("data-content", currentNewNode.getAttribute("data-content") + nextNewNode.getAttribute("data-content"));diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.tsindex a648e93473..193ef00b59 100644--- a/app/src/protyle/ui/initUI.ts+++ b/app/src/protyle/ui/initUI.ts@@ -94,7 +94,7 @@ export const setPadding = (protyle: IProtyle) => {if (!window.siyuan.config.editor.fullWidth && padding > 96) {if (padding > Constants.SIZE_EDITOR_WIDTH) {// 超宽屏调整 https://ld246.com/article/1668266637363- padding = protyle.element.clientWidth / 3+ padding = protyle.element.clientWidth / 3;}min16 = padding;min24 = padding;diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.tsindex 1b79b436ad..79c234288a 100644--- a/app/src/protyle/wysiwyg/commonHotkey.ts+++ b/app/src/protyle/wysiwyg/commonHotkey.ts@@ -234,7 +234,7 @@ export const goHome = (protyle:IProtyle) => {onGet(getResponse, protyle, [Constants.CB_GET_FOCUS]);});}-}+};export const goEnd = (protyle:IProtyle) => {if (!protyle.scroll.element.classList.contains("fn__none") &&@@ -251,4 +251,4 @@ export const goEnd = (protyle:IProtyle) => {protyle.scroll.lastScrollTop = protyle.contentElement.scrollTop;focusBlock(protyle.wysiwyg.element.lastElementChild, undefined, false);}-}+};