Fix listen button not disabling when agent selected

- Add fallback direct DOM manipulation in agents.js selectAgent()
- Fix setListeningPostRunning to check agent mode before re-enabling button
- Add debug logging for button state changes
This commit is contained in:
cemaxecuter
2026-01-27 11:44:30 -05:00
parent a0fd6d9651
commit 077d46f319
2 changed files with 20 additions and 2 deletions

View File

@@ -2474,8 +2474,10 @@ function setListeningPostRunning(isRunning, agentId = null) {
// Update status
updateScannerDisplay('IDLE', 'var(--text-secondary)');
// Re-enable listen button
updateListenButtonState(false);
// Only re-enable listen button if we're in local mode
// (agent mode can't stream audio over HTTP)
const isAgentMode = typeof currentAgent !== 'undefined' && currentAgent !== 'local';
updateListenButtonState(isAgentMode);
// Clear polling
if (listeningPostPollTimer) {