Class representing a Chat Controller.

Constructors

Methods

  • Adds a message to the chat.

    Parameters

    • message: Message<any>

      The message to add.

    Returns Promise<number>

    A Promise resolving to the index of the added message.

  • Cancels the current action request.

    Returns void

  • Clears all messages from the chat.

    Returns void

  • Removes a message from the chat.

    Parameters

    • index: number

      The index of the message to remove.

    Returns void

  • Sets the action response and triggers related actions.

    Parameters

    Returns Promise<void>

    A Promise resolving when the action response is processed.

  • Sets the messages in the chat.

    Parameters

    • messages: Message<any>[]

      The messages to set.

    Returns void

  • Updates a message in the chat.

    Parameters

    • index: number

      The index of the message to update.

    • message: Message<any>

      The updated message.

    Returns void