mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-17 20:31:47 +02:00
refactor: read the catalog from store state in catalogBuilds
Assisted-by: pi:GLM-5.3-Flash
This commit is contained in:
@@ -86,7 +86,7 @@ class ModelsHubStore {
|
||||
|
||||
this.catalog = catalog;
|
||||
|
||||
const builds = this.catalogBuilds(catalog);
|
||||
const builds = this.catalogBuilds();
|
||||
const fetched = await Promise.all(
|
||||
builds.map(async (build) => {
|
||||
const [info, tree] = await Promise.all([
|
||||
@@ -210,8 +210,8 @@ class ModelsHubStore {
|
||||
* families published only by other orgs (mistralai, unsloth) still show up.
|
||||
* Returns an empty array when the catalog is empty.
|
||||
*/
|
||||
private catalogBuilds(catalog: HfCatalogEntry[]): HfCatalogBuild[] {
|
||||
return [...catalog]
|
||||
private catalogBuilds(): HfCatalogBuild[] {
|
||||
return [...this.catalog]
|
||||
.sort((a, b) => b.released.localeCompare(a.released))
|
||||
.flatMap((entry) =>
|
||||
entry.sizes.flatMap((size) => {
|
||||
|
||||
Reference in New Issue
Block a user