Display a chat conversation thread between an end-user and an AI model.
Reference → Controls → Interaction → ChatSession
The ChatSession control belongs to the Interaction category and runs on the Portable rendering target (WPF rich client and HTML5/WASM). Place it on a Display from the Components Panel and configure the properties listed below.
ChatSession renders a vertical, auto-scrolling list of message bubbles, visually distinguishing user messages from AI messages. It is the standard FrameworX surface for an operator chat or LLM-assistant pane inside a SCADA/HMI Display — pair it with a Dataset, an in-memory List Tag, or a Script-returned collection to drive the conversation, and with the ChatRequest Script API (HTTP verb CHAT) to dispatch prompts to a backing language model.
ChatSession is the FrameworX Display control for conversational AI inside a process-control or operator console. It renders a scrolling thread of message bubbles bound to an items source — typically a Dataset table, a List-typed Tag, or a Script-returned collection — where each item carries a role (user vs AI) and a body text. The control inspects each item's role value, compares it against UserRoleValue and AIRoleValue, and styles the bubble accordingly (alignment, colors, corner shaping).
A typical assistant pane in an operator Display wires three pieces:
A TextBox for the user prompt and a Button whose Action invokes a Script.
A Server-side Script that appends the user message to the conversation collection, then calls an LLM via the FrameworX HTTP CHAT verb (routed through the in-product ChatSession orchestrator and the ChatRequest API). On response, the Script appends the AI reply to the same collection.
A ChatSession control bound to that collection. The control re-renders on any collection change, and — when AutoScrollToBottom is true — brings the newest message into view automatically.
Because the control runs on the Portable target, the same Display works in the WPF Rich Client and in the HTML5/WASM Smart Client without modification.
ChatSession uses the standard FrameworX itemized-source pattern. The conversation collection is provided through three coordinated properties:
Property | Use in an AI chat pattern |
|---|---|
| Selects the kind of source. Use |
| The actual source reference, interpreted per |
| Legacy source-selection mode kept for compatibility; new Displays should prefer |
Whichever source is chosen, each item must expose a role value comparable to UserRoleValue / AIRoleValue and a body text. For Dataset sources, name the role column and body column to match what the Script appends; for List-Tag sources, define a UserType with at least Role and Body members.
Property set auto-extracted from ControlSchemas.json (build fx-10.1.5.2000, schema 1.0, generated 2026-05-17T21:29:29.5050227Z).
Property | Type | Default | Description |
|---|---|---|---|
|
| 0 | X position from left edge (unit: pixels) |
|
| 0 | Y position from top edge (unit: pixels) |
|
| 100 | Element width (unit: pixels) |
|
| 100 | Element height (unit: pixels) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| 100 | (no description in schema) |
|
| (none) | (no description in schema) |
|
| 100 | (no description in schema) |
|
| (none) | (no description in schema) |
|
| 5 | (no description in schema) |
|
| (none) | (no description in schema) |
|
| (none) | (no description in schema) |
|
| 0 | Data source type: Designer (static list), ArrayTag (tag array), DataTable |
|
| (none) | Source kind: Text (static list via ItemsList), ArrayTag (array tag values), DataTable (Dataset Query or Table — FK pattern). For FK dropdowns use DataTable + ItemsSourceLink='@Dataset.Query.X' + DisplayMemberPath + SelectedValuePath. |
|
| (none) | Source for populating list items. Interpretation depends on ItemsSourceType: Text → @Tag.OptionsList (array or CSV tag) ArrayTag → @Tag.ArrayOfStrings DataTable → @Dataset.Query.NameOfQuery (RECOMMENDED for FK dropdowns) In DataTable mode the ComboBox auto-fires the backing query at display-open — no script Select() needed. |
|
| (none) | Tag that triggers list refresh when its value changes |
|
| 0 | (no description in schema) |
|
| (none) | Background color (#AARRGGBB). Themed by default — OMIT to use theme. |
|
| (none) | Text/foreground color (#AARRGGBB). Themed by default — OMIT to use theme. |
|
| (none) | Border color (#AARRGGBB). |
|
| (none) | Border thickness (single value or 'left,top,right,bottom'). |
The auto-generated table above ships with empty descriptions for several ChatSession-specific properties. Until the next schema regeneration carries the descriptions through, use the editorial notes below.
Property | Description |
|---|---|
| When |
| The string the control treats as the user role marker. Each item in the bound collection whose role field equals this value is rendered as a user bubble (right-aligned by default). May be a literal (e.g. |
| The string the control treats as the AI role marker. Items whose role field equals this value render as AI bubbles (left-aligned by default). May be a literal (e.g. |
| Corner rounding of each message bubble, in pixels. |