Constructs an instance of ChatController.
Optionaloption: ChatOptionThe chat options.
Adds a message to the chat.
The message to add.
A Promise resolving to the index of the added message.
Adds an event handler for action changed.
The event handler to add.
Adds an event handler for messages changed.
The event handler to add.
Cancels the current action request.
Clears all messages from the chat.
Removes a message from the chat.
The index of the message to remove.
Removes an event handler for action changed.
The event handler to remove.
Removes an event handler for messages changed.
The event handler to remove.
Sets the action request and its response handlers.
The action request.
OptionalonResponse: OnActionResponsedThe response handler.
A Promise resolving to the action response.
Sets the action response and triggers related actions.
The action request.
The action response.
A Promise resolving when the action response is processed.
Updates a message in the chat.
The index of the message to update.
The updated message.
Class representing a Chat Controller.