mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-15 01:21:48 +03:00
feat(frontend): order models and brain by name (#3009)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
This commit is contained in:
parent
2812ea4f35
commit
a36837e361
@ -65,9 +65,16 @@ export const getBrains = async (
|
||||
return -1;
|
||||
} else if (a.brain_type !== "model" && b.brain_type === "model") {
|
||||
return 1;
|
||||
} else if (
|
||||
a.brain_type === "model" &&
|
||||
b.brain_type === "model" &&
|
||||
a.display_name &&
|
||||
b.display_name
|
||||
) {
|
||||
return a.display_name.localeCompare(b.display_name);
|
||||
} else {
|
||||
return a.name.localeCompare(b.name);
|
||||
}
|
||||
|
||||
return 0;
|
||||
});
|
||||
|
||||
return sortedBrains.map(mapBackendMinimalBrainToMinimalBrain);
|
||||
|
Loading…
Reference in New Issue
Block a user