Class BuilderAiChat
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.html.Div>
io.jmix.aichat.component.chat.AiChat<SimpleAiChatMessage>
io.jmix.dynmodelaiflowui.view.builder.BuilderAiChat
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.shared.HasThemeVariant<AiChatVariant>,HasActions,HasSubParts,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
@CssImport(value="./dmagent/builder-snapshot-links.css",
themeFor="jmix-ai-markdown")
@JsModule("./dmagent/builder-snapshot-links.js")
public class BuilderAiChat
extends AiChat<SimpleAiChatMessage>
Local presentation extension; no files, publication or Agent state are owned by AiChat.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.aichat.component.chat.AiChat
AiChat.CurrentSessionAttributes, AiChat.LlmRequest, AiChat.ProjectingThemeList -
Field Summary
Fields inherited from class io.jmix.aichat.component.chat.AiChat
actionsSupport, activeAssistantItem, activeBuffer, applicationContext, attachmentResources, attachmentsEnabledListeners, currentStream, defaultI18n, defaultMessageFactory, emptyStateFooter, emptyStateHeader, fileStorageLocator, i18n, items, itemsChangeRegistration, lastAssistantMessage, lastUserAttachments, lastUserMessage, liveRegion, llmProvider, messageFactory, messageInput, messageList, removeDelegate, saveDelegate, sourceOrderWarned, state, systemPrompt -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidWires the inner input/list and the message source.protected voidonAttach(com.vaadin.flow.component.AttachEvent event) protected AiMessageListItemtoListItem(SimpleAiChatMessage message) Maps a data message to a rendered list item, rejecting anullrole as a contract violation.Methods inherited from class io.jmix.aichat.component.chat.AiChat
addAction, addAssistantAction, addAttachmentClickListener, addAttachmentRejectedListener, addAttachmentsEnabledChangeListenerInternal, addGenerationFailedListener, addGenerationStateChangeListener, addMessageChangeListener, addUserAction, afterPropertiesSet, announce, bindItems, buildRequest, cancelGeneration, checkAttached, checkLlmProviderConfigured, checkMessageFactoryConfigured, commitMessage, createActionsSupport, createMessageInput, createMessageList, currentHttpSession, describe, failGeneration, findPromptIndex, findSlotSubPart, finishGeneration, fireMessageChange, getAcceptedFileExtensions, getAcceptedMimeTypes, getAction, getActions, getActionsSupport, getAssistantActions, getDefaultMessageFactory, getEmptyStateFooter, getEmptyStateHeader, getEnterAction, getI18n, getInputFooterComponent, getInputHeaderComponent, getInputPrefixComponent, getInputSuffixComponent, getItems, getLlmProvider, getMaxFiles, getMaxFileSize, getMaxRows, getMessageFactory, getMessageInputInternal, getRemoveDelegate, getSaveDelegate, getState, getSubPart, getSystemPrompt, getThemeNames, getThinkingIndicator, getThinkingStages, getThinkingStatusPublisher, getUserActions, imageUrl, initContent, initI18n, isAnnounceMessages, isAttachmentsEnabled, isUploadDropZoneEnabled, onComplete, onDetach, onError, onItemsChanged, onToken, prompt, promptAttachments, rebuild, regenerate, regenerate, regenerateAt, regenerateFrom, removeAction, removeLastAssistant, removeMessage, requireFactory, resolveAnnouncement, runWithGenerationContext, send, setAcceptedFileExtensions, setAcceptedMimeTypes, setAnnounceMessages, setApplicationContext, setAssistantActions, setAttachmentsEnabled, setEmptyStateFooter, setEmptyStateHeader, setEnterAction, setI18n, setInputFooterComponent, setInputHeaderComponent, setInputPrefixComponent, setInputSuffixComponent, setItems, setItems, setItems, setLlmProvider, setMaxFiles, setMaxFileSize, setMaxRows, setMessageFactory, setRemoveDelegate, setSaveDelegate, setState, setSystemPrompt, setThinkingIndicator, setThinkingStages, setUploadDropZoneEnabled, setUserActions, stop, stream, targetMessageAction, toDisplayAttachment, toRenderRole, updateEmptyState, warnIfSourceOutOfOrderMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface io.jmix.flowui.kit.component.HasActions
addAction, removeAction, removeAllActionsMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, bindThemeVariants, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariants
-
Constructor Details
-
BuilderAiChat
public BuilderAiChat()
-
-
Method Details
-
initComponent
protected void initComponent()Description copied from class:AiChatWires the inner input/list and the message source. Runs fromAiChat.afterPropertiesSet(), after the application context is injected — not from the constructor.- Overrides:
initComponentin classAiChat<SimpleAiChatMessage>
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent event) - Overrides:
onAttachin classAiChat<SimpleAiChatMessage>
-
toListItem
Description copied from class:AiChatMaps a data message to a rendered list item, rejecting anullrole as a contract violation.Carries the source message onto the item, which is what lets a per-message action and an attachment click resolve back to the domain message. The streaming placeholder is built outside this method and deliberately carries none.
- Overrides:
toListItemin classAiChat<SimpleAiChatMessage>- Parameters:
message- the data message- Returns:
- the rendered item
-