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/pull/17468
Vanessa802a27b5c4bd
diff --git a/app/src/layout/dock/Backlink.ts b/app/src/layout/dock/Backlink.tsindex fcc54222a5..59488efc3b 100644--- a/app/src/layout/dock/Backlink.ts+++ b/app/src/layout/dock/Backlink.ts@@ -11,6 +11,7 @@ import {Protyle} from "../../protyle";import {MenuItem} from "../../menus/Menu";import {App} from "../../index";import {isSupportCSSHL, searchMarkRender} from "../../protyle/render/searchMarkRender";+import {getDocDisplayName} from "../../util/pathName";export class Backlink extends Model {public element: HTMLElement;@@ -59,7 +60,7 @@ export class Backlink extends Model {switch (data.cmd) {case "rename":if (this.rootId === data.data.id) {- this.parent.updateTitle(data.data.title);+ this.parent.updateTitle(getDocDisplayName(data.data.title, data.data.empty));}break;case "closeBox":diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.tsindex 43f8787d31..0db31b790c 100644--- a/app/src/layout/dock/Graph.ts+++ b/app/src/layout/dock/Graph.ts@@ -13,6 +13,7 @@ import {openGlobalSearch} from "../../search/util";import {App} from "../../index";import {checkFold} from "../../util/noRelyPCFunction";import {Editor} from "../../editor";+import {getDocDisplayName} from "../../util/pathName";declare const vis: any;@@ -63,7 +64,7 @@ export class Graph extends Model {if (this.graphData && data.data.box === this.graphData.box && this.rootId === data.data.id) {this.searchGraph(false);if (this.type === "local") {- this.parent.updateTitle(data.data.title);+ this.parent.updateTitle(getDocDisplayName(data.data.title, data.data.empty));}}if (this.type === "global") {diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.tsindex 637b89b9fe..306d0bd992 100644--- a/app/src/layout/dock/Outline.ts+++ b/app/src/layout/dock/Outline.ts@@ -28,6 +28,7 @@ import {mathRender} from "../../protyle/render/mathRender";import {genEmptyElement} from "../../block/util";import {focusBlock, focusByWbr} from "../../protyle/util/selection";import {dragOverScroll, stopScrollAnimation} from "../../boot/globalEvent/dragover";+import {getDocDisplayName} from "../../util/pathName";export class Outline extends Model {public tree: Tree;@@ -66,7 +67,8 @@ export class Outline extends Model {break;case "rename":if (this.type === "local" && this.blockId === data.data.id) {- this.parent.updateTitle(data.data.title);+ this.parent.updateTitle(getDocDisplayName(data.data.title, data.data.empty));+ this.protyle.model.parent.updateTitle(getDocDisplayName(data.data.title, data.data.empty));} else {this.updateDocTitle({title: data.data.title,@@ -491,8 +493,9 @@ export class Outline extends Model {if (ial.icon === Constants.ZWSP && docTitleElement.firstElementChild) {iconHTML = docTitleElement.firstElementChild.outerHTML;}- docTitleElement.innerHTML = `${iconHTML}<span class="b3-list-item__text">${escapeHtml(ial.title)}</span>${docTitleElement.querySelector(".counter")?.outerHTML || ""}`;- docTitleElement.setAttribute("title", ial.title);+ const title = getDocDisplayName(ial.title, ial[Constants.CUSTOM_SY_TITLE_EMPTY] === "true");+ docTitleElement.innerHTML = `${iconHTML}<span class="b3-list-item__text">${escapeHtml(title)}</span>${docTitleElement.querySelector(".counter")?.outerHTML || ""}`;+ docTitleElement.setAttribute("title", title);docTitleElement.classList.remove("fn__none");}// count 为 -1 时,不对数量进行更新