An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://ld246.com/article/1731373012221
Vanessa58e97e0f07c0
diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.tsindex ddc33c0973..ec171ada5f 100644--- a/app/src/layout/dock/Graph.ts+++ b/app/src/layout/dock/Graph.ts@@ -726,7 +726,7 @@ export class Graph extends Model {return;}if (-1 < node.type.indexOf("tag")) {- openGlobalSearch(this.app, `#${node.id}#`, !window.siyuan.ctrlIsPressed);+ openGlobalSearch(this.app, `#${node.id}#`, !window.siyuan.ctrlIsPressed, {method: 0});return;}if (window.siyuan.shiftIsPressed) {diff --git a/app/src/layout/dock/Tag.ts b/app/src/layout/dock/Tag.tsindex 0c6b636849..a5f6b2eaa0 100644--- a/app/src/layout/dock/Tag.ts+++ b/app/src/layout/dock/Tag.ts@@ -87,7 +87,7 @@ export class Tag extends Model {return;}}- openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed);+ openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed, {method: 0});},rightClick: (element: HTMLElement, event: MouseEvent) => {openTagMenu(element, event, element.getAttribute("data-label"));diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.tsindex 8366d5a1f6..7e314070ed 100644--- a/app/src/menus/protyle.ts+++ b/app/src/menus/protyle.ts@@ -1681,7 +1681,7 @@ export const tagMenu = (protyle: IProtyle, tagElement: HTMLElement) => {icon: "iconSearch",click() {/// #if !MOBILE- openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, false);+ openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, false, {method: 0});/// #elsepopSearch(protyle.app, {hasReplace: false,diff --git a/app/src/protyle/header/Background.ts b/app/src/protyle/header/Background.tsindex ca5a7a4cf0..2febb96704 100644--- a/app/src/protyle/header/Background.ts+++ b/app/src/protyle/header/Background.ts@@ -391,7 +391,7 @@ export class Background {break;} else if (type === "open-search") {/// #if !MOBILE- openGlobalSearch(protyle.app, `#${target.textContent}#`, !window.siyuan.ctrlIsPressed);+ openGlobalSearch(protyle.app, `#${target.textContent}#`, !window.siyuan.ctrlIsPressed, {method: 0});/// #elsepopSearch(protyle.app, {hasReplace: false,diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex c9714074cd..8476253e19 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -2375,7 +2375,7 @@ export class WYSIWYG {const tagElement = hasClosestByAttribute(event.target, "data-type", "tag");if (tagElement && !event.altKey) {/// #if !MOBILE- openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed);+ openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed, {method: 0});hideElements(["dialog"]);/// #elsepopSearch(protyle.app, {diff --git a/app/src/search/util.ts b/app/src/search/util.tsindex e03e5354d4..7fa8202f20 100644--- a/app/src/search/util.ts+++ b/app/src/search/util.ts@@ -202,7 +202,7 @@ const saveKeyList = (type: "keys" | "replaceKeys", value: string) => {setStorageVal(Constants.LOCAL_SEARCHKEYS, window.siyuan.storage[Constants.LOCAL_SEARCHKEYS]);};-export const openGlobalSearch = (app: App, text: string, replace: boolean) => {+export const openGlobalSearch = (app: App, text: string, replace: boolean, searchData?: Config.IUILayoutTabSearchConfig) => {text = text.trim();const searchModel = getAllModels().search.find((item) => {item.parent.parent.switchTab(item.parent.headElement);@@ -219,7 +219,7 @@ export const openGlobalSearch = (app: App, text: string, replace: boolean) => {k: text,r: "",hasReplace: false,- method: localData.method,+ method: searchData ? searchData.method : localData.method,hPath: "",idPath: [],group: localData.group,