Fix ReferenceError: streamingTTS is not defined in chat error handler
Some checks are pending
CI / Focused test guidance (report-only) (push) Waiting to run
CI / Python syntax (compileall) (push) Waiting to run
CI / JS syntax (node --check) (push) Waiting to run
CI / Python tests (pytest) (push) Waiting to run
Container scan / hadolint (Dockerfile lint) (push) Waiting to run
Container scan (Trivy) / Trivy (image scan, advisory) (push) Waiting to run
Container scan (Trivy) / Trivy (image scan + SARIF upload) (push) Waiting to run
Dependency review / dependency-review (PR gate) (push) Waiting to run
Dependency review / pip-audit (advisory) (push) Waiting to run
ci / docker publish / build (amd64) (push) Waiting to run
ci / docker publish / build (arm64) (push) Waiting to run
ci / docker publish / merge manifest + tag (push) Blocked by required conditions
Secret scan / gitleaks (push) Waiting to run
Workflow security / actionlint (push) Waiting to run
Workflow security / zizmor (Actions SAST) (push) Waiting to run

streamingTTS const is out of scope in the catch block at handleChatSubmit.
Replaced with direct window.aiTTSManager check using optional chaining.
This commit is contained in:
Lukas Parsons 2026-07-07 00:23:10 -04:00
parent 9cbe6a165b
commit 6918d9417f

View file

@ -3036,7 +3036,7 @@ import { wireArrowUpRecall, getLastUserMessageFromChatHistory } from './composer
}
} else {
// Stop streaming TTS on any error/abort
if (streamingTTS && window.aiTTSManager) window.aiTTSManager.stop();
if (window.aiTTSManager?.autoPlay && window.aiTTSManager?.available) window.aiTTSManager.stop();
if (currentAbort && currentAbort.signal.aborted) {
const abortReason = currentAbort._reason || '';