Stabilize TTS voice reload and reconnect logging
This commit is contained in:
+1
-19
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user