Changeset 0.37.18 (#230)

Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
2026-03-24 19:55:14 +00:00
committed by xcaliber
parent 96a4f16bc5
commit 3a4afea7f2
34 changed files with 1534 additions and 1290 deletions

View File

@@ -54,6 +54,16 @@ export default function ProvidersSection() {
} catch (e) { sw.toast(e.message, 'error'); }
}
async function testProvider(cfg) {
sw.toast(`Testing ${cfg.name}\u2026`, 'info');
try {
const result = await sw.api.admin.models.fetch();
sw.toast(`${cfg.name}: connection OK`, 'success');
} catch (e) {
sw.toast(`${cfg.name}: connection failed \u2014 ${e.message}`, 'error');
}
}
async function deleteProvider(id) {
const ok = await sw.confirm('Delete this provider config?', true);
if (!ok) return;
@@ -118,6 +128,7 @@ export default function ProvidersSection() {
</div>
<div class="text-muted" style="font-size:12px;margin-bottom:8px;word-break:break-all;">${c.endpoint || '(default)'}</div>
<div style="display:flex;gap:6px;">
<button class="btn-small" onClick=${() => testProvider(c)}>Test</button>
<button class="btn-small" onClick=${() => setEditing(c)}>Edit</button>
<button class="btn-small" onClick=${() => syncModels(c.id)}>Sync Models</button>
<button class="btn-small btn-danger" onClick=${() => deleteProvider(c.id)}>Delete</button>