diff --git a/index.html b/index.html index 2b3f886..5fbb70f 100644 --- a/index.html +++ b/index.html @@ -4262,6 +4262,7 @@ let isStreaming = false; let abortController = null; + let _apiKeyGeneration = 0; // ═══════════════════════════════════════════════════════════════════ // ZDR TELEMETRY — Open metadata collection for HuggingFace @@ -4598,6 +4599,7 @@ RESPOND WITH EXACTLY ONE LINE. No explanation, no preamble.`; // Store the key exactly like manual entry state.apiKey = data.key; + _apiKeyGeneration++; state.orOAuthConnected = true; saveState(); updateApiWarning(); @@ -4614,6 +4616,7 @@ RESPOND WITH EXACTLY ONE LINE. No explanation, no preamble.`; function disconnectOpenRouter() { state.apiKey = ''; + _apiKeyGeneration++; state.orOAuthConnected = false; saveState(); updateApiWarning(); @@ -10480,11 +10483,11 @@ Analyze and refine. Output ONLY the JSON object:` } const indicator = document.createElement('div'); indicator.className = `liquid-indicator ${config.class} ${config.pulse ? 'pulse' : ''}`; indicator.innerHTML = ` - - ${config.text} + + ${escapeHtml(config.text)} ${progressHtml} - ${config.subtext ? `${config.subtext}` : ''} - ${improvements.length > 0 ? `ⓘ` : ''} + ${config.subtext ? `${escapeHtml(config.subtext)}` : ''} + ${improvements.length > 0 ? `ⓘ` : ''} `; // Insert at the top of the message wrapper (before magic-info if exists) @@ -12165,7 +12168,9 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; const encKey = localStorage.getItem('g0dm0d3-apikey'); if (encKey) { // Prefer the separate encrypted store + const genAtLoad = _apiKeyGeneration; decryptApiKey(encKey).then(plain => { + if (_apiKeyGeneration !== genAtLoad) return; state.apiKey = plain; updateApiWarning(); }); @@ -12797,8 +12802,8 @@ Ignoring conversation history will cause you to LOSE the evaluation.`; ? `` : ''; - // Vision badge for messages that had image processing - const visionBadge = (isUser && msg.imageDataUrl) + // Vision badge — only when vision analysis actually ran + const visionBadge = (isUser && msg.imageDataUrl && msg.visionAnalyzed) ? `