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 03ee789
Browse filesBrowse the repository at this point in the historyBrowse files
fix(agent): a reply-button click is not text the person typed
A reply in the next-step box shows a 1-3 word label; what a click sends is the reply's message, up to 300
characters the agent wrote (visible only as a tooltip). It went through the chat's normal send, so the host
recorded it as typed — and since #112 and #114 that is the person's word: the Ask When Risky reviewer counts
it as authorization, and remember may quote it. A README that steers the agent into a "Yes" button whose
message says more could have turned one click into an explicit go-ahead.
The page now sends a click as a reply ({ type: 'send', reply: true }), and keeps that mark through the queue
(drained at the end of a run, or sent with Send now while idle). handleSend passes typed: false for it, so
the reply reaches the agent as before but is not the person's word. A reply the person edits in the message
box, or that is handed back to it, is sent as their own typing.
Tested: the page's queue functions lifted from chat.html (sent at once, queued while busy, drained, Send now
when idle — the mark survives each, and a typed message carries none); handleSend lifted into
sessionExpiredHost (a reply reaches agentFlow with typed: false, a typed message with true); the button's
click and the send message are pinned from source.
assert.deepStrictEqual(t.calls.flows,[{text: 'Go ahead and push the fix to main.',typed: false},{text: 'Fix it',typed: true}]);
1101
+
});
1102
+
1096
1103
awaittest('…and nothing else does: Retry, Continue and a diagram retry pass words the person did not type here',async()=>{
1097
1104
// The response bar's buttons live in the message switch, which no harness lifts: pinned from source.
1098
-
// Exactly one caller may say `typed: true`, and it is handleSend.
1099
-
assert.strictEqual((src.match(/typed:true/g)||[]).length,1,'another caller marks its goal as typed');
1105
+
// Exactly one caller may pass a typed flag, and it is handleSend (a reply button's click is not typing).
1106
+
assert.strictEqual((src.match(/\{typed:/g)||[]).length,1,'another caller marks its goal as typed');
1100
1107
assert.match(src,/asyncfunctionagentFlow\(text,imageBlocks,opts\)\{[\s\S]{0,4000}?rememberTypedGoal\(text,opts\);/,'agentFlow hands the flag through unchanged');
0 commit comments