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/7428
Vanessaccbcaeb1fdb9
diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.tsindex a91dc8ba7a..65c3c1ef76 100644--- a/app/src/layout/Wnd.ts+++ b/app/src/layout/Wnd.ts@@ -681,12 +681,18 @@ export class Wnd {}if (item.headElement) {if (item.headElement.classList.contains("item--focus")) {- let currentIndex = index + 1;- if (index === this.children.length - 1) {- currentIndex = index - 1;- }- if (this.children[currentIndex] && !closeAll) {- this.switchTab(this.children[currentIndex].headElement, true);+ let latestHeadElement: HTMLElement+ Array.from(item.headElement.parentElement.children).forEach((headItem: HTMLElement) => {+ if (!headItem.isSameNode(item.headElement)) {+ if (!latestHeadElement) {+ latestHeadElement = headItem;+ } else if (headItem.getAttribute("data-activetime") > latestHeadElement.getAttribute("data-activetime")) {+ latestHeadElement = headItem;+ }+ }+ })+ if (latestHeadElement && !closeAll) {+ this.switchTab(latestHeadElement, true);}}if (animate) {