mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-20 02:01:26 +08:00
feat: sort model by name
This commit is contained in:
@@ -133,7 +133,9 @@ export const useAppConfig = createPersistStore(
|
|||||||
.customModels.split(",")
|
.customModels.split(",")
|
||||||
.filter((v) => !!v && v.length > 0)
|
.filter((v) => !!v && v.length > 0)
|
||||||
.map((m) => ({ name: m, available: true }));
|
.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;
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user