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:
Vanessa621babd29dbf
diff --git a/app/src/boot/onGetConfig.ts b/app/src/boot/onGetConfig.tsindex ba416b771d..e96405980d 100644--- a/app/src/boot/onGetConfig.ts+++ b/app/src/boot/onGetConfig.ts@@ -178,12 +178,12 @@ const saveUI = () => {onlyData: false,errorExit: false});-}+};export const unbindSaveUI = () => {window.removeEventListener("beforeunload", saveUI);window.removeEventListener("pagehide", saveUI);-}+};export const initWindow = async (app: App) => {/// #if !BROWSERdiff --git a/app/src/card/openCard.ts b/app/src/card/openCard.tsindex aad6b723bd..acad48c4d0 100644--- a/app/src/card/openCard.ts+++ b/app/src/card/openCard.ts@@ -209,7 +209,7 @@ export const bindCardEvent = (options: {fullscreen(options.element.querySelector(".card__main"),options.element.querySelector('[data-type="fullscreen"]'));resize(editor.protyle);- window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen = !window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen+ window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen = !window.siyuan.storage[Constants.LOCAL_FLASHCARD].fullscreen;setStorageVal(Constants.LOCAL_FLASHCARD, window.siyuan.storage[Constants.LOCAL_FLASHCARD]);event.stopPropagation();event.preventDefault();diff --git a/app/src/config/bazaar.ts b/app/src/config/bazaar.tsindex 5b268eaa30..1d9f9ce84f 100644--- a/app/src/config/bazaar.ts+++ b/app/src/config/bazaar.ts@@ -932,7 +932,7 @@ export const bazaar = {event.preventDefault();return;}- })+ });});bazaar.element.querySelectorAll(".b3-select").forEach((selectElement: HTMLSelectElement) => {diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.tsindex fd192dfd65..91334dfd6a 100644--- a/app/src/config/keymap.ts+++ b/app/src/config/keymap.ts@@ -380,7 +380,7 @@ export const keymap = {if (keys[1] === "heading") {keys[1] = "headings";}- let hasConflict = false+ let hasConflict = false;if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||["⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦"].includes(keymapStr)) {showMessage(`${window.siyuan.languages.invalid} [${adoptKeymapStr}]`);diff --git a/app/src/plugin/loader.ts b/app/src/plugin/loader.tsindex 3e8485250f..05fe8ceaf0 100644--- a/app/src/plugin/loader.ts+++ b/app/src/plugin/loader.ts@@ -29,7 +29,7 @@ export const loadPlugins = async (app: App) => {loadPluginJS(app, item);css += item.css || "" + "\n";});- const pluginsStyle = document.getElementById("pluginsStyle")+ const pluginsStyle = document.getElementById("pluginsStyle");if (pluginsStyle) {pluginsStyle.innerHTML = css;} else {diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex 419b3ee328..5a0abb2823 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -55,7 +55,7 @@ export class Gutter {this.element.setAttribute("data-position", "right");this.element.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {hideTooltip();- const buttonElement = event.target.parentElement+ const buttonElement = event.target.parentElement;let selectIds: string[] = [buttonElement.getAttribute("data-node-id")];const selectElements = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");if (selectElements.length > 0) {@@ -1846,7 +1846,7 @@ export class Gutter {const buttonHTML = `<button data-type="${type}" data-subtype="${nodeElement.getAttribute("data-subtype")}" data-node-id="${nodeElement.getAttribute("data-node-id")}"><svg><use xlink:href="#${getIconByType(type, nodeElement.getAttribute("data-subtype"))}"></use></svg><span ${protyle.disabled ? "" : 'draggable="true"'}></span>-</button>`+</button>`;if (isShow) {html = buttonHTML + html;}diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 9206a4801d..3460f6bce2 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -68,7 +68,6 @@ import {getSavePath} from "../../util/newFile";import {escapeHtml} from "../../util/escape";import {insertHTML} from "../util/insertHTML";import {removeSearchMark} from "../toolbar/util";-import {copyPNG} from "../../menus/util";import {avKeydown} from "../render/av/keydown";import {resizeAV} from "../util/resize";diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex 637f6127e0..b1033c992f 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -3,7 +3,7 @@ import {getAllModels} from "../layout/getAll";import * as path from "path";/// #endifimport {Constants} from "../constants";-import {escapeAriaLabel, escapeAttr, escapeGreat, escapeHtml} from "../util/escape";+import {escapeAriaLabel, escapeGreat, escapeHtml} from "../util/escape";import {fetchPost} from "../util/fetch";import {openFile, openFileById} from "../editor/util";import {showMessage} from "../dialog/message";@@ -1353,7 +1353,7 @@ const getAttr =(block:IBlock) => {attrHTML += `<span class="b3-list-item__meta fn__flex" style="max-width: 30%"><svg class="b3-list-item__hinticon"><use xlink:href="#iconM"></use></svg><span class="b3-list-item__hinttext">${block.memo}</span></span>`;}return attrHTML;-}+};const onSearch = (data: IBlock[], edit: Protyle, element: Element, config: ISearchOption) => {let resultHTML = "";diff --git a/app/src/util/assets.ts b/app/src/util/assets.tsindex ff9a422078..a38aa880b0 100644--- a/app/src/util/assets.ts+++ b/app/src/util/assets.ts@@ -225,7 +225,7 @@ export const setInlineStyle = (set = true) => {style += "\n.b3-menu .b3-menu__action {opacity: 0.68;}";}if (set) {- const siyuanStyle = document.getElementById("siyuanStyle")+ const siyuanStyle = document.getElementById("siyuanStyle");if (siyuanStyle) {siyuanStyle.innerHTML = style;} else {