AIToolAuthorizationPrompt
Asks the person a tool call waits for to sign in at the provider it needs: the sign-in its ai_tool_call step carries (status awaiting_authorization, with authorization). Connect hands the sign-in page to the approver's AIToolAuthorizer, which opens it. Once the provider has answered, your backend updates the step and the call goes on. It shows only to that person, only while the call waits, and only with an AIToolAuthorizer, so it can sit under every tool call. Once the sign-in's AIToolAuthorization.expiresAt passes, it says so and stops offering Connect:
AIToolCall(part = call)
AIToolAuthorizationPrompt(call = call, approver = approver)By default it asks with ChatAiComponentFactory.AIToolAuthorizationContent, an AIToolAuthorizationCard. To ask in your own design, return yours there, or pass the content. It gets the sign-in, where the answer is, and functions that connect and decline:
AIToolAuthorizationPrompt(call = call, approver = approver) { authorization, state, connect, decline ->
MySignInCard(authorization.title, busy = state.isBusy, onConnect = connect, onNotNow = decline)
}Parameters
The tool call.
Who answers on this device, with the AIToolAuthorizer the sign-in needs.
The modifier to apply to the sign-in.
The style of the sign-in's question, handed to the default content.
The palette of the sign-in, handed to the default content.
Shows the sign-in. Defaults to ChatAiComponentFactory.AIToolAuthorizationContent.