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:
Vanessa2008dcaff28b
diff --git a/app/src/block/util.ts b/app/src/block/util.tsindex c543c50016..9977e273ae 100644--- a/app/src/block/util.ts+++ b/app/src/block/util.ts@@ -204,5 +204,5 @@ export const getLangByType = (type: string) => {lang = window.siyuan.languages.blockEmbed;break;}- return lang-}+ return lang;+};diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.tsindex 6e5450368a..a692b02559 100644--- a/app/src/protyle/render/av/action.ts+++ b/app/src/protyle/render/av/action.ts@@ -21,12 +21,6 @@ import {hintRef} from "../../hint/extend";import {focusByRange} from "../../util/selection";import {showMessage} from "../../../dialog/message";import {previewImage} from "../../preview/image";-import {pathPosix} from "../../../util/pathName";-import {Constants} from "../../../constants";-/// #if !MOBILE-import {openAsset, openBy} from "../../../editor/util";-/// #endif-import {getSearch} from "../../../util/functions";import {unicode2Emoji} from "../../../emoji";import {selectRow} from "./row";import * as dayjs from "dayjs";diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.tsindex 18dd642709..2614159305 100644--- a/app/src/protyle/render/av/blockAttr.ts+++ b/app/src/protyle/render/av/blockAttr.ts@@ -215,8 +215,8 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]const targetElement = element.querySelector(".dragover__bottom, .dragover__top") as HTMLElement;if (targetElement && dragBlockElement) {const isBottom = targetElement.classList.contains("dragover__bottom");- const previousID = isBottom ? targetElement.dataset.colId : targetElement.previousElementSibling?.getAttribute("data-col-id")- const undoPreviousID = window.siyuan.dragElement.previousElementSibling?.getAttribute("data-col-id")+ const previousID = isBottom ? targetElement.dataset.colId : targetElement.previousElementSibling?.getAttribute("data-col-id");+ const undoPreviousID = window.siyuan.dragElement.previousElementSibling?.getAttribute("data-col-id");if (previousID !== undoPreviousID && previousID !== window.siyuan.dragElement.dataset.colId) {transaction(protyle, [{action: "sortAttrViewCol",diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.tsindex e94af8b770..16b8364758 100644--- a/app/src/protyle/render/av/col.ts+++ b/app/src/protyle/render/av/col.ts@@ -793,7 +793,7 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElemenclick() {const addMenu = addCol(protyle, blockElement, cellElement.previousElementSibling?.getAttribute("data-col-id") || "");if (!blockElement.contains(cellElement)) {- cellElement = blockElement.querySelector(`.av__row--header .av__cell--header[data-col-id="${colId}"]`)+ cellElement = blockElement.querySelector(`.av__row--header .av__cell--header[data-col-id="${colId}"]`);}const addRect = cellElement.getBoundingClientRect();addMenu.open({@@ -809,7 +809,7 @@ export const showColMenu = (protyle: IProtyle, blockElement: Element, cellElemenclick() {const addMenu = addCol(protyle, blockElement, colId);if (!blockElement.contains(cellElement)) {- cellElement = blockElement.querySelector(`.av__row--header .av__cell--header[data-col-id="${colId}"]`)+ cellElement = blockElement.querySelector(`.av__row--header .av__cell--header[data-col-id="${colId}"]`);}const addRect = cellElement.getBoundingClientRect();addMenu.open({diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.tsindex bed92f9165..84f1c36c43 100644--- a/app/src/protyle/render/av/openMenuPanel.ts+++ b/app/src/protyle/render/av/openMenuPanel.ts@@ -390,7 +390,7 @@ export const openMenuPanel = (options: {}if (targetElement.getAttribute("data-type") === "editCol") {- const previousID = (targetElement.classList.contains("dragover__top") ? targetElement.previousElementSibling?.getAttribute("data-id") : targetElement.getAttribute("data-id")) || ""+ const previousID = (targetElement.classList.contains("dragover__top") ? targetElement.previousElementSibling?.getAttribute("data-id") : targetElement.getAttribute("data-id")) || "";const undoPreviousID = sourceElement.previousElementSibling?.getAttribute("data-id") || "";if (previousID !== undoPreviousID && previousID !== sourceId) {transaction(options.protyle, [{diff --git a/app/src/protyle/render/av/rollup.ts b/app/src/protyle/render/av/rollup.tsindex 58fc88fa48..a16040ef5e 100644--- a/app/src/protyle/render/av/rollup.ts+++ b/app/src/protyle/render/av/rollup.ts@@ -34,13 +34,13 @@ const updateCol = (options: {}colData.rollup = {relationKeyID: itemElement.dataset.colId- }- const goSearchRollupTargetElement = options.target.nextElementSibling as HTMLElement+ };+ const goSearchRollupTargetElement = options.target.nextElementSibling as HTMLElement;goSearchRollupTargetElement.querySelector(".b3-menu__accelerator").textContent = "";goSearchRollupTargetElement.setAttribute("data-av-id", itemElement.dataset.targetAvId);const goSearchRollupCalcElement = goSearchRollupTargetElement.nextElementSibling as HTMLElement;- goSearchRollupCalcElement.removeAttribute("data-col-type")- goSearchRollupCalcElement.removeAttribute("data-calc")+ goSearchRollupCalcElement.removeAttribute("data-col-type");+ goSearchRollupCalcElement.removeAttribute("data-calc");goSearchRollupCalcElement.querySelector(".b3-menu__accelerator").textContent = window.siyuan.languages.original;} else {if (itemElement.dataset.colId === colData.rollup?.keyID) {@@ -49,7 +49,7 @@ const updateCol = (options: {colData.rollup.keyID = itemElement.dataset.colId;delete colData.rollup.calc;const goSearchRollupCalcElement = options.target.nextElementSibling as HTMLElement;- goSearchRollupCalcElement.removeAttribute("data-calc")+ goSearchRollupCalcElement.removeAttribute("data-calc");goSearchRollupCalcElement.setAttribute("data-col-type", itemElement.dataset.colType);goSearchRollupCalcElement.querySelector(".b3-menu__accelerator").textContent = window.siyuan.languages.original;}diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 9b37b486af..374b06f6dd 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -738,8 +738,8 @@ export class WYSIWYG {let startFirstElement: Element;let endLastElement: Element;this.element.querySelectorAll("iframe").forEach(item => {- item.style.pointerEvents = "none"- })+ item.style.pointerEvents = "none";+ });documentSelf.onmousemove = (moveEvent: MouseEvent) => {const moveTarget = moveEvent.target as HTMLElement;// table cell select@@ -907,10 +907,10 @@ export class WYSIWYG {let currentElement: Element | boolean = firstBlockElement;if (currentElement) {- // 从下网上选遇到嵌入块时,选中整个嵌入块- const embedElement = hasClosestByAttribute(currentElement, "data-type", "NodeBlockQueryEmbed")+ // 从下往上划选遇到嵌入块时,选中整个嵌入块+ const embedElement = hasClosestByAttribute(currentElement, "data-type", "NodeBlockQueryEmbed");if (embedElement) {- currentElement = embedElement+ currentElement = embedElement;}}@@ -985,7 +985,7 @@ export class WYSIWYG {endLastElement = undefined;this.element.querySelectorAll("iframe").forEach(item => {item.style.pointerEvents = "";- })+ });protyle.selectElement.classList.add("fn__none");protyle.selectElement.removeAttribute("style");if (!protyle.disabled && tableBlockElement) {