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/12948
Vanessa90a89f886d06
diff --git a/app/src/history/diff.ts b/app/src/history/diff.tsindex 3be880a9cf..2b51133a4f 100644--- a/app/src/history/diff.ts+++ b/app/src/history/diff.ts@@ -80,6 +80,7 @@ const renderCompare = (app: App, element: HTMLElement) => {leftElement.classList.remove("fn__none");const textElement = leftElement.querySelector("textarea");const type = pathPosix().extname(response.data.content).toLowerCase();+ const titleElement = leftElement.querySelector(".protyle-title__input");if (Constants.SIYUAN_ASSETS_IMAGE.concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO).includes(type)) {textElement.previousElementSibling.innerHTML = renderAssetsPreview(response.data.content);textElement.previousElementSibling.classList.remove("fn__none");@@ -101,6 +102,7 @@ const renderCompare = (app: App, element: HTMLElement) => {action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML],});}+ titleElement.textContent = response.data.title;leftElement.querySelector(".history__date").textContent = dayjs(response.data.updated).format("YYYY-MM-DD HH:mm");});const id2 = element.getAttribute("data-id2");@@ -109,6 +111,7 @@ const renderCompare = (app: App, element: HTMLElement) => {fetchPost("/api/repo/openRepoSnapshotDoc", {id: id2}, (response) => {const textElement = rightElement.querySelector("textarea");const type = pathPosix().extname(response.data.content).toLowerCase();+ const titleElement = rightElement.querySelector(".protyle-title__input");if (Constants.SIYUAN_ASSETS_IMAGE.concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO).includes(type)) {textElement.previousElementSibling.innerHTML = renderAssetsPreview(response.data.content);textElement.previousElementSibling.classList.remove("fn__none");@@ -130,6 +133,7 @@ const renderCompare = (app: App, element: HTMLElement) => {action: [Constants.CB_GET_HISTORY, Constants.CB_GET_HTML],});}+ titleElement.textContent = response.data.title;rightElement.querySelector(".history__date").textContent = dayjs(response.data.updated).format("YYYY-MM-DD HH:mm");});} else {@@ -262,12 +266,14 @@ const genHTML = (left: string, right: string, dialog: Dialog, direct: string) =><div class="fn__flex-1 fn__flex" data-type="editors"><div class="fn__none fn__flex-1 fn__flex-column"><div class="history__date">${dayjs(response.data.left.created).format("YYYY-MM-DD HH:mm")}</div>+ <div class="protyle-title__input ft__center ft__breakword">${response.data.left.title}</div><div class="ft__center"></div><textarea class="history__text fn__none fn__flex-1" readonly></textarea><div class="fn__flex-1"></div></div><div class="fn__none fn__flex-1 fn__flex-column" style="border-left: 1px solid var(--b3-border-color);">- <div class="history__date">${dayjs(response.data.right.created).format("YYYY-MM-DD HH:mm")}</div>+ <div class="history__date">${response.data.right.title} ${dayjs(response.data.right.created).format("YYYY-MM-DD HH:mm")}</div>+ <div class="protyle-title__input ft__center ft__breakword">${response.data.right.title}</div><div class="ft__center"></div><textarea class="history__text fn__none fn__flex-1" readonly></textarea><div class="fn__flex-1"></div>diff --git a/app/src/history/doc.ts b/app/src/history/doc.tsindex a985f6eab9..74df038ae3 100644--- a/app/src/history/doc.ts+++ b/app/src/history/doc.ts@@ -67,7 +67,7 @@ export const openDocHistory = (options: {</ul><div class="history__resize"></div><div class="fn__flex-1 fn__flex-column">- <div class="protyle-title__input ft__center"></div>+ <div class="protyle-title__input ft__center ft__breakword"></div><textarea class="fn__flex-1 history__text fn__none" readonly data-type="mdPanel"></textarea><div class="fn__flex-1 history__text fn__none" style="padding: 0" data-type="docPanel"></div></div>diff --git a/app/src/history/history.ts b/app/src/history/history.tsindex 7d39aadc50..3fdbb4c162 100644--- a/app/src/history/history.ts+++ b/app/src/history/history.ts@@ -398,7 +398,7 @@ export const openHistory = (app: App) => {</ul><div class="history__resize"></div><div class="fn__flex-column fn__flex-1">- <div class="protyle-title__input ft__center"></div>+ <div class="protyle-title__input ft__center ft__breakword"></div><div class="fn__flex-1 history__text fn__none" data-type="assetPanel"></div><textarea class="fn__flex-1 history__text fn__none" data-type="mdPanel"></textarea><div class="fn__flex-1 history__text fn__none" style="padding: 0" data-type="docPanel"></div>