You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 417cbc3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(computer-use): show file panels and fresh looks in the same call (#7065)
Two round trips cost an extra call on most saves and refusals:
- A Save or Open panel that the agent's own step opened came back with the step as
file_panel_approval_required. The agent then had to observe again so the broker could apply
the organization's file rule. That rule now runs on the step's own look: by default the panel
is shown in the same receipt, an organization that asks still asks, and one that blocks still
keeps the agent out.
- An act the helper refused before any step started (a dialog opened, the window changed or
another window came in front), or one refused because the helper session was renewed, came
back with no look. These now carry a fresh observation, as refusals inside a batch already
did, so the next call can act. Nothing refused is ever sent again.
Signed-off-by: Jalil <reachjalil@gmail.com>
assert.equal(seen[1]?.args.include_image,false,"the model's screenshot choice still holds");
509
515
516
+
// A refusal the helper gives before any step starts carries no step status: it gets a look too.
517
+
refusal={ok: false,code: "observation_required",message: "A dialog opened or closed since the last observation. Observe again; nothing was sent.",next: "observe"};
518
+
awaitact({action: {type: "press",ref: "e2"}});
519
+
assert.deepEqual(seen.map((call)=>call.name),["computer_act","computer_observe"],"a dialog the last step opened is looked at in this call");
520
+
refusal={ok: false,code: "protected_input",message: "Take over for this step.",next: "human_takeover"};
521
+
awaitact({action: {type: "type",text: "x"}});
522
+
assert.deepEqual(seen.map((call)=>call.name),["computer_act"],"a refusal that hands over gets no look");
if(["computer_act","computer_zoom"].includes(name))returnfailure("observation_required","The internal session was renewed. Observe the current window before input; nothing was dispatched.",{next: "observe",actions_replayed: false});
constrefused=failure("observation_required","The internal session was renewed. Observe the current window before input; nothing was dispatched.",{next: "observe",actions_replayed: false});
1107
+
// The model would observe next: it gets that look now, in this call, as after any refusal before input.
returnwithPostObservation(refused,{ok: true},listed.content,{next: "act",note: "Nothing was sent. Act on this fresh observation."});
1117
+
}
1104
1118
}
1105
1119
if(!["computer_discover","computer_open"].includes(name)&&!current.nativeId)returnfailure("session_required","No session is open. Call computer_open first. Nothing was dispatched.");
0 commit comments