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/14113
Vanessa7d01a45b666b
diff --git a/app/src/constants.ts b/app/src/constants.tsindex e7d3a39abd..21d2e35ff7 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -462,6 +462,8 @@ export abstract class Constants {ai: {default: "", custom: ""},switchReadonly: {default: "", custom: ""},switchAdjust: {default: "", custom: ""},+ rtl: {default: "", custom: ""},+ ltr: {default: "", custom: ""},},insert: {appearance: {default: "⌥⌘X", custom: "⌥⌘X"},diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex fe39b6a1a6..9a9a2e73f3 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -2055,6 +2055,7 @@ export class Gutter {id: "ltr",icon: "iconLtr",label: window.siyuan.languages.ltr,+ accelerator: window.siyuan.config.keymap.editor.general.ltr.custom,click: () => {this.genClick(nodeElements, protyle, (e: HTMLElement) => {e.style.direction = "ltr";@@ -2064,6 +2065,7 @@ export class Gutter {id: "rtl",icon: "iconRtl",label: window.siyuan.languages.rtl,+ accelerator: window.siyuan.config.keymap.editor.general.rtl.custom,click: () => {this.genClick(nodeElements, protyle, (e: HTMLElement) => {if (!e.classList.contains("av")) {diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 0278a05fc5..88013a2aa5 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -1198,6 +1198,30 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {event.preventDefault();return;}+ if (matchHotKey(window.siyuan.config.keymap.editor.general.rtl.custom, event)) {+ let selectElements: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));+ if (selectElements.length === 0) {+ selectElements = [nodeElement];+ }+ updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {+ e.style.direction = "rtl";+ });+ event.stopPropagation();+ event.preventDefault();+ return;+ }+ if (matchHotKey(window.siyuan.config.keymap.editor.general.ltr.custom, event)) {+ let selectElements: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));+ if (selectElements.length === 0) {+ selectElements = [nodeElement];+ }+ updateBatchTransaction(selectElements, protyle, (e: HTMLElement) => {+ e.style.direction = "ltr";+ });+ event.stopPropagation();+ event.preventDefault();+ return;+ }// escif (event.key === "Escape") {