diff --git a/apps/host/tests/helpers/scripted-worker.mjs b/apps/host/tests/helpers/scripted-worker.mjs index 360c6ecd..2ebee5e8 100644 --- a/apps/host/tests/helpers/scripted-worker.mjs +++ b/apps/host/tests/helpers/scripted-worker.mjs @@ -127,6 +127,11 @@ export async function startScriptedWorker({ port = 0, chunkDelayMs = 40, model = } if (directive?.[1] === 'planslow') return say(['## Slow plan\n\n', '1. First thing SCRIPT:goalstep\n', '2. A step that never finishes SCRIPT:slow 4000\n', '3. Third thing SCRIPT:goalstep\n']); if (directive?.[1] === 'planreply') return say(['I looked around the folder first.\n\n## The pagoda plan\n\n', '1. First thing SCRIPT:goalstep\n', '2. Second thing SCRIPT:goalstep\n', '3. Third thing SCRIPT:goalstep\n']); + if (directive?.[1] === 'multi' && last.role === 'tool') { + let cfg = {}; + try { cfg = JSON.parse((directive[2] ?? '').trim()); } catch { /* a test bug */ } + return say([String(cfg.say ?? 'Done.')]); + } if (last.role === 'tool') { const result = text(last).replace(/\s+/g, ' ').slice(0, 120); return say(['Tool finished. ', `Result: ${result}`]);