Fired AFTER the response form's values have been submitted. Carries the form id (using the message ID as a stable per-message identifier) and the submitted values map. Not fired when beforeResponseFormSubmitted was canceled.
Allow deleting the user's own messages (the per-message delete button).
Allow editing the user's own messages (the per-message edit button).
Allow pinning messages (the per-message pin button).
OptionalartifactAll distinct artifacts attached to this message, each at its latest version.
Preferred over the single artifact/artifactVersion inputs above (which are
retained for backward compatibility and kept pointed at the first entry).
OptionalartifactThe last assistantAvatarUrl failed to load — fall back to the icon branch.
Host override for the AI message display name (white-label persona). Null = the agent record's name.
Cancelable — fired BEFORE the response form's values are sent back as a new
conversation message. Listeners may set event.Cancel = true to halt the
submission (e.g., a validation pass that finds required fields unfilled).
When canceled, the corresponding afterResponseFormSubmitted event is
NOT fired and suggestedResponseSelected is NOT emitted.
Follows MJ's established Before/After cancelable event pattern.
Optional additive per-message slot template (forwarded from chat-area's
mjChatSlot="messageExtra"). Rendered inside the bubble after the message
content, before attachments. Receives the message as $implicit + a named
message context binding. Null when no consumer template is projected.
If specified, this provider will be used for communication and for all metadata purposes. By default, if not provided, the Metadata and RunView classes are used for this and the default GraphQLDataProvider is used which is connected to the same back-end MJAPI instance as the Metadata and RunView classes. If you want to have this component connect to a different MJAPI back-end, create an instance of a ProviderBase sub-class like GraphQLDataProvider/etc, and configure it as appropriate to connect to the MJAPI back-end you want to use, and then pass it in here.
OptionalratingsShow the per-message agent run-detail grid (run ID, step/token counts, $ cost).
Show the per-message thumbs rating control on completed AI messages.
Show the per-message reaction buttons (like / comment).
StaticɵdirStaticɵfacGet formatted duration for the agent run For active runs: Calculate from created to NOW (live updates) For completed runs: Calculate from created to updated timestamp (static)
Get number of steps in the agent run
Get total cost of the agent run
Get total tokens used in the agent run
The agent identity as shown in the UI: the ENGINE-resolved identity (see
engineAgentInfo) with the host's assistantDisplayName override
applied to the name when set. Internal logic that must compare against the
real agent name (e.g. isConversationManager) uses engineAgentInfo
directly, so a display override can never change routing/behavior decisions.
Host image URL for the AI message avatar. Null = the agent's Font Awesome icon.
The artifacts to render under this message, one card each. Prefers the
artifacts array; falls back to the legacy single artifact/artifactVersion
inputs so older callers that set only those keep working.
The avatar image URL actually rendered: trimmed, and null after a load error so a broken/whitespace URL degrades to the agent icon instead of a broken-image glyph.
ProtectedengineThe engine-resolved agent identity — no host display overrides applied. Protected (not private) so the template's run-details header — which labels the REAL agent's diagnostics and record link — can read it directly.
Whether the agent-run gear's expanded panel would actually render anything —
used to gate the gear button itself so it doesn't appear as a dead control
that opens an empty popup. The panel hosts, in order: the run-details section
(only when showAgentRunDetails), associated tasks, and (non-last messages
only) the delete / rating / pin overflow. With showAgentRunDetails=false and
none of those enabled — a white-labeled end-user surface — the gear vanishes
entirely instead of opening onto nothing.
Each arm below mirrors the corresponding template condition EXACTLY; keep them
in lockstep with message-item.component.html's .agent-details-panel block.
Defaults leave it unchanged: with showAgentRunDetails=true (the default) this
is unconditionally true, so the gear renders exactly as before — including the
pre-existing window where agentRun hasn't loaded yet and the panel is briefly
empty. That window is deliberately preserved (byte-identical defaults) rather
than fixed here.
Whether this message has an associated agent run Based on whether the message has an AgentID (not whether agentRun object is loaded)
Check if message has any attachments
Get only image attachments
Check if current user is the conversation owner
Check if the artifact is a system-only artifact
Returns the cached CSS class string. Updated in ngDoCheck so the value is stable within a single change detection cycle, preventing ExpressionChangedAfterItHasBeenCheckedError.
Get the actual sender name for user messages Uses the denormalized User field from the view if available, otherwise falls back to current user name
Returns either the default Metadata provider or the one specified in the Provider property, if it was specified
Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified
Returns either the default RunReport provider or the one specified in the Provider property, if it was specified
Returns either the default RunView provider or the one specified in the Provider property, if it was specified
Unified time pill text for all AI message states Returns the appropriate time display based on message state:
Get the user's avatar icon class from the userAvatarMap Uses fast O(1) lookup by UserID
Get the user's avatar image URL from the userAvatarMap Uses fast O(1) lookup by UserID
Compact UPPERCASE badge label (artifact-type name wins over file extension).
Format file size for display
Format number with commas
Get rating count for badge display on gear icon
Get thumbs down count (ratings <= 3)
Get thumbs up count (ratings >= 8)
Check if message has any ratings (for gear icon badge)
A callback method that is invoked immediately after Angular has completed initialization of a component's view. It is invoked only once when the view is instantiated.
DoCheck lifecycle hook - detects changes to message properties This runs on every change detection cycle, so we check if Status actually changed This is more reliable than ngOnChanges when the message object reference doesn't change
A callback method that is invoked immediately after the default change detector has checked data-bound properties if at least one has changed, and before the view and content children are checked.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
Handle attachment thumbnail click Emits the attachment for the parent to display in the image viewer
Handle agent response form submission Converts form data to the new @{_mode:"form",...} format
Handles clicks on the message bubble. Shift+Click on any AI message emits a diagnosticRequested event so the parent can dump live streaming state to the browser console — useful for debugging stuck or forever-spinning conversations without any code changes.
Open the agent entity record in a new tab
Open the agent run entity record in a new tab
Determine if pin/delete actions should show inline (with rating buttons). Show for latest completed AI message that user hasn't rated yet.
Determine if rating component should be shown inline (Option C - Hybrid). Show for latest completed AI message that user hasn't rated yet. For older/already-rated messages, ratings accessible via gear menu.
Toggle the agent details panel expansion
Component for displaying a single message in a conversation Follows the dynamic rendering pattern from skip-chat for optimal performance This component is created dynamically via ViewContainerRef.createComponent()