Fix Silas identity/voice leak, avatar gender, and add pre-warm batch gen

session.caller was reading name/voice from CALLER_BASES randomized defaults
instead of the slim bg dict — causing Silas to appear as "Earl" with wrong
voice. Now prefers bg data when populated.

Also: avatar endpoint infers gender from voice pool, /api/callers returns bg
name, regulars get canonical voice force-locked, batch gen splits into two
parallel calls with pre-warm so subsequent resets are instant.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 19:08:46 -06:00
co-authored by Claude Opus 4.6
parent 4e28f3fb84
commit d0bb50fe12
4 changed files with 273 additions and 40 deletions
+1 -1
View File
@@ -324,6 +324,6 @@
</div>
</div>
<script src="/js/app.js?v=27"></script>
<script src="/js/app.js?v=28"></script>
</body>
</html>
+23 -9
View File
@@ -744,18 +744,32 @@ async function newSession() {
await hangup();
}
await fetch('/api/session/reset', { method: 'POST' });
conversationSince = 0;
const btn = document.getElementById('new-session-btn');
const originalText = btn?.textContent;
if (btn) {
btn.disabled = true;
btn.textContent = 'Generating...';
}
// Hide caller background
const bgDetails = document.getElementById('caller-background-details');
if (bgDetails) bgDetails.classList.add('hidden');
try {
await fetch('/api/session/reset', { method: 'POST' });
conversationSince = 0;
// Reload callers to get new session ID
await loadCallers();
await loadShowTheme();
// Hide caller background
const bgDetails = document.getElementById('caller-background-details');
if (bgDetails) bgDetails.classList.add('hidden');
log('New session started - all callers have fresh backgrounds');
// Reload callers to get new session ID
await loadCallers();
await loadShowTheme();
log('New session started - all callers have fresh backgrounds');
} finally {
if (btn) {
btn.disabled = false;
btn.textContent = originalText || 'New Session';
}
}
}