Elffuss BraidHub

utopia-ia/elffuss-code public

model-cache: await the engine's storage origins

origenesAlmacen() from the engine registry may return the list or a
promise of it; modelUsage() and clearModels() now await it before handing
it to the broker, instead of passing a promise where a list of URLs is
expected.
Changeset143eda9ec77210e81f2028b9c19214e9092765d5eedbaefcd3c32cbc79219681
AuthorKikoCis <kikocisneros@gmail.com> · 2026-10-10 16:53 +02:00
CommitterKikoCis <kikocisneros@gmail.com> · 2026-10-11 14:15 +02:00
Parents47ed48012e12

Browse the files at this changeset

1 file changed

modified web/js/model-cache.js +2 −1
@@ -92,7 +92,8 @@
9292 const b = await import('./runtime/model-broker.js');
9393 if (typeof b.sharedUsage !== 'function') return null;
9494 let origenes;
95- try { const r = await import('./engine/registro.js'); origenes = r.origenesAlmacen ? r.origenesAlmacen() : undefined; }
95+ // Puede devolver la lista o una promesa de ella: se espera siempre.
96+ try { const r = await import('./engine/registro.js'); origenes = r.origenesAlmacen ? await r.origenesAlmacen() : undefined; }
9697 catch { /* sin motor: el broker por defecto */ }
9798 return { b, origenes };
9899 } catch { return null; }