Class ChatFormComponent
java.lang.Object
ai.mindconnect.adminui.ui.component.ChatFormComponent
- All Implemented Interfaces:
UiComponent
The chat-input form at the bottom of a
ChatPage — a single
textarea plus a context-sensitive Send / Stop button.
The component has two visual states:
- idle — textarea is editable, button is a primary "Send" that posts to the streaming chat endpoint.
- streaming — textarea is read-only, button is a danger "Stop" that cancels the in-flight turn via DELETE on the chat endpoint.
The form id is stable across both states so a REPLACE patch can
morph the body without losing the surrounding DOM context; the
textarea's id is also stable so ignoreActiveValue on the
morpher preserves anything the user has already typed.
-
Constructor Summary
ConstructorsConstructorDescriptionChatFormComponent(UUID sessionId, UUID agentId) ChatFormComponent(UUID sessionId, UUID agentId, boolean streaming) -
Method Summary
Modifier and TypeMethodDescriptionid()The DOM id this component renders with.ai.mindconnect.ui.model.UiNoderender()Renders the composer in whichever state matches the live stream registry.ai.mindconnect.ui.model.UiPatch.Operationreset()REPLACE that resets the form to its idle state (Send button, editable textarea, no buffered text).ai.mindconnect.ui.model.UiPatch.OperationtoIdle()Alias forreset(), named after the visual state for callers that prefer theidle/streamingvocabulary.ai.mindconnect.ui.model.UiPatch.OperationREPLACE that swaps the Send button for a Stop button and locks the textarea as read-only.
-
Constructor Details
-
ChatFormComponent
-
ChatFormComponent
-
-
Method Details
-
id
Description copied from interface:UiComponentThe DOM id this component renders with. Patch operations targeting this component (REPLACE / CLEAR / REMOVE) use this id, so it must match the id on the rootUiNodereturned byUiComponent.render().- Specified by:
idin interfaceUiComponent
-
render
public ai.mindconnect.ui.model.UiNode render()Renders the composer in whichever state matches the live stream registry.- Specified by:
renderin interfaceUiComponent
-
reset
public ai.mindconnect.ui.model.UiPatch.Operation reset()REPLACE that resets the form to its idle state (Send button, editable textarea, no buffered text). Used after a turn completes — both on the streaming and the non-streaming path. -
toStreaming
public ai.mindconnect.ui.model.UiPatch.Operation toStreaming()REPLACE that swaps the Send button for a Stop button and locks the textarea as read-only. Used at the start of a streaming turn. -
toIdle
public ai.mindconnect.ui.model.UiPatch.Operation toIdle()Alias forreset(), named after the visual state for callers that prefer theidle/streamingvocabulary.
-