()
| 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>`; |
no test coverage detected