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/16927

Vanessa4389a5180399
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index 7c08bcf589..99f4c43499 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -747,6 +747,8 @@ export const genSearch = (app: App, config: Config.IUILayoutTabSearchConfig, ele
element.querySelector("#searchSyntaxCheck").outerHTML = genQueryHTML(config.method, "searchSyntaxCheck");
config.page = 1;
inputEvent(element, config, edit, true);
+ window.siyuan.storage[Constants.LOCAL_SEARCHDATA] = JSON.parse(JSON.stringify(config));
+ setStorageVal(Constants.LOCAL_SEARCHDATA, window.siyuan.storage[Constants.LOCAL_SEARCHDATA]);
});
const rect = target.getBoundingClientRect();
window.siyuan.menus.menu.popup({x: rect.right, y: rect.bottom, isLeft: true});
@@ -893,7 +895,7 @@ export const genSearch = (app: App, config: Config.IUILayoutTabSearchConfig, ele
searchInputElement.addEventListener("blur", () => {
if (config.removed) {
config.k = searchInputElement.value;
- window.siyuan.storage[Constants.LOCAL_SEARCHDATA] = Object.assign({}, config);
+ window.siyuan.storage[Constants.LOCAL_SEARCHDATA] = JSON.parse(JSON.stringify(config));
setStorageVal(Constants.LOCAL_SEARCHDATA, window.siyuan.storage[Constants.LOCAL_SEARCHDATA]);
}
saveKeyList("keys", searchInputElement.value);