Member Junction
    Preparing search index...

    Base class for all Angular components in the MemberJunction system.

    Hierarchy (View Summary)

    Implements

    • OnInit
    • OnDestroy
    • AfterViewChecked
    Index

    Constructors

    Properties

    acceptedFileTypes ActiveAgentConfigurationPresetId afterAgentTurn afterResponseFormSubmitted afterToolInvoked agentCharacterConfig agentRunsByDetailId allowAttachments allowMentions allowMessageDelete allowMessageEdit allowPinning allowPlanMode allowRealtime appContext applicationId applicationScope artifactCount artifactCountDisplay artifactLinkClicked artifactPaneWidth artifactsByDetailId artifactToShare artifactViewerRefresh$ attachmentsByDetailId beforeAgentTurn beforeResponseFormSubmitted beforeToolInvoked canEditSelectedArtifact canShareSelectedArtifact collectionPickerArtifactId collectionPickerArtifactName collectionPickerExcludedIds collectionPickerVersionId collectionPickerVersionNumber composerAgentMentionConsumed composerDraft composerDraftConsumed conversation conversationCreated conversationRenamed currentUser defaultAgentId demonstrationSurfaceContent emptyAgentRunsMap emptyArtifactsMap emptyInProgressIds emptyStateConfig emptyStateGreeting enableAttachments environmentId expandedArtifactId inProgressMessageIds isArtifactPaneMaximized isArtifactShareModalOpen isLoadingConversation isLoadingPeripheralData isProcessing isShared isUploadingAttachments linkedEntityId linkedRecordId maxAttachments maxAttachmentSizeBytes memberCount messages navigationRequest openEntityRecord overlayMode pendingArtifactConsumed pendingArtifactConversationId pendingArtifactId pendingArtifactVersionNumber pendingMessageConsumed pendingMessageConversationId pendingMessageRequested Provider ratingsByDetailId realtimeConversationReady RealtimeReview RealtimeSession realtimeSessionMetaMap selectedArtifactId selectedImageAlt selectedImageFileName selectedImageUrl selectedVersionNumber sessionChannelStateChanged sessionEnded sessionStarted shareAdapter shareContext showAgentCharacter showAgentModePicker showAgentPanel showAgentPicker showAgentRunDetails showArtifactIndicator showArtifactPanel showArtifactsModal showCollectionPicker showDateNavigation showDemonstrationSurface showEmptyFill showExportButton showExportModal showImageViewer showLoadingState showMembersModal showMessageRating showPinsPanel showProjectSelector showReactions showScrollToBottomIcon showShareButton showShareModal showSidebarToggle showSuggestedPrompts showSystemArtifacts showTestFeedbackDialog sidebarToggleClicked suppressNewConversationEmptyState systemArtifactsByDetailId taskClicked testFeedbackDialogData threadClosed threadId threadOpened uploadingMessage userAvatarMap ɵdir ɵfac

    Accessors

    Methods

    checkScroll ClearRealtimeSessionReview conversationDetailHasArtifact exportConversation getAllArtifactsForDetail getArtifactInfo getArtifactsArray getCachedInputs GetInitialDraftFor ngAfterViewChecked ngOnDestroy ngOnInit OnAgentModePresetChanged onAgentResponse onAgentRunDetected onAgentRunUpdate onAgentSelected OnAnalyzeArtifact OnApplyFormRequested onArtifactClicked onArtifactCreated onArtifactLinkNavigation onArtifactShared onArtifactShareModalClose onArtifactShareRequested onAttachmentClicked onCloseArtifactPanel onCollectionPickerCancelled onCollectionPickerCompleted OnComposerBlurred OnComposerDraftApplied onConversationRenamed onDeleteMessage onDiagnosticRequested OnDraftStateChanged onEmptyStateMessageSent onExportModalCancelled onExportModalComplete onImageViewerClosed onInitialMessageAutoSendFailed onInitialMessageAutoSendStarted onIntentCheckCompleted onIntentCheckStarted onJumpToMessage onLocalThreadClosed onMessageComplete onMessageEdited onMessagePinToggled onMessageSent onNavigateToConversation onNavigationRequest onOpenEntityRecord onProjectSelected onRealtimeNavigateRequest onReplyInThread onResizeStart onResizeTouchStart onRetryMessage onReviewClosed onReviewStartLive onSaveToCollectionRequested onShareDialogResult onSuggestedResponseSelected onTaskClicked onTestFeedbackDialogClosed onTestFeedbackMessage onThreadReplyAdded onToggleAgentPanel onUnpinFromPanel onUploadStateChanged onViewThread openArtifactFromModal openProjectSelector OpenRealtimeSessionReview reloadMessages scrollToBottomAnimate scrollToBottomNow shareConversation shouldDeliverPendingMessageTo slotTemplate toggleArtifactExpansion toggleMaximizeArtifactPane toggleMembersModal toggleSystemArtifacts viewArtifacts viewTestRun

    Constructors

    Properties

    acceptedFileTypes: string = 'image/*'
    ActiveAgentConfigurationPresetId: string | null = null

    The mode/preset picker's selected configuration ID, forwarded to <mj-message-input> so non-mention routes apply it on the next send. Past messages are NOT retroactively re-routed — the picker only affects subsequent requests. Updated when the user picks a row in the mode picker; the picker itself persists the choice per-user, per-agent via UserInfoEngine.

    afterAgentTurn: EventEmitter<AfterAgentTurnEventArgs> = ...

    Fired AFTER a successful agent turn completes.

    afterResponseFormSubmitted: EventEmitter<AfterResponseFormSubmittedEventArgs> = ...

    Fired AFTER a response form's values have been sent.

    afterToolInvoked: EventEmitter<AfterToolInvokedEventArgs> = ...

    Fired AFTER a client tool invocation completes.

    agentCharacterConfig: AgentCharacterConfig | null = null

    Visualization data forwarded to the agentPresence slot's default component (or to any consumer-projected template via slot context). Includes avatar URL, character name, voice state, and visual intensity.

    agentRunsByDetailId: Map<string, MJAIAgentRunEntityExtended> = ...
    allowAttachments: boolean = true

    Host-level cap for attachments. Defaults true. When false, the host disables attachments regardless of agent modality support — useful for surfaces where attachments don't make sense (cockpit text-only flows). When true (default), attachment availability still depends on the agent's modality support, computed at runtime.

    allowMentions: boolean = true

    Host-level cap for @-mention autocomplete (agents and users). Defaults true. Hosts addressing a single fixed agent (e.g. Form Builder cockpit pinned to the Form Builder agent) should set false so the user can't accidentally redirect a turn to a different agent.

    allowMessageDelete: boolean = true

    Allow deleting the user's own messages (per-message delete button).

    allowMessageEdit: boolean = true

    Allow editing the user's own messages (per-message edit button).

    allowPinning: boolean = true

    Allow pinning messages (per-message pin button, the header pin chip, and the pinned-messages panel).

    allowPlanMode: boolean = true

    Host-level cap for the composer's Plan Mode toggle. Defaults true (current behavior). White-labeled / end-user hosts that don't expose plan-mode workflows set false to remove the button entirely.

    allowRealtime: boolean = true

    Host-level cap for the composer's realtime voice-call launcher (and its options caret). Defaults true (current behavior). Hosts with no voice experience set false to remove the buttons entirely.

    appContext: Record<string, unknown> | null = null

    Application context snapshot for AI agent awareness. Included in agent execution data.

    applicationId: string | null = null

    Application ID to bind a newly-created conversation to. REQUIRED when applicationScope is 'Application' or 'Both' (DB CHECK constraint enforces it). Used by embedded chat surfaces to scope their conversations to their owning Application.

    applicationScope: "Application" | "Both" | "Global" = 'Global'

    Scope to apply when this surface CREATES a new conversation. Forwarded to ConversationEngine.CreateConversation so the new row's ApplicationScope column is stamped correctly. Embedded surfaces (e.g. the Form Builder cockpit) set this to 'Application' so their conversations don't pollute the main Chat app list. Main Chat leaves it as the default 'Global'. Has no effect on existing conversations.

    artifactCount: number = 0
    artifactCountDisplay: number = 0
    artifactLinkClicked: EventEmitter<
        { id: string; type: "conversation"
        | "collection" },
    > = ...
    artifactPaneWidth: number = DEFAULT_ARTIFACT_PANE_WIDTH
    artifactsByDetailId: Map<string, LazyArtifactInfo[]> = ...
    artifactToShare: MJArtifactEntity | null = null
    artifactViewerRefresh$: Subject<{ artifactId: string; versionNumber: number }> = ...
    attachmentsByDetailId: Map<string, MessageAttachment[]> = ...

    Attachments by conversation detail ID (loaded from ConversationDetailAttachments)

    beforeAgentTurn: EventEmitter<BeforeAgentTurnEventArgs> = ...

    Cancelable — fired BEFORE a user message is sent to the agent.

    beforeResponseFormSubmitted: EventEmitter<BeforeResponseFormSubmittedEventArgs> = ...

    Cancelable — fired BEFORE a response form's submitted values are sent.

    beforeToolInvoked: EventEmitter<BeforeToolInvokedEventArgs> = ...

    Cancelable — fired BEFORE a registered client tool is invoked by the agent.

    canEditSelectedArtifact: boolean = false
    canShareSelectedArtifact: boolean = false
    collectionPickerArtifactId: string | null = null
    collectionPickerArtifactName: string = ''
    collectionPickerExcludedIds: string[] = []
    collectionPickerVersionId: string | null = null
    collectionPickerVersionNumber: number | null = null
    composerAgentMentionConsumed: EventEmitter<void> = ...
    composerDraft: string | null = null

    Prefill the composer with draft text (NOT sent — unlike pendingMessage) and focus it. Targets the empty-state input for new/unsaved conversations, else the active conversation's cached input. Emits composerDraftConsumed once applied. Retries briefly because the target input mounts asynchronously (config params can arrive before the first render).

    composerDraftConsumed: EventEmitter<void> = ...
    conversation: MJConversationEntity | null = null
    conversationCreated: EventEmitter<
        {
            conversation: MJConversationEntity;
            pendingAttachments?: PendingAttachment[];
            pendingMessage?: string;
        },
    > = ...
    conversationRenamed: EventEmitter<
        { conversationId: string; description: string; name: string },
    > = ...
    currentUser: UserInfo
    defaultAgentId: string | null = null

    Optional default agent ID for the conversation. Forwarded to <mj-message-input> as its [defaultAgentId] so the first message routes directly to this agent instead of Sage. See MessageInputComponent.routeMessage priority rules — explicit

    and prior-agent continuity still take precedence.

    Embedded chat surfaces (Form Builder cockpit, future domain chats) set this to the specialist agent's ID; the main Chat app leaves it unset to preserve the Sage-fronted UX.

    demonstrationSurfaceContent: unknown = null

    Content payload forwarded to the demonstrationSurface slot via $implicit + named content context. Shape is consumer-defined per the IMJChatDemonstrationSurfaceComponent interface — the widget doesn't introspect or render it directly, just hands it through.

    emptyAgentRunsMap: Map<string, MJAIAgentRunEntityExtended> = ...
    emptyArtifactsMap: Map<string, LazyArtifactInfo[]> = ...
    emptyInProgressIds: string[] = []
    emptyStateConfig: EmptyStateConfig | null = null

    Structured config for the emptyState slot's default component — greeting, subtext, and optional suggested prompts. Backwards-compatible with the existing emptyStateGreeting input (which still wins when emptyStateConfig is null).

    emptyStateGreeting: string = 'How can I help you?'

    Greeting message shown in the empty state when no conversation is active

    enableAttachments: boolean = false
    environmentId: string
    expandedArtifactId: string | null = null
    inProgressMessageIds: string[] = []

    In-progress message IDs for streaming reconnection Passed to message-input component to reconnect PubSub updates

    isArtifactPaneMaximized: boolean = false
    isArtifactShareModalOpen: boolean = false
    isLoadingConversation: boolean = false
    isLoadingPeripheralData: boolean = false
    isProcessing: boolean = false
    isShared: boolean = false
    isUploadingAttachments: boolean = false
    linkedEntityId: string | null = null

    "What is this conversation about?" — the Entity ID this conversation references. Forwarded to ConversationEngine.CreateConversation so the new row's LinkedEntityID is stamped at creation time. Paired with linkedRecordId (DB CHECK requires both populated or both null). Form Builder cockpit passes the MJ: Components entity ID; Component Studio's AI panel does the same. Surfaces use this to later list "prior conversations about THIS form/component." Has no effect on existing conversations.

    linkedRecordId: string | null = null

    Primary key of the linked record, serialized as a string. Used with linkedEntityId. Form Builder cockpit passes the active form's ComponentID; Component Studio's AI panel passes the currently-selected component's ID.

    maxAttachments: number = 10
    maxAttachmentSizeBytes: number = ...
    memberCount: number = 1
    navigationRequest: EventEmitter<NavigationRequest> = ...
    openEntityRecord: EventEmitter<
        { compositeKey: CompositeKey; entityName: string },
    > = ...
    overlayMode: boolean = false

    When true, the component is rendered inside the floating overlay (hides suggested topics, etc.)

    pendingArtifactConsumed: EventEmitter<void> = ...
    pendingArtifactConversationId: string | null = null
    pendingArtifactId: string | null = null
    pendingArtifactVersionNumber: number | null = null
    pendingMessageConsumed: EventEmitter<void> = ...
    pendingMessageConversationId: string | null = null

    The conversation the pendingMessage was created FOR. The pending message's auto-send is delivered ONLY to the cached input whose conversationId matches this — NOT the live-active conversationId. Without this, swapping conversations during the (async) auto-send window lets the swapped-to conversation's input grab the still-set pendingMessage and send it too, duplicating the message into the wrong conversation.

    Hosts MAY set this explicitly; it also self-resolves from _pendingMessageTargetId (captured in onEmptyStateMessageSent) so the guard works regardless of host wiring.

    pendingMessageRequested: EventEmitter<
        { attachments: PendingAttachment[]; text: string },
    > = ...
    Provider: IMetadataProvider | null

    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.

    ratingsByDetailId: Map<string, RatingJSON[]> = ...

    Ratings by conversation detail ID (parsed from RatingsJSON)

    realtimeConversationReady: EventEmitter<
        { conversationId: string; select: boolean },
    > = ...

    A realtime session that CREATED its own conversation has ended — the new conversation is named (background, shared helper) and ready. The workspace folds it into the cached list and selects it when the conversation list is visible.

    RealtimeReview: RealtimeSessionReview | null = null

    The PAST realtime session currently under review, or null. While set (and no live call is active) the realtime overlay renders in SESSION REVIEW mode over this conversation panel. Populated via OpenRealtimeSessionReview; cleared when the user closes the review or resumes it as a new live call.

    RealtimeSession: RealtimeSessionService = ...

    Voice session service — exposed to the template so the realtime "call mode" overlay can be hosted here (it fills this conversation panel in place while Active$ is true). The trigger wiring lives in .

    realtimeSessionMetaMap: Map<string, RealtimeSessionTimelineMeta> = ...

    Session-row enrichment for the timeline's realtime SESSION BLOCKS (details stamped with an AgentSessionID collapse to one card per session — see the message list's timeline pass). Keyed by NormalizeUUID(sessionId); loaded with ONE batched MJ: AI Agent Sessions lookup per conversation, only when stamped rows exist. Tolerant: a failed lookup leaves the map empty and cards render their generic label.

    selectedArtifactId: string | null = null
    selectedImageAlt: string = ''
    selectedImageFileName: string = ''
    selectedImageUrl: string = ''
    selectedVersionNumber: number | undefined = undefined
    sessionChannelStateChanged: EventEmitter<SessionChannelStateChangedEventArgs> = ...

    Informational.

    sessionEnded: EventEmitter<SessionEndedEventArgs> = ...

    Informational.

    sessionStarted: EventEmitter<SessionStartedEventArgs> = ...

    Informational.

    shareContext: ResourceShareContext | null = null
    showAgentCharacter: boolean = false

    When true, the agentPresence slot is allowed to render (using the supplied agentCharacterConfig for visualization data). Off by default so existing embeds (Form Builder, Component Studio AI Assistant, the corner overlay) see no UI change.

    showAgentModePicker: boolean = true

    Whether the chat header should render the per-agent mode/quality picker (Draft / Standard / High, etc.). Default true. The picker auto-hides when the bound agent has fewer than 2 configured presets, so embedders rarely need to set this explicitly — turn off only when the surface should never expose model-tier choice (kiosks, specialty embeds).

    showAgentPanel: boolean = false
    showAgentPicker: boolean = true

    Whether the conversation header should render the per-conversation agent picker. Default true. The picker lets a user pin a default agent on the active conversation (saved to MJConversationEntity.DefaultAgentID), so non-mention messages route to that agent instead of through Sage. Surfaces with no meaningful agent-choice UX can set this to false to hide the widget.

    showAgentRunDetails: boolean = true

    Show the per-message agent run-detail grid (run ID, step/token counts, $ cost).

    showArtifactIndicator: boolean = true

    Show the artifact count indicator in the conversation header. Default true.

    showArtifactPanel: boolean = false
    showArtifactsModal: boolean = false
    showCollectionPicker: boolean = false
    showDateNavigation: boolean = true

    Show the message list's sticky date header + jump-to-date navigation.

    showDemonstrationSurface: boolean = false

    Activate the demonstrationSurface slot layout-mode. Per Matt's 06-10 placement design: when true AND a consumer has projected mjChatSlot="demonstrationSurface", the chat-content-area restructures into [stage | conversation-rail] — the stage takes the main pane, the messages pane shrinks to a side rail (below the stage on mobile). When false (default), no layout change; the chat-area renders as normal.

    The consumer is expected to drive this from their own state (e.g., an agent emits a demonstration intent → host sets this true; user dismisses → host sets it false). The widget itself doesn't decide.

    showEmptyFill: boolean = true

    Whether the message list renders its built-in "No messages yet" filler when a conversation has zero messages. Defaults true. Hosts that render their own empty-state chrome around the chat area set false.

    showExportButton: boolean = true

    Show the Export button in the conversation header. Default true.

    showExportModal: boolean = false
    showImageViewer: boolean = false
    showLoadingState: boolean = true

    Whether the built-in centered loading indicator renders while a conversation loads. Defaults true. When false the pane stays blank during the load (the loading branch still short-circuits rendering, so no premature empty-state flash). Hosts with their own loading chrome set false.

    showMembersModal: boolean = false
    showMessageRating: boolean = true

    Show the per-message thumbs rating control on completed AI messages.

    showPinsPanel: boolean = false
    showProjectSelector: boolean = false
    showReactions: boolean = true

    Show the per-message reaction buttons (like / comment).

    showScrollToBottomIcon: boolean = false
    showShareButton: boolean = true

    Show the Share button in the conversation header. Default true.

    showShareModal: boolean = false
    showSidebarToggle: boolean = false
    showSuggestedPrompts: boolean = true

    Show the empty-state's built-in suggested-prompt chips (and the

    tip).

    showSystemArtifacts: boolean = false
    showTestFeedbackDialog: boolean = false
    sidebarToggleClicked: EventEmitter<void> = ...
    suppressNewConversationEmptyState: boolean = false

    When true, render the normal message-list + message-input layout even before a conversation exists, instead of the centered empty-state welcome card. Lets host pages (e.g. Form Builder cockpit) put the chat header + mode picker front-and-center on first open and let the user pick a mode before typing. The first send still routes through MessageInputComponent and triggers conversationCreated as usual.

    systemArtifactsByDetailId: Map<string, LazyArtifactInfo[]> = ...
    taskClicked: EventEmitter<MJTaskEntity> = ...
    testFeedbackDialogData: TestFeedbackDialogData | null = null
    threadClosed: EventEmitter<void> = ...
    threadId: string | null = null
    threadOpened: EventEmitter<string> = ...
    uploadingMessage: string = ''
    userAvatarMap: Map<
        string,
        { iconClass: string
        | null; imageUrl: string | null },
    > = ...
    "ɵdir": unknown
    "ɵfac": unknown

    Accessors

    • get HasPreConversationHeader(): boolean

      True when the chat header should render even before a conversation row exists. Currently means: the embedder has enabled the mode picker AND we resolved a target agent for it (so there's actually something to put in the header). Lets surfaces like the Form Builder cockpit show the mode picker on top of the empty-state instead of waiting for the first message to create a conversation.

      Returns boolean

    • get ProviderToUse(): IMetadataProvider

      Returns either the default Metadata provider or the one specified in the Provider property, if it was specified

      Returns IMetadataProvider

    • get RunQueryToUse(): IRunQueryProvider

      Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified

      Returns IRunQueryProvider

    • get RunReportToUse(): IRunReportProvider

      Returns either the default RunReport provider or the one specified in the Provider property, if it was specified

      Returns IRunReportProvider

    • get RunViewToUse(): IRunViewProvider

      Returns either the default RunView provider or the one specified in the Provider property, if it was specified

      Returns IRunViewProvider

    Methods

    • Get unique artifacts grouped by artifact ID (not by conversation detail) Returns the latest version info for each unique artifact with all versions Works with LazyArtifactInfo - uses display data without loading full entities Respects showSystemArtifacts toggle

      Returns {
          artifactId: string;
          name: string;
          versionCount: number;
          versionId: string;
          versions: { versionId: string; versionNumber: number }[];
          visibility: string;
      }[]

    • Handle Analyze button click from the artifact viewer panel.

      Persists the captured snapshot as a new Data Snapshot artifact and attaches it to the user's in-progress message as a pending attachment chip (same UX as image/file uploads). On send, the existing attachment pipeline creates a ConversationDetailArtifact with Direction='Input'; AgentRunner then picks it up via gatherConversationArtifacts and resolves the DataSnapshotToolLibrary for tool calls.

      Falls back to plain message prefill if snapshot persistence fails — the user can still ask questions about the artifact that's already attached to the prior conversation turn.

      Parameters

      Returns Promise<PendingAttachment | null>

    • Parameters

      • data: {
            artifactId: string;
            conversationDetailId: string;
            conversationId: string;
            name: string;
            versionId: string;
            versionNumber: number;
        }

      Returns Promise<void>

    • Handle message completion event from message-input Refreshes the agent run data in-place to get final status and timestamps Also reloads attachments created during agent execution (e.g., generated images)

      Parameters

      • event: { agentId?: string; conversationDetailId: string; conversationId: string }

      Returns Promise<void>

    • ENTRY API for SESSION REVIEW: opens the realtime overlay in review mode over this conversation panel, rendering what went down in a PAST agent session (caption turns, delegated-run cards, the saved read-only whiteboard). Intended for conversation timeline affordances that reopen historical realtime sessions.

      Parameters

      • agentSessionId: string

        The MJ: AI Agent Sessions.ID to review.

      Returns Promise<boolean>

      true when the session loaded and the review opened; false when it couldn't be loaded (missing/unreadable session) or a live call is already active.