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:
Vanessa347d4c755413
diff --git a/app/src/protyle/render/highlightRender.ts b/app/src/protyle/render/highlightRender.tsindex c9be3bf27e..78953c81a7 100644--- a/app/src/protyle/render/highlightRender.ts+++ b/app/src/protyle/render/highlightRender.ts@@ -89,7 +89,7 @@ export const highlightRender = (element: Element, cdn = Constants.PROTYLE_CDN) =const codeText = block.textContent;if (!isPreview && (lineNumber === "true" || (lineNumber !== "false" && window.siyuan.config.editor.codeSyntaxHighlightLineNum))) {// 需要先添加 class 以防止抖动 https://ld246.com/article/1648116585443- block.firstElementChild.classList.add("protyle-linenumber__rows")+ block.firstElementChild.classList.add("protyle-linenumber__rows");lineNumberRender(block);}diff --git a/app/src/search/menu.ts b/app/src/search/menu.tsindex 82e3c0ec5b..c2ac7e87a5 100644--- a/app/src/search/menu.ts+++ b/app/src/search/menu.ts@@ -317,7 +317,7 @@ export const saveCriterion = (config: Config.IUILayoutTabSearchConfig,saveDialog.destroy();});btnsElement[1].addEventListener("click", () => {- const inputElement = saveDialog.element.querySelector("input")+ const inputElement = saveDialog.element.querySelector("input");const value = inputElement.value.trim();if (!value) {showMessage(window.siyuan.languages["_kernel"]["142"]);diff --git a/app/src/util/highlightById.ts b/app/src/util/highlightById.tsindex 4b1e3fee27..210f9866b6 100644--- a/app/src/util/highlightById.ts+++ b/app/src/util/highlightById.ts@@ -1,5 +1,5 @@import {hasClosestBlock, hasClosestByAttribute} from "../protyle/util/hasClosest";-import {getEditorRange, getSelectionPosition} from "../protyle/util/selection";+import {getEditorRange} from "../protyle/util/selection";export const bgFade = (element: Element) => {element.classList.add("protyle-wysiwyg--hl");@@ -40,12 +40,12 @@ export const highlightById = (protyle: IProtyle, id: string, top = false) => {export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = false, behavior: ScrollBehavior = "auto") => {if (!protyle.disabled && !top && getSelection().rangeCount > 0) {- const range = getSelection().getRangeAt(0)+ const range = getSelection().getRangeAt(0);const blockElement = hasClosestBlock(range.startContainer);if (blockElement) {// https://github.com/siyuan-note/siyuan/issues/10769if (blockElement.classList.contains("code-block")) {- const brElement = document.createElement('br');+ const brElement = document.createElement("br");range.insertNode(brElement);brElement.scrollIntoView({block: "center", behavior});brElement.remove();@@ -57,7 +57,7 @@ export const scrollCenter = (protyle: IProtyle, nodeElement?: Element, top = falreturn;}- const br2Element = document.createElement('br');+ const br2Element = document.createElement("br");range.insertNode(br2Element);const editorElement = protyle.contentElement;const cursorTop = br2Element.getBoundingClientRect().top - editorElement.getBoundingClientRect().top;