Class AiMessageList.RetryEvent

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<AiMessageList>
io.jmix.aichat.component.messagelist.AiMessageList.RetryEvent
All Implemented Interfaces:
Serializable
Enclosing class:
AiMessageList

@DomEvent("retry") public static class AiMessageList.RetryEvent extends com.vaadin.flow.component.ComponentEvent<AiMessageList>
Fired when the user clicks the retry action of the error banner. The application decides what to do (typically: reset the state to GenerationState.GENERATING and re-run the stream for the user's last prompt).
See Also:
  • Constructor Details

    • RetryEvent

      public RetryEvent(AiMessageList source, boolean fromClient)
      Creates the event.
      Parameters:
      source - the source component
      fromClient - true if the event comes from the client
  • Method Details

    • getUserMessage

      public @Nullable AiMessageListItem getUserMessage()
      The user message whose response failed — i.e. the prompt to re-send. The assistant message is intentionally not exposed: it may be empty or only partially generated. How to re-run is the application's decision. Resolved against the list's current items when this method is called, not captured at event time.
      Returns:
      the last MessageRole.USER item, or null