mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
Merge main into german/i18n-plurals-context
This commit is contained in:
commit
64b9cef14b
209 files changed
+35415
-701
No files matched your search
@@ -12,6 +12,7 @@ import {
|
||||
attachVoiceResult,
|
||||
} from './speech.js';
|
||||
import { resolveDeicticArgs } from './deixis.js';
|
||||
import { isStoriesOpen } from './realtimeInputPolicy.js';
|
||||
export { readLayerLifecycleSummary } from './layerSummary.js';
|
||||
import { defaultGeospatial } from '../search/defaults.js';
|
||||
import { msg } from '../i18n/index.js';
|
||||
@@ -298,6 +299,7 @@ export function createGevActionRunner({
|
||||
styleManager,
|
||||
dataManager,
|
||||
sceneDirector = null,
|
||||
openStories = null,
|
||||
annotations = null,
|
||||
placeSearch = unavailablePlaceSearch,
|
||||
floorServices = defaultFloorServices,
|
||||
@@ -451,6 +453,56 @@ export function createGevActionRunner({
|
||||
const current = () =>
|
||||
!runOptions.signal?.aborted &&
|
||||
(typeof runOptions.isCurrent !== 'function' || runOptions.isCurrent());
|
||||
if (name === 'open_stories') {
|
||||
const denied = { ok: false, action: name, applied: false };
|
||||
const cancelled = {
|
||||
...denied,
|
||||
code: 'CANCELLED',
|
||||
cancelled: true,
|
||||
error: 'This request was superseded.',
|
||||
};
|
||||
if (!current()) return cancelled;
|
||||
if (typeof openStories !== 'function')
|
||||
return {
|
||||
...denied,
|
||||
unavailable: true,
|
||||
error: 'Stories is unavailable in this host.',
|
||||
say: 'Stories is unavailable in this host.',
|
||||
};
|
||||
// Opening Stories can stop the voice session that requested it. The
|
||||
// action was applied even when that session is no longer current.
|
||||
const opened = await openStories({ isCurrent: current });
|
||||
if (opened === true)
|
||||
return {
|
||||
ok: true,
|
||||
action: name,
|
||||
applied: true,
|
||||
say: 'Stories is open.',
|
||||
};
|
||||
if (!current()) return cancelled;
|
||||
if (opened === 'already-open')
|
||||
return {
|
||||
ok: true,
|
||||
action: name,
|
||||
applied: false,
|
||||
say: 'Stories is already open.',
|
||||
};
|
||||
return {
|
||||
...denied,
|
||||
error: 'Stories could not be opened.',
|
||||
say: 'Stories could not be opened.',
|
||||
};
|
||||
}
|
||||
// Stories owns the camera and scenes. Leave the globe behind it alone.
|
||||
if (isStoriesOpen())
|
||||
return {
|
||||
ok: false,
|
||||
action: name,
|
||||
applied: false,
|
||||
refused: 'stories-open',
|
||||
error: 'Stories is open. Close Stories first.',
|
||||
say: 'Stories is open. Close Stories first to control the globe.',
|
||||
};
|
||||
// Step reports for voice narration and the voice card; never fatal.
|
||||
const reportProgress = (step, label = '') => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user