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:
Vanessa9ddd1c46741b
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.tsindex 9a494117fb..c73a38ac89 100644--- a/app/src/layout/Wnd.ts+++ b/app/src/layout/Wnd.ts@@ -139,7 +139,7 @@ export class Wnd {event.preventDefault();const it = this as HTMLElement;if (event.dataTransfer.types.includes(Constants.SIYUAN_DROP_FILE)) {- it.style.opacity = ".1"+ it.style.opacity = ".1";return;}const newTabHeaderElement = hasClosestByTag(event.target, "LI");@@ -444,7 +444,7 @@ export class Wnd {}setTimeout(() => {- tab.headElement.removeAttribute("style")+ tab.headElement.removeAttribute("style");}, Constants.TIMEOUT_TRANSITION);tab.headElement.querySelector(".item__close").addEventListener("click", (event) => {diff --git a/app/src/layout/util.ts b/app/src/layout/util.tsindex 2b3c57ca75..cd139cfcb4 100644--- a/app/src/layout/util.ts+++ b/app/src/layout/util.ts@@ -412,8 +412,8 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => {export const resizeDrag = () => {const dragElement = document.getElementById("drag");- const width = dragElement.clientWidth- const left = dragElement.getBoundingClientRect().left+ const width = dragElement.clientWidth;+ const left = dragElement.getBoundingClientRect().left;const right = document.querySelector("#windowControls").clientWidth + document.querySelector("#barSearch").clientWidth * 4;if (left > right && left - right < width) {dragElement.style.paddingRight = (left - right) + "px";diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex 7ccc42b23e..4e41b72d4e 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -22,9 +22,6 @@ import * as dayjs from "dayjs";import {fetchPost, fetchSyncPost} from "../../util/fetch";import {cancelSB, insertEmptyBlock, jumpToParentNext} from "../../block/util";import {scrollCenter} from "../../util/highlightById";-import {isMobile} from "../../util/functions";-import {confirmDialog} from "../../dialog/confirmDialog";-import {enableProtyle} from "../util/onGet";import {countBlockWord} from "../../layout/status";/// #if !MOBILEimport {openFileById} from "../../editor/util";diff --git a/app/src/protyle/util/editorCommonEvent.ts b/app/src/protyle/util/editorCommonEvent.tsindex 4096881c32..88b791b6fd 100644--- a/app/src/protyle/util/editorCommonEvent.ts+++ b/app/src/protyle/util/editorCommonEvent.ts@@ -1,4 +1,4 @@-import {focusBlock, focusByRange, focusByWbr} from "./selection";+import {focusBlock, focusByRange} from "./selection";import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName} from "./hasClosest";import {Constants} from "../../constants";import {paste} from "./paste";diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.tsindex 2cee87145e..9e58dd4e61 100644--- a/app/src/protyle/util/onGet.ts+++ b/app/src/protyle/util/onGet.ts@@ -279,7 +279,7 @@ export const disabledProtyle = (protyle: IProtyle) => {hideElements(["gutter", "toolbar", "select", "hint", "util"], protyle);protyle.disabled = true;if (protyle.title) {- const titleElement = protyle.title.element.querySelector(".protyle-title__input") as HTMLElement+ const titleElement = protyle.title.element.querySelector(".protyle-title__input") as HTMLElement;titleElement.setAttribute("contenteditable", "false");titleElement.style.userSelect = "text";}@@ -297,7 +297,7 @@ export const enableProtyle = (protyle: IProtyle) => {// iPhone,iPad 端输入 contenteditable 为 true 时会在块中间插入 span} else {if (protyle.title) {- const titleElement = protyle.title.element.querySelector(".protyle-title__input") as HTMLElement+ const titleElement = protyle.title.element.querySelector(".protyle-title__input") as HTMLElement;titleElement.setAttribute("contenteditable", "true");titleElement.style.userSelect = "";}diff --git a/app/src/util/assets.ts b/app/src/util/assets.tsindex 2b6a0837b5..17a60ceae3 100644--- a/app/src/util/assets.ts+++ b/app/src/util/assets.ts@@ -96,9 +96,9 @@ export const renderSnippet = () => {scriptElement.id = `snippetJS${item.name}`;document.head.appendChild(scriptElement);}- })+ });});-}+};export const initAssets = () => {const emojiElement = document.getElementById("emojiScript");@@ -185,7 +185,7 @@ export const setMode = (modeElementValue: number) => {exportLayout(true);return;}- window.siyuan.config.appearance = response.data+ window.siyuan.config.appearance = response.data;/// #if !BROWSERipcRenderer.send(Constants.SIYUAN_CONFIG_THEME, response.data.modeOS ? "system" : (response.data.mode === 1 ? "dark" : "light"));ipcRenderer.send(Constants.SIYUAN_CONFIG_CLOSE, response.data.closeButtonBehavior);@@ -194,4 +194,4 @@ export const setMode = (modeElementValue: number) => {document.querySelector("#barMode use").setAttribute("xlink:href", `#icon${window.siyuan.config.appearance.modeOS ? "Mode" : (window.siyuan.config.appearance.mode === 0 ? "Light" : "Dark")}`);});/// #endif-}+};