Class TimelineAssistantThinkingMessageItem

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.HorizontalLayout>
io.jmix.aitoolsflowui.view.chat.renderer.component.AbstractTimelineItem
io.jmix.aitoolsflowui.view.chat.renderer.component.TimelineAssistantThinkingMessageItem
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class TimelineAssistantThinkingMessageItem extends AbstractTimelineItem implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Row shown while the assistant is preparing a response. Displays a shimmer indicator, the latest live status, and a history of prior steps delivered by AI tools through AiToolStatusPublisher.

Each AiToolStatusUpdate carries a message and an optional resultSnippet; AiToolStatusUpdate.isCompleted() is true when the snippet is non-blank. Completed past steps are prefixed with a "✓ " check mark and their snippet is rendered next to the base text; in-flight past steps render plain (no check, no snippet).

See Also:
  • Field Details

  • Constructor Details

    • TimelineAssistantThinkingMessageItem

      public TimelineAssistantThinkingMessageItem()
  • Method Details

    • setApplicationContext

      @NullMarked public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • initComponent

      protected void initComponent()
    • setThinking

      public void setThinking(TimelineItem item, String assistantName, String defaultThinkingIndicatorText)
      Renders the "thinking" row: the latest live status, a shimmer indicator and the history of prior steps carried by the given item.
      Parameters:
      item - thinking timeline item carrying the status updates
      assistantName - actor display name shown in the header
      defaultThinkingIndicatorText - text shown while no status update has arrived yet
    • createThinkingStatusList

      protected com.vaadin.flow.component.Component createThinkingStatusList(List<TimelineItemStatus> statusUpdates)
    • buildStatusSpan

      protected com.vaadin.flow.component.html.Span buildStatusSpan(TimelineItemStatus update)
    • buildStatusSpan

      protected com.vaadin.flow.component.html.Span buildStatusSpan(TimelineItemStatus update, String mainClass, boolean completedPrefix)
    • resolveActiveStatus

      protected TimelineItemStatus resolveActiveStatus(List<TimelineItemStatus> statusUpdates, String defaultThinkingIndicatorText)
    • setAiAvatarIconSupplier

      @NullMarked public void setAiAvatarIconSupplier(@Nullable com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.component.Component> avatarIconSupplier)
      Sets the supplier of the avatar icon shown for this row. The supplier must return a fresh component on every call.
      Parameters:
      avatarIconSupplier - supplier of the avatar icon, or null to render no icon
    • createAvatar

      protected com.vaadin.flow.component.Component createAvatar(String actorName)
      Specified by:
      createAvatar in class AbstractTimelineItem