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:
Vanessa57d0ae7be8da
diff --git a/app/src/editor/util.ts b/app/src/editor/util.tsindex 7756abbaea..fc721bd6e9 100644--- a/app/src/editor/util.ts+++ b/app/src/editor/util.ts@@ -341,7 +341,7 @@ const switchEditor = (editor: Editor, options: IOpenFileOptions, allModels: IModconst newRange = focusBlock(nodeElement);if (newRange) {// 需要更新 range,否则文档大纲点击导致切换页签时因为 resize 中 `保持光标位置不变` 会导致光标跳动- editor.editor.protyle.toolbar.range = newRange+ editor.editor.protyle.toolbar.range = newRange;}scrollCenter(editor.editor.protyle, nodeElement, true);} else if (editor.editor.protyle.block.rootID === options.id) {diff --git a/app/src/layout/util.ts b/app/src/layout/util.tsindex 27c636e972..ae652112ee 100644--- a/app/src/layout/util.ts+++ b/app/src/layout/util.ts@@ -240,28 +240,28 @@ export const exportLayout = (options: {};const pushPluginDock = (app: App, dockItem: IDockTab[], position: TPluginDockPosition) => {- const needPushData: { [key: string]: IPluginDockTab } = {}+ const needPushData: { [key: string]: IPluginDockTab } = {};app.plugins.forEach((pluginItem) => {let isExist = false;dockItem.forEach(existSubItem => {if (Object.keys(pluginItem.docks).includes(existSubItem.type)) {isExist = true;}- })+ });if (!isExist) {Object.keys(pluginItem.docks).forEach(pluginDockKey => {if (pluginItem.docks[pluginDockKey].config.position === position) {needPushData[pluginDockKey] = pluginItem.docks[pluginDockKey].config;}- })+ });}- })+ });dockItem.forEach(existSubItem => {if (existSubItem.hotkeyLangId) {- existSubItem.title = window.siyuan.languages[existSubItem.hotkeyLangId]- existSubItem.hotkey = window.siyuan.config.keymap.general[existSubItem.hotkeyLangId].custom+ existSubItem.title = window.siyuan.languages[existSubItem.hotkeyLangId];+ existSubItem.hotkey = window.siyuan.config.keymap.general[existSubItem.hotkeyLangId].custom;}- })+ });Object.keys(needPushData).forEach(key => {const item = needPushData[key];dockItem.push({@@ -272,8 +272,8 @@ const pushPluginDock = (app: App, dockItem: IDockTab[], position: TPluginDockPoshotkey: item.hotkey || "",title: item.title,});- })-}+ });+};const JSONToDock = (json: any, app: App) => {json.left.data.forEach((existItem: IDockTab[], index: number) => {diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.tsindex dd4b88e457..eb05a9a62b 100644--- a/app/src/plugin/index.ts+++ b/app/src/plugin/index.ts@@ -159,7 +159,7 @@ export class Plugin {destroy: options.destroy,resize: options.resize,update: options.update,- })+ });customObj.element.addEventListener("click", (event: MouseEvent) => {setPanelFocus(customObj.element);if (hasClosestByAttribute(event.target as HTMLElement, "data-type", "min")) {@@ -167,7 +167,7 @@ export class Plugin {}});customObj.element.classList.add("sy__" + type2);- return customObj+ return customObj;}};return this.docks[type2];diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.tsindex d0768e09a0..c7c8481f82 100644--- a/app/src/protyle/ui/initUI.ts+++ b/app/src/protyle/ui/initUI.ts@@ -73,8 +73,8 @@ export const initUI = (protyle: IProtyle) => {embedBlockElement.firstElementChild.classList.toggle("protyle-icons--show");}});- let wheelTimeout: number- const isMacOS = isMac()+ let wheelTimeout: number;+ const isMacOS = isMac();protyle.contentElement.addEventListener("mousewheel", (event: WheelEvent) => {if ((isMacOS && !event.metaKey) || (!isMacOS && !event.ctrlKey) || event.deltaX !== 0) {return;@@ -89,7 +89,7 @@ export const initUI = (protyle: IProtyle) => {}} else if (event.deltaY > 0) {if (window.siyuan.config.editor.fontSize > 9) {- window.siyuan.config.editor.fontSize--+ window.siyuan.config.editor.fontSize--;} else {return;}