@memberjunction/ng-conversations 2.104.0

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 (226) hide show
  1. package/README.md +197 -0
  2. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts +20 -0
  3. package/dist/lib/components/active-tasks/active-tasks-panel.component.d.ts.map +1 -0
  4. package/dist/lib/components/active-tasks/active-tasks-panel.component.js +125 -0
  5. package/dist/lib/components/active-tasks/active-tasks-panel.component.js.map +1 -0
  6. package/dist/lib/components/agent/active-agent-indicator.component.d.ts +48 -0
  7. package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -0
  8. package/dist/lib/components/agent/active-agent-indicator.component.js +199 -0
  9. package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -0
  10. package/dist/lib/components/agent/agent-process-panel.component.d.ts +30 -0
  11. package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -0
  12. package/dist/lib/components/agent/agent-process-panel.component.js +333 -0
  13. package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -0
  14. package/dist/lib/components/artifact/artifact-panel.component.d.ts +22 -0
  15. package/dist/lib/components/artifact/artifact-panel.component.d.ts.map +1 -0
  16. package/dist/lib/components/artifact/artifact-panel.component.js +237 -0
  17. package/dist/lib/components/artifact/artifact-panel.component.js.map +1 -0
  18. package/dist/lib/components/artifact/artifact-upload-modal.component.d.ts +39 -0
  19. package/dist/lib/components/artifact/artifact-upload-modal.component.d.ts.map +1 -0
  20. package/dist/lib/components/artifact/artifact-upload-modal.component.js +384 -0
  21. package/dist/lib/components/artifact/artifact-upload-modal.component.js.map +1 -0
  22. package/dist/lib/components/artifact/artifact-version-history.component.d.ts +28 -0
  23. package/dist/lib/components/artifact/artifact-version-history.component.d.ts.map +1 -0
  24. package/dist/lib/components/artifact/artifact-version-history.component.js +280 -0
  25. package/dist/lib/components/artifact/artifact-version-history.component.js.map +1 -0
  26. package/dist/lib/components/artifact/artifact-viewer-panel.component.d.ts +22 -0
  27. package/dist/lib/components/artifact/artifact-viewer-panel.component.d.ts.map +1 -0
  28. package/dist/lib/components/artifact/artifact-viewer-panel.component.js +182 -0
  29. package/dist/lib/components/artifact/artifact-viewer-panel.component.js.map +1 -0
  30. package/dist/lib/components/artifact/artifact-viewer.component.d.ts +27 -0
  31. package/dist/lib/components/artifact/artifact-viewer.component.d.ts.map +1 -0
  32. package/dist/lib/components/artifact/artifact-viewer.component.js +266 -0
  33. package/dist/lib/components/artifact/artifact-viewer.component.js.map +1 -0
  34. package/dist/lib/components/artifact/inline-artifact.component.d.ts +46 -0
  35. package/dist/lib/components/artifact/inline-artifact.component.d.ts.map +1 -0
  36. package/dist/lib/components/artifact/inline-artifact.component.js +447 -0
  37. package/dist/lib/components/artifact/inline-artifact.component.js.map +1 -0
  38. package/dist/lib/components/collection/collection-artifact-card.component.d.ts +18 -0
  39. package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -0
  40. package/dist/lib/components/collection/collection-artifact-card.component.js +147 -0
  41. package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -0
  42. package/dist/lib/components/collection/collection-form-modal.component.d.ts +33 -0
  43. package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -0
  44. package/dist/lib/components/collection/collection-form-modal.component.js +245 -0
  45. package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -0
  46. package/dist/lib/components/collection/collection-tree.component.d.ts +42 -0
  47. package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -0
  48. package/dist/lib/components/collection/collection-tree.component.js +482 -0
  49. package/dist/lib/components/collection/collection-tree.component.js.map +1 -0
  50. package/dist/lib/components/collection/collection-view.component.d.ts +31 -0
  51. package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -0
  52. package/dist/lib/components/collection/collection-view.component.js +254 -0
  53. package/dist/lib/components/collection/collection-view.component.js.map +1 -0
  54. package/dist/lib/components/collection/collections-full-view.component.d.ts +55 -0
  55. package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -0
  56. package/dist/lib/components/collection/collections-full-view.component.js +578 -0
  57. package/dist/lib/components/collection/collections-full-view.component.js.map +1 -0
  58. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +160 -0
  59. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -0
  60. package/dist/lib/components/conversation/conversation-chat-area.component.js +891 -0
  61. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -0
  62. package/dist/lib/components/conversation/conversation-list.component.d.ts +29 -0
  63. package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -0
  64. package/dist/lib/components/conversation/conversation-list.component.js +255 -0
  65. package/dist/lib/components/conversation/conversation-list.component.js.map +1 -0
  66. package/dist/lib/components/dialogs/input-dialog.component.d.ts +17 -0
  67. package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -0
  68. package/dist/lib/components/dialogs/input-dialog.component.js +122 -0
  69. package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -0
  70. package/dist/lib/components/export/export-modal.component.d.ts +37 -0
  71. package/dist/lib/components/export/export-modal.component.d.ts.map +1 -0
  72. package/dist/lib/components/export/export-modal.component.js +414 -0
  73. package/dist/lib/components/export/export-modal.component.js.map +1 -0
  74. package/dist/lib/components/library/library-full-view.component.d.ts +36 -0
  75. package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -0
  76. package/dist/lib/components/library/library-full-view.component.js +270 -0
  77. package/dist/lib/components/library/library-full-view.component.js.map +1 -0
  78. package/dist/lib/components/members/members-modal.component.d.ts +42 -0
  79. package/dist/lib/components/members/members-modal.component.d.ts.map +1 -0
  80. package/dist/lib/components/members/members-modal.component.js +352 -0
  81. package/dist/lib/components/members/members-modal.component.js.map +1 -0
  82. package/dist/lib/components/mention/mention-dropdown.component.d.ts +44 -0
  83. package/dist/lib/components/mention/mention-dropdown.component.d.ts.map +1 -0
  84. package/dist/lib/components/mention/mention-dropdown.component.js +194 -0
  85. package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -0
  86. package/dist/lib/components/message/message-input.component.d.ts +137 -0
  87. package/dist/lib/components/message/message-input.component.d.ts.map +1 -0
  88. package/dist/lib/components/message/message-input.component.js +1159 -0
  89. package/dist/lib/components/message/message-input.component.js.map +1 -0
  90. package/dist/lib/components/message/message-item.component.d.ts +140 -0
  91. package/dist/lib/components/message/message-item.component.d.ts.map +1 -0
  92. package/dist/lib/components/message/message-item.component.js +817 -0
  93. package/dist/lib/components/message/message-item.component.js.map +1 -0
  94. package/dist/lib/components/message/message-list.component.d.ts +77 -0
  95. package/dist/lib/components/message/message-list.component.d.ts.map +1 -0
  96. package/dist/lib/components/message/message-list.component.js +316 -0
  97. package/dist/lib/components/message/message-list.component.js.map +1 -0
  98. package/dist/lib/components/navigation/conversation-navigation.component.d.ts +13 -0
  99. package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -0
  100. package/dist/lib/components/navigation/conversation-navigation.component.js +88 -0
  101. package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -0
  102. package/dist/lib/components/notification/activity-indicator.component.d.ts +11 -0
  103. package/dist/lib/components/notification/activity-indicator.component.d.ts.map +1 -0
  104. package/dist/lib/components/notification/activity-indicator.component.js +56 -0
  105. package/dist/lib/components/notification/activity-indicator.component.js.map +1 -0
  106. package/dist/lib/components/notification/notification-badge.component.d.ts +27 -0
  107. package/dist/lib/components/notification/notification-badge.component.d.ts.map +1 -0
  108. package/dist/lib/components/notification/notification-badge.component.js +160 -0
  109. package/dist/lib/components/notification/notification-badge.component.js.map +1 -0
  110. package/dist/lib/components/project/project-form-modal.component.d.ts +34 -0
  111. package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -0
  112. package/dist/lib/components/project/project-form-modal.component.js +357 -0
  113. package/dist/lib/components/project/project-form-modal.component.js.map +1 -0
  114. package/dist/lib/components/project/project-selector.component.d.ts +36 -0
  115. package/dist/lib/components/project/project-selector.component.d.ts.map +1 -0
  116. package/dist/lib/components/project/project-selector.component.js +317 -0
  117. package/dist/lib/components/project/project-selector.component.js.map +1 -0
  118. package/dist/lib/components/search/search-panel.component.d.ts +120 -0
  119. package/dist/lib/components/search/search-panel.component.d.ts.map +1 -0
  120. package/dist/lib/components/search/search-panel.component.js +714 -0
  121. package/dist/lib/components/search/search-panel.component.js.map +1 -0
  122. package/dist/lib/components/share/share-modal.component.d.ts +46 -0
  123. package/dist/lib/components/share/share-modal.component.d.ts.map +1 -0
  124. package/dist/lib/components/share/share-modal.component.js +431 -0
  125. package/dist/lib/components/share/share-modal.component.js.map +1 -0
  126. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +18 -0
  127. package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -0
  128. package/dist/lib/components/sidebar/conversation-sidebar.component.js +81 -0
  129. package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -0
  130. package/dist/lib/components/task/task-form-modal.component.d.ts +42 -0
  131. package/dist/lib/components/task/task-form-modal.component.d.ts.map +1 -0
  132. package/dist/lib/components/task/task-form-modal.component.js +329 -0
  133. package/dist/lib/components/task/task-form-modal.component.js.map +1 -0
  134. package/dist/lib/components/task/task-item.component.d.ts +22 -0
  135. package/dist/lib/components/task/task-item.component.d.ts.map +1 -0
  136. package/dist/lib/components/task/task-item.component.js +234 -0
  137. package/dist/lib/components/task/task-item.component.js.map +1 -0
  138. package/dist/lib/components/task/task-list.component.d.ts +32 -0
  139. package/dist/lib/components/task/task-list.component.d.ts.map +1 -0
  140. package/dist/lib/components/task/task-list.component.js +290 -0
  141. package/dist/lib/components/task/task-list.component.js.map +1 -0
  142. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +27 -0
  143. package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -0
  144. package/dist/lib/components/tasks/tasks-dropdown.component.js +254 -0
  145. package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -0
  146. package/dist/lib/components/thread/thread-panel.component.d.ts +65 -0
  147. package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -0
  148. package/dist/lib/components/thread/thread-panel.component.js +325 -0
  149. package/dist/lib/components/thread/thread-panel.component.js.map +1 -0
  150. package/dist/lib/components/toast/toast.component.d.ts +26 -0
  151. package/dist/lib/components/toast/toast.component.d.ts.map +1 -0
  152. package/dist/lib/components/toast/toast.component.js +108 -0
  153. package/dist/lib/components/toast/toast.component.js.map +1 -0
  154. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +75 -0
  155. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -0
  156. package/dist/lib/components/workspace/conversation-workspace.component.js +299 -0
  157. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -0
  158. package/dist/lib/conversations.module.d.ts +62 -0
  159. package/dist/lib/conversations.module.d.ts.map +1 -0
  160. package/dist/lib/conversations.module.js +248 -0
  161. package/dist/lib/conversations.module.js.map +1 -0
  162. package/dist/lib/directives/search-shortcut.directive.d.ts +17 -0
  163. package/dist/lib/directives/search-shortcut.directive.d.ts.map +1 -0
  164. package/dist/lib/directives/search-shortcut.directive.js +39 -0
  165. package/dist/lib/directives/search-shortcut.directive.js.map +1 -0
  166. package/dist/lib/models/conversation-state.model.d.ts +72 -0
  167. package/dist/lib/models/conversation-state.model.d.ts.map +1 -0
  168. package/dist/lib/models/conversation-state.model.js +2 -0
  169. package/dist/lib/models/conversation-state.model.js.map +1 -0
  170. package/dist/lib/models/notification.model.d.ts +89 -0
  171. package/dist/lib/models/notification.model.d.ts.map +1 -0
  172. package/dist/lib/models/notification.model.js +11 -0
  173. package/dist/lib/models/notification.model.js.map +1 -0
  174. package/dist/lib/services/active-tasks.service.d.ts +65 -0
  175. package/dist/lib/services/active-tasks.service.d.ts.map +1 -0
  176. package/dist/lib/services/active-tasks.service.js +95 -0
  177. package/dist/lib/services/active-tasks.service.js.map +1 -0
  178. package/dist/lib/services/agent-state.service.d.ts +78 -0
  179. package/dist/lib/services/agent-state.service.d.ts.map +1 -0
  180. package/dist/lib/services/agent-state.service.js +213 -0
  181. package/dist/lib/services/agent-state.service.js.map +1 -0
  182. package/dist/lib/services/artifact-state.service.d.ts +114 -0
  183. package/dist/lib/services/artifact-state.service.d.ts.map +1 -0
  184. package/dist/lib/services/artifact-state.service.js +288 -0
  185. package/dist/lib/services/artifact-state.service.js.map +1 -0
  186. package/dist/lib/services/conversation-agent.service.d.ts +79 -0
  187. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -0
  188. package/dist/lib/services/conversation-agent.service.js +259 -0
  189. package/dist/lib/services/conversation-agent.service.js.map +1 -0
  190. package/dist/lib/services/conversation-state.service.d.ts +122 -0
  191. package/dist/lib/services/conversation-state.service.d.ts.map +1 -0
  192. package/dist/lib/services/conversation-state.service.js +255 -0
  193. package/dist/lib/services/conversation-state.service.js.map +1 -0
  194. package/dist/lib/services/dialog.service.d.ts +54 -0
  195. package/dist/lib/services/dialog.service.d.ts.map +1 -0
  196. package/dist/lib/services/dialog.service.js +157 -0
  197. package/dist/lib/services/dialog.service.js.map +1 -0
  198. package/dist/lib/services/export.service.d.ts +25 -0
  199. package/dist/lib/services/export.service.d.ts.map +1 -0
  200. package/dist/lib/services/export.service.js +237 -0
  201. package/dist/lib/services/export.service.js.map +1 -0
  202. package/dist/lib/services/mention-autocomplete.service.d.ts +59 -0
  203. package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -0
  204. package/dist/lib/services/mention-autocomplete.service.js +160 -0
  205. package/dist/lib/services/mention-autocomplete.service.js.map +1 -0
  206. package/dist/lib/services/mention-parser.service.d.ts +46 -0
  207. package/dist/lib/services/mention-parser.service.d.ts.map +1 -0
  208. package/dist/lib/services/mention-parser.service.js +156 -0
  209. package/dist/lib/services/mention-parser.service.js.map +1 -0
  210. package/dist/lib/services/notification.service.d.ts +108 -0
  211. package/dist/lib/services/notification.service.d.ts.map +1 -0
  212. package/dist/lib/services/notification.service.js +431 -0
  213. package/dist/lib/services/notification.service.js.map +1 -0
  214. package/dist/lib/services/search.service.d.ts +144 -0
  215. package/dist/lib/services/search.service.d.ts.map +1 -0
  216. package/dist/lib/services/search.service.js +370 -0
  217. package/dist/lib/services/search.service.js.map +1 -0
  218. package/dist/lib/services/toast.service.d.ts +46 -0
  219. package/dist/lib/services/toast.service.d.ts.map +1 -0
  220. package/dist/lib/services/toast.service.js +76 -0
  221. package/dist/lib/services/toast.service.js.map +1 -0
  222. package/dist/public-api.d.ts +42 -0
  223. package/dist/public-api.d.ts.map +1 -0
  224. package/dist/public-api.js +49 -0
  225. package/dist/public-api.js.map +1 -0
  226. package/package.json +54 -0
@@ -0,0 +1,891 @@
1
+ import { Component, Input, Output, EventEmitter, ViewChild } from '@angular/core';
2
+ import { RunView, Metadata } from '@memberjunction/core';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "../../services/conversation-state.service";
5
+ import * as i2 from "../../services/agent-state.service";
6
+ import * as i3 from "../../services/conversation-agent.service";
7
+ import * as i4 from "../../services/active-tasks.service";
8
+ import * as i5 from "@angular/common";
9
+ import * as i6 from "../message/message-list.component";
10
+ import * as i7 from "../message/message-input.component";
11
+ import * as i8 from "../thread/thread-panel.component";
12
+ import * as i9 from "../artifact/artifact-viewer-panel.component";
13
+ import * as i10 from "../project/project-selector.component";
14
+ import * as i11 from "../tasks/tasks-dropdown.component";
15
+ import * as i12 from "../agent/active-agent-indicator.component";
16
+ import * as i13 from "../active-tasks/active-tasks-panel.component";
17
+ import * as i14 from "../members/members-modal.component";
18
+ import * as i15 from "../export/export-modal.component";
19
+ const _c0 = ["scrollContainer"];
20
+ const _forTrack0 = ($index, $item) => $item.artifactId;
21
+ function ConversationChatAreaComponent_div_1_button_4_Template(rf, ctx) { if (rf & 1) {
22
+ const _r3 = i0.ɵɵgetCurrentView();
23
+ i0.ɵɵelementStart(0, "button", 29);
24
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.openProjectSelector()); });
25
+ i0.ɵɵelement(1, "i", 30);
26
+ i0.ɵɵelementStart(2, "span");
27
+ i0.ɵɵtext(3);
28
+ i0.ɵɵelementEnd()();
29
+ } if (rf & 2) {
30
+ const conversation_r5 = i0.ɵɵnextContext().ngIf;
31
+ i0.ɵɵadvance(3);
32
+ i0.ɵɵtextInterpolate(conversation_r5.Project || "Project");
33
+ } }
34
+ function ConversationChatAreaComponent_div_1_button_9_Template(rf, ctx) { if (rf & 1) {
35
+ const _r6 = i0.ɵɵgetCurrentView();
36
+ i0.ɵɵelementStart(0, "button", 31);
37
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.viewArtifacts()); });
38
+ i0.ɵɵelement(1, "i", 32);
39
+ i0.ɵɵelementStart(2, "span");
40
+ i0.ɵɵtext(3);
41
+ i0.ɵɵelementEnd()();
42
+ } if (rf & 2) {
43
+ const ctx_r3 = i0.ɵɵnextContext(2);
44
+ i0.ɵɵadvance(3);
45
+ i0.ɵɵtextInterpolate2("", ctx_r3.artifactCount, " artifact", ctx_r3.artifactCount !== 1 ? "s" : "", "");
46
+ } }
47
+ function ConversationChatAreaComponent_div_1_Template(rf, ctx) { if (rf & 1) {
48
+ const _r2 = i0.ɵɵgetCurrentView();
49
+ i0.ɵɵelementStart(0, "div", 15)(1, "div", 16)(2, "div", 17);
50
+ i0.ɵɵtext(3);
51
+ i0.ɵɵelementEnd();
52
+ i0.ɵɵtemplate(4, ConversationChatAreaComponent_div_1_button_4_Template, 4, 1, "button", 18);
53
+ i0.ɵɵelementStart(5, "button", 19);
54
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.toggleMembersModal()); });
55
+ i0.ɵɵelement(6, "i", 20);
56
+ i0.ɵɵelementStart(7, "span");
57
+ i0.ɵɵtext(8);
58
+ i0.ɵɵelementEnd()();
59
+ i0.ɵɵtemplate(9, ConversationChatAreaComponent_div_1_button_9_Template, 4, 2, "button", 21);
60
+ i0.ɵɵelement(10, "mj-tasks-dropdown", 22);
61
+ i0.ɵɵelementStart(11, "mj-active-agent-indicator", 23);
62
+ i0.ɵɵlistener("togglePanel", function ConversationChatAreaComponent_div_1_Template_mj_active_agent_indicator_togglePanel_11_listener() { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onToggleAgentPanel()); })("agentSelected", function ConversationChatAreaComponent_div_1_Template_mj_active_agent_indicator_agentSelected_11_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onAgentSelected($event)); });
63
+ i0.ɵɵelementEnd()();
64
+ i0.ɵɵelementStart(12, "div", 24)(13, "button", 25);
65
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.exportConversation()); });
66
+ i0.ɵɵelement(14, "i", 26);
67
+ i0.ɵɵtext(15, " Export ");
68
+ i0.ɵɵelementEnd();
69
+ i0.ɵɵelementStart(16, "button", 27);
70
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.shareConversation()); });
71
+ i0.ɵɵelement(17, "i", 28);
72
+ i0.ɵɵtext(18, " Share ");
73
+ i0.ɵɵelementEnd()()();
74
+ } if (rf & 2) {
75
+ const conversation_r5 = ctx.ngIf;
76
+ const ctx_r3 = i0.ɵɵnextContext();
77
+ i0.ɵɵadvance(3);
78
+ i0.ɵɵtextInterpolate(conversation_r5.Name);
79
+ i0.ɵɵadvance();
80
+ i0.ɵɵproperty("ngIf", conversation_r5.ProjectID);
81
+ i0.ɵɵadvance(4);
82
+ i0.ɵɵtextInterpolate2("", ctx_r3.memberCount, " member", ctx_r3.memberCount !== 1 ? "s" : "", "");
83
+ i0.ɵɵadvance();
84
+ i0.ɵɵproperty("ngIf", ctx_r3.artifactCount > 0);
85
+ i0.ɵɵadvance();
86
+ i0.ɵɵproperty("currentUser", ctx_r3.currentUser);
87
+ i0.ɵɵadvance();
88
+ i0.ɵɵproperty("conversationId", ctx_r3.conversationState.activeConversation.ID)("currentUser", ctx_r3.currentUser);
89
+ i0.ɵɵadvance(5);
90
+ i0.ɵɵclassProp("shared", ctx_r3.isShared);
91
+ i0.ɵɵproperty("title", ctx_r3.isShared ? "Manage sharing" : "Share conversation");
92
+ } }
93
+ function ConversationChatAreaComponent_span_8_Template(rf, ctx) { if (rf & 1) {
94
+ const _r7 = i0.ɵɵgetCurrentView();
95
+ i0.ɵɵelementStart(0, "span", 33);
96
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_span_8_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.scrollToBottomAnimate()); });
97
+ i0.ɵɵelement(1, "i", 34);
98
+ i0.ɵɵelementEnd();
99
+ } if (rf & 2) {
100
+ const ctx_r3 = i0.ɵɵnextContext();
101
+ i0.ɵɵstyleProp("left", ctx_r3.getScrollToBottomIconPosition(), "px");
102
+ } }
103
+ function ConversationChatAreaComponent_mj_message_input_10_Template(rf, ctx) { if (rf & 1) {
104
+ const _r8 = i0.ɵɵgetCurrentView();
105
+ i0.ɵɵelementStart(0, "mj-message-input", 35);
106
+ i0.ɵɵlistener("messageSent", function ConversationChatAreaComponent_mj_message_input_10_Template_mj_message_input_messageSent_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onMessageSent($event)); })("agentResponse", function ConversationChatAreaComponent_mj_message_input_10_Template_mj_message_input_agentResponse_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onAgentResponse($event)); })("agentRunDetected", function ConversationChatAreaComponent_mj_message_input_10_Template_mj_message_input_agentRunDetected_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onAgentRunDetected($event)); })("artifactCreated", function ConversationChatAreaComponent_mj_message_input_10_Template_mj_message_input_artifactCreated_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onArtifactCreated($event)); })("conversationRenamed", function ConversationChatAreaComponent_mj_message_input_10_Template_mj_message_input_conversationRenamed_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onConversationRenamed($event)); });
107
+ i0.ɵɵelementEnd();
108
+ } if (rf & 2) {
109
+ const ctx_r3 = i0.ɵɵnextContext();
110
+ i0.ɵɵproperty("conversationId", ctx_r3.conversationState.activeConversation.ID)("currentUser", ctx_r3.currentUser)("conversationHistory", ctx_r3.messages)("disabled", ctx_r3.isProcessing);
111
+ } }
112
+ function ConversationChatAreaComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
113
+ const _r9 = i0.ɵɵgetCurrentView();
114
+ i0.ɵɵelementStart(0, "div", 36);
115
+ i0.ɵɵlistener("mousedown", function ConversationChatAreaComponent_Conditional_11_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onResizeStart($event)); });
116
+ i0.ɵɵelementEnd();
117
+ i0.ɵɵelementStart(1, "div", 37)(2, "mj-artifact-viewer-panel", 38);
118
+ i0.ɵɵlistener("closed", function ConversationChatAreaComponent_Conditional_11_Template_mj_artifact_viewer_panel_closed_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onCloseArtifactPanel()); });
119
+ i0.ɵɵelementEnd()();
120
+ } if (rf & 2) {
121
+ const ctx_r3 = i0.ɵɵnextContext();
122
+ i0.ɵɵadvance();
123
+ i0.ɵɵstyleProp("width", ctx_r3.artifactPaneWidth, "%");
124
+ i0.ɵɵadvance();
125
+ i0.ɵɵproperty("artifactId", ctx_r3.selectedArtifactId)("currentUser", ctx_r3.currentUser);
126
+ } }
127
+ function ConversationChatAreaComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
128
+ const _r10 = i0.ɵɵgetCurrentView();
129
+ i0.ɵɵelementStart(0, "mj-thread-panel", 39);
130
+ i0.ɵɵlistener("closed", function ConversationChatAreaComponent_Conditional_12_Template_mj_thread_panel_closed_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onThreadClosed()); })("replyAdded", function ConversationChatAreaComponent_Conditional_12_Template_mj_thread_panel_replyAdded_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onThreadReplyAdded($event)); });
131
+ i0.ɵɵelementEnd();
132
+ } if (rf & 2) {
133
+ const ctx_r3 = i0.ɵɵnextContext();
134
+ i0.ɵɵproperty("parentMessageId", ctx_r3.conversationState.activeThreadId)("conversationId", (ctx_r3.conversationState.activeConversation == null ? null : ctx_r3.conversationState.activeConversation.ID) || "")("currentUser", ctx_r3.currentUser);
135
+ } }
136
+ function ConversationChatAreaComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
137
+ const _r11 = i0.ɵɵgetCurrentView();
138
+ i0.ɵɵelementStart(0, "div", 40);
139
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_15_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.showProjectSelector = false); });
140
+ i0.ɵɵelementStart(1, "div", 41);
141
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_15_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r11); return i0.ɵɵresetView($event.stopPropagation()); });
142
+ i0.ɵɵelementStart(2, "div", 42)(3, "h3");
143
+ i0.ɵɵtext(4, "Assign Project");
144
+ i0.ɵɵelementEnd();
145
+ i0.ɵɵelementStart(5, "button", 43);
146
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_15_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r11); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.showProjectSelector = false); });
147
+ i0.ɵɵelement(6, "i", 44);
148
+ i0.ɵɵelementEnd()();
149
+ i0.ɵɵelementStart(7, "div", 45)(8, "mj-project-selector", 46);
150
+ i0.ɵɵlistener("projectSelected", function ConversationChatAreaComponent_Conditional_15_Template_mj_project_selector_projectSelected_8_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onProjectSelected($event)); });
151
+ i0.ɵɵelementEnd()()()();
152
+ } if (rf & 2) {
153
+ const ctx_r3 = i0.ɵɵnextContext();
154
+ i0.ɵɵadvance(8);
155
+ i0.ɵɵproperty("environmentId", ctx_r3.environmentId)("currentUser", ctx_r3.currentUser)("selectedProjectId", ctx_r3.conversationState.activeConversation.ProjectID);
156
+ } }
157
+ function ConversationChatAreaComponent_Conditional_17_Conditional_8_Template(rf, ctx) { if (rf & 1) {
158
+ i0.ɵɵelementStart(0, "div", 49);
159
+ i0.ɵɵelement(1, "i", 51);
160
+ i0.ɵɵelementStart(2, "p", 52);
161
+ i0.ɵɵtext(3, "No artifacts in this conversation yet");
162
+ i0.ɵɵelementEnd()();
163
+ } }
164
+ function ConversationChatAreaComponent_Conditional_17_For_10_Template(rf, ctx) { if (rf & 1) {
165
+ const _r13 = i0.ɵɵgetCurrentView();
166
+ i0.ɵɵelementStart(0, "div", 53);
167
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_17_For_10_Template_div_click_0_listener() { const artifact_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.openArtifactFromModal(artifact_r14.artifactId)); });
168
+ i0.ɵɵelementStart(1, "div", 54);
169
+ i0.ɵɵelement(2, "i", 55);
170
+ i0.ɵɵelementEnd();
171
+ i0.ɵɵelementStart(3, "div", 56)(4, "div", 57);
172
+ i0.ɵɵtext(5);
173
+ i0.ɵɵelementEnd();
174
+ i0.ɵɵelementStart(6, "div", 58);
175
+ i0.ɵɵtext(7);
176
+ i0.ɵɵelementEnd()();
177
+ i0.ɵɵelementStart(8, "div", 59);
178
+ i0.ɵɵelement(9, "i", 60);
179
+ i0.ɵɵelementEnd()();
180
+ } if (rf & 2) {
181
+ const artifact_r14 = ctx.$implicit;
182
+ i0.ɵɵadvance(5);
183
+ i0.ɵɵtextInterpolate(artifact_r14.name);
184
+ i0.ɵɵadvance(2);
185
+ i0.ɵɵtextInterpolate1("Version ", artifact_r14.versionId.substring(0, 8), "");
186
+ } }
187
+ function ConversationChatAreaComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
188
+ const _r12 = i0.ɵɵgetCurrentView();
189
+ i0.ɵɵelementStart(0, "div", 40);
190
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_17_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.showArtifactsModal = false); });
191
+ i0.ɵɵelementStart(1, "div", 47);
192
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_17_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r12); return i0.ɵɵresetView($event.stopPropagation()); });
193
+ i0.ɵɵelementStart(2, "div", 42)(3, "h3");
194
+ i0.ɵɵtext(4, "Conversation Artifacts");
195
+ i0.ɵɵelementEnd();
196
+ i0.ɵɵelementStart(5, "button", 43);
197
+ i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_17_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r12); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.showArtifactsModal = false); });
198
+ i0.ɵɵelement(6, "i", 44);
199
+ i0.ɵɵelementEnd()();
200
+ i0.ɵɵelementStart(7, "div", 48);
201
+ i0.ɵɵtemplate(8, ConversationChatAreaComponent_Conditional_17_Conditional_8_Template, 4, 0, "div", 49);
202
+ i0.ɵɵrepeaterCreate(9, ConversationChatAreaComponent_Conditional_17_For_10_Template, 10, 2, "div", 50, _forTrack0);
203
+ i0.ɵɵelementEnd()()();
204
+ } if (rf & 2) {
205
+ const ctx_r3 = i0.ɵɵnextContext();
206
+ i0.ɵɵadvance(8);
207
+ i0.ɵɵconditional(ctx_r3.artifactsByDetailId.size === 0 ? 8 : -1);
208
+ i0.ɵɵadvance();
209
+ i0.ɵɵrepeater(ctx_r3.getArtifactsArray());
210
+ } }
211
+ export class ConversationChatAreaComponent {
212
+ conversationState;
213
+ agentStateService;
214
+ conversationAgentService;
215
+ activeTasks;
216
+ cdr;
217
+ environmentId;
218
+ currentUser;
219
+ conversationRenamed = new EventEmitter();
220
+ openEntityRecord = new EventEmitter();
221
+ scrollContainer;
222
+ messages = [];
223
+ showScrollToBottomIcon = false;
224
+ scrollToBottom = false;
225
+ previousConversationId = null;
226
+ isProcessing = false;
227
+ memberCount = 1;
228
+ artifactCount = 0;
229
+ isShared = false;
230
+ showExportModal = false;
231
+ showAgentPanel = false;
232
+ showMembersModal = false;
233
+ showProjectSelector = false;
234
+ showArtifactPanel = false;
235
+ showArtifactsModal = false;
236
+ selectedArtifactId = null;
237
+ artifactPaneWidth = 40; // Default 40% width
238
+ // Artifact mapping: ConversationDetailID -> {artifactId, versionId, name}
239
+ artifactsByDetailId = new Map();
240
+ // Agent run mapping: ConversationDetailID -> AIAgentRunEntityExtended
241
+ // Loaded once per conversation and kept in sync as new runs are created
242
+ agentRunsByDetailId = new Map();
243
+ // Resize state
244
+ isResizing = false;
245
+ startX = 0;
246
+ startWidth = 0;
247
+ // LocalStorage key
248
+ ARTIFACT_PANE_WIDTH_KEY = 'mj-conversations-artifact-pane-width';
249
+ constructor(conversationState, agentStateService, conversationAgentService, activeTasks, cdr) {
250
+ this.conversationState = conversationState;
251
+ this.agentStateService = agentStateService;
252
+ this.conversationAgentService = conversationAgentService;
253
+ this.activeTasks = activeTasks;
254
+ this.cdr = cdr;
255
+ }
256
+ ngOnInit() {
257
+ // Load saved artifact pane width
258
+ this.loadArtifactPaneWidth();
259
+ // Initial load if there's already an active conversation
260
+ if (this.conversationState.activeConversationId) {
261
+ this.onConversationChanged(this.conversationState.activeConversationId);
262
+ }
263
+ // Setup resize listeners
264
+ window.addEventListener('mousemove', this.onResizeMove.bind(this));
265
+ window.addEventListener('mouseup', this.onResizeEnd.bind(this));
266
+ }
267
+ ngDoCheck() {
268
+ // Detect conversation ID changes using change detection
269
+ const currentId = this.conversationState.activeConversationId;
270
+ if (currentId !== this.previousConversationId) {
271
+ this.previousConversationId = currentId;
272
+ this.onConversationChanged(currentId);
273
+ }
274
+ }
275
+ ngAfterViewChecked() {
276
+ if (this.scrollToBottom) {
277
+ this.scrollToBottom = false;
278
+ setTimeout(() => {
279
+ this.scrollToBottomNow();
280
+ }, 100);
281
+ }
282
+ }
283
+ ngOnDestroy() {
284
+ // Stop polling when component is destroyed
285
+ this.agentStateService.stopPolling();
286
+ // Remove resize listeners
287
+ window.removeEventListener('mousemove', this.onResizeMove.bind(this));
288
+ window.removeEventListener('mouseup', this.onResizeEnd.bind(this));
289
+ }
290
+ async onConversationChanged(conversationId) {
291
+ this.activeTasks.clear();
292
+ // Hide artifact panel when conversation changes
293
+ this.showArtifactPanel = false;
294
+ this.selectedArtifactId = null;
295
+ if (conversationId) {
296
+ await this.loadMessages(conversationId);
297
+ await this.restoreActiveTasks(conversationId);
298
+ this.agentStateService.startPolling(this.currentUser, conversationId);
299
+ }
300
+ else {
301
+ this.messages = [];
302
+ }
303
+ }
304
+ async loadMessages(conversationId) {
305
+ try {
306
+ const rv = new RunView();
307
+ // Load messages and agent runs in parallel
308
+ const md = new Metadata();
309
+ const convoDetailEntity = md.EntityByName("Conversation Details");
310
+ const [messagesResult, agentRunsResult, conversationDetailArtifacts] = await Promise.all([
311
+ rv.RunView({
312
+ EntityName: 'Conversation Details',
313
+ ExtraFilter: `ConversationID='${conversationId}'`,
314
+ OrderBy: '__mj_CreatedAt ASC',
315
+ ResultType: 'entity_object'
316
+ }, this.currentUser),
317
+ rv.RunView({
318
+ EntityName: 'MJ: AI Agent Runs',
319
+ ExtraFilter: `ConversationDetailID IN (SELECT ID FROM [${convoDetailEntity.SchemaName}].[${convoDetailEntity.BaseView}] WHERE ConversationID='${conversationId}')`,
320
+ ResultType: 'entity_object'
321
+ }, this.currentUser),
322
+ rv.RunView({
323
+ EntityName: 'MJ: Conversation Detail Artifacts',
324
+ ExtraFilter: `ConversationDetailID IN (SELECT ID FROM [${convoDetailEntity.SchemaName}].[${convoDetailEntity.BaseView}] WHERE ConversationID='${conversationId}') AND Direction='Output'`,
325
+ ResultType: 'entity_object'
326
+ }, this.currentUser)
327
+ ]);
328
+ if (messagesResult.Success) {
329
+ const loadedMessages = messagesResult.Results || [];
330
+ // Build agent runs map - single query loads all runs for this conversation
331
+ this.agentRunsByDetailId.clear();
332
+ console.log(`🔍 Agent Runs Query Result:`, {
333
+ success: agentRunsResult.Success,
334
+ resultCount: agentRunsResult.Results?.length || 0,
335
+ errorMessage: agentRunsResult.ErrorMessage
336
+ });
337
+ if (agentRunsResult.Success && agentRunsResult.Results) {
338
+ for (const run of agentRunsResult.Results) {
339
+ console.log(` 📌 Agent Run:`, {
340
+ id: run.ID,
341
+ agentName: run.Agent,
342
+ conversationDetailID: run.ConversationDetailID,
343
+ status: run.Status
344
+ });
345
+ if (run.ConversationDetailID) {
346
+ this.agentRunsByDetailId.set(run.ConversationDetailID, run);
347
+ }
348
+ }
349
+ console.log(`📊 Loaded ${this.agentRunsByDetailId.size} agent runs for conversation ${conversationId}`);
350
+ console.log(`📊 Map keys:`, Array.from(this.agentRunsByDetailId.keys()));
351
+ }
352
+ else {
353
+ console.error(`❌ Failed to load agent runs:`, agentRunsResult.ErrorMessage);
354
+ }
355
+ // Build artifact map from preloaded artifacts
356
+ this.artifactsByDetailId.clear();
357
+ if (conversationDetailArtifacts.Success && conversationDetailArtifacts.Results && conversationDetailArtifacts.Results.length > 0) {
358
+ // Load artifact versions to get ArtifactID
359
+ const versionIds = conversationDetailArtifacts.Results.map(a => `'${a.ArtifactVersionID}'`).join(',');
360
+ const versionsResult = await rv.RunView({
361
+ EntityName: 'MJ: Artifact Versions',
362
+ ExtraFilter: `ID IN (${versionIds})`,
363
+ ResultType: 'entity_object'
364
+ }, this.currentUser);
365
+ if (versionsResult.Success && versionsResult.Results) {
366
+ // Create map of versionId -> {artifactId, artifactName}
367
+ const versionToArtifact = new Map();
368
+ // Get all unique artifact IDs
369
+ const artifactIds = [...new Set(versionsResult.Results.map(v => v.ArtifactID))];
370
+ // Load artifact entities to get names
371
+ const artifactsResult = await rv.RunView({
372
+ EntityName: 'MJ: Artifacts',
373
+ ExtraFilter: `ID IN (${artifactIds.map(id => `'${id}'`).join(',')})`,
374
+ ResultType: 'entity_object'
375
+ }, this.currentUser);
376
+ // Create map of artifactId -> name
377
+ const artifactNames = new Map();
378
+ if (artifactsResult.Success && artifactsResult.Results) {
379
+ for (const artifact of artifactsResult.Results) {
380
+ artifactNames.set(artifact.ID, artifact.Name || 'Unnamed Artifact');
381
+ }
382
+ }
383
+ // Build versionId to artifact info map
384
+ for (const version of versionsResult.Results) {
385
+ versionToArtifact.set(version.ID, {
386
+ artifactId: version.ArtifactID,
387
+ artifactName: artifactNames.get(version.ArtifactID) || 'Unnamed Artifact'
388
+ });
389
+ }
390
+ // Build final artifact map with IDs and names
391
+ for (const artifact of conversationDetailArtifacts.Results) {
392
+ const artifactInfo = versionToArtifact.get(artifact.ArtifactVersionID);
393
+ if (artifact.ConversationDetailID && artifactInfo) {
394
+ this.artifactsByDetailId.set(artifact.ConversationDetailID, {
395
+ artifactId: artifactInfo.artifactId,
396
+ versionId: artifact.ArtifactVersionID,
397
+ name: artifactInfo.artifactName
398
+ });
399
+ }
400
+ }
401
+ console.log(`📦 Preloaded ${this.artifactsByDetailId.size} artifacts for conversation ${conversationId}`);
402
+ }
403
+ }
404
+ // Update artifact count for header display
405
+ this.artifactCount = conversationDetailArtifacts.Results?.length || 0;
406
+ // Debug: Log all artifacts to console
407
+ console.log(`📊 Artifact Count: ${this.artifactCount}`);
408
+ console.log(`📦 Artifacts by Detail ID:`, Array.from(this.artifactsByDetailId.entries()).map(([detailId, info]) => ({
409
+ conversationDetailId: detailId,
410
+ artifactId: info.artifactId,
411
+ versionId: info.versionId
412
+ })));
413
+ // NOW set messages to trigger rendering (after artifacts are loaded)
414
+ this.messages = loadedMessages;
415
+ }
416
+ }
417
+ catch (error) {
418
+ console.error('Failed to load messages:', error);
419
+ }
420
+ }
421
+ /**
422
+ * Restore active tasks from the database for this conversation
423
+ * Queries for messages with Status='In-Progress' and recreates the active task tracking
424
+ */
425
+ async restoreActiveTasks(conversationId) {
426
+ try {
427
+ // Clear existing tasks for this conversation first
428
+ // (We'll filter by conversation in the UI later)
429
+ const rv = new RunView();
430
+ const result = await rv.RunView({
431
+ EntityName: 'Conversation Details',
432
+ ExtraFilter: `ConversationID='${conversationId}' AND Status='In-Progress'`,
433
+ OrderBy: '__mj_CreatedAt ASC',
434
+ ResultType: 'entity_object'
435
+ }, this.currentUser);
436
+ if (result.Success && result.Results) {
437
+ for (const message of result.Results) {
438
+ // Restore the task to the active tasks service
439
+ this.activeTasks.add({
440
+ agentName: 'Agent', // We'll need to enhance this with actual agent name from AgentRunID
441
+ status: 'Processing...',
442
+ relatedMessageId: message.ID,
443
+ conversationDetailId: message.ID
444
+ });
445
+ }
446
+ console.log(`✅ Restored ${result.Results.length} active tasks for conversation ${conversationId}`);
447
+ }
448
+ }
449
+ catch (error) {
450
+ console.error('Failed to restore active tasks:', error);
451
+ }
452
+ }
453
+ onMessageSent(message) {
454
+ // Add the new message to the list
455
+ this.messages = [...this.messages, message];
456
+ // Scroll to bottom when new message is sent
457
+ this.scrollToBottom = true;
458
+ }
459
+ /**
460
+ * Handle agent run detected event from progress updates
461
+ * This is called when the first progress update arrives with an agent run ID
462
+ */
463
+ async onAgentRunDetected(event) {
464
+ console.log('🎯 Agent run detected from progress update:', event);
465
+ await this.addAgentRunToMap(event.conversationDetailId, event.agentRunId);
466
+ }
467
+ async onAgentResponse(event) {
468
+ // Add the agent's response message to the conversation
469
+ this.messages = [...this.messages, event.message];
470
+ // Scroll to bottom when agent responds
471
+ this.scrollToBottom = true;
472
+ console.log('Agent responded:', event.agentResult);
473
+ // Add agent run to the map if present (fallback if not already loaded from progress)
474
+ // agentResult is ExecuteAgentResult which contains agentRun property
475
+ if (event.agentResult?.agentRun?.ID) {
476
+ // Only load if not already in map (progress update may have already loaded it)
477
+ if (!this.agentRunsByDetailId.has(event.message.ID)) {
478
+ console.log('🔄 Loading agent run after execution:', {
479
+ agentRunId: event.agentResult.agentRun.ID,
480
+ conversationDetailId: event.message.ID,
481
+ agentName: event.agentResult.agentRun.Agent
482
+ });
483
+ await this.addAgentRunToMap(event.message.ID, event.agentResult.agentRun.ID);
484
+ }
485
+ else {
486
+ console.log('✅ Agent run already in map from progress update');
487
+ }
488
+ }
489
+ else {
490
+ console.warn('⚠️ No agent run ID in agent response:', event.agentResult);
491
+ }
492
+ // Reload artifact mapping for this message to pick up newly created artifacts
493
+ await this.reloadArtifactsForMessage(event.message.ID);
494
+ // Auto-open artifact panel if this message has an artifact and no artifact is currently shown
495
+ if (this.artifactsByDetailId.has(event.message.ID) && !this.showArtifactPanel) {
496
+ const artifactInfo = this.artifactsByDetailId.get(event.message.ID);
497
+ if (artifactInfo) {
498
+ this.selectedArtifactId = artifactInfo.artifactId;
499
+ this.showArtifactPanel = true;
500
+ }
501
+ }
502
+ // Force change detection to update the UI
503
+ this.cdr.detectChanges();
504
+ }
505
+ /**
506
+ * Add or update an agent run in the map
507
+ * Called when a new agent run completes to keep the map in sync
508
+ */
509
+ async addAgentRunToMap(conversationDetailId, agentRunId) {
510
+ try {
511
+ console.log(`🔄 Adding agent run to map:`, { conversationDetailId, agentRunId });
512
+ const md = new Metadata();
513
+ const agentRun = await md.GetEntityObject('MJ: AI Agent Runs', this.currentUser);
514
+ if (await agentRun.Load(agentRunId)) {
515
+ this.agentRunsByDetailId.set(conversationDetailId, agentRun);
516
+ console.log(`✅ Added agent run to map:`, {
517
+ agentRunId,
518
+ conversationDetailId,
519
+ agentName: agentRun.Agent,
520
+ status: agentRun.Status,
521
+ mapSize: this.agentRunsByDetailId.size
522
+ });
523
+ }
524
+ else {
525
+ console.warn(`⚠️ Failed to load agent run ${agentRunId}`);
526
+ }
527
+ }
528
+ catch (error) {
529
+ console.error('❌ Failed to load agent run for map:', error);
530
+ }
531
+ }
532
+ /**
533
+ * Reload artifacts for a specific message ID
534
+ * Called after an artifact is created to update the UI immediately
535
+ */
536
+ async reloadArtifactsForMessage(conversationDetailId) {
537
+ try {
538
+ const rv = new RunView();
539
+ const artifactsResult = await rv.RunView({
540
+ EntityName: 'MJ: Conversation Detail Artifacts',
541
+ ExtraFilter: `ConversationDetailID='${conversationDetailId}' AND Direction='Output'`,
542
+ ResultType: 'entity_object'
543
+ }, this.currentUser);
544
+ if (artifactsResult.Success && artifactsResult.Results && artifactsResult.Results.length > 0) {
545
+ // Load artifact versions to get ArtifactID
546
+ const versionIds = artifactsResult.Results.map(a => `'${a.ArtifactVersionID}'`).join(',');
547
+ const versionsResult = await rv.RunView({
548
+ EntityName: 'MJ: Artifact Versions',
549
+ ExtraFilter: `ID IN (${versionIds})`,
550
+ ResultType: 'entity_object'
551
+ }, this.currentUser);
552
+ if (versionsResult.Success && versionsResult.Results) {
553
+ const versionToArtifact = new Map();
554
+ for (const version of versionsResult.Results) {
555
+ versionToArtifact.set(version.ID, version.ArtifactID);
556
+ }
557
+ // Update artifact map
558
+ for (const artifact of artifactsResult.Results) {
559
+ const artifactId = versionToArtifact.get(artifact.ArtifactVersionID);
560
+ if (artifactId) {
561
+ this.artifactsByDetailId.set(conversationDetailId, {
562
+ artifactId: artifactId,
563
+ versionId: artifact.ArtifactVersionID,
564
+ name: 'Artifact' // Note: This method is deprecated, name should come from event
565
+ });
566
+ console.log(`✅ Loaded artifact ${artifactId} for message ${conversationDetailId}`);
567
+ }
568
+ }
569
+ // Update artifact count
570
+ this.artifactCount = this.artifactsByDetailId.size;
571
+ }
572
+ }
573
+ }
574
+ catch (error) {
575
+ console.error('Failed to reload artifacts for message:', error);
576
+ }
577
+ }
578
+ openProjectSelector() {
579
+ this.showProjectSelector = true;
580
+ }
581
+ toggleMembersModal() {
582
+ this.showMembersModal = !this.showMembersModal;
583
+ }
584
+ viewArtifacts() {
585
+ this.showArtifactsModal = true;
586
+ }
587
+ getArtifactsArray() {
588
+ return Array.from(this.artifactsByDetailId.values());
589
+ }
590
+ openArtifactFromModal(artifactId) {
591
+ this.selectedArtifactId = artifactId;
592
+ this.showArtifactPanel = true;
593
+ this.showArtifactsModal = false;
594
+ }
595
+ exportConversation() {
596
+ if (this.conversationState.activeConversation) {
597
+ this.showExportModal = true;
598
+ }
599
+ }
600
+ onExportModalCancelled() {
601
+ this.showExportModal = false;
602
+ }
603
+ onExportModalComplete() {
604
+ this.showExportModal = false;
605
+ }
606
+ async onProjectSelected(project) {
607
+ const activeConv = this.conversationState.activeConversation;
608
+ if (activeConv && project) {
609
+ try {
610
+ await this.conversationState.saveConversation(activeConv.ID, { ProjectID: project.ID }, this.currentUser);
611
+ this.showProjectSelector = false;
612
+ }
613
+ catch (error) {
614
+ console.error('Failed to assign project:', error);
615
+ }
616
+ }
617
+ else if (activeConv && !project) {
618
+ // Remove project assignment
619
+ try {
620
+ await this.conversationState.saveConversation(activeConv.ID, { ProjectID: null }, this.currentUser);
621
+ this.showProjectSelector = false;
622
+ }
623
+ catch (error) {
624
+ console.error('Failed to remove project:', error);
625
+ }
626
+ }
627
+ }
628
+ shareConversation() {
629
+ // TODO: Implement share functionality
630
+ console.log('Share conversation');
631
+ }
632
+ onReplyInThread(message) {
633
+ // Open thread panel for this message
634
+ this.conversationState.openThread(message.ID);
635
+ }
636
+ onViewThread(message) {
637
+ // Open thread panel for this message
638
+ this.conversationState.openThread(message.ID);
639
+ }
640
+ onThreadClosed() {
641
+ // Close the thread panel
642
+ this.conversationState.closeThread();
643
+ }
644
+ onThreadReplyAdded(reply) {
645
+ // Optionally refresh the message list to update thread counts
646
+ // For now, we'll just log it
647
+ console.log('Thread reply added:', reply);
648
+ // Reload messages to get updated thread counts
649
+ const activeConv = this.conversationState.activeConversation;
650
+ if (activeConv) {
651
+ this.loadMessages(activeConv.ID);
652
+ }
653
+ }
654
+ onToggleAgentPanel() {
655
+ this.showAgentPanel = !this.showAgentPanel;
656
+ // The agent panel component handles its own visibility
657
+ // This could be used to toggle a modal or different view
658
+ }
659
+ onAgentSelected(agentRun) {
660
+ // When an agent is clicked in the indicator, could show details
661
+ console.log('Agent selected:', agentRun.ID);
662
+ // Could open a modal or navigate to agent details
663
+ }
664
+ onMessageEdited(message) {
665
+ // Message was edited and saved, trigger change detection
666
+ console.log('Message edited:', message.ID);
667
+ // The message entity is already updated in place, so no need to reload
668
+ // Just ensure the UI reflects the changes
669
+ }
670
+ onRetryMessage(message) {
671
+ // TODO: Implement retry logic
672
+ // This should find the parent user message and re-trigger the agent invocation
673
+ console.log('Retry requested for message:', message.ID);
674
+ // For now, just log it - full implementation would require refactoring agent invocation
675
+ }
676
+ onArtifactClicked(data) {
677
+ this.selectedArtifactId = data.artifactId;
678
+ this.showArtifactPanel = true;
679
+ }
680
+ onArtifactCreated(data) {
681
+ this.artifactsByDetailId.set(data.conversationDetailId, {
682
+ artifactId: data.artifactId,
683
+ versionId: data.versionId,
684
+ name: data.name
685
+ });
686
+ // if we don't already have another artifact showing, let's show the newly created one
687
+ if (!this.showArtifactPanel) {
688
+ this.selectedArtifactId = data.artifactId;
689
+ this.showArtifactPanel = true;
690
+ }
691
+ this.artifactCount++; // increment artifact count
692
+ }
693
+ onCloseArtifactPanel() {
694
+ this.showArtifactPanel = false;
695
+ this.selectedArtifactId = null;
696
+ }
697
+ /**
698
+ * Helper method to check if a conversation detail has an artifact
699
+ * Used by message components to determine whether to show artifact card
700
+ */
701
+ conversationDetailHasArtifact(conversationDetailId) {
702
+ return this.artifactsByDetailId.has(conversationDetailId);
703
+ }
704
+ /**
705
+ * Get artifact info for a conversation detail
706
+ */
707
+ getArtifactInfo(conversationDetailId) {
708
+ return this.artifactsByDetailId.get(conversationDetailId);
709
+ }
710
+ /**
711
+ * Resize handle methods for artifact pane
712
+ */
713
+ onResizeStart(event) {
714
+ this.isResizing = true;
715
+ this.startX = event.clientX;
716
+ this.startWidth = this.artifactPaneWidth;
717
+ event.preventDefault();
718
+ document.body.style.cursor = 'col-resize';
719
+ document.body.style.userSelect = 'none';
720
+ }
721
+ onResizeMove(event) {
722
+ if (!this.isResizing)
723
+ return;
724
+ const containerWidth = event.currentTarget.innerWidth;
725
+ const deltaX = this.startX - event.clientX; // Reversed: drag left = wider artifact pane
726
+ const deltaPercent = (deltaX / containerWidth) * 100;
727
+ let newWidth = this.startWidth + deltaPercent;
728
+ // Constrain between 20% and 70%
729
+ newWidth = Math.max(20, Math.min(70, newWidth));
730
+ this.artifactPaneWidth = newWidth;
731
+ }
732
+ onResizeEnd(event) {
733
+ if (this.isResizing) {
734
+ this.isResizing = false;
735
+ document.body.style.cursor = '';
736
+ document.body.style.userSelect = '';
737
+ // Save to localStorage
738
+ this.saveArtifactPaneWidth();
739
+ }
740
+ }
741
+ /**
742
+ * LocalStorage persistence methods for artifact pane
743
+ */
744
+ loadArtifactPaneWidth() {
745
+ try {
746
+ const saved = localStorage.getItem(this.ARTIFACT_PANE_WIDTH_KEY);
747
+ if (saved) {
748
+ const width = parseFloat(saved);
749
+ if (!isNaN(width) && width >= 20 && width <= 70) {
750
+ this.artifactPaneWidth = width;
751
+ }
752
+ }
753
+ }
754
+ catch (error) {
755
+ console.warn('Failed to load artifact pane width from localStorage:', error);
756
+ }
757
+ }
758
+ saveArtifactPaneWidth() {
759
+ try {
760
+ localStorage.setItem(this.ARTIFACT_PANE_WIDTH_KEY, this.artifactPaneWidth.toString());
761
+ }
762
+ catch (error) {
763
+ console.warn('Failed to save artifact pane width to localStorage:', error);
764
+ }
765
+ }
766
+ onConversationRenamed(event) {
767
+ console.log('🎉 Conversation renamed:', event);
768
+ // Pass the event up to workspace component for animation
769
+ this.conversationRenamed.emit(event);
770
+ }
771
+ onOpenEntityRecord(event) {
772
+ // Pass the event up to the parent component (workspace or explorer wrapper)
773
+ this.openEntityRecord.emit(event);
774
+ }
775
+ // Scroll functionality (pattern from skip-chat)
776
+ checkScroll() {
777
+ if (!this.scrollContainer)
778
+ return;
779
+ const element = this.scrollContainer.nativeElement;
780
+ const buffer = 15; // Tolerance in pixels
781
+ const scrollDifference = element.scrollHeight - (element.scrollTop + element.clientHeight);
782
+ const hasScrollableContent = element.scrollHeight > element.clientHeight + 50;
783
+ const atBottom = scrollDifference <= buffer;
784
+ this.showScrollToBottomIcon = !atBottom && hasScrollableContent;
785
+ }
786
+ scrollToBottomNow(retryCount = 0) {
787
+ try {
788
+ if (!this.scrollContainer) {
789
+ if (retryCount < 10) {
790
+ setTimeout(() => this.scrollToBottomNow(retryCount + 1), 50);
791
+ }
792
+ return;
793
+ }
794
+ const element = this.scrollContainer.nativeElement;
795
+ if (element.scrollHeight === 0 && retryCount < 10) {
796
+ setTimeout(() => this.scrollToBottomNow(retryCount + 1), 50);
797
+ }
798
+ else if (element.scrollHeight > 0) {
799
+ element.scrollTop = element.scrollHeight;
800
+ }
801
+ }
802
+ catch (err) {
803
+ console.error('Error scrolling to bottom:', err);
804
+ }
805
+ }
806
+ scrollToBottomAnimate() {
807
+ if (this.scrollContainer) {
808
+ const element = this.scrollContainer.nativeElement;
809
+ element.scroll({ top: element.scrollHeight, behavior: 'smooth' });
810
+ }
811
+ }
812
+ getScrollToBottomIconPosition() {
813
+ if (!this.scrollContainer) {
814
+ return window.innerWidth / 2;
815
+ }
816
+ const rect = this.scrollContainer.nativeElement.getBoundingClientRect();
817
+ return rect.left + (rect.width / 2);
818
+ }
819
+ static ɵfac = function ConversationChatAreaComponent_Factory(t) { return new (t || ConversationChatAreaComponent)(i0.ɵɵdirectiveInject(i1.ConversationStateService), i0.ɵɵdirectiveInject(i2.AgentStateService), i0.ɵɵdirectiveInject(i3.ConversationAgentService), i0.ɵɵdirectiveInject(i4.ActiveTasksService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
820
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationChatAreaComponent, selectors: [["mj-conversation-chat-area"]], viewQuery: function ConversationChatAreaComponent_Query(rf, ctx) { if (rf & 1) {
821
+ i0.ɵɵviewQuery(_c0, 5);
822
+ } if (rf & 2) {
823
+ let _t;
824
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.scrollContainer = _t.first);
825
+ } }, inputs: { environmentId: "environmentId", currentUser: "currentUser" }, outputs: { conversationRenamed: "conversationRenamed", openEntityRecord: "openEntityRecord" }, decls: 18, vars: 21, consts: [["scrollContainer", ""], [1, "chat-area"], ["class", "chat-header", 4, "ngIf"], [1, "chat-content-area"], [1, "chat-messages-pane"], [1, "chat-messages-wrapper"], [1, "chat-messages-container", 3, "scroll"], [3, "replyInThread", "viewThread", "retryMessage", "artifactClicked", "messageEdited", "openEntityRecord", "messages", "conversation", "currentUser", "isProcessing", "artifactMap", "agentRunMap"], ["class", "scroll-to-bottom-icon", 3, "left", "click", 4, "ngIf"], [1, "chat-input-container"], [3, "conversationId", "currentUser", "conversationHistory", "disabled", "messageSent", "agentResponse", "agentRunDetected", "artifactCreated", "conversationRenamed", 4, "ngIf"], [3, "parentMessageId", "conversationId", "currentUser"], [3, "cancelled", "exported", "isVisible", "conversation", "currentUser"], [3, "cancelled", "membersChanged", "isVisible", "conversation", "currentUser"], [1, "modal-overlay"], [1, "chat-header"], [1, "chat-info"], [1, "chat-title"], ["class", "project-tag", "title", "Assign to project", 3, "click", 4, "ngIf"], ["title", "View members", 1, "chat-members", 3, "click"], [1, "fas", "fa-users"], ["class", "artifact-indicator", "title", "View artifacts", 3, "click", 4, "ngIf"], [3, "currentUser"], [3, "togglePanel", "agentSelected", "conversationId", "currentUser"], [1, "chat-actions"], ["title", "Export conversation", 1, "action-btn", 3, "click"], [1, "fas", "fa-download"], [1, "action-btn", "share-btn", 3, "click", "title"], [1, "fas", "fa-share-nodes"], ["title", "Assign to project", 1, "project-tag", 3, "click"], [1, "fas", "fa-folder"], ["title", "View artifacts", 1, "artifact-indicator", 3, "click"], [1, "fas", "fa-cube"], [1, "scroll-to-bottom-icon", 3, "click"], [1, "fas", "fa-arrow-down"], [3, "messageSent", "agentResponse", "agentRunDetected", "artifactCreated", "conversationRenamed", "conversationId", "currentUser", "conversationHistory", "disabled"], [1, "resize-handle", 3, "mousedown"], [1, "chat-artifact-pane"], [3, "closed", "artifactId", "currentUser"], [3, "closed", "replyAdded", "parentMessageId", "conversationId", "currentUser"], [1, "modal-overlay", 3, "click"], [1, "modal-content", "project-selector-modal", 3, "click"], [1, "modal-header"], [1, "modal-close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "modal-body"], [3, "projectSelected", "environmentId", "currentUser", "selectedProjectId"], [1, "modal-content", "artifacts-modal", 3, "click"], [1, "modal-body", "artifacts-grid"], [1, "empty-state"], [1, "artifact-modal-card"], [1, "fas", "fa-cube", 2, "font-size", "48px", "color", "#D1D5DB", "margin-bottom", "16px"], [2, "color", "#6B7280", "font-size", "14px"], [1, "artifact-modal-card", 3, "click"], [1, "artifact-modal-icon"], [1, "fas", "fa-file-code"], [1, "artifact-modal-info"], [1, "artifact-modal-title"], [1, "artifact-modal-meta"], [1, "artifact-modal-action"], [1, "fas", "fa-external-link-alt"]], template: function ConversationChatAreaComponent_Template(rf, ctx) { if (rf & 1) {
826
+ const _r1 = i0.ɵɵgetCurrentView();
827
+ i0.ɵɵelementStart(0, "div", 1);
828
+ i0.ɵɵtemplate(1, ConversationChatAreaComponent_div_1_Template, 19, 11, "div", 2);
829
+ i0.ɵɵelementStart(2, "div", 3)(3, "div", 4)(4, "div", 5)(5, "div", 6, 0);
830
+ i0.ɵɵlistener("scroll", function ConversationChatAreaComponent_Template_div_scroll_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.checkScroll()); });
831
+ i0.ɵɵelementStart(7, "mj-conversation-message-list", 7);
832
+ i0.ɵɵlistener("replyInThread", function ConversationChatAreaComponent_Template_mj_conversation_message_list_replyInThread_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onReplyInThread($event)); })("viewThread", function ConversationChatAreaComponent_Template_mj_conversation_message_list_viewThread_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onViewThread($event)); })("retryMessage", function ConversationChatAreaComponent_Template_mj_conversation_message_list_retryMessage_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onRetryMessage($event)); })("artifactClicked", function ConversationChatAreaComponent_Template_mj_conversation_message_list_artifactClicked_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onArtifactClicked($event)); })("messageEdited", function ConversationChatAreaComponent_Template_mj_conversation_message_list_messageEdited_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onMessageEdited($event)); })("openEntityRecord", function ConversationChatAreaComponent_Template_mj_conversation_message_list_openEntityRecord_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onOpenEntityRecord($event)); });
833
+ i0.ɵɵelementEnd()();
834
+ i0.ɵɵtemplate(8, ConversationChatAreaComponent_span_8_Template, 2, 2, "span", 8);
835
+ i0.ɵɵelementStart(9, "div", 9);
836
+ i0.ɵɵtemplate(10, ConversationChatAreaComponent_mj_message_input_10_Template, 1, 4, "mj-message-input", 10);
837
+ i0.ɵɵelementEnd()()();
838
+ i0.ɵɵtemplate(11, ConversationChatAreaComponent_Conditional_11_Template, 3, 4);
839
+ i0.ɵɵelementEnd()();
840
+ i0.ɵɵtemplate(12, ConversationChatAreaComponent_Conditional_12_Template, 1, 3, "mj-thread-panel", 11);
841
+ i0.ɵɵelementStart(13, "mj-export-modal", 12);
842
+ i0.ɵɵlistener("cancelled", function ConversationChatAreaComponent_Template_mj_export_modal_cancelled_13_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onExportModalCancelled()); })("exported", function ConversationChatAreaComponent_Template_mj_export_modal_exported_13_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onExportModalComplete()); });
843
+ i0.ɵɵelementEnd();
844
+ i0.ɵɵelementStart(14, "mj-members-modal", 13);
845
+ i0.ɵɵlistener("cancelled", function ConversationChatAreaComponent_Template_mj_members_modal_cancelled_14_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showMembersModal = false); })("membersChanged", function ConversationChatAreaComponent_Template_mj_members_modal_membersChanged_14_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showMembersModal = false); });
846
+ i0.ɵɵelementEnd();
847
+ i0.ɵɵtemplate(15, ConversationChatAreaComponent_Conditional_15_Template, 9, 3, "div", 14);
848
+ i0.ɵɵelement(16, "mj-active-tasks-panel");
849
+ i0.ɵɵtemplate(17, ConversationChatAreaComponent_Conditional_17_Template, 11, 1, "div", 14);
850
+ } if (rf & 2) {
851
+ i0.ɵɵadvance();
852
+ i0.ɵɵproperty("ngIf", ctx.conversationState.activeConversation);
853
+ i0.ɵɵadvance(2);
854
+ i0.ɵɵclassProp("full-width", !ctx.showArtifactPanel);
855
+ i0.ɵɵadvance(4);
856
+ i0.ɵɵproperty("messages", ctx.messages)("conversation", ctx.conversationState.activeConversation)("currentUser", ctx.currentUser)("isProcessing", ctx.isProcessing)("artifactMap", ctx.artifactsByDetailId)("agentRunMap", ctx.agentRunsByDetailId);
857
+ i0.ɵɵadvance();
858
+ i0.ɵɵproperty("ngIf", ctx.showScrollToBottomIcon && ctx.messages && ctx.messages.length > 0);
859
+ i0.ɵɵadvance(2);
860
+ i0.ɵɵproperty("ngIf", ctx.conversationState.activeConversation);
861
+ i0.ɵɵadvance();
862
+ i0.ɵɵconditional(ctx.showArtifactPanel && ctx.selectedArtifactId ? 11 : -1);
863
+ i0.ɵɵadvance();
864
+ i0.ɵɵconditional(ctx.conversationState.activeThreadId ? 12 : -1);
865
+ i0.ɵɵadvance();
866
+ i0.ɵɵproperty("isVisible", ctx.showExportModal)("conversation", ctx.conversationState.activeConversation || undefined)("currentUser", ctx.currentUser);
867
+ i0.ɵɵadvance();
868
+ i0.ɵɵproperty("isVisible", ctx.showMembersModal)("conversation", ctx.conversationState.activeConversation || undefined)("currentUser", ctx.currentUser);
869
+ i0.ɵɵadvance();
870
+ i0.ɵɵconditional(ctx.showProjectSelector && ctx.conversationState.activeConversation ? 15 : -1);
871
+ i0.ɵɵadvance(2);
872
+ i0.ɵɵconditional(ctx.showArtifactsModal ? 17 : -1);
873
+ } }, dependencies: [i5.NgIf, i6.MessageListComponent, i7.MessageInputComponent, i8.ThreadPanelComponent, i9.ArtifactViewerPanelComponent, i10.ProjectSelectorComponent, i11.TasksDropdownComponent, i12.ActiveAgentIndicatorComponent, i13.ActiveTasksPanelComponent, i14.MembersModalComponent, i15.ExportModalComponent], styles: ["[_nghost-%COMP%] {\n display: flex;\n width: 100%;\n height: 100%;\n}\n.chat-area[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.chat-header[_ngcontent-%COMP%] {\n flex-shrink: 0;\n padding: 12px 20px;\n border-bottom: 1px solid #D9D9D9;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n background: #FFF;\n z-index: 10;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n}\n.chat-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n min-width: 0;\n}\n.chat-title[_ngcontent-%COMP%] {\n font-size: 16px;\n font-weight: 600;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.project-tag[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: #F4F4F4;\n border: 1px solid #D9D9D9;\n border-radius: 16px;\n font-size: 11px;\n font-weight: 600;\n color: #AAA;\n cursor: pointer;\n transition: all 0.2s;\n height: 28px;\n margin-left: 12px;\n}\n.project-tag[_ngcontent-%COMP%]:hover {\n background: #D9D9D9;\n border-color: #AAA;\n}\n.project-tag[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n.chat-members[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n background: #F4F4F4;\n border: none;\n border-radius: 20px;\n font-size: 12px;\n font-weight: 500;\n color: #AAA;\n cursor: pointer;\n transition: all 0.2s;\n height: 32px;\n}\n.chat-members[_ngcontent-%COMP%]:hover {\n background: #D9D9D9;\n color: #333;\n}\n.chat-members[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\n}\n.chat-members[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 500;\n}\n.artifact-indicator[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: #3B82F6;\n border: none;\n border-radius: 6px;\n font-size: 13px;\n color: white;\n cursor: pointer;\n transition: all 150ms ease;\n}\n.artifact-indicator[_ngcontent-%COMP%]:hover {\n background: #2563EB;\n}\n.ambient-agent-indicator[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: #F3F4F6;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n font-size: 13px;\n color: #6B7280;\n animation: _ngcontent-%COMP%_pulse 2s ease-in-out infinite;\n}\n.ambient-agent-indicator[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #0076B6;\n}\n@keyframes _ngcontent-%COMP%_pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.7; }\n}\n.chat-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n}\n.action-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n background: transparent;\n border: 1px solid #E5E7EB;\n cursor: pointer;\n border-radius: 6px;\n font-size: 13px;\n color: #6B7280;\n transition: all 150ms ease;\n}\n.action-btn[_ngcontent-%COMP%]:hover {\n background: #F9FAFB;\n color: #111827;\n}\n.share-btn.shared[_ngcontent-%COMP%] {\n background: #EFF6FF;\n border-color: #1e40af;\n color: #1e40af;\n}\n.share-btn.shared[_ngcontent-%COMP%]:hover {\n background: #DBEAFE;\n color: #1e3a8a;\n}\n.chat-content-area[_ngcontent-%COMP%] {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n display: flex;\n flex-direction: row;\n position: relative;\n}\n.chat-messages-pane[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n min-width: 300px;\n overflow: hidden;\n transition: width 0.3s ease;\n}\n.chat-messages-pane.full-width[_ngcontent-%COMP%] {\n width: 100%;\n}\n.chat-messages-pane[_ngcontent-%COMP%]:not(.full-width) {\n flex: 1;\n}\n.resize-handle[_ngcontent-%COMP%] {\n width: 4px;\n background: transparent;\n cursor: col-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n.resize-handle[_ngcontent-%COMP%]:hover {\n background: #3B82F6;\n}\n.resize-handle[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n}\n.chat-artifact-pane[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: #FAFAFA;\n overflow: hidden;\n flex-shrink: 0;\n}\n.chat-artifact-pane[_ngcontent-%COMP%] > mj-artifact-viewer-panel[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n.chat-messages-wrapper[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n position: relative;\n}\n.chat-messages-container[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: #FFF;\n min-height: 0;\n}\n.scroll-to-bottom-icon[_ngcontent-%COMP%] {\n position: absolute;\n bottom: 80px;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: all 0.2s ease;\n z-index: 100;\n}\n.scroll-to-bottom-icon[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n border-color: #3B82F6;\n transform: translateX(-50%) translateY(-2px);\n box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);\n}\n.scroll-to-bottom-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6B7280;\n font-size: 16px;\n transition: color 0.2s;\n}\n.scroll-to-bottom-icon[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%] {\n color: #3B82F6;\n}\n.chat-input-container[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background: #FFF;\n border-top: 1px solid #E5E7EB;\n}\n.modal-overlay[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n.modal-content[_ngcontent-%COMP%] {\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n max-width: 90vw;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n}\n.project-selector-modal[_ngcontent-%COMP%] {\n width: 600px;\n height: 500px;\n}\n.modal-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #E5E7EB;\n}\n.modal-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n}\n.modal-close-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n cursor: pointer;\n color: #6B7280;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n}\n.modal-close-btn[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n color: #111827;\n}\n.modal-body[_ngcontent-%COMP%] {\n flex: 1;\n overflow: auto;\n padding: 20px;\n}\n.artifacts-modal[_ngcontent-%COMP%] {\n width: 700px;\n max-height: 600px;\n}\n.artifacts-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 16px;\n}\n.empty-state[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 20px;\n}\n.artifact-modal-card[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background: white;\n border: 1.5px solid #E5E7EB;\n border-radius: 12px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.artifact-modal-card[_ngcontent-%COMP%]:hover {\n border-color: #3B82F6;\n box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);\n transform: translateY(-2px);\n}\n.artifact-modal-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);\n border-radius: 10px;\n color: #3B82F6;\n flex-shrink: 0;\n}\n.artifact-modal-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 18px;\n}\n.artifact-modal-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n.artifact-modal-title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #1F2937;\n margin-bottom: 4px;\n}\n.artifact-modal-meta[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6B7280;\n}\n.artifact-modal-action[_ngcontent-%COMP%] {\n color: #9CA3AF;\n transition: color 0.2s;\n}\n.artifact-modal-card[_ngcontent-%COMP%]:hover .artifact-modal-action[_ngcontent-%COMP%] {\n color: #3B82F6;\n}"] });
874
+ }
875
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationChatAreaComponent, [{
876
+ type: Component,
877
+ args: [{ selector: 'mj-conversation-chat-area', template: "<div class=\"chat-area\">\n <!-- Fixed Header -->\n <div class=\"chat-header\" *ngIf=\"conversationState.activeConversation as conversation\">\n <div class=\"chat-info\">\n <div class=\"chat-title\">{{ conversation.Name }}</div>\n <button class=\"project-tag\" (click)=\"openProjectSelector()\" title=\"Assign to project\" *ngIf=\"conversation.ProjectID\">\n <i class=\"fas fa-folder\"></i>\n <span>{{ conversation.Project || 'Project' }}</span>\n </button>\n <button class=\"chat-members\" (click)=\"toggleMembersModal()\" title=\"View members\">\n <i class=\"fas fa-users\"></i>\n <span>{{ memberCount }} member{{ memberCount !== 1 ? 's' : '' }}</span>\n </button>\n <button class=\"artifact-indicator\" (click)=\"viewArtifacts()\" title=\"View artifacts\" *ngIf=\"artifactCount > 0\">\n <i class=\"fas fa-cube\"></i>\n <span>{{ artifactCount }} artifact{{ artifactCount !== 1 ? 's' : '' }}</span>\n </button>\n <mj-tasks-dropdown [currentUser]=\"currentUser\"></mj-tasks-dropdown>\n <mj-active-agent-indicator\n [conversationId]=\"conversationState.activeConversation.ID\"\n [currentUser]=\"currentUser\"\n (togglePanel)=\"onToggleAgentPanel()\"\n (agentSelected)=\"onAgentSelected($event)\">\n </mj-active-agent-indicator>\n </div>\n <div class=\"chat-actions\">\n <button class=\"action-btn\" (click)=\"exportConversation()\" title=\"Export conversation\">\n <i class=\"fas fa-download\"></i>\n Export\n </button>\n <button class=\"action-btn share-btn\"\n [class.shared]=\"isShared\"\n (click)=\"shareConversation()\"\n [title]=\"isShared ? 'Manage sharing' : 'Share conversation'\">\n <i class=\"fas fa-share-nodes\"></i>\n Share\n </button>\n </div>\n </div>\n\n <!-- Messages and Artifact Split Layout -->\n <div class=\"chat-content-area\">\n <!-- Messages Pane -->\n <div class=\"chat-messages-pane\" [class.full-width]=\"!showArtifactPanel\">\n <div class=\"chat-messages-wrapper\">\n <div class=\"chat-messages-container\" #scrollContainer (scroll)=\"checkScroll()\">\n <mj-conversation-message-list\n [messages]=\"messages\"\n [conversation]=\"conversationState.activeConversation\"\n [currentUser]=\"currentUser\"\n [isProcessing]=\"isProcessing\"\n [artifactMap]=\"artifactsByDetailId\"\n [agentRunMap]=\"agentRunsByDetailId\"\n (replyInThread)=\"onReplyInThread($event)\"\n (viewThread)=\"onViewThread($event)\"\n (retryMessage)=\"onRetryMessage($event)\"\n (artifactClicked)=\"onArtifactClicked($event)\"\n (messageEdited)=\"onMessageEdited($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\">\n </mj-conversation-message-list>\n </div>\n\n <!-- Scroll to Bottom Icon -->\n <span class=\"scroll-to-bottom-icon\"\n *ngIf=\"showScrollToBottomIcon && messages && messages.length > 0\"\n [style.left.px]=\"getScrollToBottomIconPosition()\"\n (click)=\"scrollToBottomAnimate()\">\n <i class=\"fas fa-arrow-down\"></i>\n </span>\n\n <!-- Fixed Input Area -->\n <div class=\"chat-input-container\">\n <mj-message-input\n *ngIf=\"conversationState.activeConversation\"\n [conversationId]=\"conversationState.activeConversation.ID\"\n [currentUser]=\"currentUser\"\n [conversationHistory]=\"messages\"\n [disabled]=\"isProcessing\"\n (messageSent)=\"onMessageSent($event)\"\n (agentResponse)=\"onAgentResponse($event)\"\n (agentRunDetected)=\"onAgentRunDetected($event)\"\n (artifactCreated)=\"onArtifactCreated($event)\"\n (conversationRenamed)=\"onConversationRenamed($event)\">\n </mj-message-input>\n </div>\n </div>\n </div>\n\n <!-- Artifact Viewer Pane -->\n @if (showArtifactPanel && selectedArtifactId) {\n <div class=\"resize-handle\" (mousedown)=\"onResizeStart($event)\"></div>\n <div class=\"chat-artifact-pane\" [style.width.%]=\"artifactPaneWidth\">\n <mj-artifact-viewer-panel\n [artifactId]=\"selectedArtifactId\"\n [currentUser]=\"currentUser\"\n (closed)=\"onCloseArtifactPanel()\">\n </mj-artifact-viewer-panel>\n </div>\n }\n </div>\n</div>\n\n<!-- Thread Panel -->\n@if (conversationState.activeThreadId) {\n <mj-thread-panel\n [parentMessageId]=\"conversationState.activeThreadId\"\n [conversationId]=\"conversationState.activeConversation?.ID || ''\"\n [currentUser]=\"currentUser\"\n (closed)=\"onThreadClosed()\"\n (replyAdded)=\"onThreadReplyAdded($event)\">\n </mj-thread-panel>\n}\n\n<!-- Export Modal -->\n<mj-export-modal\n [isVisible]=\"showExportModal\"\n [conversation]=\"conversationState.activeConversation || undefined\"\n [currentUser]=\"currentUser\"\n (cancelled)=\"onExportModalCancelled()\"\n (exported)=\"onExportModalComplete()\">\n</mj-export-modal>\n\n<!-- Members Modal -->\n<mj-members-modal\n [isVisible]=\"showMembersModal\"\n [conversation]=\"conversationState.activeConversation || undefined\"\n [currentUser]=\"currentUser\"\n (cancelled)=\"showMembersModal = false\"\n (membersChanged)=\"showMembersModal = false\">\n</mj-members-modal>\n\n<!-- Project Selector Modal -->\n@if (showProjectSelector && conversationState.activeConversation) {\n <div class=\"modal-overlay\" (click)=\"showProjectSelector = false\">\n <div class=\"modal-content project-selector-modal\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-header\">\n <h3>Assign Project</h3>\n <button class=\"modal-close-btn\" (click)=\"showProjectSelector = false\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body\">\n <mj-project-selector\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedProjectId]=\"conversationState.activeConversation.ProjectID\"\n (projectSelected)=\"onProjectSelected($event)\">\n </mj-project-selector>\n </div>\n </div>\n </div>\n}\n\n<!-- Active Tasks Panel -->\n<mj-active-tasks-panel></mj-active-tasks-panel>\n\n<!-- Artifacts Modal -->\n@if (showArtifactsModal) {\n <div class=\"modal-overlay\" (click)=\"showArtifactsModal = false\">\n <div class=\"modal-content artifacts-modal\" (click)=\"$event.stopPropagation()\">\n <div class=\"modal-header\">\n <h3>Conversation Artifacts</h3>\n <button class=\"modal-close-btn\" (click)=\"showArtifactsModal = false\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\n <div class=\"modal-body artifacts-grid\">\n @if (artifactsByDetailId.size === 0) {\n <div class=\"empty-state\">\n <i class=\"fas fa-cube\" style=\"font-size: 48px; color: #D1D5DB; margin-bottom: 16px;\"></i>\n <p style=\"color: #6B7280; font-size: 14px;\">No artifacts in this conversation yet</p>\n </div>\n }\n @for (artifact of getArtifactsArray(); track artifact.artifactId) {\n <div class=\"artifact-modal-card\" (click)=\"openArtifactFromModal(artifact.artifactId)\">\n <div class=\"artifact-modal-icon\">\n <i class=\"fas fa-file-code\"></i>\n </div>\n <div class=\"artifact-modal-info\">\n <div class=\"artifact-modal-title\">{{artifact.name}}</div>\n <div class=\"artifact-modal-meta\">Version {{artifact.versionId.substring(0, 8)}}</div>\n </div>\n <div class=\"artifact-modal-action\">\n <i class=\"fas fa-external-link-alt\"></i>\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n}", styles: [":host {\n display: flex;\n width: 100%;\n height: 100%;\n}\n.chat-area {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n.chat-header {\n flex-shrink: 0;\n padding: 12px 20px;\n border-bottom: 1px solid #D9D9D9;\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 16px;\n background: #FFF;\n z-index: 10;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);\n}\n.chat-info {\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 1;\n min-width: 0;\n}\n.chat-title {\n font-size: 16px;\n font-weight: 600;\n color: #333;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.project-tag {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n background: #F4F4F4;\n border: 1px solid #D9D9D9;\n border-radius: 16px;\n font-size: 11px;\n font-weight: 600;\n color: #AAA;\n cursor: pointer;\n transition: all 0.2s;\n height: 28px;\n margin-left: 12px;\n}\n.project-tag:hover {\n background: #D9D9D9;\n border-color: #AAA;\n}\n.project-tag i {\n font-size: 10px;\n}\n.chat-members {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n background: #F4F4F4;\n border: none;\n border-radius: 20px;\n font-size: 12px;\n font-weight: 500;\n color: #AAA;\n cursor: pointer;\n transition: all 0.2s;\n height: 32px;\n}\n.chat-members:hover {\n background: #D9D9D9;\n color: #333;\n}\n.chat-members i {\n font-size: 12px;\n}\n.chat-members span {\n font-size: 12px;\n font-weight: 500;\n}\n.artifact-indicator {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: #3B82F6;\n border: none;\n border-radius: 6px;\n font-size: 13px;\n color: white;\n cursor: pointer;\n transition: all 150ms ease;\n}\n.artifact-indicator:hover {\n background: #2563EB;\n}\n.ambient-agent-indicator {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: #F3F4F6;\n border: 1px solid #D1D5DB;\n border-radius: 6px;\n font-size: 13px;\n color: #6B7280;\n animation: pulse 2s ease-in-out infinite;\n}\n.ambient-agent-indicator i {\n color: #0076B6;\n}\n@keyframes pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.7; }\n}\n.chat-actions {\n display: flex;\n gap: 8px;\n}\n.action-btn {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 12px;\n background: transparent;\n border: 1px solid #E5E7EB;\n cursor: pointer;\n border-radius: 6px;\n font-size: 13px;\n color: #6B7280;\n transition: all 150ms ease;\n}\n.action-btn:hover {\n background: #F9FAFB;\n color: #111827;\n}\n.share-btn.shared {\n background: #EFF6FF;\n border-color: #1e40af;\n color: #1e40af;\n}\n.share-btn.shared:hover {\n background: #DBEAFE;\n color: #1e3a8a;\n}\n.chat-content-area {\n flex: 1;\n min-height: 0;\n overflow: hidden;\n display: flex;\n flex-direction: row;\n position: relative;\n}\n.chat-messages-pane {\n height: 100%;\n display: flex;\n flex-direction: column;\n min-width: 300px;\n overflow: hidden;\n transition: width 0.3s ease;\n}\n.chat-messages-pane.full-width {\n width: 100%;\n}\n.chat-messages-pane:not(.full-width) {\n flex: 1;\n}\n.resize-handle {\n width: 4px;\n background: transparent;\n cursor: col-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n.resize-handle:hover {\n background: #3B82F6;\n}\n.resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n}\n.chat-artifact-pane {\n height: 100%;\n display: flex;\n flex-direction: column;\n background: #FAFAFA;\n overflow: hidden;\n flex-shrink: 0;\n}\n.chat-artifact-pane > mj-artifact-viewer-panel {\n display: flex;\n flex: 1;\n min-height: 0;\n overflow: hidden;\n}\n.chat-messages-wrapper {\n flex: 1;\n display: flex;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n position: relative;\n}\n.chat-messages-container {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: #FFF;\n min-height: 0;\n}\n.scroll-to-bottom-icon {\n position: absolute;\n bottom: 80px;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n background: white;\n border: 1px solid #D1D5DB;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: all 0.2s ease;\n z-index: 100;\n}\n.scroll-to-bottom-icon:hover {\n background: #F3F4F6;\n border-color: #3B82F6;\n transform: translateX(-50%) translateY(-2px);\n box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);\n}\n.scroll-to-bottom-icon i {\n color: #6B7280;\n font-size: 16px;\n transition: color 0.2s;\n}\n.scroll-to-bottom-icon:hover i {\n color: #3B82F6;\n}\n.chat-input-container {\n flex-shrink: 0;\n background: #FFF;\n border-top: 1px solid #E5E7EB;\n}\n.modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1000;\n}\n.modal-content {\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n max-width: 90vw;\n max-height: 90vh;\n display: flex;\n flex-direction: column;\n}\n.project-selector-modal {\n width: 600px;\n height: 500px;\n}\n.modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 16px 20px;\n border-bottom: 1px solid #E5E7EB;\n}\n.modal-header h3 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n}\n.modal-close-btn {\n background: none;\n border: none;\n cursor: pointer;\n color: #6B7280;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n}\n.modal-close-btn:hover {\n background: #F3F4F6;\n color: #111827;\n}\n.modal-body {\n flex: 1;\n overflow: auto;\n padding: 20px;\n}\n.artifacts-modal {\n width: 700px;\n max-height: 600px;\n}\n.artifacts-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 16px;\n}\n.empty-state {\n grid-column: 1 / -1;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 20px;\n}\n.artifact-modal-card {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n background: white;\n border: 1.5px solid #E5E7EB;\n border-radius: 12px;\n cursor: pointer;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.artifact-modal-card:hover {\n border-color: #3B82F6;\n box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);\n transform: translateY(-2px);\n}\n.artifact-modal-icon {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);\n border-radius: 10px;\n color: #3B82F6;\n flex-shrink: 0;\n}\n.artifact-modal-icon i {\n font-size: 18px;\n}\n.artifact-modal-info {\n flex: 1;\n min-width: 0;\n}\n.artifact-modal-title {\n font-size: 14px;\n font-weight: 600;\n color: #1F2937;\n margin-bottom: 4px;\n}\n.artifact-modal-meta {\n font-size: 12px;\n color: #6B7280;\n}\n.artifact-modal-action {\n color: #9CA3AF;\n transition: color 0.2s;\n}\n.artifact-modal-card:hover .artifact-modal-action {\n color: #3B82F6;\n}"] }]
878
+ }], () => [{ type: i1.ConversationStateService }, { type: i2.AgentStateService }, { type: i3.ConversationAgentService }, { type: i4.ActiveTasksService }, { type: i0.ChangeDetectorRef }], { environmentId: [{
879
+ type: Input
880
+ }], currentUser: [{
881
+ type: Input
882
+ }], conversationRenamed: [{
883
+ type: Output
884
+ }], openEntityRecord: [{
885
+ type: Output
886
+ }], scrollContainer: [{
887
+ type: ViewChild,
888
+ args: ['scrollContainer']
889
+ }] }); })();
890
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationChatAreaComponent, { className: "ConversationChatAreaComponent", filePath: "src/lib/components/conversation/conversation-chat-area.component.ts", lineNumber: 14 }); })();
891
+ //# sourceMappingURL=conversation-chat-area.component.js.map