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:
Vanessa5d70f3cf64e0
diff --git a/app/src/config/editor.ts b/app/src/config/editor.tsindex faa4b85e05..cf1fe0f4ff 100644--- a/app/src/config/editor.ts+++ b/app/src/config/editor.ts@@ -202,7 +202,7 @@ export const editor = {onSetEditor: (editor: IEditor) => {window.siyuan.config.editor = editor;getAllModels().editor.forEach((item) => {- reloadProtyle(item.editor.protyle)+ reloadProtyle(item.editor.protyle);setPadding(item.editor.protyle);if (window.siyuan.config.editor.fullWidth) {item.editor.protyle.contentElement.setAttribute("data-fullwidth", "true");diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.tsindex 6847ad442f..d9b4607727 100644--- a/app/src/protyle/index.ts+++ b/app/src/protyle/index.ts@@ -100,7 +100,7 @@ class Protyle {size: Constants.SIZE_GET,}, getResponse => {onGet(getResponse, this.protyle);- })+ });} else {reloadProtyle(this.protyle);}diff --git a/app/src/protyle/util/reload.ts b/app/src/protyle/util/reload.tsindex c7202a4329..c6f3cb436c 100644--- a/app/src/protyle/util/reload.ts+++ b/app/src/protyle/util/reload.ts@@ -19,4 +19,4 @@ export const reloadProtyle = (protyle:IProtyle) => {}, getResponse => {onGet(getResponse, protyle, protyle.block.showAll ? [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS] : [Constants.CB_GET_FOCUS], saveScroll(protyle, true), true);});-}+};diff --git a/app/src/search/spread.ts b/app/src/search/spread.tsindex 826886492c..b4ac0c3141 100644--- a/app/src/search/spread.ts+++ b/app/src/search/spread.ts@@ -537,7 +537,7 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri}getAllModels().editor.forEach(item => {if (rootIds[0] === item.editor.protyle.block.rootID) {- reloadProtyle(item.editor.protyle)+ reloadProtyle(item.editor.protyle);}});if (!currentList.nextElementSibling && searchPanelElement.children[0]) {diff --git a/app/src/util/history.ts b/app/src/util/history.tsindex 65c10367a5..971721257f 100644--- a/app/src/util/history.ts+++ b/app/src/util/history.ts@@ -9,7 +9,7 @@ import {renderAssetsPreview} from "../asset/renderAssets";import Protyle from "../protyle";import {onGet} from "../protyle/util/onGet";-let historyEditor: Protyle+let historyEditor: Protyle;const renderDoc = (element: HTMLElement, currentPage: number) => {const previousElement = element.querySelector('[data-type="docprevious"]');const nextElement = element.querySelector('[data-type="docnext"]');@@ -30,12 +30,12 @@ const renderDoc = (element: HTMLElement, currentPage: number) => {docElement.classList.add("fn__none");mdElement.classList.add("fn__none");if (typeElement.value === "0") {- opElement.removeAttribute("disabled")- notebookElement.removeAttribute("disabled")+ opElement.removeAttribute("disabled");+ notebookElement.removeAttribute("disabled");assetElement.classList.add("fn__none");} else {- opElement.setAttribute("disabled", "disabled")- notebookElement.setAttribute("disabled", "disabled")+ opElement.setAttribute("disabled", "disabled");+ notebookElement.setAttribute("disabled", "disabled");assetElement.classList.remove("fn__none");}fetchPost("/api/history/searchHistory", {@@ -84,11 +84,11 @@ const renderDoc = (element: HTMLElement, currentPage: number) => {}, (contentResponse) => {if (contentResponse.data.isLargeDoc) {mdElement.value = contentResponse.data.content;- mdElement.classList.remove("fn__none")- docElement.classList.add("fn__none")+ mdElement.classList.remove("fn__none");+ docElement.classList.add("fn__none");} else {- mdElement.classList.add("fn__none")- docElement.classList.remove("fn__none")+ mdElement.classList.add("fn__none");+ docElement.classList.remove("fn__none");onGet(contentResponse, historyEditor.protyle, [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML]);}});@@ -233,10 +233,10 @@ export const openHistory = () => {}const currentNotebookId = localStorage.getItem(Constants.LOCAL_HISTORYNOTEID);- let notebookSelectHTML = '';+ let notebookSelectHTML = "";window.siyuan.notebooks.forEach((item) => {if (!item.closed) {- notebookSelectHTML += ` <option value="${item.id}"${item.id === currentNotebookId ? " selected" : ""}>${item.name}</option>`+ notebookSelectHTML += ` <option value="${item.id}"${item.id === currentNotebookId ? " selected" : ""}>${item.name}</option>`;}});const dialog = new Dialog({@@ -423,11 +423,11 @@ export const openHistory = () => {}, (response) => {if (response.data.isLargeDoc) {mdElement.value = response.data.content;- mdElement.classList.remove("fn__none")- docElement.classList.add("fn__none")+ mdElement.classList.remove("fn__none");+ docElement.classList.add("fn__none");} else {- mdElement.classList.add("fn__none")- docElement.classList.remove("fn__none")+ mdElement.classList.add("fn__none");+ docElement.classList.remove("fn__none");onGet(response, historyEditor.protyle, [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML]);}});