An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:rotating_light:
Vanessae474ceffe1e8
diff --git a/app/src/card/openCard.ts b/app/src/card/openCard.tsindex c44205e532..00ac0ed35d 100644--- a/app/src/card/openCard.ts+++ b/app/src/card/openCard.ts@@ -312,7 +312,7 @@ export const bindCardEvent = async (options: {fetchPost("/api/riff/batchSetRiffCardsDueTime", {cardDues: [{id: currentCard.cardID,- due: dayjs().add(parseInt(inputElement.value), 'day').format("YYYYMMDDHHmmss")+ due: dayjs().add(parseInt(inputElement.value), "day").format("YYYYMMDDHHmmss")}]}, () => {actionElements[0].classList.add("fn__none");diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.tsindex 4a373a8338..cc4a506fde 100644--- a/app/src/protyle/render/av/cell.ts+++ b/app/src/protyle/render/av/cell.ts@@ -309,9 +309,9 @@ export const cellScrollIntoView = (blockElement: HTMLElement, cellElement: Eleme/// #if MOBILEconst contentElement = hasClosestByClassName(blockElement, "protyle-content", true);if (contentElement && cellElement.getAttribute("data-dtype") !== "checkbox") {- const keyboardToolbarElement = document.getElementById("keyboardToolbar")- const keyboardH = parseInt(keyboardToolbarElement.getAttribute("data-keyboardheight")) || (window.outerHeight / 2 - 42)- console.log(keyboardH, window.innerHeight, cellRect.bottom)+ const keyboardToolbarElement = document.getElementById("keyboardToolbar");+ const keyboardH = parseInt(keyboardToolbarElement.getAttribute("data-keyboardheight")) || (window.outerHeight / 2 - 42);+ console.log(keyboardH, window.innerHeight, cellRect.bottom);if (cellRect.bottom > window.innerHeight - keyboardH - 42) {contentElement.scrollTop += cellRect.bottom - window.innerHeight + 42 + keyboardH;} else if (cellRect.top < 110) {diff --git a/app/src/protyle/render/av/view.ts b/app/src/protyle/render/av/view.tsindex e4d2e2d98e..aa3c1a4355 100644--- a/app/src/protyle/render/av/view.ts+++ b/app/src/protyle/render/av/view.ts@@ -219,20 +219,20 @@ export const bindSwitcherEvent = (options: { protyle: IProtyle, menuElement: Eleif (event.isComposing) {return;}- upDownHint(options.menuElement.querySelector('.fn__flex-1'), event, "b3-menu__item--current");+ upDownHint(options.menuElement.querySelector(".fn__flex-1"), event, "b3-menu__item--current");if (event.key === "Enter") {const currentElement = options.menuElement.querySelector(".b3-menu__item--current") as HTMLElement;if (currentElement) {options.blockElement.removeAttribute("data-render");avRender(options.blockElement, options.protyle, undefined, currentElement.dataset.id);options.menuElement.remove();- focusBlock(options.blockElement)+ focusBlock(options.blockElement);}} else if (event.key === "Escape") {options.menuElement.remove();- focusBlock(options.blockElement)+ focusBlock(options.blockElement);}- })+ });inputElement.addEventListener("input", (event: InputEvent) => {if (event.isComposing) {return;@@ -242,7 +242,7 @@ export const bindSwitcherEvent = (options: { protyle: IProtyle, menuElement: EleinputElement.addEventListener("compositionend", () => {filterSwitcher(options.menuElement);});-}+};const filterSwitcher = (menuElement: Element) => {const inputElement = menuElement.querySelector(".b3-text-field") as HTMLInputElement;@@ -251,16 +251,16 @@ const filterSwitcher = (menuElement: Element) => {if (!key ||(key.toLowerCase().indexOf(item.textContent.trim().toLowerCase()) > -1 ||item.textContent.trim().toLowerCase().indexOf(key.toLowerCase()) > -1)) {- item.classList.remove("fn__none")+ item.classList.remove("fn__none");} else {- item.classList.add("fn__none")- item.classList.remove("b3-menu__item--current")+ item.classList.add("fn__none");+ item.classList.remove("b3-menu__item--current");}- })- if (!menuElement.querySelector('.b3-menu__item--current')) {- menuElement.querySelector(".fn__flex-1 .b3-menu__item:not(.fn__none)")?.classList.add("b3-menu__item--current")+ });+ if (!menuElement.querySelector(".b3-menu__item--current")) {+ menuElement.querySelector(".fn__flex-1 .b3-menu__item:not(.fn__none)")?.classList.add("b3-menu__item--current");}-}+};export const getSwitcherHTML = (views: IAVView[], viewId: string) => {let html = "";diff --git a/app/src/protyle/wysiwyg/transaction.ts b/app/src/protyle/wysiwyg/transaction.tsindex a574a4a084..df6b0d23a1 100644--- a/app/src/protyle/wysiwyg/transaction.ts+++ b/app/src/protyle/wysiwyg/transaction.ts@@ -352,7 +352,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, isUndo:if (isUndo) {return;}- const embedElement = isInEmbedBlock(item)+ const embedElement = isInEmbedBlock(item);if (embedElement) {embedElement.removeAttribute("data-render");blockRender(protyle, embedElement);@@ -1192,7 +1192,7 @@ const processFold = (operation: IOperation, protyle: IProtyle) => {if (operation.action === "unfoldHeading") {const scrollTop = protyle.contentElement.scrollTop;protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach(item => {- const embedElement = isInEmbedBlock(item)+ const embedElement = isInEmbedBlock(item);if (embedElement) {embedElement.removeAttribute("data-render");blockRender(protyle, embedElement);@@ -1224,7 +1224,7 @@ const processFold = (operation: IOperation, protyle: IProtyle) => {return;}protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach(item => {- const embedElement = isInEmbedBlock(item)+ const embedElement = isInEmbedBlock(item);if (embedElement) {embedElement.removeAttribute("data-render");blockRender(protyle, embedElement);