Refuse a motion after its reply's fly-to found nothing, also on Gemini

Gemini runs one turn's calls one after another. By the time "pan left" ran beside "fly to Xyzzyville", the lookup had already found nothing, so there was no flight to wait on and the pan moved the old view with ok: true. OpenAI's parallel calls refused the same reply.

The runner now remembers, for the latest reply that sent a voice fly-to, whether one moved the camera and whether one found nothing. A tilt, orbit, pan or rotate of that reply with no flight left to wait on is refused when its fly-to found nothing and none moved. The reply is Gemini's turn, passed as a per-turn reply object, or OpenAI's authorityGroup. A motion in a later reply, or beside a fly-to of the same reply that did land, runs as before.
This commit is contained in:
Sameh Khamis committed 2026-11-05 15:51:14 -08:00
1 parent 1eef14454a
commit dae95e1c7f
5 files changed
+153 -1

No files matched your search

+9
View File
@@ -184,6 +184,9 @@ export class GeminiSessionController {
this.model = null;
this.epoch = 0;
this.turn = 0;
// Identifies one turn's tool calls to the runner as one reply; a new
// object each turn, so no two sessions or turns share it.
this.turnReply = {};
this.globeToolsBlocked = false;
this.globeResetFailed = false;
this.inputGeneration = 0;
@@ -971,6 +974,7 @@ export class GeminiSessionController {
const tools = [...this.tools.values()];
this.turnAbort = new AbortController();
this.turn++;
this.turnReply = {};
this.typedIntent = null;
this.radioStrongerCommit = null;
this.pruneControls();
@@ -1544,6 +1548,7 @@ export class GeminiSessionController {
)
throw new Error(msg('Gemini requested too many simultaneous actions'));
const turn = this.turn;
const reply = this.turnReply;
this.userTurnPending = false;
this.modelComplete = false;
// Admit each valid native call ID once per connection.
@@ -1565,6 +1570,7 @@ export class GeminiSessionController {
const action = new AbortController();
action.call = { id: call.id, name: call.name };
action.sequence = ++this.toolSequence;
action.reply = reply;
this.tools.set(call.id, action);
const priorTools = this.toolQueue;
const args =
@@ -1674,6 +1680,9 @@ export class GeminiSessionController {
this.runAction(call.name, args, {
signal: toolSignal,
callId: call.id,
// Calls run one by one, so a motion can follow a fly-to of the
// same reply that already found nothing.
reply: action.reply,
progress: (update) => {
if (actionCurrent()) this.narration.progress(call.id, update);
},