Merge pull request #3166 from Yidadaa/bugfix-1107

This commit is contained in:
Yifei Zhang 2023-11-08 01:08:00 +08:00 committed by GitHub
commit 77f27b7948
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -133,7 +133,9 @@ export const useAppConfig = createPersistStore(
.customModels.split(",")
.filter((v) => !!v && v.length > 0)
.map((m) => ({ name: m, available: true }));
return get().models.concat(customModels);
const allModels = get().models.concat(customModels);
allModels.sort((a, b) => (a.name < b.name ? -1 : 1));
return allModels;
},
}),
{