mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
- Defaults and config aligned with English-first product surface - Adds/removes ASR/TTS paths; drops China-only provider implementations and bundled SenseVoice assets - Westernizes prompts, plugin/tool copy, connection and handler behavior on upstream fixes - Powermem max_tokens and OpenAI no-thinking guard preserved on downstream path
27 lines
851 B
JavaScript
27 lines
851 B
JavaScript
// Background image load check.
|
|
(function() {
|
|
const backgroundContainer = document.getElementById('backgroundContainer');
|
|
|
|
// Extract the background image URL.
|
|
let bgImageUrl = window.getComputedStyle(backgroundContainer).backgroundImage;
|
|
const urlMatch = bgImageUrl && bgImageUrl.match(/url\(["']?(.*?)["']?\)/);
|
|
|
|
if (!urlMatch || !urlMatch[1]) {
|
|
console.warn('Could not extract a valid background image URL.');
|
|
return;
|
|
}
|
|
|
|
bgImageUrl = urlMatch[1];
|
|
|
|
const bgImage = new Image();
|
|
bgImage.onerror = function() {
|
|
console.error('Failed to load the background image:', bgImageUrl);
|
|
};
|
|
|
|
// Show the model loading indicator once the background is ready.
|
|
bgImage.onload = function() {
|
|
modelLoading.style.display = 'flex';
|
|
};
|
|
|
|
bgImage.src = bgImageUrl;
|
|
})();
|