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.
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 the platform-managed per-Display-panel transcript from the ChatRequest action, 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).
In FrameworX 10.1.5, the standard operator chat panel pairs ChatSession with the ChatRequest Display Action. No scripting is required:
A TextBox for the user prompt and a Button whose Action is set to ChatRequest (Query tag, Return tag configured in the Action editor).
A ChatSession control bound to the same Display panel. The platform automatically maintains the per-Display-panel transcript — each turn the operator sends is appended to the conversation history server-side; the AI reply is appended after the model responds. The customer does not need to write Script code to manage this collection.
The per-Display-panel transcript is keyed internally by the client connection and resets transparently on operator login change (shift change). It can be disabled solution-wide via the EnableChatHistory bit on SolutionSettings.ModelOptions. See ChatRequest Action Reference for full transcript semantics.
When the conversation source is not the platform-managed transcript — for example, a persisted chat log driven by a Dataset, or a custom in-memory collection a Script assembles — a typical assistant pane 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. |
The properties below also ship with empty descriptions in the auto-generated table. They configure Designer-time and Preview-mode rendering of sample items inside the ChatSession surface. Behaviors are conservative best-effort from the schema shape; consult ControlSchemas.json for the current default value.
Property | Description |
|---|---|
| Number of sample items rendered in the Designer canvas when no live source is bound. Used so the control occupies meaningful space while the Display is being authored. |
| Number of sample items rendered in Preview mode. Lets the author validate scrolling and bubble layout against a representative item count before going live. |
| Comma- or newline-separated sample items rendered inside the control at design time. Each entry produces one preview bubble. Use to visualize the bubble styling without binding a source. |
| Same shape as |
| Outer spacing around preview items, in pixels. Single value applies uniformly; |
| When |
| Same as |
| Serialized render settings applied to Preview-mode items (typography, color overrides, spacing). Edited through the Designer property editor rather than by hand; consult |
| Width of the preview frame within the control, in pixels. Controls how wide each preview bubble may stretch before wrapping. Defaults to the auto-generated design-mode width when unset. |
| Height of the preview frame within the control, in pixels. Combined with |
| Serialized render settings applied to Designer-canvas items (counterpart to |
| Tag expression that caps the maximum number of items the control will render from the bound source. When unset, the full bound collection is rendered. Use for live operator chat panes where the visible history must be bounded to keep the bubble list responsive. |
ChatSession is a rendering control. The Display Actions listed below operate on the server-side transcript that ChatSession displays. Attach them to Buttons on the same Display panel to give operators full control of the conversation lifecycle.
Action | What it does |
|---|---|
Sends the operator’s query to the LLM, manages the per-panel transcript across turns, and dispatches platform tools the model may request. The primary action for an operator chat panel. | |
Wipes the transcript for the addressed chat session immediately, without calling the LLM. Use for “Start new conversation” buttons and shift-handover resets. | |
Summarises the current transcript via one LLM call and atomically replaces it with the summary. Preserves semantic continuity while reducing token cost on long conversations. |