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: fix https://github.com/siyuan-note/siyuan/issues/11233
Vanessa8af49fcc160f
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.tsindex 062caabd24..455b405e71 100644--- a/app/src/protyle/render/av/openMenuPanel.ts+++ b/app/src/protyle/render/av/openMenuPanel.ts@@ -930,7 +930,7 @@ export const openMenuPanel = (options: {event.stopPropagation();break;} else if (type === "goSearchAV") {- openSearchAV(avID, target);+ openSearchAV(avID, target, undefined, false);event.preventDefault();event.stopPropagation();break;diff --git a/app/src/protyle/render/av/relation.ts b/app/src/protyle/render/av/relation.tsindex 314dac800b..bafcd86296 100644--- a/app/src/protyle/render/av/relation.ts+++ b/app/src/protyle/render/av/relation.ts@@ -9,8 +9,8 @@ import {updateAttrViewCellAnimation} from "./action";import {focusBlock} from "../../util/selection";import {setPosition} from "../../../util/setPosition";-const genSearchList = (element: Element, keyword: string, avId: string, cb?: () => void) => {- fetchPost("/api/av/searchAttributeView", {keyword, excludes: [avId]}, (response) => {+const genSearchList = (element: Element, keyword: string, avId: string, excludes = true, cb?: () => void) => {+ fetchPost("/api/av/searchAttributeView", {keyword, excludes: excludes ? [avId] : undefined}, (response) => {let html = "";response.data.results.forEach((item: {avID: string@@ -45,7 +45,7 @@ const setDatabase = (avId: string, element: HTMLElement, item: HTMLElement) => {}};-export const openSearchAV = (avId: string, target: HTMLElement, cb?: (element: HTMLElement) => void) => {+export const openSearchAV = (avId: string, target: HTMLElement, cb?: (element: HTMLElement) => void, excludes = true) => {window.siyuan.menus.menu.remove();const menu = new Menu();menu.addItem({@@ -86,10 +86,10 @@ export const openSearchAV = (avId: string, target: HTMLElement, cb?: (element: Hif (event.isComposing) {return;}- genSearchList(listElement, inputElement.value, avId);+ genSearchList(listElement, inputElement.value, avId, excludes);});inputElement.addEventListener("compositionend", () => {- genSearchList(listElement, inputElement.value, avId);+ genSearchList(listElement, inputElement.value, avId, excludes);});element.lastElementChild.addEventListener("click", (event) => {const listItemElement = hasClosestByClassName(event.target as HTMLElement, "b3-list-item");@@ -103,7 +103,7 @@ export const openSearchAV = (avId: string, target: HTMLElement, cb?: (element: Hwindow.siyuan.menus.menu.remove();}});- genSearchList(listElement, "", avId, () => {+ genSearchList(listElement, "", avId, excludes, () => {const rect = target.getBoundingClientRect();menu.open({x: rect.left,