Member Junction
    Preparing search index...

    Chat Conversations Resource - wraps the conversation chat area for tab-based display Extends BaseResourceComponent to work with the resource type system Displays conversation list sidebar + active conversation chat interface Designed to work with the tab system for multi-tab conversation management

    This component manages its own selection state locally, following the encapsulation pattern:

    • ConversationEngine singleton is used for shared DATA (caching, loading, saving)
    • Local state variables manage SELECTION state (which conversation is active)
    • State flows down to children via @Input, events flow up via

    Hierarchy (View Summary)

    Implements

    • OnDestroy
    Index

    Constructors

    Properties

    conversationList?: ConversationListComponent
    currentUser: any = null
    destroy$: Subject<void>
    isMobileView: boolean = false
    isNewUnsavedConversation: boolean = false
    isReady: boolean = false
    isSidebarCollapsed: boolean = false
    isSidebarPinned: boolean = true
    isSidebarSettingsLoaded: boolean = false
    navigationService: NavigationService
    ParentTabId: string | null

    Tab ID for query param notification scoping. Set by resource wrappers that render child dashboards, so the child knows which tab it belongs to. If not set, falls back to Data.Configuration.tabId.

    pendingArtifactConversationId: string | null = null
    pendingArtifactId: string | null = null
    pendingArtifactVersionNumber: number | null = null
    pendingAttachmentsToSend: PendingAttachment[] | null = null
    pendingComposerAgentMention: string | null = null
    pendingMessageToSend: string | null = null
    pendingRealtimeSessionId: string | null = null

    A pending request to open the REALTIME SESSION REVIEW overlay (deep link / cross-resource nav with realtimeSessionId, e.g. the AI Agent Session form's "open session" pill). Applied once after the chat area renders — this is also the reference example for invoking an EXISTING realtime session programmatically: await chatArea.OpenRealtimeSessionReview(agentSessionId) (a NEW session starts through the composer's phone button / RealtimeSessionService.StartRealtimeSession).

    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.

    renamedConversationId: string | null = null
    selectedConversation: MJConversationEntity | null = null
    selectedConversationId: string | null = null
    selectedThreadId: string | null = null
    sidebarTransitionsEnabled: boolean = false
    sidebarWidth: number = 300
    "ɵdir": unknown
    "ɵfac": unknown

    Accessors

    • get Data(): ResourceData

      Returns ResourceData

    • set Data(value: ResourceData): void

      Parameters

      Returns void

    • get DisplayNameChangedEvent(): ((newName: string) => void) | null

      Returns ((newName: string) => void) | null

    • set DisplayNameChangedEvent(value: ((newName: string) => void) | null): void

      Parameters

      • value: ((newName: string) => void) | null

      Returns void

    • get LoadComplete(): boolean

      Returns boolean

    • get LoadCompleteEvent(): any

      Returns any

    • set LoadCompleteEvent(value: any): void

      Parameters

      • value: any

      Returns void

    • get LoadStarted(): boolean

      Returns boolean

    • get LoadStartedEvent(): any

      Returns any

    • set LoadStartedEvent(value: any): void

      Parameters

      • value: any

      Returns void

    • get ProviderToUse(): IMetadataProvider

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

      Returns IMetadataProvider

    • get ResourceCloseRequestedEvent(): (() => void) | null

      Returns (() => void) | null

    • set ResourceCloseRequestedEvent(value: (() => void) | null): void

      Parameters

      • value: (() => void) | null

      Returns void

    • 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

    • Read current query params from tab configuration. Use in initDashboard() / ngOnInit() to get initial URL state.

      Returns Record<string, string>

    • Get this component's tab ID. Checks ParentTabId input first (set by resource wrappers for child dashboards), then falls back to Data.Configuration.tabId.

      Returns string

    • Ask the host shell to close/dismiss this resource (typically: close the tab). Called by subclasses that hosted a form that emitted a 'dismiss' navigation event — most often, a brand-new record where the user clicked Discard. The record was never saved, the form is empty, and leaving it open serves no purpose. The tab-container listens for this and closes the workspace tab.

      Returns void

    • Call this to notify the tab system that the resource's display name has changed. The tab container will update the tab title and browser title accordingly.

      Parameters

      • newName: string

      Returns void

    • Handle navigation request from artifact viewer panel within the chat area. Converts the link event to a generic navigation request and uses NavigationService.

      Parameters

      • event: {
            artifactId?: string;
            id: string;
            type: "conversation" | "collection";
            versionNumber?: number;
        }

      Returns void

    • React to query param changes that arrive AFTER initial load — e.g. clicking a Home pin for a different conversation, or browser back/forward — when this tab already exists and is simply re-focused (so ngOnInit / applyConfigurationParams does NOT run again). Without this, every pin would land on whatever conversation was already open instead of the pinned one.

      Parameters

      • params: Record<string, string>
      • _source: "popstate" | "deeplink"

      Returns void

    • Marks this component's view (and its ancestors) as needing change detection and schedules a tick — the reliable way for a resource component to re-render after updating state from async work (RunView/RunQuery continuations, timers, websocket pushes, RxJS subscriptions).

      WHY THIS EXISTS: the Explorer shell hosts resource components dynamically — createComponent()

      • ApplicationRef.attachView() — because tab content mounts into Golden Layout / cached DOM containers, not into an Angular template. Since Angular 18's change-detection scheduler rework (Explorer is on Angular 21), ApplicationRef.tick() only refreshes attached views that are FLAGGED dirty; a root-level attached view whose component mutates plain fields from an async continuation is never flagged, so the view silently never re-renders — even though the component uses default (non-OnPush) change detection (issue #3106).

      The framework calls this automatically from NotifyLoadStarted() / NotifyLoadComplete(), so the standard load lifecycle re-renders without any subclass action. Call it yourself after any LATER async state change that must reach the DOM outside those signals.

      Returns void

    • Push query param changes to the URL. Creates a browser history entry. Safe to call during OnQueryParamsChanged — auto-suppressed to prevent loops.

      Parameters

      • params: Record<string, string | null>

      Returns void