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:
Vanessa13332781c96f
diff --git a/app/electron/main.js b/app/electron/main.jsindex bcd1566847..acc66a135b 100644--- a/app/electron/main.js+++ b/app/electron/main.js@@ -1041,7 +1041,7 @@ app.whenReady().then(() => {return;}if (globalShortcut.isRegistered(shortcut)) {- globalShortcut.unregister(shortcut)+ globalShortcut.unregister(shortcut);}if (index === 0) {globalShortcut.register(shortcut, () => {diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.tsindex 78ab596d06..51ca3d15ed 100644--- a/app/src/config/keymap.ts+++ b/app/src/config/keymap.ts@@ -186,7 +186,7 @@ export const keymap = {},_setkeymap(app: App) {const data: Config.IKeymap = JSON.parse(JSON.stringify(Constants.SIYUAN_KEYMAP));- const oldToggleWin = window.siyuan.config.keymap.general.toggleWin.custom+ const oldToggleWin = window.siyuan.config.keymap.general.toggleWin.custom;keymap.element.querySelectorAll("label.b3-list-item input").forEach((item) => {const keys = item.getAttribute("data-key").split(Constants.ZWSP);const newHotkey = item.getAttribute("data-value");diff --git a/app/src/config/util/snippets.ts b/app/src/config/util/snippets.tsindex 403e3a8883..e365eea62b 100644--- a/app/src/config/util/snippets.ts+++ b/app/src/config/util/snippets.ts@@ -171,7 +171,7 @@ export const openSnippets = () => {}, (searchResponse) => {dialog.element.querySelectorAll(`.fn__flex-1 > div > [data-type="${inputItem.dataset.type}"]`).forEach((snipeetPanel: Element) => {snipeetPanel.classList.add("fn__none");- })+ });searchResponse.data.snippets.forEach((snippetItem: ISnippet) => {if (snippetItem.type === inputItem.dataset.type) {dialog.element.querySelector(`[data-id="${snippetItem.id}"]`).classList.remove("fn__none");@@ -180,7 +180,7 @@ export const openSnippets = () => {});}});- })+ });});};diff --git a/app/src/menus/workspace.ts b/app/src/menus/workspace.tsindex d136688aba..9679ed3942 100644--- a/app/src/menus/workspace.ts+++ b/app/src/menus/workspace.ts@@ -98,7 +98,7 @@ const editLayout = (layoutName?: string) => {});dialog.destroy();});-}+};const togglePinDock = (dock: Dock, icon: string) => {return {diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.tsindex 3d962c31bf..10d36a7199 100644--- a/app/src/protyle/render/av/action.ts+++ b/app/src/protyle/render/av/action.ts@@ -331,7 +331,7 @@ ${window.siyuan.languages.insertRowBefore.replace("${x}", '<span class="fn__spac}insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].previousElementSibling.getAttribute("data-id"));menu.close();- })+ });inputElement.addEventListener("keydown", (event: KeyboardEvent) => {if (!event.isComposing && event.key === "Enter") {insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].previousElementSibling.getAttribute("data-id"));diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.tsindex 36375fb83b..c444bc3897 100644--- a/app/src/protyle/render/av/cell.ts+++ b/app/src/protyle/render/av/cell.ts@@ -15,11 +15,11 @@ import {hintRef} from "../../hint/extend";const renderCellURL = (urlContent: string) => {let host = urlContent;- let suffix = ""+ let suffix = "";try {const urlObj = new URL(urlContent);host = urlObj.host;- suffix = urlObj.href.replace(urlObj.origin, "")+ suffix = urlObj.href.replace(urlObj.origin, "");if (suffix.length > 12) {suffix = suffix.substring(0, 4) + "..." + suffix.substring(suffix.length - 6);}@@ -404,9 +404,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], typeaddDragFill(cellElements[0]);let textPlain = inputElement.value;if (isDynamicRef(textPlain)) {- textPlain = textPlain.substring(2, 22 + 2)+ textPlain = textPlain.substring(2, 22 + 2);} else {- textPlain = textPlain.substring(2)+ textPlain = textPlain.substring(2);}hintRef(textPlain, protyle, "av");avMaskElement?.remove();@@ -630,7 +630,7 @@ export const renderCell = (cellValue: IAVCellValue) => {} else if (["email", "phone"].includes(cellValue.type)) {text = `<span class="av__celltext av__celltext--url" data-type="${cellValue.type}">${cellValue ? cellValue[cellValue.type as "email"].content : ""}</span>`;} else if ("url" === cellValue.type) {- text = renderCellURL(cellValue?.url?.content || "")+ text = renderCellURL(cellValue?.url?.content || "");} else if (cellValue.type === "block") {if (cellValue?.isDetached) {text = `<span class="av__celltext">${cellValue.block.content || ""}</span>@@ -709,7 +709,7 @@ const renderRollup = (cellValue: IAVCellValue) => {text = `<span class="av__celltext av__celltext--url" data-type="${cellValue.type}">${emailContent}</span>`;}} else if ("url" === cellValue.type) {- const urlContent = cellValue?.url?.content || ""+ const urlContent = cellValue?.url?.content || "";if (urlContent) {text = renderCellURL(urlContent);}diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.tsindex 6d1630336b..8fb342f47f 100644--- a/app/src/protyle/util/insertHTML.ts+++ b/app/src/protyle/util/insertHTML.ts@@ -137,7 +137,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:}const contenteditableElement = getContenteditableElement(tempElement.content.firstElementChild);if (contenteditableElement && contenteditableElement.childNodes.length === 1 && contenteditableElement.firstElementChild?.getAttribute("data-type") === "block-ref") {- const selectCellElement = blockElement.querySelector(".av__cell--select") as HTMLElement+ const selectCellElement = blockElement.querySelector(".av__cell--select") as HTMLElement;if (selectCellElement) {const avID = blockElement.dataset.avId;const sourceId = contenteditableElement.firstElementChild.getAttribute("data-id");