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/12069
Vanessac2dc8fd83cbd
diff --git a/app/src/constants.ts b/app/src/constants.tsindex 4d60547ccd..3842033bd4 100644--- a/app/src/constants.ts+++ b/app/src/constants.ts@@ -432,6 +432,7 @@ export abstract class Constants {list: {default: "", custom: ""},table: {default: "⌘O", custom: "⌘O"},code: {default: "⇧⌘K", custom: "⇧⌘K"},+ quote: {default: "", custom: ""},clearInline: {default: "⌘\\", custom: "⌘\\"},},heading: {diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.tsindex b84f71bc60..52c83cb9d9 100644--- a/app/src/protyle/gutter/index.ts+++ b/app/src/protyle/gutter/index.ts@@ -571,6 +571,7 @@ export class Gutter {turnIntoSubmenu.push(this.turnsIntoOne({icon: "iconQuote",label: window.siyuan.languages.quote,+ accelerator: window.siyuan.config.keymap.editor.insert.quote.custom,protyle,selectsElement,type: "Blocks2Blockquote"@@ -917,6 +918,7 @@ export class Gutter {}));turnIntoSubmenu.push(this.turnsIntoOne({icon: "iconQuote",+ accelerator: window.siyuan.config.keymap.editor.insert.quote.custom,label: window.siyuan.languages.quote,protyle,selectsElement: [nodeElement],diff --git a/app/src/protyle/hint/extend.ts b/app/src/protyle/hint/extend.tsindex 073b5e4a61..1a72b176cf 100644--- a/app/src/protyle/hint/extend.ts+++ b/app/src/protyle/hint/extend.ts@@ -51,7 +51,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {value: '<div data-type="NodeAttributeView" data-av-type="table"></div>',html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconDatabase"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.database}</span></div>`,}, {- filter: ["新建文档并引用", "xinjianwendangbingyinyong","xjwdbyy", "new doc"],+ filter: ["新建文档并引用", "xinjianwendangbingyinyong", "xjwdbyy", "new doc"],value: Constants.ZWSP + 4,html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.newFileRef}</span></div>`,}, {@@ -100,7 +100,7 @@ export const hintSlash = (key: string, protyle: IProtyle) => {}, {filter: ["引述", "yinshu", "ys", "bq", "blockquote"],value: "> " + Lute.Caret,- html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconQuote"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.quote}</span><span class="b3-list-item__meta">></span></div>`,+ html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconQuote"></use></svg><span class="b3-list-item__text">${window.siyuan.languages.quote}</span>${window.siyuan.config.keymap.editor.insert.quote.custom ? `<span class="b3-menu__accelerator">${updateHotkeyTip((window.siyuan.config.keymap.editor.insert.quote.custom))}</span>` : '<span class="b3-list-item__meta">></span>'}</div>`,}, {filter: ["代码块", "daimakuai", "dmk", "code block"],value: "```",diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex 76180f63a1..300db6126b 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -1383,12 +1383,17 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {const isMatchList = matchHotKey(window.siyuan.config.keymap.editor.insert.list.custom, event);const isMatchCheck = matchHotKey(window.siyuan.config.keymap.editor.insert.check.custom, event);const isMatchOList = matchHotKey(window.siyuan.config.keymap.editor.insert["ordered-list"].custom, event);- if (isMatchList || isMatchOList || isMatchCheck) {+ const isMatchQuote = matchHotKey(window.siyuan.config.keymap.editor.insert.quote.custom, event);+ if (isMatchList || isMatchOList || isMatchCheck || isMatchQuote) {const selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));if (selectsElement.length === 0) {protyle.hint.splitChar = "/";protyle.hint.lastIndex = -1;- protyle.hint.fill((isMatchCheck ? "* [ ] " : (isMatchList ? "* " : "1. ")) + Lute.Caret, protyle);+ if (isMatchQuote) {+ protyle.hint.fill(">" + Lute.Caret, protyle);+ } else {+ protyle.hint.fill((isMatchCheck ? "* [ ] " : (isMatchList ? "* " : "1. ")) + Lute.Caret, protyle);+ }} else if (selectsElement.length === 1) {const subType = selectsElement[0].dataset.subtype;const type = selectsElement[0].dataset.type;@@ -1396,7 +1401,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {turnsIntoOneTransaction({protyle,selectsElement,- type: isMatchCheck ? "Blocks2TLs" : (isMatchList ? "Blocks2ULs" : "Blocks2OLs")+ type: isMatchQuote ? "Blocks2Blockquote" : (isMatchCheck ? "Blocks2TLs" : (isMatchList ? "Blocks2ULs" : "Blocks2OLs"))});} else if (type === "NodeList") {const id = selectsElement[0].dataset.nodeId;@@ -1443,7 +1448,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {turnsIntoOneTransaction({protyle,selectsElement,- type: isMatchCheck ? "Blocks2TLs" : (isMatchList ? "Blocks2ULs" : "Blocks2OLs")+ type: isMatchQuote ? "Blocks2Blockquote" : (isMatchCheck ? "Blocks2TLs" : (isMatchList ? "Blocks2ULs" : "Blocks2OLs"))});}}