refactor(agent-launch): narrow the launch params by 'in' instead of a cast

This commit is contained in:
Brennan Benson
2026-10-02 02:44:11 -07:00
parent 9e5108af50
commit c9b4dc0578
@@ -32,7 +32,8 @@ export function classifyRuntimeLongPoll(request: RpcRequest): RuntimeLongPollCla
(request.method === 'agent.launch' || request.method === 'agent.launchReplay') &&
typeof request.params === 'object' &&
request.params !== null &&
(request.params as { prompt?: unknown }).prompt !== undefined
'prompt' in request.params &&
request.params.prompt !== undefined
) {
return 'wait'
}