An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle: https://github.com/siyuan-note/siyuan/pull/17572
Vanessac7286b2c9f79
diff --git a/app/src/layout/status.ts b/app/src/layout/status.tsindex b04360974f..294fa64ac2 100644--- a/app/src/layout/status.ts+++ b/app/src/layout/status.ts@@ -178,7 +178,7 @@ export const countSelectWord = (range: Range, rootID: string) => {/// #endif};-export const countBlockWord = (ids: (string | null)[], rootID: string) => {+export const countBlockWord = (ids: string[], rootID: string) => {/// #if !MOBILEif (document.getElementById("status").classList.contains("fn__none")) {return;diff --git a/app/src/protyle/wysiwyg/commonHotkey.ts b/app/src/protyle/wysiwyg/commonHotkey.tsindex c481bdcbc5..549317b80b 100644--- a/app/src/protyle/wysiwyg/commonHotkey.ts+++ b/app/src/protyle/wysiwyg/commonHotkey.ts@@ -167,7 +167,7 @@ export const upSelect = (options: {} else {options.cb(selectElements);}- const ids: (string | null)[] = [];+ const ids: string[] = [];options.protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => {ids.push(item.getAttribute("data-node-id"));});@@ -221,7 +221,7 @@ export const downSelect = (options: {} else {options.cb(selectElements);}- const ids: (string | null)[] = [];+ const ids: string[] = [];options.protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => {ids.push(item.getAttribute("data-node-id"));});diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 16cc598775..ab1c445dbd 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -642,7 +642,7 @@ export class WYSIWYG {!selectElements[0].classList.contains("sb")) {// 单个 p 不选中} else {- const ids: (string | null)[] = [];+ const ids: string[] = [];if (!hasSelectClassElement && protyle.scroll && !protyle.scroll.element.classList.contains("fn__none") && !protyle.scroll.keepLazyLoad &&(startElement.getBoundingClientRect().top < -protyle.contentElement.clientHeight * 2 || endElement.getBoundingClientRect().bottom > protyle.contentElement.clientHeight * 2)) {showMessage(window.siyuan.languages.crossKeepLazyLoad);@@ -702,7 +702,7 @@ export class WYSIWYG {ctrlParentElement.removeAttribute("select-start");ctrlParentElement.removeAttribute("select-end");}- const ids: (string | null)[] = [];+ const ids: string[] = [];protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => {ids.push(item.getAttribute("data-node-id"));});@@ -1734,7 +1734,7 @@ export class WYSIWYG {}}- const ids: (string | null)[] = [];+ const ids: string[] = [];const selectElement = protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select");selectElement.forEach(item => {ids.push(item.getAttribute("data-node-id"));diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.tsindex bd81c14c34..4811919a06 100644--- a/app/src/protyle/wysiwyg/keydown.ts+++ b/app/src/protyle/wysiwyg/keydown.ts@@ -502,7 +502,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {item.classList.remove("protyle-wysiwyg--select");});topElement.classList.add("protyle-wysiwyg--select");- const ids: (string | null)[] = [];+ const ids: string[] = [];ids.push(topElement.getAttribute("data-node-id"));let nextElement = event.key === "Home" ? topElement.previousElementSibling : topElement.nextElementSibling;while (nextElement) {diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.tsindex 7bd61127b4..39ef3b0e12 100644--- a/app/src/protyle/wysiwyg/transaction.ts+++ b/app/src/protyle/wysiwyg/transaction.ts@@ -81,7 +81,7 @@ const promiseTransaction = () => {}]}, (response) => {if (window.siyuan.transactions.length === 0) {- const ids: (string | null)[] = [];+ const ids: string[] = [];protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => {ids.push(item.getAttribute("data-node-id"));});