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:
Vanessa62cf6411a0a0
diff --git a/app/src/block/popover.ts b/app/src/block/popover.tsindex 64c4b21f38..6477d4e19a 100644--- a/app/src/block/popover.ts+++ b/app/src/block/popover.ts@@ -99,9 +99,9 @@ const hidePopover = (event: MouseEvent & { target: HTMLElement, path: HTMLElemenif (!popoverTargetElement) {// 移动到弹窗的 loading 元素上,但经过 settimeout 后 loading 已经被移除了// https://ld246.com/article/1673596577519/comment/1673767749885#comments- let targetElement = event.target+ let targetElement = event.target;if (!targetElement.parentElement) {- targetElement = event.path[1]+ targetElement = event.path[1];}const blockElement = hasClosestByClassName(targetElement, "block__popover", true);const maxEditLevels: { [key: string]: number } = {oid: 0};diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.tsindex f72fa9fc92..6e2775a5d9 100644--- a/app/src/dialog/processSystem.ts+++ b/app/src/dialog/processSystem.ts@@ -282,10 +282,10 @@ export const setTitle = (title: string, protyle?: IProtyle) => {} else {title = title || "Untitled";if (protyle && protyle.disabled) {- title = `[${window.siyuan.languages.editReadonly}] ${title}`+ title = `[${window.siyuan.languages.editReadonly}] ${title}`;}if (protyle && protyle.block.showAll) {- title = `[${window.siyuan.languages.enter}] ${title}`+ title = `[${window.siyuan.languages.enter}] ${title}`;}document.title = `${title} - ${workspaceName} - ${window.siyuan.languages.siyuanNote} v${Constants.SIYUAN_VERSION}`;dragElement.textContent = title;@@ -298,10 +298,10 @@ export const updateTitle = (readonly?: boolean, zoomIn?: boolean) => {if (typeof readonly === "boolean") {if (readonly) {if (title.indexOf(window.siyuan.languages.editReadonly) === -1) {- setTitle(`[${window.siyuan.languages.editReadonly}] ${title}`)+ setTitle(`[${window.siyuan.languages.editReadonly}] ${title}`);}} else {- setTitle(title.replace(`[${window.siyuan.languages.editReadonly}] `, ""))+ setTitle(title.replace(`[${window.siyuan.languages.editReadonly}] `, ""));}}if (typeof zoomIn === "boolean") {@@ -310,10 +310,10 @@ export const updateTitle = (readonly?: boolean, zoomIn?: boolean) => {setTitle(`[${window.siyuan.languages.enter}] ${title}`);}} else {- setTitle(title.replace(`[${window.siyuan.languages.enter}] `, ""))+ setTitle(title.replace(`[${window.siyuan.languages.enter}] `, ""));}}-}+};export const downloadProgress = (data: { id: string, percent: number }) => {const bazzarElement = document.getElementById("configBazaarReadme");diff --git a/app/src/layout/dock/util.ts b/app/src/layout/dock/util.tsindex d4ac60b806..6a3dcc658f 100644--- a/app/src/layout/dock/util.ts+++ b/app/src/layout/dock/util.ts@@ -111,4 +111,4 @@ export const renameTag = (labelName: string) => {btnsElement[1].addEventListener("click", () => {fetchPost("/api/tag/renameTag", {oldLabel: labelName, newLabel: inputElement.value});});-}+};diff --git a/app/src/layout/status.ts b/app/src/layout/status.tsindex a5c1bd6f49..2a2f4ab18a 100644--- a/app/src/layout/status.ts+++ b/app/src/layout/status.ts@@ -10,7 +10,6 @@ import {getCurrentWindow} from "@electron/remote";/// #endif/// #endifimport {isBrowser} from "../util/functions";-import {lockScreen} from "../dialog/processSystem";export const initStatus = () => {/// #if !MOBILEdiff --git a/app/src/layout/util.ts b/app/src/layout/util.tsindex 7bf57d183a..f75521b06e 100644--- a/app/src/layout/util.ts+++ b/app/src/layout/util.ts@@ -457,8 +457,8 @@ export const resizeTabs = () => {}// 保持光标位置不变 https://ld246.com/article/1673704873983/comment/1673765814595#commentsif (!item.element.classList.contains("fn__none") && item.editor.protyle.toolbar.range) {- const protyleRect = item.editor.protyle.element.getBoundingClientRect()- const rangeRect = item.editor.protyle.toolbar.range.getBoundingClientRect()+ const protyleRect = item.editor.protyle.element.getBoundingClientRect();+ const rangeRect = item.editor.protyle.toolbar.range.getBoundingClientRect();if (protyleRect.top + 30 > rangeRect.top || protyleRect.bottom < rangeRect.bottom) {item.editor.protyle.toolbar.range.startContainer.parentElement.scrollIntoView(protyleRect.top > rangeRect.top);}diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex ed53c4b5e6..ffb94990ec 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -968,7 +968,7 @@ export const tagMenu = (protyle: IProtyle, tagElement: HTMLElement) => {window.siyuan.menus.menu.append(new MenuItem({label: window.siyuan.languages.rename,click() {- renameTag(tagElement.textContent.replace(Constants.ZWSP, ""))+ renameTag(tagElement.textContent.replace(Constants.ZWSP, ""));}}).element);window.siyuan.menus.menu.append(new MenuItem({diff --git a/app/src/menus/workspace.ts b/app/src/menus/workspace.tsindex ccce69c720..45a0dcc0bc 100644--- a/app/src/menus/workspace.ts+++ b/app/src/menus/workspace.ts@@ -35,7 +35,7 @@ export const workspaceMenu = (rect: DOMRect) => {}}).element);}- const dockMenu: IMenu[] = []+ const dockMenu: IMenu[] = [];getAllDocks().forEach(item => {dockMenu.push({icon: item.icon,@@ -66,7 +66,7 @@ export const workspaceMenu = (rect: DOMRect) => {}openWorkspace(localPath.filePaths[0]);}- }]+ }];workspaceSubMenu.push({type: "separator"});response.data.forEach((item: IWorkspace) => {workspaceSubMenu.push(workspaceItem(item) as IMenu);