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:
Vanessaed19a91d37ae
diff --git a/app/src/menus/Menu.ts b/app/src/menus/Menu.tsindex 1938cf01b7..1502959804 100644--- a/app/src/menus/Menu.ts+++ b/app/src/menus/Menu.ts@@ -256,7 +256,7 @@ export const bindMenuKeydown = (event: KeyboardEvent) => {if (window.siyuan.menus.menu.element.contains(target) && (target.tagName === "INPUT" || target.tagName === "TEXTAREA")) {return false;}- const eventCode = Constants.KEYCODELIST[event.keyCode]+ const eventCode = Constants.KEYCODELIST[event.keyCode];if (eventCode === "↓" || eventCode === "↑") {const currentElement = window.siyuan.menus.menu.element.querySelector(".b3-menu__item--current");let actionMenuElement;diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.tsindex 0632073849..63d32b5a02 100644--- a/app/src/protyle/wysiwyg/commonHotkey.ts+++ b/app/src/protyle/wysiwyg/commonHotkey.ts@@ -3,16 +3,12 @@ import {fetchPost} from "../../util/fetch";import {writeText} from "../util/compatibility";import {focusBlock,- focusByOffset,getSelectionOffset,setFirstNodeRange,} from "../util/selection";import {netImg2LocalAssets} from "../breadcrumb/action";-/// #if !MOBILE-import {openBacklink, openGraph, openOutline} from "../../layout/dock/util";-/// #endifimport {getContenteditableElement, hasNextSibling, hasPreviousSibling} from "./getBlock";-import {hasClosestByAttribute, hasClosestByMatchTag} from "../util/hasClosest";+import {hasClosestByMatchTag} from "../util/hasClosest";import {hideElements} from "../ui/hideElements";import {countBlockWord} from "../../layout/status";import {scrollCenter} from "../../util/highlightById";@@ -21,8 +17,7 @@ import {onGet} from "../util/onGet";import {Constants} from "../../constants";import * as dayjs from "dayjs";-export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent, nodeElement?: HTMLElement, range?: Range) => {- const target = event.target as HTMLElement;+export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent, nodeElement?: HTMLElement) => {if (matchHotKey(window.siyuan.config.keymap.editor.general.copyHPath.custom, event)) {fetchPost("/api/filetree/getHPathByID", {id: protyle.block.rootIDdiff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 6fd1dd51ce..78836954c2 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -976,7 +976,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {return true;}/// #if !MOBILE- if (commonHotkey(protyle, event, nodeElement, range)) {+ if (commonHotkey(protyle, event, nodeElement)) {return true;}/// #endif