feat: HF-Cache raus + service_status Banner in Diagnostic
Stefan akzeptiert die ~5min Modell-Download-Zeit nach jedem Container- Start, dafuer keine 50GB Cache-Bloat mehr und kein Bind-Mount-Verzeichnis zu pflegen. - xtts/docker-compose.yml: hf-cache Bind-Mount entfernt fuer beide Bridges. Modelle werden im writable Container-Layer abgelegt und mit jedem `docker compose down` automatisch weggeraeumt. - xtts/.gitignore: hf-cache/ Eintrag raus - RVS ALLOWED_TYPES: service_status hinzu Bridges broadcasten Lade-Status: - f5tts-bridge: bei Connect 'loading' -> ensure_loaded -> 'ready'. Auch bei config-getriggertem Modell-Wechsel: erst 'loading' Broadcast, dann reload, dann 'ready'. - whisper-bridge: gleiches Pattern. Modell wird jetzt erst nach RVS-Connect geladen damit der loading-Broadcast tatsaechlich rausgeht. Diagnostic: - server.js: service_status wird an Browser durchgereicht - index.html: neues Banner unten rechts (fixed position) zeigt Status fuer beide Services. Aggregiert: Icon ist Lupe waehrend Loading, Check wenn alles ready, X bei Error. - Wenn alles ready: X-Button erscheint (manuell schliessen) + nach 8s automatisches Fade-Out. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -127,6 +127,15 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Service-Status Banner unten rechts (Gamebox: F5-TTS / Whisper Lade-Status) -->
|
||||
<div id="service-status-banner" style="display:none;position:fixed;bottom:16px;right:16px;z-index:999;background:#1E1E2E;border:1px solid #2A2A3E;border-radius:8px;padding:10px 14px;font-size:12px;color:#fff;min-width:240px;max-width:360px;box-shadow:0 4px 14px rgba(0,0,0,0.5);">
|
||||
<div style="display:flex;align-items:flex-start;gap:8px;">
|
||||
<span id="service-status-icon" style="font-size:18px;line-height:1;">⏳</span>
|
||||
<div id="service-status-list" style="flex:1;display:flex;flex-direction:column;gap:6px;"></div>
|
||||
<button id="service-status-close" onclick="document.getElementById('service-status-banner').style.display='none'" style="background:none;border:none;color:#666680;font-size:16px;cursor:pointer;padding:0;line-height:1;display:none;">×</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Disk-Space Warnung (dynamisch gesetzt) -->
|
||||
<div id="disk-banner" style="display:none;position:sticky;top:0;z-index:500;padding:10px 14px;border-radius:0;margin:-16px -16px 12px -16px;font-size:13px;">
|
||||
<div style="display:flex;align-items:center;gap:10px;flex-wrap:wrap;">
|
||||
@@ -914,6 +923,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.type === 'service_status') {
|
||||
updateServiceStatus(msg.payload || {});
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.type === 'voice_ready') {
|
||||
const v = msg.payload?.voice || '';
|
||||
const err = msg.payload?.error;
|
||||
@@ -1452,6 +1466,68 @@
|
||||
'Glob': '\uD83D\uDCC1 Dateien suchen',
|
||||
'Agent': '\uD83E\uDD16 Sub-Agent',
|
||||
};
|
||||
// ── Service-Status Banner (Gamebox: F5-TTS / Whisper Lade-Status) ──
|
||||
// Aggregiert die Status-Infos der Bridges. Wenn irgendwas am Laden
|
||||
// ist, zeigt das Banner unten rechts. Sobald alles auf 'ready' ist,
|
||||
// bleibt's einen Moment und wird dann vom User weggeklickt (oder
|
||||
// nach 8s automatisch).
|
||||
const _serviceState = {}; // { f5tts: {state, model, ...}, whisper: {...} }
|
||||
let _serviceFadeTimer = null;
|
||||
function updateServiceStatus(p) {
|
||||
const svc = p.service || '?';
|
||||
_serviceState[svc] = p;
|
||||
|
||||
const banner = document.getElementById('service-status-banner');
|
||||
const list = document.getElementById('service-status-list');
|
||||
const icon = document.getElementById('service-status-icon');
|
||||
const closeBtn = document.getElementById('service-status-close');
|
||||
|
||||
// Liste neu aufbauen
|
||||
list.innerHTML = '';
|
||||
let anyLoading = false, anyError = false;
|
||||
const labels = { f5tts: 'F5-TTS', whisper: 'Whisper STT' };
|
||||
for (const [s, info] of Object.entries(_serviceState)) {
|
||||
const row = document.createElement('div');
|
||||
row.style.cssText = 'display:flex;align-items:center;gap:6px;';
|
||||
let dot = '⚫', color = '#666680', text = '';
|
||||
if (info.state === 'loading') {
|
||||
dot = '⏳'; color = '#FFD60A'; anyLoading = true;
|
||||
text = `${labels[s] || s}: laedt${info.model ? ' ' + info.model : ''}...`;
|
||||
} else if (info.state === 'ready') {
|
||||
dot = '✅'; color = '#34C759';
|
||||
const sec = info.loadSeconds ? ` (${info.loadSeconds.toFixed(1)}s)` : '';
|
||||
text = `${labels[s] || s}: bereit${info.model ? ' ' + info.model : ''}${sec}`;
|
||||
} else if (info.state === 'error') {
|
||||
dot = '❌'; color = '#FF3B30'; anyError = true;
|
||||
text = `${labels[s] || s}: Fehler ${info.error || ''}`;
|
||||
} else {
|
||||
text = `${labels[s] || s}: ${info.state}`;
|
||||
}
|
||||
row.innerHTML = `<span style="color:${color}">${dot}</span><span>${text}</span>`;
|
||||
list.appendChild(row);
|
||||
}
|
||||
|
||||
// Icon spiegelt Gesamt-Status
|
||||
if (anyError) icon.innerHTML = '❌';
|
||||
else if (anyLoading) icon.innerHTML = '⏳';
|
||||
else icon.innerHTML = '✅';
|
||||
|
||||
banner.style.display = 'block';
|
||||
|
||||
// Wenn alles ready (kein Loading, kein Error): X-Button anzeigen
|
||||
// + nach 8s automatisch wegfaden
|
||||
if (!anyLoading && !anyError) {
|
||||
closeBtn.style.display = 'block';
|
||||
clearTimeout(_serviceFadeTimer);
|
||||
_serviceFadeTimer = setTimeout(() => {
|
||||
banner.style.display = 'none';
|
||||
}, 8000);
|
||||
} else {
|
||||
closeBtn.style.display = 'none';
|
||||
clearTimeout(_serviceFadeTimer);
|
||||
}
|
||||
}
|
||||
|
||||
function updateThinkingIndicator(msg) {
|
||||
const indicators = [
|
||||
document.getElementById('thinking-indicator'),
|
||||
|
||||
@@ -637,6 +637,22 @@ function connectRVS(forcePlain) {
|
||||
log("info", "rvs", `Voice "${v || "default"}" geladen${ms ? ` in ${(ms/1000).toFixed(1)}s` : ""}`);
|
||||
}
|
||||
broadcast({ type: "voice_ready", payload: msg.payload });
|
||||
} else if (msg.type === "service_status") {
|
||||
// Gamebox-Bridges (f5tts/whisper) melden ihren Lade-Status —
|
||||
// an Browser durchreichen fuer das Banner unten rechts
|
||||
const svc = msg.payload?.service || "?";
|
||||
const state = msg.payload?.state || "?";
|
||||
const model = msg.payload?.model || "";
|
||||
const sec = msg.payload?.loadSeconds;
|
||||
const err = msg.payload?.error;
|
||||
if (err) {
|
||||
log("warn", "rvs", `service_status ${svc}: ${err}`);
|
||||
} else if (state === "ready" && sec) {
|
||||
log("info", "rvs", `service_status ${svc} ready (${model}, ${sec.toFixed(1)}s)`);
|
||||
} else {
|
||||
log("info", "rvs", `service_status ${svc} ${state}${model ? ` (${model})` : ""}`);
|
||||
}
|
||||
broadcast({ type: "service_status", payload: msg.payload });
|
||||
} else {
|
||||
log("debug", "rvs", `Nachricht: ${JSON.stringify(msg).slice(0, 150)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user