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/16814
Vanessafcf7924059dd
diff --git a/app/src/history/history.ts b/app/src/history/history.tsindex a02cd111b7..7efcf9e174 100644--- a/app/src/history/history.ts+++ b/app/src/history/history.ts@@ -198,6 +198,8 @@ const renderRepoItem = (response: IWebSocketData, element: Element, type: string/// #endiflet repoHTML = "";const isPhone = isMobile();+ const selectId: { id: string, time: string }[] = ["getRepoTagSnapshots", "getRepoSnapshots"].includes(type) ?+ JSON.parse(element.querySelector(".b3-button[data-type='compare']").getAttribute("data-ids") || "[]") : [];response.data.snapshots.forEach((item: {memo: string,id: string,@@ -234,8 +236,9 @@ ${window.siyuan.languages.fileCount} ${item.count}<span class="fn__space"></span<code class="fn__code">${item.id.substring(0, 7)}</code></div>${statHTML}`;+ const hasSelected = selectId.find(subItem => subItem.id === item.id);/// #if MOBILE- repoHTML += `<li class="b3-list-item" data-type="repoitem" data-id="${item.id}" data-tag="${item.tag}">+ repoHTML += `<li class="b3-list-item${hasSelected ? " b3-list-item--focus" : ""}" data-type="repoitem" data-id="${item.id}" data-tag="${item.tag}"><div class="fn__flex-1">${infoHTML}<div class="fn__flex" style="height: 26px" data-type="repoitem"" data-id="${item.id}" data-tag="${item.tag}">@@ -250,7 +253,7 @@ ${statHTML}`;</div></li>`;/// #else- repoHTML += `<li class="b3-list-item b3-list-item--hide-action" data-type="repoitem" data-id="${item.id}" data-tag="${item.tag}">+ repoHTML += `<li class="b3-list-item b3-list-item--hide-action${hasSelected ? " b3-list-item--focus" : ""}" data-type="repoitem" data-id="${item.id}" data-tag="${item.tag}"><div class="fn__flex-1">${infoHTML}</div>${actionHTML}</li>`;@@ -678,9 +681,10 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {const id = target.getAttribute("data-id");if (target.classList.contains("b3-list-item--focus")) {target.classList.remove("b3-list-item--focus");- idJSON.forEach((item: { id: string, time: string }, index: number) => {+ idJSON.find((item: { id: string, time: string }, index: number) => {if (id === item.id) {idJSON.splice(index, 1);+ return true;}});} else {@@ -688,6 +692,8 @@ const bindEvent = (app: App, element: Element, dialog?: Dialog) => {while (idJSON.length > 1) {if (idJSON[0].id !== id) {target.parentElement.querySelector(`.b3-list-item[data-id="${idJSON.splice(0, 1)[0].id}"]`)?.classList.remove("b3-list-item--focus");+ } else {+ idJSON.splice(0, 1);}}idJSON.push({id, time: target.querySelector('[data-type="hCreated"]').textContent});