mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-09-19 01:36:38 +08:00
Improve prompt store prompt list counting
This commit is contained in:
parent
16c16887ae
commit
bc53c17a8c
@ -175,8 +175,9 @@ export const usePromptStore = createPersistStore(
|
||||
const allPromptsForSearch = builtinPrompts
|
||||
.reduce((pre, cur) => pre.concat(cur), [])
|
||||
.filter((v) => !!v.title && !!v.content);
|
||||
SearchService.count.builtin =
|
||||
res.en.length + res.cn.length + res.tw.length;
|
||||
SearchService.count.builtin = Object.values(res)
|
||||
.filter(Array.isArray)
|
||||
.reduce((total, promptList) => total + promptList.length, 0);
|
||||
SearchService.init(allPromptsForSearch, userPrompts);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user