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: fix https://github.com/siyuan-note/siyuan/issues/7455
Vanessa69139f530d45
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.tsindex 4efc7fa5f4..d859bc0358 100644--- a/app/src/card/openCard.ts+++ b/app/src/card/openCard.ts@@ -54,6 +54,11 @@ export const openCardByData = (cardsData: ICard[], html = "") => {${window.siyuan.languages.noDueCard}</div><div class="fn__flex card__action${blocks.length === 0 ? " fn__none" : ""}">+ <button class="b3-button b3-button--cancel" disabled="disabled" data-type="-2" style="width: 25%;min-width: 86px;display: flex">+ <svg><use xlink:href="#iconLeft"></use></svg>+ (p)+ </button>+ <span class="fn__space"></span><button data-type="-1" class="b3-button fn__flex-1">${window.siyuan.languages.cardShowAnswer} (${window.siyuan.languages.space})</button></div><div class="fn__flex card__action fn__none">@@ -143,8 +148,10 @@ export const openCardByData = (cardsData: ICard[], html = "") => {type = "2";} else if (event.detail === "4" || event.detail === ";") {type = "3";- } else if (event.detail === "s") {+ } else if (event.detail === " ") {type = "-1";+ }else if (event.detail === "p") {+ type = "-2";}}if (!type) {@@ -168,6 +175,20 @@ export const openCardByData = (cardsData: ICard[], html = "") => {actionElements[1].classList.remove("fn__none");return;}+ if (type === "-2") {+ if (index > 0) {+ index--;+ editor.protyle.element.classList.add("card__block--hide");+ nextCard({+ countElement,+ editor,+ actionElements,+ index,+ blocks+ })+ }+ return;+ }if (["0", "1", "2", "3"].includes(type)) {fetchPost("/api/riff/reviewRiffCard", {deckID: blocks[index].deckID,@@ -239,6 +260,11 @@ const nextCard = (options: {options.editor.protyle.element.nextElementSibling.classList.add("fn__none");options.countElement.lastElementChild.innerHTML = `<span>${options.index + 1}</span>/${options.blocks.length}`;options.countElement.classList.remove("fn__none");+ if (options.index === 0) {+ options.actionElements[0].firstElementChild.setAttribute("disabled", "disabled");+ } else{+ options.actionElements[0].firstElementChild.removeAttribute("disabled");+ }fetchPost("/api/filetree/getDoc", {id: options.blocks[options.index].blockID,mode: 0,diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.tsindex 881f49d1d2..58edc64552 100644--- a/app/src/util/globalShortcut.ts+++ b/app/src/util/globalShortcut.ts@@ -384,7 +384,7 @@ export const globalShortcut = () => {if (!event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey &&!["INPUT", "TEXTAREA"].includes((event.target as HTMLElement).tagName) &&- ["1", "2", "3", "4", "j", "k", "l", ";", "s"].includes(event.key.toLowerCase())) {+ ["1", "2", "3", "4", "j", "k", "l", ";", "s", " ", "p"].includes(event.key.toLowerCase())) {const openCardDialog = window.siyuan.dialogs.find(item => {if (item.element.getAttribute("data-key") === window.siyuan.config.keymap.general.riffCard.custom) {return true;