fix: #2221 user prompts in front of all prompts

This commit is contained in:
Yidadaa 2023-07-04 00:22:30 +08:00
parent 0bc2c71b0c
commit 5963459499

View File

@ -127,7 +127,7 @@ export const usePromptStore = create<PromptStore>()(
search(text) { search(text) {
if (text.length === 0) { if (text.length === 0) {
// return all rompts // return all rompts
return SearchService.allPrompts.concat([...get().getUserPrompts()]); return get().getUserPrompts().concat(SearchService.builtinPrompts);
} }
return SearchService.search(text) as Prompt[]; return SearchService.search(text) as Prompt[];
}, },