Keep an active voice session through engine switches

The page creates the voice once; each engine attachment only gives it that scene's action runner, pointer canvas and annotation events. Calls made during a switch wait for the incoming engine and are refused with ENGINE_SWITCHING when none attaches in time; results name the engine that answered, and the session hears engine-changed after a switch. The analyst's follow-up memory and layer enable times outlive one engine's runner. scripts/qa-voice-engine-switch.mjs drives a fake microphone and Realtime transport through the switches.
This commit is contained in:
German Khokhlov committed 2026-11-03 17:20:40 +04:00
1 parent 35ed499ae4
commit 05578c61b9
13 files changed
+998 -139

No files matched your search

+4 -3
View File
@@ -6,10 +6,11 @@ import { VOICE_PROVIDERS } from './providerCapabilities.js';
import { t } from '../i18n/index.js';
function createDefaultReticle(pointer) {
const element = pointer?.element;
if (!element?.ownerDocument) return null;
// A pointer may follow another element later (an engine switch), so the
// reticle reads it each time; a page without a document has none.
if (!pointer || !globalThis.document) return null;
return new PointerReticle({
rectOf: () => element.getBoundingClientRect?.() || null,
rectOf: () => pointer.element?.getBoundingClientRect?.() || null,
});
}