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: Show document names and aliases in move search results https://github.com/siyuan-note/siyuan/issues/19317
Danielaa656913e729
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.tsindex 74cad0def7..7947f9fa65 100644--- a/app/src/util/pathName.ts+++ b/app/src/util/pathName.ts@@ -352,6 +352,8 @@ export const movePathTo = (options: {box: string,hPath: string,path: string,+ name?: string,+ alias?: string,newFlashcardCount: string,dueFlashcardCount: string,flashcardCount: string@@ -363,9 +365,16 @@ export const movePathTo = (options: {<span class="counter counter--right b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardDueCard}">${item.dueFlashcardCount}</span><span class="counter counter--right b3-tooltips b3-tooltips__w" aria-label="${window.siyuan.languages.flashcardCard}">${item.flashcardCount}</span>`;}+ let attributesHTML = "";+ if (item.name) {+ attributesHTML += `<span class="ft__smaller ft__on-surface" style="display: block; line-height: 1.5">${window.siyuan.languages.name} ${escapeHtml(item.name)}</span>`;+ }+ if (item.alias) {+ attributesHTML += `<span class="ft__smaller ft__on-surface" style="display: block; line-height: 1.5">${window.siyuan.languages.alias} ${escapeHtml(item.alias)}</span>`;+ }fileHTML += `<li class="b3-list-item${fileHTML === "" ? " b3-list-item--focus" : ""}" data-path="${item.path}" data-box="${item.box}"${getFileTreeDefaultIconAttr(item.boxIcon, "notebook")}>${getFileTreeIconHTML(item.boxIcon, "notebook", "b3-list-item__graphic", true)}- <span class="b3-list-item__showall" style="padding: 4px 0">${escapeHtml(item.hPath)}</span>+ <span class="b3-list-item__showall" style="padding: 4px 0">${escapeHtml(item.hPath)}${attributesHTML}</span>${countHTML}</li>`;});diff --git a/kernel/model/file.go b/kernel/model/file.goindex 59af5795dc..a4f394d8b2 100644--- a/kernel/model/file.go+++ b/kernel/model/file.go@@ -302,7 +302,8 @@ func SearchDocs(keyword string, flashcard bool, excludeIDs []string) (ret []map[continue}hPath := b.Name + rootBlock.HPath- data := map[string]string{"path": rootBlock.Path, "hPath": hPath, "box": rootBlock.Box, "boxIcon": b.Icon}+ data := map[string]string{"path": rootBlock.Path, "hPath": hPath, "box": rootBlock.Box, "boxIcon": b.Icon,+ "name": rootBlock.Name, "alias": rootBlock.Alias}if flashcard {newFlashcardCount, dueFlashcardCount, flashcardCount := countTreeFlashcard(rootBlock.ID, deck, deckBlockIDs)if 1 > flashcardCount {