Stabilize TTS voice reload and reconnect logging

This commit is contained in:
2026-05-19 17:08:48 +02:00
parent df5933c194
commit b911c40d89
6 changed files with 148 additions and 27 deletions
+1 -19
View File
@@ -245,6 +245,7 @@
border: 1px none rgba(255,255,255,0);
}
</style>
<script src="/js/logger.js?v=20260519-logger"></script>
</head>
<body>
<!-- Debug output area -->
@@ -279,25 +280,6 @@
console.log(message);
};
</script>
<script>
// Redefine console.log to expose browser logs to model
const originalLog = console.log;
console.log = function(...args) {
if (typeof debug !== 'undefined' && debug) {
const debugContent = document.getElementById('debug-content');
if (debugContent) {
const logMsg = document.createElement('div');
// Convert all arguments to string and join them
logMsg.textContent = args.map(arg =>
typeof arg === 'object' ? JSON.stringify(arg) : String(arg)
).join(' ');
debugContent.appendChild(logMsg);
}
}
// Pass all arguments to the original console.log
originalLog.apply(console, args);
};
</script>
<script type="module" src="/js/loader.js?v=20260516-scroll-window"></script>
</body>
</html>