summaryrefslogtreecommitdiff
path: root/tests/fake-agy.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fake-agy.lua')
-rw-r--r--tests/fake-agy.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/fake-agy.lua b/tests/fake-agy.lua
index 4f76d8d..b1537ad 100644
--- a/tests/fake-agy.lua
+++ b/tests/fake-agy.lua
@@ -141,11 +141,20 @@ elseif resumed then local resumed_prompt=prompt('resume'); check_relay(); finish
if current~='boundary workflow notice' then assert(text:find('[Assistant]: primary-tool-ok',1,true)) end
if current=='branch-probe' then
finish(q,'branch-seed-ok'); finish(prompt('warm-probe'),'warm-after-seed-ok')
+ local esc=prompt('esc-probe')
+ send({method='session/update',params={sessionId='test-session',update={
+ sessionUpdate='agent_message_chunk',content={type='text',text='esc-window-open'},
+ }}})
+ local cancel=request('session/cancel'); assert(cancel.id==nil and cancel.params.sessionId=='test-session')
+ reply(esc,{stopReason='cancelled'})
+ finish(prompt('after-esc-probe'),'after-esc-ok')
reply(prompt('cancel-probe'),{stopReason='cancelled'})
elseif current=='boundary workflow notice' then
assert(text:find('[User]: boundary steer',1,true) and text:find('[Tool result',1,true)); finish(q,'proceed-recovered-ok')
else
- assert(current=='cold-probe' and text:find('[Assistant]: warm-after-seed-ok',1,true)); finish(q,'cold-resume-ok')
+ assert(current=='cold-probe' and text:find('[Assistant]: warm-after-seed-ok',1,true)
+ and text:find('[User]: esc-probe',1,true) and not text:find('esc-window-open',1,true)
+ and text:find('[Assistant]: after-esc-ok',1,true)); finish(q,'cold-resume-ok')
end
else
q = prompt('hello')