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:
Vanessa3e4f6c5587de
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.tsindex 40d2f7aea0..1e5eab079f 100644--- a/app/src/layout/Wnd.ts+++ b/app/src/layout/Wnd.ts@@ -481,7 +481,7 @@ export class Wnd {this.switchTab(item, true);window.siyuan.menus.menu.remove();}- event.preventDefault()+ event.preventDefault();event.stopPropagation();});},diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.tsindex 4028f01c27..b0ce21368b 100644--- a/app/src/protyle/header/Title.ts+++ b/app/src/protyle/header/Title.ts@@ -91,8 +91,8 @@ export class Title {event.preventDefault();event.stopPropagation();} else if (event.key === "Enter") {- const newId = Lute.NewNodeID()- const newElement = genEmptyElement(false, true, newId)+ const newId = Lute.NewNodeID();+ const newElement = genEmptyElement(false, true, newId);protyle.wysiwyg.element.insertAdjacentElement("afterbegin", newElement);focusByWbr(newElement, protyle.toolbar.range || getEditorRange(newElement));transaction(protyle, [{diff --git a/app/src/protyle/toolbar/Font.ts b/app/src/protyle/toolbar/Font.tsindex 1428343c3f..218895e35a 100644--- a/app/src/protyle/toolbar/Font.ts+++ b/app/src/protyle/toolbar/Font.ts@@ -117,7 +117,7 @@ export const fontMenu = (protyle: IProtyle) => {});element.querySelector("select").addEventListener("change", function (event: Event) {fontEvent(protyle, "fontSize", (event.target as HTMLSelectElement).value);- })+ });return element;};diff --git a/app/src/protyle/toolbar/InlineMath.ts b/app/src/protyle/toolbar/InlineMath.tsindex c6af3aab10..c54c20f53d 100644--- a/app/src/protyle/toolbar/InlineMath.ts+++ b/app/src/protyle/toolbar/InlineMath.ts@@ -54,7 +54,7 @@ export class InlineMath extends ToolbarItem {} else {range.setStartAfter(newElement);range.collapse(true);- focusByRange(range)+ focusByRange(range);nodeElement.setAttribute("updated", dayjs().format("YYYYMMDDHHmmss"));updateTransaction(protyle, nodeElement.getAttribute("data-node-id"), nodeElement.outerHTML, html);wbrElement.remove();diff --git a/app/src/protyle/toolbar/InlineMemo.ts b/app/src/protyle/toolbar/InlineMemo.tsindex 24186b079d..0eda473d8e 100644--- a/app/src/protyle/toolbar/InlineMemo.ts+++ b/app/src/protyle/toolbar/InlineMemo.ts@@ -1,6 +1,4 @@import {ToolbarItem} from "./ToolbarItem";-import * as dayjs from "dayjs";-import {updateTransaction} from "../wysiwyg/transaction";import {hasClosestBlock, hasClosestByAttribute} from "../util/hasClosest";import {hasNextSibling, hasPreviousSibling} from "../wysiwyg/getBlock";import {fixTableRange} from "../util/selection";diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.tsindex fb2af57e1c..39aec5b11f 100644--- a/app/src/protyle/toolbar/index.ts+++ b/app/src/protyle/toolbar/index.ts@@ -563,7 +563,7 @@ export class Toolbar {</div></div>`;this.subElement.querySelector(".b3-button--cancel").addEventListener(getEventName(), () => {refElement.outerHTML = refElement.textContent + "<wbr>";- hideElements(["util"], protyle)+ hideElements(["util"], protyle);});const anchorElement = this.subElement.querySelector('[data-type="anchor"]') as HTMLInputElement;anchorElement.value = refElement.textContent;@@ -581,7 +581,7 @@ export class Toolbar {return;}if (event.key === "Enter" || event.key === "Escape") {- hideElements(["util"], protyle)+ hideElements(["util"], protyle);event.preventDefault();event.stopPropagation();}@@ -594,7 +594,7 @@ export class Toolbar {} else {refElement.innerHTML = "*";}- this.range.setStartAfter(refElement)+ this.range.setStartAfter(refElement);focusByRange(this.range);} else {focusByWbr(nodeElement, this.range);@@ -924,7 +924,7 @@ export class Toolbar {processRender(renderElement);} else {inlineLastNode = renderElement;- renderElement.outerHTML = "<wbr>"+ renderElement.outerHTML = "<wbr>";}} else {renderElement.setAttribute("data-content", Lute.EscapeHTMLStr(textElement.value));@@ -944,7 +944,7 @@ export class Toolbar {this.range.collapse(true);focusByRange(this.range);} else {- focusByWbr(nodeElement, this.range)+ focusByWbr(nodeElement, this.range);}} else if (renderElement.parentElement) {this.range.setStartAfter(renderElement);@@ -966,7 +966,7 @@ export class Toolbar {}}updateTransaction(protyle, id, newHTML, html);- }+ };const nodeRect = renderElement.getBoundingClientRect();this.element.classList.add("fn__none");if (isPin) {diff --git a/app/src/protyle/util/selection.ts b/app/src/protyle/util/selection.tsindex 0f172faeef..878ccbdfd5 100644--- a/app/src/protyle/util/selection.ts+++ b/app/src/protyle/util/selection.ts@@ -522,8 +522,8 @@ export const focusBlock = (element: Element, parentElement?: HTMLElement, toStar}}// 需要定位到第一个 child https://github.com/siyuan-note/siyuan/issues/5930- const range = setFirstNodeRange(cursorElement, getEditorRange(cursorElement))- focusByRange(range)+ const range = setFirstNodeRange(cursorElement, getEditorRange(cursorElement));+ focusByRange(range);return range;} else if (parentElement) {parentElement.focus();diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.tsindex 2c04592308..7bf294bce5 100644--- a/app/src/protyle/wysiwyg/remove.ts+++ b/app/src/protyle/wysiwyg/remove.ts@@ -297,7 +297,7 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: RanturnsIntoTransaction({protyle: protyle,selectsElement: [blockElement],- type: 'Blocks2Ps',+ type: "Blocks2Ps",});return;}