@memberjunction/ng-explorer-core 6.2.0-edge.0 → 6.2.0-edge.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/app-routing.module.d.ts +23 -1
  2. package/dist/app-routing.module.d.ts.map +1 -1
  3. package/dist/app-routing.module.js +50 -14
  4. package/dist/app-routing.module.js.map +1 -1
  5. package/dist/generated/lazy-feature-config.d.ts +1 -1
  6. package/dist/generated/lazy-feature-config.d.ts.map +1 -1
  7. package/dist/generated/lazy-feature-config.js +12 -1
  8. package/dist/generated/lazy-feature-config.js.map +1 -1
  9. package/dist/lib/command-palette/command-palette.component.d.ts +7 -1
  10. package/dist/lib/command-palette/command-palette.component.d.ts.map +1 -1
  11. package/dist/lib/command-palette/command-palette.component.js +28 -14
  12. package/dist/lib/command-palette/command-palette.component.js.map +1 -1
  13. package/dist/lib/conversation-feedback/conversation-feedback.d.ts +103 -13
  14. package/dist/lib/conversation-feedback/conversation-feedback.d.ts.map +1 -1
  15. package/dist/lib/conversation-feedback/conversation-feedback.js +219 -67
  16. package/dist/lib/conversation-feedback/conversation-feedback.js.map +1 -1
  17. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts +64 -10
  18. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts.map +1 -1
  19. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +172 -66
  20. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
  21. package/dist/lib/generic/resource-container-component.d.ts +19 -5
  22. package/dist/lib/generic/resource-container-component.d.ts.map +1 -1
  23. package/dist/lib/generic/resource-container-component.js +43 -13
  24. package/dist/lib/generic/resource-container-component.js.map +1 -1
  25. package/dist/lib/guards/entities.guard.d.ts +4 -0
  26. package/dist/lib/guards/entities.guard.d.ts.map +1 -1
  27. package/dist/lib/guards/entities.guard.js +10 -2
  28. package/dist/lib/guards/entities.guard.js.map +1 -1
  29. package/dist/lib/identity-claims/claim-redeem.component.d.ts +4 -0
  30. package/dist/lib/identity-claims/claim-redeem.component.d.ts.map +1 -1
  31. package/dist/lib/identity-claims/claim-redeem.component.js +10 -2
  32. package/dist/lib/identity-claims/claim-redeem.component.js.map +1 -1
  33. package/dist/lib/oauth/oauth-callback.component.d.ts +4 -0
  34. package/dist/lib/oauth/oauth-callback.component.d.ts.map +1 -1
  35. package/dist/lib/oauth/oauth-callback.component.js +10 -2
  36. package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
  37. package/dist/lib/profile/profile-dialog.component.d.ts.map +1 -1
  38. package/dist/lib/profile/profile-dialog.component.js +194 -191
  39. package/dist/lib/profile/profile-dialog.component.js.map +1 -1
  40. package/dist/lib/resource-wrappers/artifact-resource.component.d.ts +20 -2
  41. package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
  42. package/dist/lib/resource-wrappers/artifact-resource.component.js +33 -9
  43. package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
  44. package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +80 -10
  45. package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
  46. package/dist/lib/resource-wrappers/chat-collections-resource.component.js +168 -56
  47. package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
  48. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +199 -25
  49. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
  50. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +534 -182
  51. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
  52. package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts +2 -0
  53. package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts.map +1 -1
  54. package/dist/lib/resource-wrappers/chat-deeplink-params.js +5 -1
  55. package/dist/lib/resource-wrappers/chat-deeplink-params.js.map +1 -1
  56. package/dist/lib/resource-wrappers/chat-search-routing.d.ts +25 -0
  57. package/dist/lib/resource-wrappers/chat-search-routing.d.ts.map +1 -0
  58. package/dist/lib/resource-wrappers/chat-search-routing.js +24 -0
  59. package/dist/lib/resource-wrappers/chat-search-routing.js.map +1 -0
  60. package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +14 -2
  61. package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
  62. package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +32 -8
  63. package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
  64. package/dist/lib/resource-wrappers/compose-email-fallback.d.ts +46 -0
  65. package/dist/lib/resource-wrappers/compose-email-fallback.d.ts.map +1 -0
  66. package/dist/lib/resource-wrappers/compose-email-fallback.js +62 -0
  67. package/dist/lib/resource-wrappers/compose-email-fallback.js.map +1 -0
  68. package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +54 -8
  69. package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
  70. package/dist/lib/resource-wrappers/dashboard-resource.component.js +138 -46
  71. package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
  72. package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +223 -30
  73. package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -1
  74. package/dist/lib/resource-wrappers/livekit-room-resource.component.js +438 -118
  75. package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -1
  76. package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +7 -3
  77. package/dist/lib/resource-wrappers/search-results-resource.component.d.ts.map +1 -1
  78. package/dist/lib/resource-wrappers/search-results-resource.component.js +23 -15
  79. package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
  80. package/dist/lib/resource-wrappers/view-resource.component.d.ts +74 -11
  81. package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
  82. package/dist/lib/resource-wrappers/view-resource.component.js +214 -68
  83. package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
  84. package/dist/lib/services/server-connectivity.service.d.ts +9 -4
  85. package/dist/lib/services/server-connectivity.service.d.ts.map +1 -1
  86. package/dist/lib/services/server-connectivity.service.js +56 -12
  87. package/dist/lib/services/server-connectivity.service.js.map +1 -1
  88. package/dist/lib/services/startup-validation.service.d.ts +4 -0
  89. package/dist/lib/services/startup-validation.service.d.ts.map +1 -1
  90. package/dist/lib/services/startup-validation.service.js +10 -2
  91. package/dist/lib/services/startup-validation.service.js.map +1 -1
  92. package/dist/lib/services/system-validation.service.d.ts +13 -1
  93. package/dist/lib/services/system-validation.service.d.ts.map +1 -1
  94. package/dist/lib/services/system-validation.service.js +29 -5
  95. package/dist/lib/services/system-validation.service.js.map +1 -1
  96. package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts +54 -4
  97. package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts.map +1 -1
  98. package/dist/lib/shell/components/dialogs/app-access-dialog.component.js +130 -40
  99. package/dist/lib/shell/components/dialogs/app-access-dialog.component.js.map +1 -1
  100. package/dist/lib/shell/components/header/app-nav.component.d.ts +29 -1
  101. package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
  102. package/dist/lib/shell/components/header/app-nav.component.js +56 -12
  103. package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
  104. package/dist/lib/shell/components/header/app-switcher.component.d.ts +33 -5
  105. package/dist/lib/shell/components/header/app-switcher.component.d.ts.map +1 -1
  106. package/dist/lib/shell/components/header/app-switcher.component.js +85 -29
  107. package/dist/lib/shell/components/header/app-switcher.component.js.map +1 -1
  108. package/dist/lib/shell/components/record-open/record-origin-crumb.component.js +1 -1
  109. package/dist/lib/shell/components/record-open/record-origin-crumb.component.js.map +1 -1
  110. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +50 -6
  111. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
  112. package/dist/lib/shell/components/tabs/component-cache-manager.js +95 -22
  113. package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
  114. package/dist/lib/shell/components/tabs/tab-container.component.d.ts +91 -9
  115. package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
  116. package/dist/lib/shell/components/tabs/tab-container.component.js +257 -101
  117. package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
  118. package/dist/lib/shell/loading-themes.d.ts +16 -12
  119. package/dist/lib/shell/loading-themes.d.ts.map +1 -1
  120. package/dist/lib/shell/loading-themes.js +145 -137
  121. package/dist/lib/shell/loading-themes.js.map +1 -1
  122. package/dist/lib/shell/readiness-beacon.d.ts +2 -0
  123. package/dist/lib/shell/readiness-beacon.d.ts.map +1 -1
  124. package/dist/lib/shell/readiness-beacon.js +5 -1
  125. package/dist/lib/shell/readiness-beacon.js.map +1 -1
  126. package/dist/lib/shell/services/about-dialog.service.d.ts +6 -0
  127. package/dist/lib/shell/services/about-dialog.service.d.ts.map +1 -1
  128. package/dist/lib/shell/services/about-dialog.service.js +16 -4
  129. package/dist/lib/shell/services/about-dialog.service.js.map +1 -1
  130. package/dist/lib/shell/services/profile-dialog.service.d.ts +6 -0
  131. package/dist/lib/shell/services/profile-dialog.service.d.ts.map +1 -1
  132. package/dist/lib/shell/services/profile-dialog.service.js +16 -4
  133. package/dist/lib/shell/services/profile-dialog.service.js.map +1 -1
  134. package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts +6 -0
  135. package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts.map +1 -1
  136. package/dist/lib/shell/services/user-sharing-center-dialog.service.js +15 -3
  137. package/dist/lib/shell/services/user-sharing-center-dialog.service.js.map +1 -1
  138. package/dist/lib/shell/shell.component.d.ts +264 -39
  139. package/dist/lib/shell/shell.component.d.ts.map +1 -1
  140. package/dist/lib/shell/shell.component.js +697 -294
  141. package/dist/lib/shell/shell.component.js.map +1 -1
  142. package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +64 -8
  143. package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts.map +1 -1
  144. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +129 -37
  145. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
  146. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts +26 -2
  147. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts.map +1 -1
  148. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +48 -10
  149. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
  150. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +84 -6
  151. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
  152. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +133 -29
  153. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
  154. package/dist/lib/single-dashboard/single-dashboard.component.d.ts +173 -23
  155. package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
  156. package/dist/lib/single-dashboard/single-dashboard.component.js +383 -109
  157. package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
  158. package/dist/lib/single-list-detail/single-list-detail.component.d.ts +383 -55
  159. package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
  160. package/dist/lib/single-list-detail/single-list-detail.component.js +962 -326
  161. package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
  162. package/dist/lib/single-query/single-query.component.d.ts +22 -2
  163. package/dist/lib/single-query/single-query.component.d.ts.map +1 -1
  164. package/dist/lib/single-query/single-query.component.js +40 -10
  165. package/dist/lib/single-query/single-query.component.js.map +1 -1
  166. package/dist/lib/single-record/single-record.component.d.ts +41 -3
  167. package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
  168. package/dist/lib/single-record/single-record.component.js +71 -11
  169. package/dist/lib/single-record/single-record.component.js.map +1 -1
  170. package/dist/lib/single-search-result/single-search-result.component.d.ts +23 -3
  171. package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
  172. package/dist/lib/single-search-result/single-search-result.component.js +42 -12
  173. package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
  174. package/dist/lib/system-validation/system-validation-banner.component.d.ts +12 -2
  175. package/dist/lib/system-validation/system-validation-banner.component.d.ts.map +1 -1
  176. package/dist/lib/system-validation/system-validation-banner.component.js +25 -5
  177. package/dist/lib/system-validation/system-validation-banner.component.js.map +1 -1
  178. package/dist/lib/user-menu/user-menu.types.d.ts +4 -0
  179. package/dist/lib/user-menu/user-menu.types.d.ts.map +1 -1
  180. package/dist/lib/user-menu/user-menu.types.js +10 -2
  181. package/dist/lib/user-menu/user-menu.types.js.map +1 -1
  182. package/dist/lib/user-notifications/user-notifications.component.d.ts +59 -7
  183. package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
  184. package/dist/lib/user-notifications/user-notifications.component.js +151 -47
  185. package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
  186. package/dist/lib/user-profile/user-profile.component.d.ts +3 -2
  187. package/dist/lib/user-profile/user-profile.component.d.ts.map +1 -1
  188. package/dist/lib/user-profile/user-profile.component.js +5 -4
  189. package/dist/lib/user-profile/user-profile.component.js.map +1 -1
  190. package/package.json +52 -52
@@ -1 +1 @@
1
- {"version":3,"file":"chat-conversations-resource.component.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-conversations-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAa,SAAS,EAAqB,YAAY,EAAE,MAAM,eAAe,CAAC;AAEpH,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAqB,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAgB,2BAA2B,EAA6C,cAAc,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;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6DAAzB,yBAAyB;;;;;;;YAAzB,gGAAA,oBAAgB,wBAAS,uFAAzB,2BAAuB,0BAAE;;YA5JhC,AA5EF,2FAAe,qEA4EN;YAOT,2BAAqB;;YAnFrB,qCAgFC;;;AAwJQ,yBAAyB;IA7OrC,aAAa,CAAC,qBAAqB,EAAE,2BAA2B,CAAC;GA6OrD,yBAAyB,CA25BrC;;iFA35BY,yBAAyB;cA5OrC,SAAS;6BACI,KAAK,YACP,gCAAgC,YAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqFP,iBAkJY,iBAAiB,CAAC,IAAI;;kBAGpC,SAAS;mBAAC,kBAAkB;;kBAC5B,SAAS;mBAAC,UAAU;;kBAufpB,YAAY;mBAAC,eAAe;;kBAQ5B,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kFAjgB/B,yBAAyB","sourcesContent":["import { Component, ViewEncapsulation, OnDestroy, ViewChild, ChangeDetectorRef, HostListener } from '@angular/core';\nimport { Metadata, CompositeKey } from '@memberjunction/core';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';\nimport { ResourceData, MJEnvironmentEntityExtended, MJConversationEntity, MJUserSettingEntity, UserInfoEngine, ConversationEngine } from '@memberjunction/core-entities';\nimport { resolveDeepLinkParam } from './chat-deeplink-params.js';\nimport { ConversationChatAreaComponent, ConversationListComponent, ConversationStreamingService, ActiveTasksService, UICommandHandlerService, ConversationBridgeService } from '@memberjunction/ng-conversations';\nimport { PendingAttachment } from '@memberjunction/ng-composer';\nimport { MentionAutocompleteService } from '@memberjunction/ng-conversations';\nimport { ActionableCommand, OpenResourceCommand } from '@memberjunction/ai-core-plus';\nimport { NavigationRequest } from '@memberjunction/ng-artifacts';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { Subject, takeUntil } from 'rxjs';\n/**\n * Chat Conversations Resource - wraps the conversation chat area for tab-based display\n * Extends BaseResourceComponent to work with the resource type system\n * Displays conversation list sidebar + active conversation chat interface\n * Designed to work with the tab system for multi-tab conversation management\n *\n * This component manages its own selection state locally, following the encapsulation pattern:\n * - ConversationEngine singleton is used for shared DATA (caching, loading, saving)\n * - Local state variables manage SELECTION state (which conversation is active)\n * - State flows down to children via @Input, events flow up via @Output\n */\n@RegisterClass(BaseResourceComponent, 'ChatConversationsResource')\n@Component({\n standalone: false,\n selector: 'mj-chat-conversations-resource',\n template: `\n @if (isReady) {\n <div class=\"chat-conversations-container\">\n <!-- Mobile backdrop: tap to close the slide-over sidebar -->\n @if (isMobileView && !isSidebarCollapsed && isSidebarSettingsLoaded) {\n <div class=\"mobile-sidebar-backdrop\" (click)=\"collapseSidebar()\"></div>\n }\n <!-- Left sidebar: Conversation list -->\n @if (isSidebarSettingsLoaded) {\n <div class=\"conversation-sidebar\"\n [class.collapsed]=\"isSidebarCollapsed\"\n [class.no-transition]=\"!sidebarTransitionsEnabled\"\n [style.width.px]=\"isSidebarCollapsed ? 0 : sidebarWidth\">\n @if (currentUser) {\n <mj-conversation-list\n #conversationList\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (conversationDeleted)=\"onConversationDeleted($event)\"\n (newConversationRequested)=\"onNewConversationRequested()\"\n (pinSidebarRequested)=\"pinSidebar()\"\n (unpinSidebarRequested)=\"unpinSidebar()\"\n (refreshRequested)=\"onRefreshRequested()\">\n </mj-conversation-list>\n <!-- Routines — pinned at the very bottom of the sidebar. Gated inside the\n section component by Read permission on 'MJ: User Routines'. -->\n <mj-conversation-routines-section\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (openConversation)=\"onConversationSelected($event)\">\n </mj-conversation-routines-section>\n }\n </div>\n }\n <!-- Resize handle for sidebar (only when expanded and settings loaded) -->\n @if (!isSidebarCollapsed && isSidebarSettingsLoaded) {\n <div class=\"sidebar-resize-handle\"\n (mousedown)=\"onSidebarResizeStart($event)\"></div>\n }\n <!-- Main area: Chat interface -->\n <div class=\"conversation-main\">\n @if (currentUser) {\n <mj-conversation-chat-area\n #chatArea\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n [conversation]=\"selectedConversation\"\n [threadId]=\"selectedThreadId\"\n [isNewConversation]=\"isNewUnsavedConversation\"\n [pendingMessage]=\"pendingMessageToSend\"\n [pendingAttachments]=\"pendingAttachmentsToSend\"\n [pendingArtifactId]=\"pendingArtifactId\"\n [pendingArtifactConversationId]=\"pendingArtifactConversationId\"\n [pendingArtifactVersionNumber]=\"pendingArtifactVersionNumber\"\n [showSidebarToggle]=\"isSidebarCollapsed && isSidebarSettingsLoaded\"\n (sidebarToggleClicked)=\"expandSidebar()\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (conversationCreated)=\"onConversationCreated($event)\"\n (threadOpened)=\"onThreadOpened($event)\"\n (threadClosed)=\"onThreadClosed()\"\n (pendingArtifactConsumed)=\"onPendingArtifactConsumed()\"\n (pendingMessageConsumed)=\"onPendingMessageConsumed()\"\n (pendingMessageRequested)=\"onPendingMessageRequested($event)\"\n (artifactLinkClicked)=\"onArtifactLinkClicked($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (navigationRequest)=\"onNavigationRequest($event)\"\n [composerAgentMention]=\"pendingComposerAgentMention\"\n (composerAgentMentionConsumed)=\"onComposerAgentMentionConsumed()\">\n </mj-conversation-chat-area>\n }\n </div>\n </div>\n } @else {\n <div class=\"initializing-container\">\n <mj-loading text=\"Initializing...\" size=\"large\"></mj-loading>\n </div>\n }\n \n <!-- Toast notifications container -->\n <mj-toast></mj-toast>\n `,\n styles: [`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .chat-conversations-container {\n display: flex;\n width: 100%;\n height: 100%;\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n .conversation-sidebar {\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--mj-bg-surface-sunken);\n transition: width 0.3s ease;\n }\n\n /* Conversation list scrolls; the routines section stays pinned at the bottom */\n .conversation-sidebar mj-conversation-list {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n }\n\n .conversation-sidebar mj-conversation-routines-section {\n flex-shrink: 0;\n }\n\n /* Disable transitions during initial load to prevent jarring animation */\n .conversation-sidebar.no-transition {\n transition: none !important;\n }\n\n .conversation-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n }\n\n /* Resize handle for sidebar */\n .sidebar-resize-handle {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n }\n\n .sidebar-resize-handle:hover {\n background: var(--mj-brand-primary);\n }\n\n .sidebar-resize-handle:active {\n background: var(--mj-brand-primary-hover);\n }\n\n .sidebar-resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n }\n\n .conversation-main {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .initializing-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n flex: 1;\n }\n\n /* Mobile: sidebar slides over the chat instead of squishing it.\n The chat area always fills the full width; the sidebar overlays on\n top and is dismissed by tapping the backdrop. */\n @media (max-width: 767px) {\n .conversation-sidebar {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n height: 100%;\n width: min(85%, 320px) !important;\n z-index: 1000;\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n box-shadow: 2px 0 12px color-mix(in srgb, var(--mj-text-primary) 25%, transparent);\n }\n\n /* Keep a fixed width in both states so only the transform animates\n (avoids text reflow during the slide). */\n .conversation-sidebar.collapsed {\n width: min(85%, 320px) !important;\n border-right: 1px solid var(--mj-border-default);\n overflow-y: auto;\n }\n\n .conversation-sidebar:not(.collapsed) {\n transform: translateX(0);\n }\n\n /* No drag-resize on mobile */\n .sidebar-resize-handle {\n display: none;\n }\n\n .mobile-sidebar-backdrop {\n position: absolute;\n inset: 0;\n background: var(--mj-bg-overlay);\n z-index: 999;\n border: none;\n padding: 0;\n cursor: pointer;\n animation: chatBackdropFade 0.2s ease;\n }\n\n @keyframes chatBackdropFade {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ChatConversationsResource extends BaseResourceComponent implements OnDestroy {\n @ViewChild('conversationList') conversationList?: ConversationListComponent;\n @ViewChild('chatArea') chatArea?: ConversationChatAreaComponent;\n\n public currentUser: any = null;\n private skipUrlUpdate = true; // Skip URL updates during initialization\n\n // Ready flag - blocks child rendering until AIEngine is initialized\n public isReady: boolean = false;\n\n // LOCAL SELECTION STATE - each wrapper instance manages its own selection\n public selectedConversationId: string | null = null;\n public selectedConversation: MJConversationEntity | null = null;\n public selectedThreadId: string | null = null;\n public isNewUnsavedConversation: boolean = false;\n public renamedConversationId: string | null = null;\n public isSidebarCollapsed: boolean = false;\n public isSidebarPinned: boolean = true; // Whether sidebar stays open after selection\n public isMobileView: boolean = false;\n public sidebarTransitionsEnabled: boolean = false; // Disabled during initial load to prevent jarring animation\n public isSidebarSettingsLoaded: boolean = false; // Prevents UI flash while loading settings\n\n // Sidebar resize state\n public sidebarWidth: number = 300; // Default width in pixels\n private isSidebarResizing: boolean = false;\n private sidebarResizeStartX: number = 0;\n private sidebarResizeStartWidth: number = 0;\n private readonly SIDEBAR_MIN_WIDTH = 200;\n private readonly SIDEBAR_MAX_WIDTH = 500;\n\n // Pending navigation state\n public pendingArtifactId: string | null = null;\n public pendingArtifactConversationId: string | null = null;\n /**\n * A pending request to open the REALTIME SESSION REVIEW overlay (deep link /\n * cross-resource nav with `realtimeSessionId`, e.g. the AI Agent Session form's\n * \"open session\" pill). Applied once after the chat area renders — this is also the\n * reference example for invoking an EXISTING realtime session programmatically:\n * `await chatArea.OpenRealtimeSessionReview(agentSessionId)` (a NEW session starts\n * through the composer's phone button / `RealtimeSessionService.StartRealtimeSession`).\n */\n public pendingRealtimeSessionId: string | null = null;\n public pendingArtifactVersionNumber: number | null = null;\n public pendingMessageToSend: string | null = null;\n public pendingAttachmentsToSend: PendingAttachment[] | null = null;\n\n // User Settings persistence\n private readonly USER_SETTING_SIDEBAR_KEY = 'Conversations.SidebarState';\n private saveSettingsTimeout: ReturnType<typeof setTimeout> | null = null;\n\n private engine = ConversationEngine.Instance;\n\n // Shared AI mention/suggestion engine (BaseSingleton — same instance the composer plugins use)\n private mentionAutocompleteService = MentionAutocompleteService.Instance;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private streamingService: ConversationStreamingService,\n private activeTasksService: ActiveTasksService,\n private uiCommandHandler: UICommandHandlerService,\n private bridge: ConversationBridgeService\n ) {\n super();\n }\n\n async ngOnInit() {\n super.ngOnInit();\n const md = this.ProviderToUse;\n this.currentUser = md.CurrentUser;\n\n // Check initial mobile state and set default collapsed\n this.checkMobileView();\n if (this.isMobileView) {\n this.isSidebarCollapsed = true;\n this.isSidebarSettingsLoaded = true; // Mobile uses defaults, no need to load from server\n // Enable transitions after a brief delay to ensure initial state is applied\n setTimeout(() => {\n this.sidebarTransitionsEnabled = true;\n }, 50);\n } else {\n // Load sidebar state from User Settings (non-blocking)\n this.loadSidebarState().then(() => {\n this.cdr.detectChanges();\n // Enable transitions after state is loaded and applied\n setTimeout(() => {\n this.sidebarTransitionsEnabled = true;\n }, 50);\n });\n }\n\n // CRITICAL: Initialize AIEngine and mention service BEFORE children render\n // This prevents the slow first-load issue where each child would trigger initialization\n await this.initializeEngines();\n\n // Initialize global streaming service for PubSub updates\n // This enables reconnection to in-progress agents after browser refresh\n this.streamingService.initialize();\n\n // Apply initial state from tab configuration (populated by shell from URL or nav params)\n this.applyConfigurationParams();\n\n // Subscribe to actionable commands (open:resource) from the UI command handler service.\n // open:url commands are handled directly by the service; open:resource needs NavigationService.\n this.uiCommandHandler.actionableCommandRequested\n .pipe(takeUntil(this.destroy$))\n .subscribe(request => this.handleActionableCommand(request.command));\n\n // Subscribe to bridge switch events so the overlay can hand off a conversation to this workspace\n this.bridge.SwitchEvent$\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => {\n if (event.Target === 'workspace' && event.ConversationID) {\n void this.selectConversation(event.ConversationID);\n this.updateTabTitle();\n this.cdr.detectChanges();\n }\n });\n\n // Notify the bridge that the workspace is active\n this.bridge.NotifyWorkspaceActive(true);\n\n // Enable URL updates after initialization\n this.skipUrlUpdate = false;\n\n // Update URL to reflect current state\n this.updateUrl();\n\n // Notify load complete after user is set\n setTimeout(() => {\n this.NotifyLoadComplete();\n }, 100);\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.bridge.NotifyWorkspaceActive(false);\n\n // Clear any pending save timeout\n if (this.saveSettingsTimeout) {\n clearTimeout(this.saveSettingsTimeout);\n }\n\n // Clean up resize event listeners\n document.removeEventListener('mousemove', this.onSidebarResizeMove);\n document.removeEventListener('mouseup', this.onSidebarResizeEnd);\n }\n\n /**\n * Initialize AI Engine, conversations, and services BEFORE child components render.\n * This prevents the slow first-load issue where initialization would block conversation loading.\n * The `false` parameter means \"don't force refresh if already initialized\".\n */\n private async initializeEngines(): Promise<void> {\n try {\n // Initialize AIEngine, conversations, and mention service in parallel\n await Promise.all([\n AIEngineBase.Instance.Config(false),\n this.engine.LoadConversations(this.environmentId, this.currentUser, false),\n this.mentionAutocompleteService.initialize(this.currentUser)\n ]);\n\n // Restore active tasks AFTER conversations are cached (uses in-memory lookup)\n await this.activeTasksService.restoreFromDatabase(this.currentUser);\n\n // Mark as ready - child components can now render\n this.isReady = true;\n this.cdr.detectChanges();\n } catch (error) {\n console.error('Failed to initialize AI engines:', error);\n // Still mark as ready so UI isn't blocked forever\n this.isReady = true;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Load the conversation entity asynchronously (non-blocking).\n * The conversationId is already set synchronously, this just loads the full entity.\n */\n private async loadConversationEntity(conversationId: string | undefined): Promise<void> {\n if (!conversationId) return;\n\n // Try to get from cache first\n const conversation = this.engine.GetConversation(conversationId);\n if (conversation) {\n this.selectedConversation = conversation;\n this.updateTabTitle();\n }\n // If not in cache, the chat area component will handle loading it\n }\n\n /**\n * Apply initial state from tab configuration.\n * The shell populates queryParams from the URL, and nav params come from cross-resource linking.\n * Sets state synchronously so child components see values immediately.\n */\n /**\n * The omnibar's '@' mode lands here with ?agent=<AgentName>: start a NEW\n * conversation with the composer pre-addressed to that agent. The mention chip\n * itself is typed by the user's send; prefilling '@\"Name\" ' is the plain-text\n * form the composer's agent-mention provider recognizes.\n */\n private applyAgentParam(agentName: string | null | undefined, requestNonce?: string | null): void {\n if (!agentName) {\n return;\n }\n // The pre-address is a one-shot INSTRUCTION keyed by agent|nonce (the omnibar\n // stamps ?agentReq=<nonce> alongside ?agent=). The shell's URL↔tab-config sync\n // can echo an already-consumed param back at us — an in-flight navigation that\n // settles AFTER our consume-clear backfills the tab config from the URL (\"URL\n // is source of truth\"). A value-only guard can't tell that echo apart from a\n // genuine re-tag of the same agent; the nonce can. Nonce-less deliveries (hand\n // typed deep links) still apply once per session.\n const requestKey = `${agentName}|${requestNonce ?? ''}`;\n if (requestKey === this.lastAppliedAgentParamKey) {\n // Stale echo. Re-issue the clear so tab config and URL converge to clean —\n // otherwise the echoed param persists into the saved workspace and re-applies\n // on every boot, wiping whatever draft the composer restored.\n console.log(`[Omnibar→Chat] wrapper: agent param '${agentName}' (req=${requestNonce ?? 'none'}) already applied — ignoring echo, re-clearing`);\n this.clearAgentParamDeferred();\n return;\n }\n console.log(`[Omnibar→Chat] wrapper: agent param '${agentName}' (req=${requestNonce ?? 'none'}) received — staging composer pre-address`);\n this.lastAppliedAgentParamKey = requestKey;\n this.isNewUnsavedConversation = true;\n this.selectedConversationId = null;\n this.selectedConversation = null;\n // Resolved mention PILL (composerAgentMention) — matching the UX of typing\n // '@agent' and picking from the dropdown; pendingMessage would AUTO-SEND.\n this.pendingComposerAgentMention = agentName;\n this.cdr.detectChanges();\n }\n\n public pendingComposerAgentMention: string | null = null;\n private lastAppliedAgentParamKey: string | null = null;\n\n public onComposerAgentMentionConsumed(): void {\n this.pendingComposerAgentMention = null;\n // Consume-and-clear: drop the agent params from the tab/URL so boots and\n // back/forward can't re-stage the pill. lastAppliedAgentParamKey is\n // intentionally NOT reset — a fresh omnibar re-tag (even of the same agent)\n // carries a new agentReq nonce and forms a new key, so anything re-delivering\n // the OLD key is by definition a stale echo.\n console.log(`[Omnibar→Chat] wrapper: pill applied — clearing agent param from URL`);\n this.clearAgentParamDeferred();\n }\n\n /**\n * Clears the agent pre-address params OUTSIDE any OnQueryParamsChanged delivery:\n * UpdateQueryParams is suppressed synchronously during delivery, so an inline\n * call from the echo path would silently no-op.\n */\n private clearAgentParamDeferred(): void {\n setTimeout(() => this.UpdateQueryParams({ agent: null, agentReq: null }), 0);\n }\n\n private applyConfigurationParams(): void {\n const config = this.Data?.Configuration;\n if (!config) return;\n\n // Check queryParams first (shell populates these from the URL for deep-linking)\n const qp = config['queryParams'] as Record<string, string> | undefined;\n this.applyAgentParam(qp?.['agent'], qp?.['agentReq']);\n\n const search = typeof window !== 'undefined' ? window.location.search : '';\n const conversationId = resolveDeepLinkParam('conversationId', search, qp, config.conversationId as string);\n const artifactId = resolveDeepLinkParam('artifactId', search, qp, config.artifactId as string);\n // Resolved the same URL-first way as artifactId above: pairing a URL artifact with the\n // previous visit's version number would open the wrong version of the right artifact.\n const rawVersion = resolveDeepLinkParam(\n 'versionNumber', search, qp, config.versionNumber != null ? String(config.versionNumber) : undefined);\n const versionNumber = rawVersion ? parseInt(rawVersion, 10) : null;\n\n // Set pending artifact if provided\n if (artifactId) {\n this.pendingArtifactId = artifactId;\n this.pendingArtifactConversationId = conversationId || null;\n this.pendingArtifactVersionNumber = versionNumber;\n }\n\n // Set conversationId synchronously so child components see it immediately\n if (conversationId) {\n this.selectedConversationId = conversationId;\n this.bridge.SetActiveFromWorkspace(conversationId);\n this.isNewUnsavedConversation = false;\n // Load entity asynchronously\n this.loadConversationEntity(conversationId);\n }\n\n const realtimeSessionId = qp?.['realtimeSessionId'] || (config['realtimeSessionId'] as string);\n if (realtimeSessionId) {\n this.pendingRealtimeSessionId = realtimeSessionId;\n this.applyPendingRealtimeSessionReview();\n }\n }\n\n /** Opens the pending realtime session review once the chat area exists (retries next tick while it renders). */\n private applyPendingRealtimeSessionReview(): void {\n const sessionId = this.pendingRealtimeSessionId;\n if (!sessionId) {\n return;\n }\n if (!this.chatArea) {\n setTimeout(() => this.applyPendingRealtimeSessionReview(), 50);\n return;\n }\n this.pendingRealtimeSessionId = null;\n void this.chatArea.OpenRealtimeSessionReview(sessionId).then((opened) => {\n if (!opened) {\n console.warn(`Chat: could not open realtime session review for '${sessionId}'`);\n }\n });\n }\n\n /**\n * React to query param changes that arrive AFTER initial load — e.g. clicking a\n * Home pin for a different conversation, or browser back/forward — when this tab\n * already exists and is simply re-focused (so ngOnInit / applyConfigurationParams\n * does NOT run again). Without this, every pin would land on whatever conversation\n * was already open instead of the pinned one.\n */\n protected override OnQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void {\n this.applyAgentParam(params['agent'], params['agentReq']);\n const realtimeSessionId = params['realtimeSessionId'] || null;\n if (realtimeSessionId) {\n this.pendingRealtimeSessionId = realtimeSessionId;\n this.applyPendingRealtimeSessionReview();\n }\n const conversationId = params['conversationId'] || null;\n const artifactId = params['artifactId'] || null;\n const versionNumber = params['versionNumber'] ? parseInt(params['versionNumber'], 10) : null;\n\n // Reflect any artifact intent so the chat area can open it.\n this.pendingArtifactId = artifactId;\n this.pendingArtifactConversationId = artifactId ? conversationId : null;\n this.pendingArtifactVersionNumber = versionNumber;\n\n if (conversationId && conversationId !== this.selectedConversationId) {\n // The URL is already the source of truth here — suppress the echo back to it.\n // selectConversation()'s body is synchronous up to its URL-update check, so\n // toggling the flag around the call reliably gates that check.\n const prevSkip = this.skipUrlUpdate;\n this.skipUrlUpdate = true;\n void this.selectConversation(conversationId);\n this.skipUrlUpdate = prevSkip;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Apply navigation state to local selection state.\n * Sets state synchronously so child components see values immediately.\n */\n /**\n * Select a conversation by ID - loads the entity and updates local state\n */\n private async selectConversation(conversationId: string): Promise<void> {\n this.selectedConversationId = conversationId;\n this.isNewUnsavedConversation = false;\n\n // Keep bridge in sync so other consumers (toast suppression, overlay) know\n // which conversation the workspace is viewing\n this.bridge.SetActiveFromWorkspace(conversationId);\n\n // Load the conversation entity from data service\n const conversation = this.engine.GetConversation(conversationId);\n if (conversation) {\n this.selectedConversation = conversation;\n } else {\n // Conversation might not be loaded yet - the chat area will handle loading\n this.selectedConversation = null;\n }\n\n // Update URL if not skipping\n if (!this.skipUrlUpdate) {\n this.updateUrl();\n }\n }\n\n /**\n * Update URL query string to reflect current state.\n * Uses NavigationService for proper URL management that respects app-scoped routes.\n */\n private updateUrl(): void {\n const queryParams: Record<string, string | null> = {};\n\n // Add conversation ID\n if (this.selectedConversationId) {\n queryParams['conversationId'] = this.selectedConversationId;\n } else {\n queryParams['conversationId'] = null;\n }\n\n // Add artifact ID if we have a pending artifact (will be cleared once opened)\n if (this.pendingArtifactId) {\n queryParams['artifactId'] = this.pendingArtifactId;\n if (this.pendingArtifactVersionNumber) {\n queryParams['versionNumber'] = this.pendingArtifactVersionNumber.toString();\n }\n } else {\n queryParams['artifactId'] = null;\n queryParams['versionNumber'] = null;\n }\n\n // realtimeSessionId is a one-shot deep-link trigger (e.g. from the AI Agent Session\n // form). Always clear it from the tab params here — leaving it lingering re-delivers\n // it on every tab re-focus / popstate, which reopened the review overlay forever\n // (the live-tested \"stuck overlay\" bug).\n queryParams['realtimeSessionId'] = null;\n\n // Use the resource-scoped helper so a cached conversation component cannot\n // write conversation params onto a tab that has since been reused for a record.\n this.UpdateQueryParams(queryParams);\n }\n\n /**\n * Update the tab/browser title based on the currently selected conversation.\n */\n private updateTabTitle(): void {\n if (this.isNewUnsavedConversation || !this.selectedConversation) {\n this.NotifyDisplayNameChanged('Conversations');\n return;\n }\n const name = this.selectedConversation.Name;\n if (name) {\n this.NotifyDisplayNameChanged(name);\n }\n }\n\n\n /**\n * Get the environment ID from configuration or use default\n */\n get environmentId(): string {\n return this.Data?.Configuration?.environmentId || MJEnvironmentEntityExtended.DefaultEnvironmentID;\n }\n\n /**\n * Get the display name for chat conversations\n */\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n // If we have a specific conversation ID, we could load the conversation name\n // For now, just return a generic name\n if (data.Configuration?.conversationId) {\n return `Conversation: ${(data.Configuration.conversationId as string).substring(0, 8)}...`;\n }\n return 'Conversations';\n }\n\n /**\n * Get the icon class for chat conversations\n */\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-comments';\n }\n\n // ============================================\n // EVENT HANDLERS FROM CHILD COMPONENTS\n // ============================================\n\n /**\n * Handle refresh request from the conversation list.\n * After the list refreshes, also reload messages in the active chat area so any\n * new agent responses are visible without a full page reload.\n */\n onRefreshRequested(): void {\n void this.chatArea?.reloadMessages();\n }\n\n /**\n * Handle conversation deletion from the list.\n * If the deleted conversation was selected, navigate to the first remaining conversation.\n */\n onConversationDeleted(deletedId: string): void {\n if (this.selectedConversationId === deletedId) {\n const remaining = this.engine.Conversations.filter(c => !UUIDsEqual(c.ID, deletedId));\n if (remaining.length > 0) {\n void this.selectConversation(remaining[0].ID);\n this.updateUrl();\n } else {\n this.selectedConversationId = null;\n this.selectedConversation = null;\n this.selectedThreadId = null;\n this.isNewUnsavedConversation = true;\n this.updateUrl();\n }\n }\n }\n\n /**\n * Handle conversation selection from the list\n */\n async onConversationSelected(conversationId: string): Promise<void> {\n await this.selectConversation(conversationId);\n this.selectedThreadId = null; // Clear thread when switching conversations\n this.isNewUnsavedConversation = false;\n this.updateUrl();\n this.updateTabTitle();\n\n // Auto-collapse if mobile OR if sidebar is not pinned\n if (this.isMobileView || !this.isSidebarPinned) {\n this.collapseSidebar();\n }\n }\n\n @HostListener('window:resize')\n onWindowResize(): void {\n this.checkMobileView();\n }\n\n /**\n * Handle clicks outside the sidebar to auto-collapse when unpinned\n */\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n // Only handle when sidebar is expanded but unpinned\n if (this.isSidebarCollapsed || this.isSidebarPinned) {\n return;\n }\n\n // Check if click is outside the sidebar\n const target = event.target as HTMLElement;\n const sidebarElement = target.closest('.conversation-sidebar');\n const expandHandle = target.closest('.sidebar-expand-handle');\n\n // If click is outside sidebar and expand handle, collapse it\n if (!sidebarElement && !expandHandle) {\n this.collapseSidebar();\n }\n }\n\n /**\n * Check if we're in mobile view and handle state accordingly\n */\n private checkMobileView(): void {\n const wasMobile = this.isMobileView;\n this.isMobileView = window.innerWidth < 768;\n\n if (this.isMobileView && !wasMobile) {\n // Switched to mobile - default to collapsed\n this.isSidebarCollapsed = true;\n }\n }\n\n /**\n * Collapse sidebar\n */\n collapseSidebar(): void {\n this.isSidebarCollapsed = true;\n }\n\n /**\n * Expand sidebar (pinned - stays open until unpinned)\n */\n expandSidebar(): void {\n this.isSidebarCollapsed = false;\n this.isSidebarPinned = true; // Pin it so it stays open\n this.saveSidebarState();\n }\n\n /**\n * Handle sidebar resize start\n */\n onSidebarResizeStart(event: MouseEvent): void {\n event.preventDefault();\n this.isSidebarResizing = true;\n this.sidebarResizeStartX = event.clientX;\n this.sidebarResizeStartWidth = this.sidebarWidth;\n\n // Disable transitions during resize for immediate feedback\n this.sidebarTransitionsEnabled = false;\n\n // Add event listeners for mousemove and mouseup\n document.addEventListener('mousemove', this.onSidebarResizeMove);\n document.addEventListener('mouseup', this.onSidebarResizeEnd);\n }\n\n /**\n * Handle sidebar resize move (bound method for proper 'this' context)\n */\n private onSidebarResizeMove = (event: MouseEvent): void => {\n if (!this.isSidebarResizing) return;\n\n const delta = event.clientX - this.sidebarResizeStartX;\n const newWidth = this.sidebarResizeStartWidth + delta;\n\n // Clamp to min/max bounds\n this.sidebarWidth = Math.max(this.SIDEBAR_MIN_WIDTH, Math.min(this.SIDEBAR_MAX_WIDTH, newWidth));\n this.cdr.detectChanges();\n };\n\n /**\n * Handle sidebar resize end (bound method for proper 'this' context)\n */\n private onSidebarResizeEnd = (): void => {\n if (!this.isSidebarResizing) return;\n\n this.isSidebarResizing = false;\n\n // Re-enable transitions for collapse/expand animations\n this.sidebarTransitionsEnabled = true;\n\n // Remove event listeners\n document.removeEventListener('mousemove', this.onSidebarResizeMove);\n document.removeEventListener('mouseup', this.onSidebarResizeEnd);\n\n // Save the new width to User Settings\n this.saveSidebarState();\n };\n\n /**\n * Pin sidebar - keep it open after selection\n */\n pinSidebar(): void {\n this.isSidebarPinned = true;\n this.saveSidebarState();\n }\n\n /**\n * Unpin sidebar - will auto-collapse on next selection\n */\n unpinSidebar(): void {\n this.isSidebarPinned = false;\n this.collapseSidebar();\n this.saveSidebarState();\n }\n\n /**\n * Save sidebar state to User Settings (server only - no localStorage fallback)\n * Uses debouncing to avoid excessive database writes\n */\n private saveSidebarState(): void {\n // Debounce the server save to avoid excessive writes\n if (this.saveSettingsTimeout) {\n clearTimeout(this.saveSettingsTimeout);\n }\n this.saveSettingsTimeout = setTimeout(() => {\n this.saveSidebarStateToServer();\n }, 1000); // 1 second debounce\n }\n\n /**\n * Save sidebar state to User Settings entity on server using UserInfoEngine for cached lookup\n */\n private async saveSidebarStateToServer(): Promise<void> {\n try {\n const userId = this.currentUser?.ID;\n if (!userId) {\n return;\n }\n\n const stateToSave = {\n collapsed: this.isSidebarCollapsed,\n pinned: this.isSidebarPinned,\n width: this.sidebarWidth\n };\n\n const engine = UserInfoEngine.Instance;\n const md = this.ProviderToUse;\n\n // Find existing setting from cached user settings\n let setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);\n\n if (!setting) {\n // Create new setting\n setting = await md.GetEntityObject<MJUserSettingEntity>('MJ: User Settings');\n setting.UserID = userId;\n setting.Setting = this.USER_SETTING_SIDEBAR_KEY;\n }\n\n setting.Value = JSON.stringify(stateToSave);\n await setting.Save();\n } catch (error) {\n console.warn('Failed to save sidebar state to User Settings:', error);\n }\n }\n\n /**\n * Load sidebar state from User Settings (server) using UserInfoEngine\n * For new users with no saved state, defaults to collapsed with new conversation\n */\n private async loadSidebarState(): Promise<void> {\n try {\n const userId = this.currentUser?.ID;\n if (userId) {\n // Load from cached User Settings\n const engine = UserInfoEngine.Instance;\n const setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);\n\n if (setting?.Value) {\n const state = JSON.parse(setting.Value);\n this.isSidebarCollapsed = state.collapsed ?? true;\n this.isSidebarPinned = state.pinned ?? false;\n this.sidebarWidth = state.width ?? 300;\n // Clamp width to valid range\n this.sidebarWidth = Math.max(this.SIDEBAR_MIN_WIDTH, Math.min(this.SIDEBAR_MAX_WIDTH, this.sidebarWidth));\n this.isSidebarSettingsLoaded = true;\n return;\n }\n }\n\n // No saved state found - NEW USER DEFAULT:\n // Start with sidebar collapsed and show new conversation screen\n this.isSidebarCollapsed = true;\n this.isSidebarPinned = false;\n this.sidebarWidth = 300;\n this.isNewUnsavedConversation = true;\n this.isSidebarSettingsLoaded = true;\n } catch (error) {\n console.warn('Failed to load sidebar state:', error);\n // Default to collapsed for new users on error\n this.isSidebarCollapsed = true;\n this.isSidebarPinned = false;\n this.sidebarWidth = 300;\n this.isSidebarSettingsLoaded = true;\n }\n }\n\n /**\n * Handle new conversation request from the list\n */\n onNewConversationRequested(): void {\n this.selectedConversationId = null;\n this.selectedConversation = null;\n this.selectedThreadId = null;\n this.isNewUnsavedConversation = true;\n this.updateUrl();\n this.NotifyDisplayNameChanged('New Conversation');\n\n // Auto-collapse if mobile OR if sidebar is not pinned\n if (this.isMobileView || !this.isSidebarPinned) {\n this.collapseSidebar();\n }\n }\n\n /**\n * Handle conversation created from chat area (after first message in new conversation).\n * The event now includes pending message and attachments for atomic state update.\n */\n async onConversationCreated(event: {\n conversation: MJConversationEntity;\n pendingMessage?: string;\n pendingAttachments?: PendingAttachment[];\n }): Promise<void> {\n // Set ALL state atomically before Angular change detection runs\n this.pendingMessageToSend = event.pendingMessage || null;\n this.pendingAttachmentsToSend = event.pendingAttachments || null;\n this.selectedConversationId = event.conversation.ID;\n this.selectedConversation = event.conversation;\n this.isNewUnsavedConversation = false;\n this.bridge.SetActiveFromWorkspace(event.conversation.ID);\n this.updateUrl();\n this.updateTabTitle();\n }\n\n /**\n * Handle conversation rename event\n */\n onConversationRenamed(event: { conversationId: string; name: string; description: string }): void {\n // Trigger rename animation in the list\n this.renamedConversationId = event.conversationId;\n\n // Update tab title with the new name\n if (event.name) {\n this.NotifyDisplayNameChanged(event.name);\n }\n\n // Clear the animation trigger after it completes\n setTimeout(() => {\n this.renamedConversationId = null;\n }, 1500);\n }\n\n /**\n * Handle thread opened event\n */\n onThreadOpened(threadId: string): void {\n this.selectedThreadId = threadId;\n }\n\n /**\n * Handle thread closed event\n */\n onThreadClosed(): void {\n this.selectedThreadId = null;\n }\n\n /**\n * Handle pending artifact consumed event\n */\n onPendingArtifactConsumed(): void {\n this.pendingArtifactId = null;\n this.pendingArtifactConversationId = null;\n this.pendingArtifactVersionNumber = null;\n // Update URL to remove artifact params\n this.updateUrl();\n }\n\n /**\n * Handle pending message consumed event\n */\n onPendingMessageConsumed(): void {\n this.pendingMessageToSend = null;\n this.pendingAttachmentsToSend = null;\n }\n\n /**\n * Handle pending message requested event (from empty state creating conversation).\n * @deprecated Use onConversationCreated with pendingMessage instead - this is kept for backwards compatibility.\n */\n onPendingMessageRequested(event: {text: string; attachments: PendingAttachment[]}): void {\n this.pendingMessageToSend = event.text;\n this.pendingAttachmentsToSend = event.attachments || null;\n }\n\n /**\n * Handle navigation request from artifact viewer panel within the chat area.\n * Converts the link event to a generic navigation request and uses NavigationService.\n */\n onArtifactLinkClicked(event: {\n type: 'conversation' | 'collection';\n id: string;\n artifactId?: string;\n versionNumber?: number;\n }): void {\n // Map the link type to the nav item name\n const navItemName = event.type === 'conversation' ? 'Conversations' : 'Collections';\n\n // Build configuration params to pass to the target resource\n const params: Record<string, unknown> = {};\n if (event.type === 'conversation') {\n params['conversationId'] = event.id;\n } else {\n params['collectionId'] = event.id;\n }\n\n // Include artifact info so destination can open it\n if (event.artifactId) {\n params['artifactId'] = event.artifactId;\n if (event.versionNumber) {\n params['versionNumber'] = event.versionNumber;\n }\n }\n\n // Navigate using the generic nav item method\n this.navigationService.OpenNavItemByName(navItemName, params);\n }\n\n /**\n * Handle entity record open request from chat area (from React component grids).\n * Uses NavigationService to open the record in a new tab.\n */\n onOpenEntityRecord(event: {entityName: string; compositeKey: CompositeKey}): void {\n this.navigationService.OpenEntityRecord(event.entityName, event.compositeKey);\n }\n\n /**\n * Handle navigation request from artifact viewer plugins.\n * Opens the target nav item (switching apps if needed) then applies query params to the URL.\n */\n async onNavigationRequest(event: NavigationRequest): Promise<void> {\n const appId = event.appName ? this.resolveAppId(event.appName) : undefined;\n await this.navigationService.OpenNavItemByName(event.navItemName, undefined, appId, {\n queryParams: event.queryParams\n });\n }\n\n /**\n * Resolve an application name to its ID.\n */\n private resolveAppId(appName: string): string | undefined {\n const md = this.ProviderToUse;\n const apps = md.Applications;\n const app = apps.find(a => a.Name.toLowerCase() === appName.toLowerCase());\n return app?.ID;\n }\n\n /**\n * Handle actionable commands that require app-specific navigation (open:resource).\n * open:url commands are already handled directly by UICommandHandlerService.\n */\n private handleActionableCommand(command: ActionableCommand): void {\n if (command.type === 'open:resource') {\n const resourceCommand = command as OpenResourceCommand;\n if (resourceCommand.resourceType === 'Record') {\n // Record opens are emitted as openEntityRecord from mj-conversation-chat-area\n // (composite-key aware). Handling them here too would open the record twice.\n return;\n } else if (resourceCommand.resourceType === 'Report' || resourceCommand.resourceType === 'Dashboard') {\n // Reports and dashboards from agents are stored as conversation artifacts.\n // Find the most recent artifact in the active conversation and open it.\n this.openMostRecentArtifact();\n }\n }\n }\n\n /**\n * Open the most recent artifact in the active conversation's artifact viewer.\n * Used for open:resource commands with resourceType Report/Dashboard where\n * the resourceId is an agent-internal ID, not a database artifact ID.\n */\n private openMostRecentArtifact(): void {\n if (!this.chatArea) return;\n\n // Find the last artifact across all messages\n const artifactMap = this.chatArea.artifactsByDetailId;\n let latestArtifact: { artifactId: string; versionId?: string } | null = null;\n for (const artifacts of artifactMap.values()) {\n if (artifacts.length > 0) {\n const last = artifacts[artifacts.length - 1];\n latestArtifact = {\n artifactId: last.artifactId,\n versionId: last.artifactVersionId\n };\n }\n }\n\n if (latestArtifact) {\n this.chatArea.onArtifactClicked(latestArtifact);\n } else {\n console.warn('No artifacts found in conversation to open for Report/Dashboard command');\n }\n }\n}\n"]}
1
+ {"version":3,"file":"chat-conversations-resource.component.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-conversations-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAa,SAAS,EAAqB,YAAY,EAAE,MAAM,eAAe,CAAC;AAEpH,OAAO,EAAE,aAAa,EAAG,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAqB,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAgB,2BAA2B,EAA6C,cAAc,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACzK,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAGxG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,qBAA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C,UAAU;;kBA6sBpB,YAAY;mBAAC,eAAe;;kBAQ5B,YAAY;mBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;kFAhuB/B,yBAAyB","sourcesContent":["import { Component, ViewEncapsulation, OnDestroy, ViewChild, ChangeDetectorRef, HostListener } from '@angular/core';\nimport { Metadata, CompositeKey } from '@memberjunction/core';\nimport { RegisterClass , UUIDsEqual } from '@memberjunction/global';\nimport { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';\nimport { ResourceData, MJEnvironmentEntityExtended, MJConversationEntity, MJUserSettingEntity, UserInfoEngine, ConversationEngine } from '@memberjunction/core-entities';\nimport { ResolveDeepLinkParam } from './chat-deeplink-params.js';\nimport { ResolveChatSearchRoute } from './chat-search-routing.js';\nimport { ResolveComposeEmailDraft, BuildComposeEmailFallbackNotice } from './compose-email-fallback.js';\nimport { ConversationChatAreaComponent, ConversationListComponent, ConversationStreamingService, ActiveTasksService, UICommandHandlerService, ConversationBridgeService, SearchResult, ActionableCommandRequest } from '@memberjunction/ng-conversations';\nimport { PendingAttachment } from '@memberjunction/ng-composer';\nimport { MentionAutocompleteService } from '@memberjunction/ng-conversations';\nimport { ComposeEmailCommand, OpenResourceCommand } from '@memberjunction/ai-core-plus';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\nimport { NavigationRequest } from '@memberjunction/ng-artifacts';\nimport { AIEngineBase } from '@memberjunction/ai-engine-base';\nimport { Subject, takeUntil } from 'rxjs';\n/**\n * Chat Conversations Resource - wraps the conversation chat area for tab-based display\n * Extends BaseResourceComponent to work with the resource type system\n * Displays conversation list sidebar + active conversation chat interface\n * Designed to work with the tab system for multi-tab conversation management\n *\n * This component manages its own selection state locally, following the encapsulation pattern:\n * - ConversationEngine singleton is used for shared DATA (caching, loading, saving)\n * - Local state variables manage SELECTION state (which conversation is active)\n * - State flows down to children via @Input, events flow up via @Output\n */\n@RegisterClass(BaseResourceComponent, 'ChatConversationsResource')\n@Component({\n standalone: false,\n selector: 'mj-chat-conversations-resource',\n template: `\n @if (isReady) {\n <div class=\"chat-conversations-container\">\n <!-- Mobile backdrop: tap to close the slide-over sidebar -->\n @if (isMobileView && !isSidebarCollapsed && isSidebarSettingsLoaded) {\n <div class=\"mobile-sidebar-backdrop\" (click)=\"collapseSidebar()\"></div>\n }\n <!-- Left sidebar: Conversation list -->\n @if (isSidebarSettingsLoaded) {\n <div class=\"conversation-sidebar\"\n [class.collapsed]=\"isSidebarCollapsed\"\n [class.no-transition]=\"!sidebarTransitionsEnabled\"\n [style.width.px]=\"isSidebarCollapsed ? 0 : sidebarWidth\">\n @if (currentUser) {\n <mj-conversation-list\n #conversationList\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (conversationDeleted)=\"onConversationDeleted($event)\"\n (newConversationRequested)=\"onNewConversationRequested()\"\n (pinSidebarRequested)=\"pinSidebar()\"\n (unpinSidebarRequested)=\"unpinSidebar()\"\n (refreshRequested)=\"onRefreshRequested()\"\n (SearchEscalated)=\"OpenSearch($event)\">\n </mj-conversation-list>\n <!-- Routines — pinned at the very bottom of the sidebar. Gated inside the\n section component by Read permission on 'MJ: User Routines'. -->\n <mj-conversation-routines-section\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (openConversation)=\"onConversationSelected($event)\">\n </mj-conversation-routines-section>\n }\n </div>\n }\n <!-- Resize handle for sidebar (only when expanded and settings loaded) -->\n @if (!isSidebarCollapsed && isSidebarSettingsLoaded) {\n <div class=\"sidebar-resize-handle\"\n (mousedown)=\"onSidebarResizeStart($event)\"></div>\n }\n <!-- Main area: Chat interface -->\n <div class=\"conversation-main\">\n @if (currentUser) {\n <mj-conversation-chat-area\n #chatArea\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n [conversation]=\"selectedConversation\"\n [threadId]=\"selectedThreadId\"\n [isNewConversation]=\"isNewUnsavedConversation\"\n [pendingMessage]=\"pendingMessageToSend\"\n [pendingAttachments]=\"pendingAttachmentsToSend\"\n [pendingArtifactId]=\"pendingArtifactId\"\n [pendingArtifactConversationId]=\"pendingArtifactConversationId\"\n [pendingArtifactVersionNumber]=\"pendingArtifactVersionNumber\"\n [showSidebarToggle]=\"isSidebarCollapsed && isSidebarSettingsLoaded\"\n (sidebarToggleClicked)=\"expandSidebar()\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (conversationCreated)=\"onConversationCreated($event)\"\n (threadOpened)=\"onThreadOpened($event)\"\n (threadClosed)=\"onThreadClosed()\"\n (pendingArtifactConsumed)=\"onPendingArtifactConsumed()\"\n (pendingMessageConsumed)=\"onPendingMessageConsumed()\"\n (pendingMessageRequested)=\"onPendingMessageRequested($event)\"\n (artifactLinkClicked)=\"onArtifactLinkClicked($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (navigationRequest)=\"onNavigationRequest($event)\"\n [composerAgentMention]=\"pendingComposerAgentMention\"\n (composerAgentMentionConsumed)=\"onComposerAgentMentionConsumed()\">\n </mj-conversation-chat-area>\n }\n </div>\n </div>\n } @else {\n <div class=\"initializing-container\">\n <mj-loading text=\"Initializing...\" size=\"large\"></mj-loading>\n </div>\n }\n \n <!-- Cross-entity search panel (conversations / messages / artifacts / collections / tasks) -->\n @if (CurrentUser) {\n <mj-search-panel\n [InitialQuery]=\"SearchSeedQuery\"\n [IsOpen]=\"IsSearchPanelOpen\"\n [EnvironmentId]=\"EnvironmentId\"\n [CurrentUser]=\"CurrentUser\"\n (close)=\"CloseSearch()\"\n (ResultSelected)=\"OnSearchResultSelected($event)\">\n </mj-search-panel>\n }\n\n <!-- Toast notifications container -->\n <mj-toast></mj-toast>\n `,\n styles: [`\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .chat-conversations-container {\n display: flex;\n width: 100%;\n height: 100%;\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n .conversation-sidebar {\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n display: flex;\n flex-direction: column;\n overflow: hidden;\n background: var(--mj-bg-surface-sunken);\n transition: width 0.3s ease;\n }\n\n /* Conversation list scrolls; the routines section stays pinned at the bottom */\n .conversation-sidebar mj-conversation-list {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n }\n\n .conversation-sidebar mj-conversation-routines-section {\n flex-shrink: 0;\n }\n\n /* Disable transitions during initial load to prevent jarring animation */\n .conversation-sidebar.no-transition {\n transition: none !important;\n }\n\n .conversation-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n }\n\n /* Resize handle for sidebar */\n .sidebar-resize-handle {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n }\n\n .sidebar-resize-handle:hover {\n background: var(--mj-brand-primary);\n }\n\n .sidebar-resize-handle:active {\n background: var(--mj-brand-primary-hover);\n }\n\n .sidebar-resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n }\n\n .conversation-main {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .initializing-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n flex: 1;\n }\n\n /* Mobile: sidebar slides over the chat instead of squishing it.\n The chat area always fills the full width; the sidebar overlays on\n top and is dismissed by tapping the backdrop. */\n @media (max-width: 767px) {\n .conversation-sidebar {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n height: 100%;\n width: min(85%, 320px) !important;\n z-index: 1000;\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n box-shadow: 2px 0 12px color-mix(in srgb, var(--mj-text-primary) 25%, transparent);\n }\n\n /* Keep a fixed width in both states so only the transform animates\n (avoids text reflow during the slide). */\n .conversation-sidebar.collapsed {\n width: min(85%, 320px) !important;\n border-right: 1px solid var(--mj-border-default);\n overflow-y: auto;\n }\n\n .conversation-sidebar:not(.collapsed) {\n transform: translateX(0);\n }\n\n /* No drag-resize on mobile */\n .sidebar-resize-handle {\n display: none;\n }\n\n .mobile-sidebar-backdrop {\n position: absolute;\n inset: 0;\n background: var(--mj-bg-overlay);\n z-index: 999;\n border: none;\n padding: 0;\n cursor: pointer;\n animation: chatBackdropFade 0.2s ease;\n }\n\n @keyframes chatBackdropFade {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ChatConversationsResource extends BaseResourceComponent implements OnDestroy {\n @ViewChild('conversationList') ConversationList?: ConversationListComponent;\n\n /** @deprecated Use {@link ConversationList}. */\n get conversationList(): ConversationListComponent | undefined {\n return this.ConversationList;\n }\n /** @deprecated Use {@link ConversationList}. */\n set conversationList(value: ConversationListComponent | undefined) {\n this.ConversationList = value;\n }\n @ViewChild('chatArea') ChatArea?: ConversationChatAreaComponent;\n\n /** @deprecated Use {@link ChatArea}. */\n get chatArea(): ConversationChatAreaComponent | undefined {\n return this.ChatArea;\n }\n /** @deprecated Use {@link ChatArea}. */\n set chatArea(value: ConversationChatAreaComponent | undefined) {\n this.ChatArea = value;\n }\n\n public CurrentUser: any = null;\n\n /** @deprecated Use {@link CurrentUser}. */\n public get currentUser(): any {\n return this.CurrentUser;\n }\n /** @deprecated Use {@link CurrentUser}. */\n public set currentUser(value: any) {\n this.CurrentUser = value;\n }\n private skipUrlUpdate = true; // Skip URL updates during initialization\n\n // Ready flag - blocks child rendering until AIEngine is initialized\n public IsReady: boolean = false;\n\n /** @deprecated Use {@link IsReady}. */\n public get isReady(): boolean {\n return this.IsReady;\n }\n /** @deprecated Use {@link IsReady}. */\n public set isReady(value: boolean) {\n this.IsReady = value;\n }\n\n // LOCAL SELECTION STATE - each wrapper instance manages its own selection\n public SelectedConversationId: string | null = null;\n\n /** @deprecated Use {@link SelectedConversationId}. */\n public get selectedConversationId(): string | null {\n return this.SelectedConversationId;\n }\n /** @deprecated Use {@link SelectedConversationId}. */\n public set selectedConversationId(value: string | null) {\n this.SelectedConversationId = value;\n }\n public SelectedConversation: MJConversationEntity | null = null;\n\n /** @deprecated Use {@link SelectedConversation}. */\n public get selectedConversation(): MJConversationEntity | null {\n return this.SelectedConversation;\n }\n /** @deprecated Use {@link SelectedConversation}. */\n public set selectedConversation(value: MJConversationEntity | null) {\n this.SelectedConversation = value;\n }\n public SelectedThreadId: string | null = null;\n\n /** @deprecated Use {@link SelectedThreadId}. */\n public get selectedThreadId(): string | null {\n return this.SelectedThreadId;\n }\n /** @deprecated Use {@link SelectedThreadId}. */\n public set selectedThreadId(value: string | null) {\n this.SelectedThreadId = value;\n }\n public IsNewUnsavedConversation: boolean = false;\n\n /** @deprecated Use {@link IsNewUnsavedConversation}. */\n public get isNewUnsavedConversation(): boolean {\n return this.IsNewUnsavedConversation;\n }\n /** @deprecated Use {@link IsNewUnsavedConversation}. */\n public set isNewUnsavedConversation(value: boolean) {\n this.IsNewUnsavedConversation = value;\n }\n public RenamedConversationId: string | null = null;\n\n /** @deprecated Use {@link RenamedConversationId}. */\n public get renamedConversationId(): string | null {\n return this.RenamedConversationId;\n }\n /** @deprecated Use {@link RenamedConversationId}. */\n public set renamedConversationId(value: string | null) {\n this.RenamedConversationId = value;\n }\n public IsSidebarCollapsed: boolean = false;\n\n /** @deprecated Use {@link IsSidebarCollapsed}. */\n public get isSidebarCollapsed(): boolean {\n return this.IsSidebarCollapsed;\n }\n /** @deprecated Use {@link IsSidebarCollapsed}. */\n public set isSidebarCollapsed(value: boolean) {\n this.IsSidebarCollapsed = value;\n }\n public IsSidebarPinned: boolean = true;\n\n /** @deprecated Use {@link IsSidebarPinned}. */\n public get isSidebarPinned(): boolean {\n return this.IsSidebarPinned;\n }\n /** @deprecated Use {@link IsSidebarPinned}. */\n public set isSidebarPinned(value: boolean) {\n this.IsSidebarPinned = value;\n } // Whether sidebar stays open after selection\n public IsMobileView: boolean = false;\n\n /** @deprecated Use {@link IsMobileView}. */\n public get isMobileView(): boolean {\n return this.IsMobileView;\n }\n /** @deprecated Use {@link IsMobileView}. */\n public set isMobileView(value: boolean) {\n this.IsMobileView = value;\n }\n public SidebarTransitionsEnabled: boolean = false;\n\n /** @deprecated Use {@link SidebarTransitionsEnabled}. */\n public get sidebarTransitionsEnabled(): boolean {\n return this.SidebarTransitionsEnabled;\n }\n /** @deprecated Use {@link SidebarTransitionsEnabled}. */\n public set sidebarTransitionsEnabled(value: boolean) {\n this.SidebarTransitionsEnabled = value;\n } // Disabled during initial load to prevent jarring animation\n public IsSidebarSettingsLoaded: boolean = false;\n\n /** @deprecated Use {@link IsSidebarSettingsLoaded}. */\n public get isSidebarSettingsLoaded(): boolean {\n return this.IsSidebarSettingsLoaded;\n }\n /** @deprecated Use {@link IsSidebarSettingsLoaded}. */\n public set isSidebarSettingsLoaded(value: boolean) {\n this.IsSidebarSettingsLoaded = value;\n } // Prevents UI flash while loading settings\n\n // Sidebar resize state\n public SidebarWidth: number = 300;\n\n /** @deprecated Use {@link SidebarWidth}. */\n public get sidebarWidth(): number {\n return this.SidebarWidth;\n }\n /** @deprecated Use {@link SidebarWidth}. */\n public set sidebarWidth(value: number) {\n this.SidebarWidth = value;\n } // Default width in pixels\n private isSidebarResizing: boolean = false;\n private sidebarResizeStartX: number = 0;\n private sidebarResizeStartWidth: number = 0;\n private readonly SIDEBAR_MIN_WIDTH = 200;\n private readonly SIDEBAR_MAX_WIDTH = 500;\n\n // Pending navigation state\n public PendingArtifactId: string | null = null;\n\n /** @deprecated Use {@link PendingArtifactId}. */\n public get pendingArtifactId(): string | null {\n return this.PendingArtifactId;\n }\n /** @deprecated Use {@link PendingArtifactId}. */\n public set pendingArtifactId(value: string | null) {\n this.PendingArtifactId = value;\n }\n public PendingArtifactConversationId: string | null = null;\n\n /** @deprecated Use {@link PendingArtifactConversationId}. */\n public get pendingArtifactConversationId(): string | null {\n return this.PendingArtifactConversationId;\n }\n /** @deprecated Use {@link PendingArtifactConversationId}. */\n public set pendingArtifactConversationId(value: string | null) {\n this.PendingArtifactConversationId = value;\n }\n /**\n * A pending request to open the REALTIME SESSION REVIEW overlay (deep link /\n * cross-resource nav with `realtimeSessionId`, e.g. the AI Agent Session form's\n * \"open session\" pill). Applied once after the chat area renders — this is also the\n * reference example for invoking an EXISTING realtime session programmatically:\n * `await chatArea.OpenRealtimeSessionReview(agentSessionId)` (a NEW session starts\n * through the composer's phone button / `RealtimeSessionService.StartRealtimeSession`).\n */\n public PendingRealtimeSessionId: string | null = null;\n\n /** @deprecated Use {@link PendingRealtimeSessionId}. */\n public get pendingRealtimeSessionId(): string | null {\n return this.PendingRealtimeSessionId;\n }\n /** @deprecated Use {@link PendingRealtimeSessionId}. */\n public set pendingRealtimeSessionId(value: string | null) {\n this.PendingRealtimeSessionId = value;\n }\n public PendingArtifactVersionNumber: number | null = null;\n\n /** @deprecated Use {@link PendingArtifactVersionNumber}. */\n public get pendingArtifactVersionNumber(): number | null {\n return this.PendingArtifactVersionNumber;\n }\n /** @deprecated Use {@link PendingArtifactVersionNumber}. */\n public set pendingArtifactVersionNumber(value: number | null) {\n this.PendingArtifactVersionNumber = value;\n }\n public PendingMessageToSend: string | null = null;\n\n /** @deprecated Use {@link PendingMessageToSend}. */\n public get pendingMessageToSend(): string | null {\n return this.PendingMessageToSend;\n }\n /** @deprecated Use {@link PendingMessageToSend}. */\n public set pendingMessageToSend(value: string | null) {\n this.PendingMessageToSend = value;\n }\n public PendingAttachmentsToSend: PendingAttachment[] | null = null;\n\n /** @deprecated Use {@link PendingAttachmentsToSend}. */\n public get pendingAttachmentsToSend(): PendingAttachment[] | null {\n return this.PendingAttachmentsToSend;\n }\n /** @deprecated Use {@link PendingAttachmentsToSend}. */\n public set pendingAttachmentsToSend(value: PendingAttachment[] | null) {\n this.PendingAttachmentsToSend = value;\n }\n\n // User Settings persistence\n private readonly USER_SETTING_SIDEBAR_KEY = 'Conversations.SidebarState';\n private saveSettingsTimeout: ReturnType<typeof setTimeout> | null = null;\n\n private engine = ConversationEngine.Instance;\n\n // Shared AI mention/suggestion engine (BaseSingleton — same instance the composer plugins use)\n private mentionAutocompleteService = MentionAutocompleteService.Instance;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private streamingService: ConversationStreamingService,\n private activeTasksService: ActiveTasksService,\n private uiCommandHandler: UICommandHandlerService,\n private bridge: ConversationBridgeService\n ) {\n super();\n }\n\n async ngOnInit() {\n super.ngOnInit();\n const md = this.ProviderToUse;\n this.CurrentUser = md.CurrentUser;\n\n // Check initial mobile state and set default collapsed\n this.checkMobileView();\n if (this.IsMobileView) {\n this.IsSidebarCollapsed = true;\n this.IsSidebarSettingsLoaded = true; // Mobile uses defaults, no need to load from server\n // Enable transitions after a brief delay to ensure initial state is applied\n setTimeout(() => {\n this.SidebarTransitionsEnabled = true;\n }, 50);\n } else {\n // Load sidebar state from User Settings (non-blocking)\n this.loadSidebarState().then(() => {\n this.cdr.detectChanges();\n // Enable transitions after state is loaded and applied\n setTimeout(() => {\n this.SidebarTransitionsEnabled = true;\n }, 50);\n });\n }\n\n // CRITICAL: Initialize AIEngine and mention service BEFORE children render\n // This prevents the slow first-load issue where each child would trigger initialization\n await this.initializeEngines();\n\n // Initialize global streaming service for PubSub updates\n // This enables reconnection to in-progress agents after browser refresh\n this.streamingService.initialize();\n\n // Apply initial state from tab configuration (populated by shell from URL or nav params)\n this.applyConfigurationParams();\n\n // Subscribe to actionable commands (open:resource) from the UI command handler service.\n // open:url commands are handled directly by the service; open:resource needs NavigationService.\n this.uiCommandHandler.ActionableCommandRequested\n .pipe(takeUntil(this.destroy$))\n .subscribe(request => this.handleActionableCommand(request));\n\n // Subscribe to bridge switch events so the overlay can hand off a conversation to this workspace\n this.bridge.SwitchEvent$\n .pipe(takeUntil(this.destroy$))\n .subscribe(event => {\n if (event.Target === 'workspace' && event.ConversationID) {\n void this.selectConversation(event.ConversationID);\n this.updateTabTitle();\n this.cdr.detectChanges();\n }\n });\n\n // Notify the bridge that the workspace is active\n this.bridge.NotifyWorkspaceActive(true);\n\n // Enable URL updates after initialization\n this.skipUrlUpdate = false;\n\n // Update URL to reflect current state\n this.updateUrl();\n\n // Notify load complete after user is set\n setTimeout(() => {\n this.NotifyLoadComplete();\n }, 100);\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n this.bridge.NotifyWorkspaceActive(false);\n\n // Clear any pending save timeout\n if (this.saveSettingsTimeout) {\n clearTimeout(this.saveSettingsTimeout);\n }\n\n // Clean up resize event listeners\n document.removeEventListener('mousemove', this.onSidebarResizeMove);\n document.removeEventListener('mouseup', this.onSidebarResizeEnd);\n }\n\n /**\n * Initialize AI Engine, conversations, and services BEFORE child components render.\n * This prevents the slow first-load issue where initialization would block conversation loading.\n * The `false` parameter means \"don't force refresh if already initialized\".\n */\n private async initializeEngines(): Promise<void> {\n try {\n // Initialize AIEngine, conversations, and mention service in parallel\n await Promise.all([\n AIEngineBase.Instance.Config(false),\n this.engine.LoadConversations(this.EnvironmentId, this.CurrentUser, false),\n this.mentionAutocompleteService.initialize(this.CurrentUser)\n ]);\n\n // Restore active tasks AFTER conversations are cached (uses in-memory lookup)\n await this.activeTasksService.restoreFromDatabase(this.CurrentUser);\n\n // Mark as ready - child components can now render\n this.IsReady = true;\n this.cdr.detectChanges();\n } catch (error) {\n console.error('Failed to initialize AI engines:', error);\n // Still mark as ready so UI isn't blocked forever\n this.IsReady = true;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Load the conversation entity asynchronously (non-blocking).\n * The conversationId is already set synchronously, this just loads the full entity.\n */\n private async loadConversationEntity(conversationId: string | undefined): Promise<void> {\n if (!conversationId) return;\n\n // Try to get from cache first\n const conversation = this.engine.GetConversation(conversationId);\n if (conversation) {\n this.SelectedConversation = conversation;\n this.updateTabTitle();\n }\n // If not in cache, the chat area component will handle loading it\n }\n\n /**\n * Apply initial state from tab configuration.\n * The shell populates queryParams from the URL, and nav params come from cross-resource linking.\n * Sets state synchronously so child components see values immediately.\n */\n /**\n * The omnibar's '@' mode lands here with ?agent=<AgentName>: start a NEW\n * conversation with the composer pre-addressed to that agent. The mention chip\n * itself is typed by the user's send; prefilling '@\"Name\" ' is the plain-text\n * form the composer's agent-mention provider recognizes.\n */\n private applyAgentParam(agentName: string | null | undefined, requestNonce?: string | null): void {\n if (!agentName) {\n return;\n }\n // The pre-address is a one-shot INSTRUCTION keyed by agent|nonce (the omnibar\n // stamps ?agentReq=<nonce> alongside ?agent=). The shell's URL↔tab-config sync\n // can echo an already-consumed param back at us — an in-flight navigation that\n // settles AFTER our consume-clear backfills the tab config from the URL (\"URL\n // is source of truth\"). A value-only guard can't tell that echo apart from a\n // genuine re-tag of the same agent; the nonce can. Nonce-less deliveries (hand\n // typed deep links) still apply once per session.\n const requestKey = `${agentName}|${requestNonce ?? ''}`;\n if (requestKey === this.lastAppliedAgentParamKey) {\n // Stale echo. Re-issue the clear so tab config and URL converge to clean —\n // otherwise the echoed param persists into the saved workspace and re-applies\n // on every boot, wiping whatever draft the composer restored.\n console.log(`[Omnibar→Chat] wrapper: agent param '${agentName}' (req=${requestNonce ?? 'none'}) already applied — ignoring echo, re-clearing`);\n this.clearAgentParamDeferred();\n return;\n }\n console.log(`[Omnibar→Chat] wrapper: agent param '${agentName}' (req=${requestNonce ?? 'none'}) received — staging composer pre-address`);\n this.lastAppliedAgentParamKey = requestKey;\n this.IsNewUnsavedConversation = true;\n this.SelectedConversationId = null;\n this.SelectedConversation = null;\n // Resolved mention PILL (composerAgentMention) — matching the UX of typing\n // '@agent' and picking from the dropdown; pendingMessage would AUTO-SEND.\n this.PendingComposerAgentMention = agentName;\n this.cdr.detectChanges();\n }\n\n public PendingComposerAgentMention: string | null = null;\n\n /** @deprecated Use {@link PendingComposerAgentMention}. */\n public get pendingComposerAgentMention(): string | null {\n return this.PendingComposerAgentMention;\n }\n /** @deprecated Use {@link PendingComposerAgentMention}. */\n public set pendingComposerAgentMention(value: string | null) {\n this.PendingComposerAgentMention = value;\n }\n private lastAppliedAgentParamKey: string | null = null;\n\n public OnComposerAgentMentionConsumed(): void {\n this.PendingComposerAgentMention = null;\n // Consume-and-clear: drop the agent params from the tab/URL so boots and\n // back/forward can't re-stage the pill. lastAppliedAgentParamKey is\n // intentionally NOT reset — a fresh omnibar re-tag (even of the same agent)\n // carries a new agentReq nonce and forms a new key, so anything re-delivering\n // the OLD key is by definition a stale echo.\n console.log(`[Omnibar→Chat] wrapper: pill applied — clearing agent param from URL`);\n this.clearAgentParamDeferred();\n }\n\n /** @deprecated Use {@link OnComposerAgentMentionConsumed}. */\n public onComposerAgentMentionConsumed(): void {\n return this.OnComposerAgentMentionConsumed();\n }\n\n /**\n * Clears the agent pre-address params OUTSIDE any OnQueryParamsChanged delivery:\n * UpdateQueryParams is suppressed synchronously during delivery, so an inline\n * call from the echo path would silently no-op.\n */\n private clearAgentParamDeferred(): void {\n setTimeout(() => this.UpdateQueryParams({ agent: null, agentReq: null }), 0);\n }\n\n private applyConfigurationParams(): void {\n const config = this.Data?.Configuration;\n if (!config) return;\n\n // Check queryParams first (shell populates these from the URL for deep-linking)\n const qp = config['queryParams'] as Record<string, string> | undefined;\n this.applyAgentParam(qp?.['agent'], qp?.['agentReq']);\n\n const search = typeof window !== 'undefined' ? window.location.search : '';\n const conversationId = ResolveDeepLinkParam('conversationId', search, qp, config.conversationId as string);\n const artifactId = ResolveDeepLinkParam('artifactId', search, qp, config.artifactId as string);\n // Resolved the same URL-first way as artifactId above: pairing a URL artifact with the\n // previous visit's version number would open the wrong version of the right artifact.\n const rawVersion = ResolveDeepLinkParam(\n 'versionNumber', search, qp, config.versionNumber != null ? String(config.versionNumber) : undefined);\n const versionNumber = rawVersion ? parseInt(rawVersion, 10) : null;\n\n // Set pending artifact if provided\n if (artifactId) {\n this.PendingArtifactId = artifactId;\n this.PendingArtifactConversationId = conversationId || null;\n this.PendingArtifactVersionNumber = versionNumber;\n }\n\n // Set conversationId synchronously so child components see it immediately\n if (conversationId) {\n this.SelectedConversationId = conversationId;\n this.bridge.SetActiveFromWorkspace(conversationId);\n this.IsNewUnsavedConversation = false;\n // Load entity asynchronously\n this.loadConversationEntity(conversationId);\n }\n\n const realtimeSessionId = qp?.['realtimeSessionId'] || (config['realtimeSessionId'] as string);\n if (realtimeSessionId) {\n this.PendingRealtimeSessionId = realtimeSessionId;\n this.applyPendingRealtimeSessionReview();\n }\n }\n\n /** Opens the pending realtime session review once the chat area exists (retries next tick while it renders). */\n private applyPendingRealtimeSessionReview(): void {\n const sessionId = this.PendingRealtimeSessionId;\n if (!sessionId) {\n return;\n }\n if (!this.ChatArea) {\n setTimeout(() => this.applyPendingRealtimeSessionReview(), 50);\n return;\n }\n this.PendingRealtimeSessionId = null;\n void this.ChatArea.OpenRealtimeSessionReview(sessionId).then((opened) => {\n if (!opened) {\n console.warn(`Chat: could not open realtime session review for '${sessionId}'`);\n }\n });\n }\n\n /**\n * React to query param changes that arrive AFTER initial load — e.g. clicking a\n * Home pin for a different conversation, or browser back/forward — when this tab\n * already exists and is simply re-focused (so ngOnInit / applyConfigurationParams\n * does NOT run again). Without this, every pin would land on whatever conversation\n * was already open instead of the pinned one.\n */\n protected override OnQueryParamsChanged(params: Record<string, string>, _source: 'popstate' | 'deeplink'): void {\n this.applyAgentParam(params['agent'], params['agentReq']);\n const realtimeSessionId = params['realtimeSessionId'] || null;\n if (realtimeSessionId) {\n this.PendingRealtimeSessionId = realtimeSessionId;\n this.applyPendingRealtimeSessionReview();\n }\n const conversationId = params['conversationId'] || null;\n const artifactId = params['artifactId'] || null;\n const versionNumber = params['versionNumber'] ? parseInt(params['versionNumber'], 10) : null;\n\n // Reflect any artifact intent so the chat area can open it.\n this.PendingArtifactId = artifactId;\n this.PendingArtifactConversationId = artifactId ? conversationId : null;\n this.PendingArtifactVersionNumber = versionNumber;\n\n if (conversationId && conversationId !== this.SelectedConversationId) {\n // The URL is already the source of truth here — suppress the echo back to it.\n // selectConversation()'s body is synchronous up to its URL-update check, so\n // toggling the flag around the call reliably gates that check.\n const prevSkip = this.skipUrlUpdate;\n this.skipUrlUpdate = true;\n void this.selectConversation(conversationId);\n this.skipUrlUpdate = prevSkip;\n this.cdr.detectChanges();\n }\n }\n\n /**\n * Apply navigation state to local selection state.\n * Sets state synchronously so child components see values immediately.\n */\n /**\n * Select a conversation by ID - loads the entity and updates local state\n */\n private async selectConversation(conversationId: string): Promise<void> {\n this.SelectedConversationId = conversationId;\n this.IsNewUnsavedConversation = false;\n\n // Keep bridge in sync so other consumers (toast suppression, overlay) know\n // which conversation the workspace is viewing\n this.bridge.SetActiveFromWorkspace(conversationId);\n\n // Load the conversation entity from data service\n const conversation = this.engine.GetConversation(conversationId);\n if (conversation) {\n this.SelectedConversation = conversation;\n } else {\n // Conversation might not be loaded yet - the chat area will handle loading\n this.SelectedConversation = null;\n }\n\n // Update URL if not skipping\n if (!this.skipUrlUpdate) {\n this.updateUrl();\n }\n }\n\n /**\n * Update URL query string to reflect current state.\n * Uses NavigationService for proper URL management that respects app-scoped routes.\n */\n private updateUrl(): void {\n const queryParams: Record<string, string | null> = {};\n\n // Add conversation ID\n if (this.SelectedConversationId) {\n queryParams['conversationId'] = this.SelectedConversationId;\n } else {\n queryParams['conversationId'] = null;\n }\n\n // Add artifact ID if we have a pending artifact (will be cleared once opened)\n if (this.PendingArtifactId) {\n queryParams['artifactId'] = this.PendingArtifactId;\n if (this.PendingArtifactVersionNumber) {\n queryParams['versionNumber'] = this.PendingArtifactVersionNumber.toString();\n }\n } else {\n queryParams['artifactId'] = null;\n queryParams['versionNumber'] = null;\n }\n\n // realtimeSessionId is a one-shot deep-link trigger (e.g. from the AI Agent Session\n // form). Always clear it from the tab params here — leaving it lingering re-delivers\n // it on every tab re-focus / popstate, which reopened the review overlay forever\n // (the live-tested \"stuck overlay\" bug).\n queryParams['realtimeSessionId'] = null;\n\n // Use the resource-scoped helper so a cached conversation component cannot\n // write conversation params onto a tab that has since been reused for a record.\n this.UpdateQueryParams(queryParams);\n }\n\n /**\n * Update the tab/browser title based on the currently selected conversation.\n */\n private updateTabTitle(): void {\n if (this.IsNewUnsavedConversation || !this.SelectedConversation) {\n this.NotifyDisplayNameChanged('Conversations');\n return;\n }\n const name = this.SelectedConversation.Name;\n if (name) {\n this.NotifyDisplayNameChanged(name);\n }\n }\n\n\n /**\n * Get the environment ID from configuration or use default\n */\n get EnvironmentId(): string {\n return this.Data?.Configuration?.environmentId || MJEnvironmentEntityExtended.DefaultEnvironmentID;\n }\n\n /** @deprecated Use {@link EnvironmentId}. */\n get environmentId(): string {\n return this.EnvironmentId;\n }\n\n /**\n * Get the display name for chat conversations\n */\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n // If we have a specific conversation ID, we could load the conversation name\n // For now, just return a generic name\n if (data.Configuration?.conversationId) {\n return `Conversation: ${(data.Configuration.conversationId as string).substring(0, 8)}...`;\n }\n return 'Conversations';\n }\n\n /**\n * Get the icon class for chat conversations\n */\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-comments';\n }\n\n // ============================================\n // EVENT HANDLERS FROM CHILD COMPONENTS\n // ============================================\n\n /**\n * Handle refresh request from the conversation list.\n * After the list refreshes, also reload messages in the active chat area so any\n * new agent responses are visible without a full page reload.\n */\n OnRefreshRequested(): void {\n void this.ChatArea?.reloadMessages();\n }\n\n /** @deprecated Use {@link OnRefreshRequested}. */\n onRefreshRequested(): void {\n return this.OnRefreshRequested();\n }\n\n /**\n * Handle conversation deletion from the list.\n * If the deleted conversation was selected, navigate to the first remaining conversation.\n */\n OnConversationDeleted(deletedId: string): void {\n if (this.SelectedConversationId === deletedId) {\n const remaining = this.engine.Conversations.filter(c => !UUIDsEqual(c.ID, deletedId));\n if (remaining.length > 0) {\n void this.selectConversation(remaining[0].ID);\n this.updateUrl();\n } else {\n this.SelectedConversationId = null;\n this.SelectedConversation = null;\n this.SelectedThreadId = null;\n this.IsNewUnsavedConversation = true;\n this.updateUrl();\n }\n }\n }\n\n /** @deprecated Use {@link OnConversationDeleted}. */\n onConversationDeleted(deletedId: string): void {\n return this.OnConversationDeleted(deletedId);\n }\n\n /**\n * Handle conversation selection from the list\n */\n async OnConversationSelected(conversationId: string): Promise<void> {\n await this.selectConversation(conversationId);\n this.SelectedThreadId = null; // Clear thread when switching conversations\n this.IsNewUnsavedConversation = false;\n this.updateUrl();\n this.updateTabTitle();\n\n // Auto-collapse if mobile OR if sidebar is not pinned\n if (this.IsMobileView || !this.IsSidebarPinned) {\n this.CollapseSidebar();\n }\n }\n\n /** @deprecated Use {@link OnConversationSelected}. */\n async onConversationSelected(conversationId: string): Promise<void> {\n return this.OnConversationSelected(conversationId);\n }\n\n @HostListener('window:resize')\n onWindowResize(): void {\n this.checkMobileView();\n }\n\n /**\n * Handle clicks outside the sidebar to auto-collapse when unpinned\n */\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n // Only handle when sidebar is expanded but unpinned\n if (this.IsSidebarCollapsed || this.IsSidebarPinned) {\n return;\n }\n\n // Check if click is outside the sidebar\n const target = event.target as HTMLElement;\n const sidebarElement = target.closest('.conversation-sidebar');\n const expandHandle = target.closest('.sidebar-expand-handle');\n\n // If click is outside sidebar and expand handle, collapse it\n if (!sidebarElement && !expandHandle) {\n this.CollapseSidebar();\n }\n }\n\n /**\n * Check if we're in mobile view and handle state accordingly\n */\n private checkMobileView(): void {\n const wasMobile = this.IsMobileView;\n this.IsMobileView = window.innerWidth < 768;\n\n if (this.IsMobileView && !wasMobile) {\n // Switched to mobile - default to collapsed\n this.IsSidebarCollapsed = true;\n }\n }\n\n /**\n * Collapse sidebar\n */\n CollapseSidebar(): void {\n this.IsSidebarCollapsed = true;\n }\n\n /** @deprecated Use {@link CollapseSidebar}. */\n collapseSidebar(): void {\n return this.CollapseSidebar();\n }\n\n /**\n * Expand sidebar (pinned - stays open until unpinned)\n */\n ExpandSidebar(): void {\n this.IsSidebarCollapsed = false;\n this.IsSidebarPinned = true; // Pin it so it stays open\n this.saveSidebarState();\n }\n\n /** @deprecated Use {@link ExpandSidebar}. */\n expandSidebar(): void {\n return this.ExpandSidebar();\n }\n\n /**\n * Handle sidebar resize start\n */\n OnSidebarResizeStart(event: MouseEvent): void {\n event.preventDefault();\n this.isSidebarResizing = true;\n this.sidebarResizeStartX = event.clientX;\n this.sidebarResizeStartWidth = this.SidebarWidth;\n\n // Disable transitions during resize for immediate feedback\n this.SidebarTransitionsEnabled = false;\n\n // Add event listeners for mousemove and mouseup\n document.addEventListener('mousemove', this.onSidebarResizeMove);\n document.addEventListener('mouseup', this.onSidebarResizeEnd);\n }\n\n /** @deprecated Use {@link OnSidebarResizeStart}. */\n onSidebarResizeStart(event: MouseEvent): void {\n return this.OnSidebarResizeStart(event);\n }\n\n /**\n * Handle sidebar resize move (bound method for proper 'this' context)\n */\n private onSidebarResizeMove = (event: MouseEvent): void => {\n if (!this.isSidebarResizing) return;\n\n const delta = event.clientX - this.sidebarResizeStartX;\n const newWidth = this.sidebarResizeStartWidth + delta;\n\n // Clamp to min/max bounds\n this.SidebarWidth = Math.max(this.SIDEBAR_MIN_WIDTH, Math.min(this.SIDEBAR_MAX_WIDTH, newWidth));\n this.cdr.detectChanges();\n };\n\n /**\n * Handle sidebar resize end (bound method for proper 'this' context)\n */\n private onSidebarResizeEnd = (): void => {\n if (!this.isSidebarResizing) return;\n\n this.isSidebarResizing = false;\n\n // Re-enable transitions for collapse/expand animations\n this.SidebarTransitionsEnabled = true;\n\n // Remove event listeners\n document.removeEventListener('mousemove', this.onSidebarResizeMove);\n document.removeEventListener('mouseup', this.onSidebarResizeEnd);\n\n // Save the new width to User Settings\n this.saveSidebarState();\n };\n\n /**\n * Pin sidebar - keep it open after selection\n */\n PinSidebar(): void {\n this.IsSidebarPinned = true;\n this.saveSidebarState();\n }\n\n /** @deprecated Use {@link PinSidebar}. */\n pinSidebar(): void {\n return this.PinSidebar();\n }\n\n /**\n * Unpin sidebar - will auto-collapse on next selection\n */\n UnpinSidebar(): void {\n this.IsSidebarPinned = false;\n this.CollapseSidebar();\n this.saveSidebarState();\n }\n\n /** @deprecated Use {@link UnpinSidebar}. */\n unpinSidebar(): void {\n return this.UnpinSidebar();\n }\n\n /**\n * Save sidebar state to User Settings (server only - no localStorage fallback)\n * Uses debouncing to avoid excessive database writes\n */\n private saveSidebarState(): void {\n // Debounce the server save to avoid excessive writes\n if (this.saveSettingsTimeout) {\n clearTimeout(this.saveSettingsTimeout);\n }\n this.saveSettingsTimeout = setTimeout(() => {\n this.saveSidebarStateToServer();\n }, 1000); // 1 second debounce\n }\n\n /**\n * Save sidebar state to User Settings entity on server using UserInfoEngine for cached lookup\n */\n private async saveSidebarStateToServer(): Promise<void> {\n try {\n const userId = this.CurrentUser?.ID;\n if (!userId) {\n return;\n }\n\n const stateToSave = {\n collapsed: this.IsSidebarCollapsed,\n pinned: this.IsSidebarPinned,\n width: this.SidebarWidth\n };\n\n const engine = UserInfoEngine.Instance;\n const md = this.ProviderToUse;\n\n // Find existing setting from cached user settings\n let setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);\n\n if (!setting) {\n // Create new setting\n setting = await md.GetEntityObject<MJUserSettingEntity>('MJ: User Settings');\n setting.UserID = userId;\n setting.Setting = this.USER_SETTING_SIDEBAR_KEY;\n }\n\n setting.Value = JSON.stringify(stateToSave);\n await setting.Save();\n } catch (error) {\n console.warn('Failed to save sidebar state to User Settings:', error);\n }\n }\n\n /**\n * Load sidebar state from User Settings (server) using UserInfoEngine\n * For new users with no saved state, defaults to collapsed with new conversation\n */\n private async loadSidebarState(): Promise<void> {\n try {\n const userId = this.CurrentUser?.ID;\n if (userId) {\n // Load from cached User Settings\n const engine = UserInfoEngine.Instance;\n const setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);\n\n if (setting?.Value) {\n const state = JSON.parse(setting.Value);\n this.IsSidebarCollapsed = state.collapsed ?? true;\n this.IsSidebarPinned = state.pinned ?? false;\n this.SidebarWidth = state.width ?? 300;\n // Clamp width to valid range\n this.SidebarWidth = Math.max(this.SIDEBAR_MIN_WIDTH, Math.min(this.SIDEBAR_MAX_WIDTH, this.SidebarWidth));\n this.IsSidebarSettingsLoaded = true;\n return;\n }\n }\n\n // No saved state found - NEW USER DEFAULT:\n // Start with sidebar collapsed and show new conversation screen\n this.IsSidebarCollapsed = true;\n this.IsSidebarPinned = false;\n this.SidebarWidth = 300;\n this.IsNewUnsavedConversation = true;\n this.IsSidebarSettingsLoaded = true;\n } catch (error) {\n console.warn('Failed to load sidebar state:', error);\n // Default to collapsed for new users on error\n this.IsSidebarCollapsed = true;\n this.IsSidebarPinned = false;\n this.SidebarWidth = 300;\n this.IsSidebarSettingsLoaded = true;\n }\n }\n\n /**\n * Handle new conversation request from the list\n */\n OnNewConversationRequested(): void {\n this.SelectedConversationId = null;\n this.SelectedConversation = null;\n this.SelectedThreadId = null;\n this.IsNewUnsavedConversation = true;\n this.updateUrl();\n this.NotifyDisplayNameChanged('New Conversation');\n\n // Auto-collapse if mobile OR if sidebar is not pinned\n if (this.IsMobileView || !this.IsSidebarPinned) {\n this.CollapseSidebar();\n }\n }\n\n /** @deprecated Use {@link OnNewConversationRequested}. */\n onNewConversationRequested(): void {\n return this.OnNewConversationRequested();\n }\n\n /**\n * Handle conversation created from chat area (after first message in new conversation).\n * The event now includes pending message and attachments for atomic state update.\n */\n async OnConversationCreated(event: {\n conversation: MJConversationEntity;\n pendingMessage?: string;\n pendingAttachments?: PendingAttachment[];\n }): Promise<void> {\n // Set ALL state atomically before Angular change detection runs\n this.PendingMessageToSend = event.pendingMessage || null;\n this.PendingAttachmentsToSend = event.pendingAttachments || null;\n this.SelectedConversationId = event.conversation.ID;\n this.SelectedConversation = event.conversation;\n this.IsNewUnsavedConversation = false;\n this.bridge.SetActiveFromWorkspace(event.conversation.ID);\n this.updateUrl();\n this.updateTabTitle();\n }\n\n /** @deprecated Use {@link OnConversationCreated}. */\n async onConversationCreated(event: {\n conversation: MJConversationEntity;\n pendingMessage?: string;\n pendingAttachments?: PendingAttachment[];\n }): Promise<void> {\n return this.OnConversationCreated(event);\n }\n\n /**\n * Handle conversation rename event\n */\n OnConversationRenamed(event: { conversationId: string; name: string; description: string }): void {\n // Trigger rename animation in the list\n this.RenamedConversationId = event.conversationId;\n\n // Update tab title with the new name\n if (event.name) {\n this.NotifyDisplayNameChanged(event.name);\n }\n\n // Clear the animation trigger after it completes\n setTimeout(() => {\n this.RenamedConversationId = null;\n }, 1500);\n }\n\n /** @deprecated Use {@link OnConversationRenamed}. */\n onConversationRenamed(event: { conversationId: string; name: string; description: string }): void {\n return this.OnConversationRenamed(event);\n }\n\n /**\n * Handle thread opened event\n */\n OnThreadOpened(threadId: string): void {\n this.SelectedThreadId = threadId;\n }\n\n /** @deprecated Use {@link OnThreadOpened}. */\n onThreadOpened(threadId: string): void {\n return this.OnThreadOpened(threadId);\n }\n\n /**\n * Handle thread closed event\n */\n OnThreadClosed(): void {\n this.SelectedThreadId = null;\n }\n\n /** @deprecated Use {@link OnThreadClosed}. */\n onThreadClosed(): void {\n return this.OnThreadClosed();\n }\n\n /**\n * Handle pending artifact consumed event\n */\n OnPendingArtifactConsumed(): void {\n this.PendingArtifactId = null;\n this.PendingArtifactConversationId = null;\n this.PendingArtifactVersionNumber = null;\n // Update URL to remove artifact params\n this.updateUrl();\n }\n\n /** @deprecated Use {@link OnPendingArtifactConsumed}. */\n onPendingArtifactConsumed(): void {\n return this.OnPendingArtifactConsumed();\n }\n\n /**\n * Handle pending message consumed event\n */\n OnPendingMessageConsumed(): void {\n this.PendingMessageToSend = null;\n this.PendingAttachmentsToSend = null;\n }\n\n /** @deprecated Use {@link OnPendingMessageConsumed}. */\n onPendingMessageConsumed(): void {\n return this.OnPendingMessageConsumed();\n }\n\n /**\n * Handle pending message requested event (from empty state creating conversation).\n * @deprecated Use onConversationCreated with pendingMessage instead - this is kept for backwards compatibility.\n */\n onPendingMessageRequested(event: {text: string; attachments: PendingAttachment[]}): void {\n this.PendingMessageToSend = event.text;\n this.PendingAttachmentsToSend = event.attachments || null;\n }\n\n /**\n * Handle navigation request from artifact viewer panel within the chat area.\n * Converts the link event to a generic navigation request and uses NavigationService.\n */\n OnArtifactLinkClicked(event: {\n type: 'conversation' | 'collection';\n id: string;\n artifactId?: string;\n versionNumber?: number;\n }): void {\n // Map the link type to the nav item name\n const navItemName = event.type === 'conversation' ? 'Conversations' : 'Collections';\n\n // Build configuration params to pass to the target resource\n const params: Record<string, unknown> = {};\n if (event.type === 'conversation') {\n params['conversationId'] = event.id;\n } else {\n params['collectionId'] = event.id;\n }\n\n // Include artifact info so destination can open it\n if (event.artifactId) {\n params['artifactId'] = event.artifactId;\n if (event.versionNumber) {\n params['versionNumber'] = event.versionNumber;\n }\n }\n\n // Navigate using the generic nav item method\n this.navigationService.OpenNavItemByName(navItemName, params);\n }\n\n /** @deprecated Use {@link OnArtifactLinkClicked}. */\n onArtifactLinkClicked(event: {\n type: 'conversation' | 'collection';\n id: string;\n artifactId?: string;\n versionNumber?: number;\n }): void {\n return this.OnArtifactLinkClicked(event);\n }\n\n /**\n * Handle entity record open request from chat area (from React component grids).\n * Uses NavigationService to open the record in a new tab.\n */\n OnOpenEntityRecord(event: {entityName: string; compositeKey: CompositeKey}): void {\n this.navigationService.OpenEntityRecord(event.entityName, event.compositeKey);\n }\n\n // ========================================\n // CROSS-ENTITY SEARCH PANEL\n // ========================================\n\n /** Whether the cross-entity search panel is open. */\n public IsSearchPanelOpen = false;\n\n /** Term the panel opens with, handed over from the conversation list's own filter. */\n public SearchSeedQuery = '';\n\n /**\n * Open the cross-entity search panel, carrying over the term the user had already typed\n * into the conversation list's filter so they do not retype it.\n */\n OpenSearch(query: string = ''): void {\n this.SearchSeedQuery = query;\n this.IsSearchPanelOpen = true;\n }\n\n /** Close the cross-entity search panel. */\n CloseSearch(): void {\n this.IsSearchPanelOpen = false;\n }\n\n /**\n * Route a search result to the right Explorer surface.\n *\n * Explorer renders each chat surface as a separate resource, so results for another\n * surface go through NavigationService. Conversations and messages resolve to a\n * conversation, which this component owns, so they are selected in place.\n */\n OnSearchResultSelected(result: SearchResult): void {\n this.CloseSearch();\n\n const route = ResolveChatSearchRoute(result);\n switch (route?.Kind) {\n case 'conversation':\n void this.OnConversationSelected(route.ConversationId);\n break;\n case 'artifact':\n this.navigationService.OpenArtifact(route.ArtifactId, route.Title);\n break;\n case 'nav-item':\n void this.navigationService.OpenNavItemByName(route.NavItemName, route.Configuration);\n break;\n }\n }\n\n /** @deprecated Use {@link OnOpenEntityRecord}. */\n onOpenEntityRecord(event: {entityName: string; compositeKey: CompositeKey}): void {\n return this.OnOpenEntityRecord(event);\n }\n\n /**\n * Handle navigation request from artifact viewer plugins.\n * Opens the target nav item (switching apps if needed) then applies query params to the URL.\n */\n async OnNavigationRequest(event: NavigationRequest): Promise<void> {\n const appId = event.appName ? this.resolveAppId(event.appName) : undefined;\n await this.navigationService.OpenNavItemByName(event.navItemName, undefined, appId, {\n queryParams: event.queryParams\n });\n }\n\n /** @deprecated Use {@link OnNavigationRequest}. */\n async onNavigationRequest(event: NavigationRequest): Promise<void> {\n return this.OnNavigationRequest(event);\n }\n\n /**\n * Resolve an application name to its ID.\n */\n private resolveAppId(appName: string): string | undefined {\n const md = this.ProviderToUse;\n const apps = md.Applications;\n const app = apps.find(a => a.Name.toLowerCase() === appName.toLowerCase());\n return app?.ID;\n }\n\n /**\n * Handle actionable commands that require app-specific navigation (open:resource, and the\n * compose:email over-length fallback). open:url commands are already handled directly by\n * UICommandHandlerService.\n */\n private handleActionableCommand(request: ActionableCommandRequest): void {\n const command = request.command;\n if (command.type === 'open:resource') {\n const resourceCommand = command as OpenResourceCommand;\n if (resourceCommand.resourceType === 'Record') {\n // Record opens are emitted as openEntityRecord from mj-conversation-chat-area\n // (composite-key aware). Handling them here too would open the record twice.\n return;\n } else if (resourceCommand.resourceType === 'Report' || resourceCommand.resourceType === 'Dashboard') {\n // Reports and dashboards from agents are stored as conversation artifacts.\n // Find the most recent artifact in the active conversation and open it.\n this.openMostRecentArtifact();\n }\n } else if (command.type === 'compose:email') {\n // The service handles compose:email directly whenever the draft fits in a mailto: URL, so\n // reaching here means it did NOT fit. Opening the mail client would hand the user a draft\n // with the body silently truncated, so the service declined and handed it to us instead —\n // our job is to show the full draft, which lives in the artifact.\n this.openComposeEmailDraft(command, request.DraftCopiedToClipboard === true);\n }\n }\n\n /**\n * The compose:email over-length fallback: open the draft artifact and tell the user why their\n * mail client did not open.\n *\n * With no artifactId (it is optional) the conversation's latest artifact opens, since for a\n * single-artifact turn that IS the draft. A stated artifactId that is not loaded opens nothing:\n * a different artifact would be passed off as the draft. Every outcome, including \"nothing to\n * open\", ends in one notification, so the button never does nothing visible.\n */\n private openComposeEmailDraft(command: ComposeEmailCommand, copiedToClipboard: boolean): void {\n const target = ResolveComposeEmailDraft(this.ChatArea?.ArtifactsByDetailId.values() ?? [], command.artifactId);\n if (this.ChatArea && (target.Kind === 'stated' || target.Kind === 'most-recent')) {\n void this.ChatArea.OnArtifactClicked({ artifactId: target.Artifact.ArtifactId, versionId: target.Artifact.ArtifactVersionId });\n }\n const notice = BuildComposeEmailFallbackNotice(target, copiedToClipboard);\n // Longer than the default: the notice is two sentences and explains a changed clipboard.\n MJNotificationService.Instance?.CreateSimpleNotification(notice.Message, notice.Style, 7000);\n }\n\n /**\n * Open the most recent artifact in the active conversation's artifact viewer.\n * Used for open:resource commands with resourceType Report/Dashboard where\n * the resourceId is an agent-internal ID, not a database artifact ID.\n */\n private openMostRecentArtifact(): void {\n if (!this.ChatArea) return;\n\n // Find the last artifact across all messages\n const artifactMap = this.ChatArea.artifactsByDetailId;\n let latestArtifact: { artifactId: string; versionId?: string } | null = null;\n for (const artifacts of artifactMap.values()) {\n if (artifacts.length > 0) {\n const last = artifacts[artifacts.length - 1];\n latestArtifact = {\n artifactId: last.artifactId,\n versionId: last.artifactVersionId\n };\n }\n }\n\n if (latestArtifact) {\n this.ChatArea.onArtifactClicked(latestArtifact);\n } else {\n console.warn('No artifacts found in conversation to open for Report/Dashboard command');\n }\n }\n}\n"]}
@@ -20,5 +20,7 @@
20
20
  * @param savedParams queryParams restored with the workspace tab
21
21
  * @param configValue value from the tab configuration itself
22
22
  */
23
+ export declare function ResolveDeepLinkParam(name: string, search: string, savedParams: Record<string, string> | undefined, configValue: string | undefined): string | undefined;
24
+ /** @deprecated Use {@link ResolveDeepLinkParam}. */
23
25
  export declare function resolveDeepLinkParam(name: string, search: string, savedParams: Record<string, string> | undefined, configValue: string | undefined): string | undefined;
24
26
  //# sourceMappingURL=chat-deeplink-params.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-deeplink-params.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-deeplink-params.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC/C,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,MAAM,GAAG,SAAS,CAGpB"}
1
+ {"version":3,"file":"chat-deeplink-params.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-deeplink-params.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC/C,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,MAAM,GAAG,SAAS,CAGpB;AAED,oDAAoD;AACpD,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC/C,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,MAAM,GAAG,SAAS,CAEpB"}
@@ -20,8 +20,12 @@
20
20
  * @param savedParams queryParams restored with the workspace tab
21
21
  * @param configValue value from the tab configuration itself
22
22
  */
23
- export function resolveDeepLinkParam(name, search, savedParams, configValue) {
23
+ export function ResolveDeepLinkParam(name, search, savedParams, configValue) {
24
24
  const fromUrl = new URLSearchParams(search ?? '').get(name);
25
25
  return fromUrl || savedParams?.[name] || configValue || undefined;
26
26
  }
27
+ /** @deprecated Use {@link ResolveDeepLinkParam}. */
28
+ export function resolveDeepLinkParam(name, search, savedParams, configValue) {
29
+ return ResolveDeepLinkParam(name, search, savedParams, configValue);
30
+ }
27
31
  //# sourceMappingURL=chat-deeplink-params.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-deeplink-params.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-deeplink-params.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,MAAc,EACd,WAA+C,EAC/C,WAA+B;IAE/B,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,OAAO,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,IAAI,WAAW,IAAI,SAAS,CAAC;AACpE,CAAC","sourcesContent":["/**\n * Deep-link parameter resolution for the chat resource wrapper.\n *\n * Kept in its own module (no Angular decorators) so the rule can be unit-tested directly.\n */\n\n/**\n * Resolve a deep-link parameter, letting the LIVE URL outrank restored tab configuration.\n *\n * On a cold load — a deep link opened in a fresh browser tab, which is every click of a\n * Slack/Teams \"open conversation in MJ Explorer\" link — the workspace tab is restored carrying\n * the queryParams of the PREVIOUS visit, and nothing reconciles them against the URL actually\n * being opened: the shell's URL-is-source-of-truth sync runs on router navigation events, not at\n * boot. The deep link therefore opened whatever was last viewed, which reads as a broken link.\n *\n * Ordinary in-app navigation is unaffected: when the URL carries no such parameter, the saved\n * configuration is used exactly as before.\n *\n * @param name parameter to read (e.g. `conversationId`)\n * @param search `window.location.search` at the time of the call\n * @param savedParams queryParams restored with the workspace tab\n * @param configValue value from the tab configuration itself\n */\nexport function resolveDeepLinkParam(\n name: string,\n search: string,\n savedParams: Record<string, string> | undefined,\n configValue: string | undefined\n): string | undefined {\n const fromUrl = new URLSearchParams(search ?? '').get(name);\n return fromUrl || savedParams?.[name] || configValue || undefined;\n}\n"]}
1
+ {"version":3,"file":"chat-deeplink-params.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-deeplink-params.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,MAAc,EACd,WAA+C,EAC/C,WAA+B;IAE/B,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,OAAO,IAAI,WAAW,EAAE,CAAC,IAAI,CAAC,IAAI,WAAW,IAAI,SAAS,CAAC;AACpE,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ,MAAc,EACd,WAA+C,EAC/C,WAA+B;IAE/B,OAAO,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;AACtE,CAAC","sourcesContent":["/**\n * Deep-link parameter resolution for the chat resource wrapper.\n *\n * Kept in its own module (no Angular decorators) so the rule can be unit-tested directly.\n */\n\n/**\n * Resolve a deep-link parameter, letting the LIVE URL outrank restored tab configuration.\n *\n * On a cold load — a deep link opened in a fresh browser tab, which is every click of a\n * Slack/Teams \"open conversation in MJ Explorer\" link — the workspace tab is restored carrying\n * the queryParams of the PREVIOUS visit, and nothing reconciles them against the URL actually\n * being opened: the shell's URL-is-source-of-truth sync runs on router navigation events, not at\n * boot. The deep link therefore opened whatever was last viewed, which reads as a broken link.\n *\n * Ordinary in-app navigation is unaffected: when the URL carries no such parameter, the saved\n * configuration is used exactly as before.\n *\n * @param name parameter to read (e.g. `conversationId`)\n * @param search `window.location.search` at the time of the call\n * @param savedParams queryParams restored with the workspace tab\n * @param configValue value from the tab configuration itself\n */\nexport function ResolveDeepLinkParam(\n name: string,\n search: string,\n savedParams: Record<string, string> | undefined,\n configValue: string | undefined\n): string | undefined {\n const fromUrl = new URLSearchParams(search ?? '').get(name);\n return fromUrl || savedParams?.[name] || configValue || undefined;\n}\n\n/** @deprecated Use {@link ResolveDeepLinkParam}. */\nexport function resolveDeepLinkParam(\n name: string,\n search: string,\n savedParams: Record<string, string> | undefined,\n configValue: string | undefined\n): string | undefined {\n return ResolveDeepLinkParam(name, search, savedParams, configValue);\n}\n"]}
@@ -0,0 +1,25 @@
1
+ import type { SearchResult } from '@memberjunction/ng-conversations';
2
+ /**
3
+ * Where a Chat search result opens.
4
+ */
5
+ export type ChatSearchRoute = {
6
+ Kind: 'conversation';
7
+ ConversationId: string;
8
+ } | {
9
+ Kind: 'artifact';
10
+ ArtifactId: string;
11
+ Title: string;
12
+ } | {
13
+ Kind: 'nav-item';
14
+ NavItemName: 'Collections' | 'Tasks';
15
+ Configuration: Record<string, string>;
16
+ };
17
+ /**
18
+ * Maps a Chat search result to the surface that opens it.
19
+ *
20
+ * Conversations and messages open a conversation in the Chat resource itself. Artifacts open
21
+ * directly, because an artifact need not belong to a collection or a conversation. Collections
22
+ * and tasks open their own nav items. Returns null when the result has nothing to open.
23
+ */
24
+ export declare function ResolveChatSearchRoute(result: SearchResult): ChatSearchRoute | null;
25
+ //# sourceMappingURL=chat-search-routing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-search-routing.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-search-routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,WAAW,EAAE,aAAa,GAAG,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAEtG;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,GAAG,IAAI,CAenF"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Maps a Chat search result to the surface that opens it.
3
+ *
4
+ * Conversations and messages open a conversation in the Chat resource itself. Artifacts open
5
+ * directly, because an artifact need not belong to a collection or a conversation. Collections
6
+ * and tasks open their own nav items. Returns null when the result has nothing to open.
7
+ */
8
+ export function ResolveChatSearchRoute(result) {
9
+ switch (result.type) {
10
+ case 'conversation':
11
+ return { Kind: 'conversation', ConversationId: result.id };
12
+ case 'message':
13
+ return result.conversationId ? { Kind: 'conversation', ConversationId: result.conversationId } : null;
14
+ case 'artifact':
15
+ return { Kind: 'artifact', ArtifactId: result.id, Title: result.title };
16
+ case 'collection':
17
+ return { Kind: 'nav-item', NavItemName: 'Collections', Configuration: { collectionId: result.id } };
18
+ case 'task':
19
+ return { Kind: 'nav-item', NavItemName: 'Tasks', Configuration: { taskId: result.id } };
20
+ default:
21
+ return null;
22
+ }
23
+ }
24
+ //# sourceMappingURL=chat-search-routing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-search-routing.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-search-routing.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAoB;IACzD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,cAAc;YACjB,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;QAC7D,KAAK,SAAS;YACZ,OAAO,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACxG,KAAK,UAAU;YACb,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;QAC1E,KAAK,YAAY;YACf,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC;QACtG,KAAK,MAAM;YACT,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC;QAC1F;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC","sourcesContent":["import type { SearchResult } from '@memberjunction/ng-conversations';\n\n/**\n * Where a Chat search result opens.\n */\nexport type ChatSearchRoute =\n | { Kind: 'conversation'; ConversationId: string }\n | { Kind: 'artifact'; ArtifactId: string; Title: string }\n | { Kind: 'nav-item'; NavItemName: 'Collections' | 'Tasks'; Configuration: Record<string, string> };\n\n/**\n * Maps a Chat search result to the surface that opens it.\n *\n * Conversations and messages open a conversation in the Chat resource itself. Artifacts open\n * directly, because an artifact need not belong to a collection or a conversation. Collections\n * and tasks open their own nav items. Returns null when the result has nothing to open.\n */\nexport function ResolveChatSearchRoute(result: SearchResult): ChatSearchRoute | null {\n switch (result.type) {\n case 'conversation':\n return { Kind: 'conversation', ConversationId: result.id };\n case 'message':\n return result.conversationId ? { Kind: 'conversation', ConversationId: result.conversationId } : null;\n case 'artifact':\n return { Kind: 'artifact', ArtifactId: result.id, Title: result.title };\n case 'collection':\n return { Kind: 'nav-item', NavItemName: 'Collections', Configuration: { collectionId: result.id } };\n case 'task':\n return { Kind: 'nav-item', NavItemName: 'Tasks', Configuration: { taskId: result.id } };\n default:\n return null;\n }\n}\n"]}
@@ -10,8 +10,16 @@ import * as i0 from "@angular/core";
10
10
  * Supports URL deep-linking via taskId query parameter
11
11
  */
12
12
  export declare class ChatTasksResource extends BaseResourceComponent implements OnDestroy {
13
- tasksView?: TasksFullViewComponent;
14
- currentUser: any;
13
+ TasksView?: TasksFullViewComponent;
14
+ /** @deprecated Use {@link TasksView}. */
15
+ get tasksView(): TasksFullViewComponent | undefined;
16
+ /** @deprecated Use {@link TasksView}. */
17
+ set tasksView(value: TasksFullViewComponent | undefined);
18
+ CurrentUser: any;
19
+ /** @deprecated Use {@link CurrentUser}. */
20
+ get currentUser(): any;
21
+ /** @deprecated Use {@link CurrentUser}. */
22
+ set currentUser(value: any);
15
23
  activeTaskId?: string;
16
24
  ngOnInit(): void;
17
25
  ngOnDestroy(): void;
@@ -19,10 +27,14 @@ export declare class ChatTasksResource extends BaseResourceComponent implements
19
27
  /**
20
28
  * Handle task selection from the tasks view.
21
29
  */
30
+ OnTaskSelected(taskId: string | null): void;
31
+ /** @deprecated Use {@link OnTaskSelected}. */
22
32
  onTaskSelected(taskId: string | null): void;
23
33
  /**
24
34
  * Get the environment ID from configuration or use default
25
35
  */
36
+ get EnvironmentId(): string;
37
+ /** @deprecated Use {@link EnvironmentId}. */
26
38
  get environmentId(): string;
27
39
  /**
28
40
  * Get the display name for chat tasks
@@ -1 +1 @@
1
- {"version":3,"file":"chat-tasks-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-tasks-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,SAAS,EAAa,MAAM,eAAe,CAAC;AAGnF,OAAO,EAAE,qBAAqB,EAAqB,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;;AAE1E;;;;;GAKG;AACH,qBAsCa,iBAAkB,SAAQ,qBAAsB,YAAW,SAAS;IACvD,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAEpD,WAAW,EAAE,GAAG,CAAQ;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IAE7B,QAAQ;IAsBR,WAAW;cAIQ,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI;IAI9G;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAM3C;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACG,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjE;;OAEG;IACG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCA9DpD,iBAAiB;2CAAjB,iBAAiB;CAiE7B"}
1
+ {"version":3,"file":"chat-tasks-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-tasks-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,SAAS,EAAa,MAAM,eAAe,CAAC;AAGnF,OAAO,EAAE,qBAAqB,EAAqB,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;;AAE1E;;;;;GAKG;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