mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
feat(voice): harden Gemini Live provider integration
This commit is contained in:
1 parent
d4492d8f8c
commit
4fde920665
102 files changed
+28528
-1581
No files matched your search
@@ -330,10 +330,17 @@ export function createPointerTracker({
|
||||
* (open mic only when it moved recently: `recentMs`). The result becomes
|
||||
* the turn's referent (null when stale).
|
||||
*/
|
||||
beginTurn(at, { recentMs = POINTER_FRESH_MS } = {}) {
|
||||
beginTurn(at, { recentMs = POINTER_FRESH_MS, capturedSnapshot } = {}) {
|
||||
const reuse =
|
||||
at !== 'text' && held && now() - held.heldAt <= POINTER_HOLD_MS;
|
||||
const snapshot = reuse ? held.snapshot : capture(at, { recentMs });
|
||||
// A delayed worklet admission may arrive after Space release. The
|
||||
// provider owns this previously captured, local gesture snapshot.
|
||||
const snapshot =
|
||||
capturedSnapshot !== undefined
|
||||
? capturedSnapshot
|
||||
: reuse
|
||||
? held.snapshot
|
||||
: capture(at, { recentMs });
|
||||
if (!reuse && at !== 'text') held = null;
|
||||
active = snapshot?.fresh ? snapshot : null;
|
||||
return snapshot;
|
||||
|
||||
Reference in new issue
Block a user