mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
Merge remote-tracking branch 'upstream/main' into core-rb2
# Conflicts: # CHANGELOG.md # build/vite.js # scripts/package-boundaries.json # server/standalone/vite.config.js # src/app/scene.js # src/layers/vessels/queries.js # src/standalone/application.js # src/tooling/viteBuild.test.mjs # src/ui/cockpitInstruments.js # src/ui/layerPanel.js # src/ui/panelPositionControls.js
This commit is contained in:
commit
71f7a58169
475 files changed
+67826
-4965
No files matched your search
@@ -80,6 +80,9 @@ export class RealtimeInput {
|
||||
// never surprise the user by muting a click-started conversation.
|
||||
if (this.isActive() && !this.pushToTalkMode) return;
|
||||
this.cancelPushToTalkHold();
|
||||
// Point-and-ask: the user decided to ask at keydown, so that is where
|
||||
// the pointer is read. A short tap releases it below.
|
||||
this.holdPointer?.();
|
||||
const holdGeneration = ++this.pushToTalkHoldGeneration;
|
||||
this.pushToTalkHoldTimer = setTimeout(() => {
|
||||
this.pushToTalkHoldTimer = null;
|
||||
@@ -103,9 +106,16 @@ export class RealtimeInput {
|
||||
) {
|
||||
this.pushToTalkHoldControl.blur();
|
||||
}
|
||||
// Read Radio's claim before pausing it: pausing can change the very
|
||||
// handoff state that decides whether voice may interrupt.
|
||||
const mayInterrupt = this.mayClaimSpeaker?.() ?? true;
|
||||
this.pauseRadioForVoice();
|
||||
this.pushToTalkKeyHeld = true;
|
||||
if (this.isActive()) {
|
||||
// A claimed hold is an explicit request to speak: cut the assistant
|
||||
// off if it is talking. Short taps never reach this point.
|
||||
if (mayInterrupt) this.bargeIn?.();
|
||||
this.beginPointerTurn?.('keydown');
|
||||
this.ui.root.dataset.pushToTalk = 'held';
|
||||
this.setMicrophoneEnabled(true);
|
||||
if (this.status === 'listening')
|
||||
@@ -128,6 +138,7 @@ export class RealtimeInput {
|
||||
this.spaceKeyHeld = false;
|
||||
this.cancelPushToTalkHold();
|
||||
if (!this.pushToTalkKeyHeld) {
|
||||
if (wasHoldingSpace) this.releasePointerHold?.();
|
||||
if (wasHoldingSpace && !preservedNativeActivation)
|
||||
event.preventDefault();
|
||||
this.resetPushToTalkGesture();
|
||||
@@ -179,6 +190,8 @@ export class RealtimeInput {
|
||||
*/
|
||||
releasePushToTalkKey() {
|
||||
this.cancelPushToTalkHold();
|
||||
// The pointer snapshot belongs to this gesture; release or blur ends it.
|
||||
this.releasePointerHold?.();
|
||||
if (!this.pushToTalkKeyHeld) return;
|
||||
this.pushToTalkKeyHeld = false;
|
||||
delete this.ui.root.dataset.pushToTalk;
|
||||
|
||||
Reference in new issue
Block a user