Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/6956

Vanessa8cc40c066a18
diff --git a/app/src/config/about.ts b/app/src/config/about.ts
index 0cbcdc359c..6615d51446 100644
--- a/app/src/config/about.ts
+++ b/app/src/config/about.ts
@@ -242,12 +242,6 @@ export const about = {
fetchPost("/api/system/setWorkspaceDir", {
path: workspace
}, () => {
- const searchData = JSON.parse(localStorage.getItem(Constants.LOCAL_SEARCHEDATA) || "{}");
- if (searchData.hPath) {
- searchData.hPath = "";
- searchData.idPath = "";
- localStorage.setItem(Constants.LOCAL_SEARCHEDATA, JSON.stringify(searchData));
- }
exportLayout(false, () => {
exitSiYuan();
});
diff --git a/app/src/protyle/util/compatibility.ts b/app/src/protyle/util/compatibility.ts
index 7fddf65ca2..eff4736753 100644
--- a/app/src/protyle/util/compatibility.ts
+++ b/app/src/protyle/util/compatibility.ts
@@ -152,18 +152,6 @@ export const setLocalStorage = () => {
exportLocalStorage();
}
});
-
- // 复写 localStorage
- window.__localStorage__setItem = localStorage.setItem;
- window.__localStorage__removeItem = localStorage.removeItem;
- localStorage.setItem = function (key, val) {
- window.__localStorage__setItem.call(this, key, val);
- fetchPost("/api/storage/setLocalStorageVal", {key, val});
- };
- localStorage.removeItem = function (key) {
- window.__localStorage__removeItem.call(this, key);
- fetchPost("/api/storage/removeLocalStorageVal", {key});
- };
};
export const exportLocalStorage = (cb?: () => void) => {