mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 15:52:21 +00:00
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:
1 parent
35ed499ae4
commit
05578c61b9
13 files changed
+998
-139
No files matched your search
+6
-1
@@ -44,7 +44,7 @@ const session = createSessionDiagnostics(() => {
|
||||
navigation: style?._navigation,
|
||||
placeSearch: style?.placeSearch,
|
||||
dataManager: components.data?.dataManager,
|
||||
voice: components.tools?.voiceCommands,
|
||||
voice: layerSession.voice?.commands ?? components.tools?.voiceCommands,
|
||||
annotations: components.tools?.annotations,
|
||||
geoImport: window.__gevGeoImport,
|
||||
drawTool: window.__gevDrawTool,
|
||||
@@ -171,8 +171,13 @@ async function settle() {
|
||||
components.controls.styleManager.shareLinkManager?.resumeNavigation?.();
|
||||
}
|
||||
|
||||
// Voice calls made while the engines switch wait for the next engine
|
||||
// (src/voice/sceneRunner.js); a settled switch lets them look again.
|
||||
layerSession.switching = () => engineSwitch?.state().busy === true;
|
||||
|
||||
function present() {
|
||||
const { kind, busy } = engineSwitch.state();
|
||||
if (!busy) layerSession.voice?.runner.wake();
|
||||
display.presentGlobeEngine({ kind, busy, select });
|
||||
for (const button of loading.querySelectorAll('.engine-switch-retry button'))
|
||||
button.disabled = busy;
|
||||
|
||||
Reference in new issue
Block a user