1982
1983
respondToUserInputRequest(requestId: string, response: ChatInputResponseKind, answers?: Record<string, ChatInputAnswer>): void {
1984
>
// `requestId` is the SDK's `tool_use_id` (interactive tools reuse it as
claudeAgent.ts
1985
>
// the {@link ChatInputRequest.id}); globally unique, so a single
1986
>
// matching chat is all we need. Silent on miss for the same reasons as
1987
>
// {@link respondToPermissionRequest}.
1988
>
for (const sess of this._allLiveSessions()) {
1989
if (sess.respondToUserInputRequest(requestId, response, answers)) {
1990
return;
1991
}
1992
}
1994
1995
/** Every live chat — each session's default chat and its peers. */