Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/3293

Vanessa116ba89d6381
diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts
index f8ad58f4d2..483e45a309 100644
--- a/app/src/util/globalShortcut.ts
+++ b/app/src/util/globalShortcut.ts
@@ -793,14 +793,9 @@ const dialogArrow = (element: HTMLElement, event: KeyboardEvent) => {
if (currentType) {
getDockByType(currentType).toggleModel(currentType, true);
} else {
- let actionString = currentLiElement.getAttribute("data-action");
- if (actionString.indexOf(Constants.CB_GET_SCROLL) === -1) {
- actionString = actionString ? (actionString + "," + Constants.CB_GET_SCROLL) : Constants.CB_GET_SCROLL;
- }
openFileById({
- id: currentLiElement.getAttribute("data-block-id") || currentLiElement.getAttribute("data-node-id"),
- mode: currentLiElement.getAttribute("data-mode") as TEditorMode,
- action: actionString.split(",")
+ id: currentLiElement.getAttribute("data-node-id"),
+ action: [Constants.CB_GET_SCROLL]
});
}
hideElements(["dialog"]);
@@ -835,7 +830,7 @@ const openRecentDocs = () => {
}
let tabHtml = "";
response.data.forEach((item: any, index: number) => {
- tabHtml += `<li data-index="${index}" data-action="${item.action}" data-node-id="${item.rootID}" data-block-id="${item.id || ""}" data-mode="${item.mode}" class="b3-list-item${index === 0 ? " b3-list-item--focus" : ""}">
+ tabHtml += `<li data-index="${index}" data-node-id="${item.rootID}" class="b3-list-item${index === 0 ? " b3-list-item--focus" : ""}">
${unicode2Emoji(item.icon || Constants.SIYUAN_IMAGE_FILE, false, "b3-list-item__graphic", true)}
<span class="b3-list-item__text">${escapeHtml(item.title)}</span>
</li>`;