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://github.com/siyuan-note/siyuan/issues/5155
Vanessa4bf4c1228c0b
diff --git a/app/src/layout/dock/Bookmark.ts b/app/src/layout/dock/Bookmark.tsindex da372ab32e..21771cb4c8 100644--- a/app/src/layout/dock/Bookmark.ts+++ b/app/src/layout/dock/Bookmark.ts@@ -77,7 +77,7 @@ export class Bookmark extends Model {element: this.element.lastElementChild as HTMLElement,data: null,click(element: HTMLElement) {- const id = element.getAttribute("data-node-id");+ const id = element.getAttribute("data-node-id");fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {openFileById({id,@@ -88,7 +88,8 @@ export class Bookmark extends Model {},rightClick: (element: HTMLElement, event: MouseEvent) => {window.siyuan.menus.menu.remove();- if (!element.getAttribute("data-node-id")) {+ const id = element.getAttribute("data-node-id")+ if (!id) {window.siyuan.menus.menu.append(new MenuItem({label: window.siyuan.languages.rename,click: () => {@@ -123,13 +124,14 @@ export class Bookmark extends Model {});}}).element);- } else {- window.siyuan.menus.menu.append(new MenuItem({- icon: "iconTrashcan",- label: window.siyuan.languages.remove,- click: () => {- confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(element.parentElement.previousElementSibling.querySelector(".b3-list-item__text").textContent)}</b>?`, () => {- const id = element.getAttribute("data-node-id");+ }+ window.siyuan.menus.menu.append(new MenuItem({+ icon: "iconTrashcan",+ label: window.siyuan.languages.remove,+ click: () => {+ const bookmark = (id ? element.parentElement.previousElementSibling : element).querySelector(".b3-list-item__text").textContent+ confirmDialog(window.siyuan.languages.delete, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmark)}</b>?`, () => {+ if (id) {fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {this.update();});@@ -140,10 +142,14 @@ export class Bookmark extends Model {bookmarkElement.remove();}});- });- }- }).element);- }+ } else {+ fetchPost("/api/bookmark/removeBookmark", {bookmark}, () => {+ this.update();+ });+ }+ });+ }+ }).element);window.siyuan.menus.menu.popup({x: event.clientX, y: event.clientY});},ctrlClick(element: HTMLElement) {