An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/issues/8521
Vanessa250bb3839d01
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.tsindex 5a6b49b3d8..2f7f2ff44c 100644--- a/app/src/dialog/processSystem.ts+++ b/app/src/dialog/processSystem.ts@@ -441,7 +441,6 @@ export const processSync = (data?: IWebSocketData) => {if (!data) {iconElement.classList.remove("toolbar__item--active");if (!window.siyuan.config.sync.enabled || (0 === window.siyuan.config.sync.provider && needSubscribe(""))) {- iconElement.setAttribute("aria-label", window.siyuan.languages["_kernel"]["53"]);useElement.setAttribute("xlink:href", "#iconCloudOff");} else {useElement.setAttribute("xlink:href", "#iconCloudSucc");@@ -460,6 +459,5 @@ export const processSync = (data?: IWebSocketData) => {iconElement.classList.remove("toolbar__item--active");useElement.setAttribute("xlink:href", "#iconCloudSucc");}- iconElement.setAttribute("aria-label", data.msg);/// #endif};diff --git a/app/src/layout/topBar.ts b/app/src/layout/topBar.tsindex d3c3c1c8c6..92efbc3c85 100644--- a/app/src/layout/topBar.ts+++ b/app/src/layout/topBar.ts@@ -16,6 +16,10 @@ import {webFrame} from "electron";import {Constants} from "../constants";import {isBrowser, isWindow} from "../util/functions";import {Menu} from "../plugin/Meun";+import {fetchPost} from "../util/fetch";+import {escapeAttr} from "../util/escape";+import {needSubscribe} from "../util/needSubscribe";+import * as dayjs from "dayjs";export const updateEditModeElement = () => {const target = document.querySelector("#barReadonly");@@ -227,6 +231,32 @@ export const initBar = (app: App) => {target = target.parentElement;}});+ const barSyncElement = toolbarElement.querySelector("#barSync");+ barSyncElement.addEventListener("mouseenter", (event) => {+ event.stopPropagation();+ event.preventDefault();+ fetchPost("/api/sync/getSyncInfo", {}, (response) => {+ let html = ""+ if (!window.siyuan.config.sync.enabled || (0 === window.siyuan.config.sync.provider && needSubscribe(""))) {+ html = response.data.stat;+ } else {+ html = window.siyuan.languages._kernel[82].replace("%s", dayjs(response.data.synced).format("YYYY-MM-DD HH:mm")) + "\n\n"+ response.data.kernels.forEach((item: {+ os: string;+ ver: string;+ hostname: string;+ id: string;+ }) => {+ html += `${item.os}-${item.ver} ${item.hostname} ${item.id}\n`+ })+ if (response.data.kernels.length > 0) {+ html += "\n"+ }+ html += response.data.stat;+ }+ barSyncElement.setAttribute("aria-label", escapeAttr(html));+ })+ })};export const setZoom = (type: "zoomIn" | "zoomOut" | "restore") => {diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.tsindex e182e6f3f1..afaeff0e75 100644--- a/app/src/protyle/render/av/render.ts+++ b/app/src/protyle/render/av/render.ts@@ -101,4 +101,3 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {});}};-