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/9182
Vanessa1ec2e03846f3
diff --git a/app/src/boot/globalEvent/keydown.ts b/app/src/boot/globalEvent/keydown.tsindex 1625e59c8d..a2bb8f07fc 100644--- a/app/src/boot/globalEvent/keydown.ts+++ b/app/src/boot/globalEvent/keydown.ts@@ -55,6 +55,7 @@ import {App} from "../../index";import {commandPanel} from "../../plugin/commandPanel";import {toggleDockBar} from "../../layout/dock/util";import {workspaceMenu} from "../../menus/workspace";+import {resize} from "../../protyle/util/resize";const switchDialogEvent = (app: App, event: MouseEvent) => {event.preventDefault();@@ -244,6 +245,7 @@ const editKeydown = (app: App, event: KeyboardEvent) => {}if (matchHotKey(window.siyuan.config.keymap.editor.general.fullscreen.custom, event)) {fullscreen(protyle.element);+ resize(protyle);event.preventDefault();return true;}diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.tsindex b3a420e21b..002d1cb824 100644--- a/app/src/card/openCard.ts+++ b/app/src/card/openCard.ts@@ -15,6 +15,7 @@ import {openFile} from "../editor/util";/// #endifimport {getDisplayName, movePathTo} from "../util/pathName";import {App} from "../index";+import {resize} from "../protyle/util/resize";export const genCardHTML = (options: {id: string,@@ -198,6 +199,7 @@ export const bindCardEvent = (options: {if (fullscreenElement) {fullscreen(options.element.querySelector(".card__main"),options.element.querySelector('[data-type="fullscreen"]'));+ resize(editor.protyle);event.stopPropagation();event.preventDefault();return;@@ -321,7 +323,7 @@ export const bindCardEvent = (options: {editor.protyle.element.classList.remove("card__block--hidemark", "card__block--hideli", "card__block--hidesb");actionElements[0].classList.add("fn__none");actionElements[1].querySelectorAll(".b3-button").forEach((element, btnIndex) => {- element.previousElementSibling.textContent = options.blocks[index].nextDues[btnIndex];+ element.previousElementSibling.textContent = options.blocks[index].nextDues[btnIndex];});actionElements[1].classList.remove("fn__none");return;diff --git a/app/src/dialog/index.ts b/app/src/dialog/index.tsindex 3cec6e63b2..c71ecb792d 100644--- a/app/src/dialog/index.ts+++ b/app/src/dialog/index.ts@@ -15,11 +15,12 @@ export class Dialog {title?: string,transparent?: boolean,content: string,- width?: string+ width?: string,height?: string,- destroyCallback?: (options?: IObject) => void- disableClose?: boolean- disableAnimation?: boolean+ destroyCallback?: (options?: IObject) => void,+ disableClose?: boolean,+ disableAnimation?: boolean,+ resizeCallback?: (type: string) => void}) {this.disableClose = options.disableClose;this.id = genUUID();@@ -61,7 +62,7 @@ export class Dialog {});}/// #if !MOBILE- moveResize(this.element.querySelector(".b3-dialog__container"));+ moveResize(this.element.querySelector(".b3-dialog__container"), options.resizeCallback);/// #endif}diff --git a/app/src/protyle/breadcrumb/action.ts b/app/src/protyle/breadcrumb/action.tsindex 485a13e563..91494f55dc 100644--- a/app/src/protyle/breadcrumb/action.ts+++ b/app/src/protyle/breadcrumb/action.ts@@ -71,14 +71,16 @@ export const fullscreen = (element: Element, btnElement?: Element) => {window.siyuan.editorIsFullscreen = !isFullscreen;}getAllModels().editor.forEach(item => {- if (window.siyuan.editorIsFullscreen) {- if (!element.isSameNode(item.element) && item.element.classList.contains("fullscreen")) {+ if (!element.isSameNode(item.element)) {+ if (window.siyuan.editorIsFullscreen) {+ if (item.element.classList.contains("fullscreen")) {+ item.element.classList.remove("fullscreen");+ resize(item.editor.protyle);+ }+ } else if (item.element.classList.contains("fullscreen")) {item.element.classList.remove("fullscreen");resize(item.editor.protyle);}- } else if (item.element.classList.contains("fullscreen")) {- item.element.classList.remove("fullscreen");- resize(item.editor.protyle);}});/// #endifdiff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.tsindex cf3691b262..ec6331a6ac 100644--- a/app/src/protyle/breadcrumb/index.ts+++ b/app/src/protyle/breadcrumb/index.ts@@ -30,6 +30,7 @@ import {getNoContainerElement} from "../wysiwyg/getBlock";import {openTitleMenu} from "../header/openTitleMenu";import {emitOpenMenu} from "../../plugin/EventBus";import {isInAndroid} from "../util/compatibility";+import {resize} from "../util/resize";export class Breadcrumb {public element: HTMLElement;@@ -404,6 +405,7 @@ export class Breadcrumb {label: window.siyuan.languages.fullscreen,click: () => {fullscreen(protyle.element);+ resize(protyle);}}).element);/// #endifdiff --git a/app/src/search/spread.ts b/app/src/search/spread.tsindex cfc25beabd..14f2d23490 100644--- a/app/src/search/spread.ts+++ b/app/src/search/spread.ts@@ -90,6 +90,11 @@ export const openSearch = async (options: {if (edit) {edit.destroy();}+ },+ resizeCallback(type: string) {+ if (type !== "d" && type !== "t" && edit) {+ edit.resize();+ }}});dialog.element.setAttribute("data-key", options.hotkey);