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

Vanessa3b1720b16990
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index 143fb18124..e85ad76a08 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -996,11 +996,16 @@ const replace = (element: Element, config: ISearchOption, edit: Protyle, app: Ap
return;
}
loadElement.classList.remove("fn__none");
- const searchData: ISearchOption & { ids?: string[] } = Object.assign({}, config);
- searchData.k = config.method === 0 ? getKeyByLiElement(currentList) : searchInputElement.value;
- searchData.r = replaceInputElement.value;
- searchData.ids = isAll ? [] : [currentList.getAttribute("data-node-id")];
- fetchPost("/api/search/findReplace", searchData, (response) => {
+ fetchPost("/api/search/findReplace", {
+ k: config.method === 0 ? getKeyByLiElement(currentList) : searchInputElement.value,
+ r: replaceInputElement.value,
+ method: config.method,
+ types: config.types,
+ paths: config.idPath || [],
+ groupBy: config.group,
+ orderBy: config.sort,
+ page: config.page,
+ }, (response) => {
loadElement.classList.add("fn__none");
if (response.code === 1) {
showMessage(response.msg);