Spaces:
Running on T4
Running on T4
Update index.html
Browse files- index.html +121 -0
index.html
CHANGED
|
@@ -688,6 +688,65 @@
|
|
| 688 |
.player-btn.primary { width: 40px; height: 40px; }
|
| 689 |
.brand-name { font-size: 1.1em; }
|
| 690 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 691 |
</style>
|
| 692 |
</head>
|
| 693 |
<body>
|
|
@@ -1245,5 +1304,67 @@
|
|
| 1245 |
});
|
| 1246 |
})();
|
| 1247 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1248 |
</body>
|
| 1249 |
</html>
|
|
|
|
| 688 |
.player-btn.primary { width: 40px; height: 40px; }
|
| 689 |
.brand-name { font-size: 1.1em; }
|
| 690 |
}
|
| 691 |
+
|
| 692 |
+
/* ── Unhide the Avatar's actual LLM reasoning (PREDICT line).
|
| 693 |
+
The obfuscated input_controller.js hardcodes `display:none` on
|
| 694 |
+
#brainPrediction as an inline style. `!important` overrides it. */
|
| 695 |
+
#brainPrediction {
|
| 696 |
+
display: block !important;
|
| 697 |
+
margin-top: 6px;
|
| 698 |
+
padding: 8px 10px;
|
| 699 |
+
background: #F0F4F8;
|
| 700 |
+
border: 1px solid #D0D8E0;
|
| 701 |
+
border-radius: 8px;
|
| 702 |
+
font-size: 10px;
|
| 703 |
+
font-family: 'JetBrains Mono', monospace;
|
| 704 |
+
color: #333;
|
| 705 |
+
line-height: 1.45;
|
| 706 |
+
word-break: break-word;
|
| 707 |
+
white-space: pre-wrap;
|
| 708 |
+
}
|
| 709 |
+
#brainPrediction::before {
|
| 710 |
+
content: '🧠 Reasoning';
|
| 711 |
+
display: block;
|
| 712 |
+
font-size: 10px;
|
| 713 |
+
font-weight: 700;
|
| 714 |
+
color: #1D9E75;
|
| 715 |
+
margin-bottom: 3px;
|
| 716 |
+
letter-spacing: 0.2px;
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
/* ── Avatar's first-person inner monologue (THOUGHT field from LLM).
|
| 720 |
+
Injected dynamically as a sibling of #brainResponse by the polling
|
| 721 |
+
script at the end of <body>. */
|
| 722 |
+
#brainInnerThought {
|
| 723 |
+
display: block;
|
| 724 |
+
margin-top: 6px;
|
| 725 |
+
padding: 8px 10px;
|
| 726 |
+
background: #FFF8E1;
|
| 727 |
+
border: 1px solid #F2D98A;
|
| 728 |
+
border-radius: 8px;
|
| 729 |
+
font-size: 11px;
|
| 730 |
+
font-family: 'JetBrains Mono', monospace;
|
| 731 |
+
color: #5C4A10;
|
| 732 |
+
line-height: 1.5;
|
| 733 |
+
font-style: italic;
|
| 734 |
+
word-break: break-word;
|
| 735 |
+
white-space: pre-wrap;
|
| 736 |
+
}
|
| 737 |
+
#brainInnerThought::before {
|
| 738 |
+
content: '💬 Inner Monologue';
|
| 739 |
+
display: block;
|
| 740 |
+
font-size: 10px;
|
| 741 |
+
font-weight: 700;
|
| 742 |
+
font-style: normal;
|
| 743 |
+
color: #B8860B;
|
| 744 |
+
margin-bottom: 3px;
|
| 745 |
+
letter-spacing: 0.2px;
|
| 746 |
+
}
|
| 747 |
+
#brainInnerThought.empty {
|
| 748 |
+
opacity: 0.55;
|
| 749 |
+
}
|
| 750 |
</style>
|
| 751 |
</head>
|
| 752 |
<body>
|
|
|
|
| 1304 |
});
|
| 1305 |
})();
|
| 1306 |
</script>
|
| 1307 |
+
|
| 1308 |
+
<!-- ── Inner-Monologue injector.
|
| 1309 |
+
The obfuscated main.js doesn't read `brain_thought` from /api/status,
|
| 1310 |
+
so this small IIFE polls the same endpoint independently and injects
|
| 1311 |
+
a `#brainInnerThought` sibling next to `#brainResponse` inside the
|
| 1312 |
+
"Avatar's Thoughts" panel as soon as it appears. -->
|
| 1313 |
+
<script>
|
| 1314 |
+
(function(){
|
| 1315 |
+
var POLL_MS = 3000;
|
| 1316 |
+
var current = null;
|
| 1317 |
+
|
| 1318 |
+
function ensureInnerThoughtEl() {
|
| 1319 |
+
var el = document.getElementById('brainInnerThought');
|
| 1320 |
+
if (el) return el;
|
| 1321 |
+
var host = document.getElementById('brainResponse');
|
| 1322 |
+
if (!host || !host.parentNode) return null;
|
| 1323 |
+
el = document.createElement('div');
|
| 1324 |
+
el.id = 'brainInnerThought';
|
| 1325 |
+
el.className = 'empty';
|
| 1326 |
+
el.textContent = 'Awaiting inner thought...';
|
| 1327 |
+
// insert immediately after brainResponse, before brainPrediction
|
| 1328 |
+
host.parentNode.insertBefore(el, host.nextSibling);
|
| 1329 |
+
return el;
|
| 1330 |
+
}
|
| 1331 |
+
|
| 1332 |
+
function updateInnerThought(text) {
|
| 1333 |
+
var el = ensureInnerThoughtEl();
|
| 1334 |
+
if (!el) return;
|
| 1335 |
+
if (text && typeof text === 'string' && text.trim().length > 0) {
|
| 1336 |
+
if (text !== current) {
|
| 1337 |
+
current = text;
|
| 1338 |
+
el.textContent = text;
|
| 1339 |
+
el.classList.remove('empty');
|
| 1340 |
+
}
|
| 1341 |
+
} else {
|
| 1342 |
+
if (current !== null) {
|
| 1343 |
+
current = null;
|
| 1344 |
+
el.textContent = 'Awaiting inner thought...';
|
| 1345 |
+
el.classList.add('empty');
|
| 1346 |
+
}
|
| 1347 |
+
}
|
| 1348 |
+
}
|
| 1349 |
+
|
| 1350 |
+
function poll() {
|
| 1351 |
+
fetch('/api/status', { cache: 'no-store' })
|
| 1352 |
+
.then(function(r){ return r.ok ? r.json() : null; })
|
| 1353 |
+
.then(function(data){
|
| 1354 |
+
if (!data) return;
|
| 1355 |
+
if (data.brain_enabled) {
|
| 1356 |
+
updateInnerThought(data.brain_thought || null);
|
| 1357 |
+
} else {
|
| 1358 |
+
updateInnerThought(null);
|
| 1359 |
+
}
|
| 1360 |
+
})
|
| 1361 |
+
.catch(function(){ /* swallow transient errors */ });
|
| 1362 |
+
}
|
| 1363 |
+
|
| 1364 |
+
setInterval(poll, POLL_MS);
|
| 1365 |
+
// kick off after a short delay so main.js has time to mount the panel
|
| 1366 |
+
setTimeout(poll, 1500);
|
| 1367 |
+
})();
|
| 1368 |
+
</script>
|
| 1369 |
</body>
|
| 1370 |
</html>
|