diff --git a/app/store/prompt.ts b/app/store/prompt.ts index d0dd454a..648b3814 100644 --- a/app/store/prompt.ts +++ b/app/store/prompt.ts @@ -116,10 +116,9 @@ export const usePromptStore = create()( }) .concat([...(state?.prompts?.values() ?? [])]); - const allPromptsForSearch = builtinPrompts.reduce( - (pre, cur) => pre.concat(cur), - [], - ); + const allPromptsForSearch = builtinPrompts + .reduce((pre, cur) => pre.concat(cur), []) + .filter((v) => !!v.title && !!v.content); SearchService.count.builtin = res.en.length + res.cn.length; SearchService.init(allPromptsForSearch); });