MCPcopy
hub / github.com/Anil-matcha/Open-Generative-AI / refreshStorageInfo

Function refreshStorageInfo

src/components/LocalModelManager.js:383–394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381 const storageEl = modelsSection.querySelector('#local-model-storage');
382
383 const refreshStorageInfo = async () => {
384 try {
385 const status = await localAI.getBinaryStatus();
386 const storagePath = status.modelsDir || status.dataDir;
387 storageEl.textContent = storagePath ? `${t('localModels.storedIn')} ${storagePath}` : t('localModels.storedDefault');
388 if (storagePath && status.envVar) {
389 storageEl.title = `Set ${status.envVar} before launch to change this location`;
390 }
391 } catch (_) {
392 storageEl.textContent = t('localModels.storedDefault');
393 }
394 };
395
396 const renderModels = async () => {
397 listEl.innerHTML = `<div class="text-xs text-muted text-center py-4">${t('localModels.loading')}</div>`;

Callers 1

LocalModelManagerFunction · 0.85

Calls 2

tFunction · 0.90
getBinaryStatusMethod · 0.80

Tested by

no test coverage detected