@memberjunction/ng-conversations 2.108.0 → 2.110.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.
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +2 -1
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +87 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +581 -209
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +22 -14
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts +6 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.js +61 -6
- package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +22 -14
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +133 -132
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +48 -7
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +222 -132
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +5 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +16 -10
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/message/suggested-responses.component.js +3 -3
- package/dist/lib/components/message/suggested-responses.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +3 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +11 -2
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.d.ts +11 -0
- package/dist/lib/models/conversation-complete-query.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +1 -0
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +2 -0
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +3 -3
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-state.service.js +1 -1
- package/dist/lib/services/conversation-state.service.js.map +1 -1
- package/dist/lib/services/dialog.service.d.ts +12 -2
- package/dist/lib/services/dialog.service.d.ts.map +1 -1
- package/dist/lib/services/dialog.service.js +27 -10
- package/dist/lib/services/dialog.service.js.map +1 -1
- package/dist/lib/services/search.service.js +1 -1
- package/dist/lib/services/search.service.js.map +1 -1
- package/package.json +12 -12
|
@@ -26,271 +26,317 @@ const _c0 = ["scrollContainer"];
|
|
|
26
26
|
const _forTrack0 = ($index, $item) => $item.artifactId;
|
|
27
27
|
const _forTrack1 = ($index, $item) => $item.versionId;
|
|
28
28
|
function ConversationChatAreaComponent_div_1_button_4_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
-
const
|
|
30
|
-
i0.ɵɵelementStart(0, "button",
|
|
31
|
-
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
32
|
-
i0.ɵɵelement(1, "i",
|
|
29
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
30
|
+
i0.ɵɵelementStart(0, "button", 26);
|
|
31
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.openProjectSelector()); });
|
|
32
|
+
i0.ɵɵelement(1, "i", 27);
|
|
33
33
|
i0.ɵɵelementStart(2, "span");
|
|
34
34
|
i0.ɵɵtext(3);
|
|
35
35
|
i0.ɵɵelementEnd()();
|
|
36
36
|
} if (rf & 2) {
|
|
37
|
-
const
|
|
37
|
+
const conversation_r4 = i0.ɵɵnextContext().ngIf;
|
|
38
38
|
i0.ɵɵadvance(3);
|
|
39
|
-
i0.ɵɵtextInterpolate(
|
|
39
|
+
i0.ɵɵtextInterpolate(conversation_r4.Project || "Project");
|
|
40
40
|
} }
|
|
41
41
|
function ConversationChatAreaComponent_div_1_button_9_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
-
const
|
|
43
|
-
i0.ɵɵelementStart(0, "button",
|
|
44
|
-
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(
|
|
45
|
-
i0.ɵɵelement(1, "i",
|
|
42
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
43
|
+
i0.ɵɵelementStart(0, "button", 28);
|
|
44
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_button_9_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.viewArtifacts()); });
|
|
45
|
+
i0.ɵɵelement(1, "i", 29);
|
|
46
46
|
i0.ɵɵelementStart(2, "span");
|
|
47
47
|
i0.ɵɵtext(3);
|
|
48
48
|
i0.ɵɵelementEnd()();
|
|
49
49
|
} if (rf & 2) {
|
|
50
|
-
const
|
|
50
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
51
51
|
i0.ɵɵadvance(3);
|
|
52
|
-
i0.ɵɵtextInterpolate2("",
|
|
52
|
+
i0.ɵɵtextInterpolate2("", ctx_r2.artifactCountDisplay, " artifact", ctx_r2.artifactCountDisplay !== 1 ? "s" : "", "");
|
|
53
53
|
} }
|
|
54
54
|
function ConversationChatAreaComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
-
const
|
|
56
|
-
i0.ɵɵelementStart(0, "div",
|
|
55
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
56
|
+
i0.ɵɵelementStart(0, "div", 12)(1, "div", 13)(2, "div", 14);
|
|
57
57
|
i0.ɵɵtext(3);
|
|
58
58
|
i0.ɵɵelementEnd();
|
|
59
|
-
i0.ɵɵtemplate(4, ConversationChatAreaComponent_div_1_button_4_Template, 4, 1, "button",
|
|
60
|
-
i0.ɵɵelementStart(5, "button",
|
|
61
|
-
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_5_listener() { i0.ɵɵrestoreView(
|
|
62
|
-
i0.ɵɵelement(6, "i",
|
|
59
|
+
i0.ɵɵtemplate(4, ConversationChatAreaComponent_div_1_button_4_Template, 4, 1, "button", 15);
|
|
60
|
+
i0.ɵɵelementStart(5, "button", 16);
|
|
61
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleMembersModal()); });
|
|
62
|
+
i0.ɵɵelement(6, "i", 17);
|
|
63
63
|
i0.ɵɵelementStart(7, "span");
|
|
64
64
|
i0.ɵɵtext(8);
|
|
65
65
|
i0.ɵɵelementEnd()();
|
|
66
|
-
i0.ɵɵtemplate(9, ConversationChatAreaComponent_div_1_button_9_Template, 4, 2, "button",
|
|
67
|
-
i0.ɵɵelementStart(10, "mj-active-agent-indicator",
|
|
68
|
-
i0.ɵɵlistener("togglePanel", function ConversationChatAreaComponent_div_1_Template_mj_active_agent_indicator_togglePanel_10_listener() { i0.ɵɵrestoreView(
|
|
66
|
+
i0.ɵɵtemplate(9, ConversationChatAreaComponent_div_1_button_9_Template, 4, 2, "button", 18);
|
|
67
|
+
i0.ɵɵelementStart(10, "mj-active-agent-indicator", 19);
|
|
68
|
+
i0.ɵɵlistener("togglePanel", function ConversationChatAreaComponent_div_1_Template_mj_active_agent_indicator_togglePanel_10_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onToggleAgentPanel()); })("agentSelected", function ConversationChatAreaComponent_div_1_Template_mj_active_agent_indicator_agentSelected_10_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onAgentSelected($event)); });
|
|
69
69
|
i0.ɵɵelementEnd()();
|
|
70
|
-
i0.ɵɵelementStart(11, "div",
|
|
71
|
-
i0.ɵɵlistener("taskClicked", function ConversationChatAreaComponent_div_1_Template_mj_tasks_dropdown_taskClicked_12_listener($event) { i0.ɵɵrestoreView(
|
|
70
|
+
i0.ɵɵelementStart(11, "div", 20)(12, "mj-tasks-dropdown", 21);
|
|
71
|
+
i0.ɵɵlistener("taskClicked", function ConversationChatAreaComponent_div_1_Template_mj_tasks_dropdown_taskClicked_12_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onTaskClicked($event)); });
|
|
72
72
|
i0.ɵɵelementEnd();
|
|
73
|
-
i0.ɵɵelementStart(13, "button",
|
|
74
|
-
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_13_listener() { i0.ɵɵrestoreView(
|
|
75
|
-
i0.ɵɵelement(14, "i",
|
|
73
|
+
i0.ɵɵelementStart(13, "button", 22);
|
|
74
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.exportConversation()); });
|
|
75
|
+
i0.ɵɵelement(14, "i", 23);
|
|
76
76
|
i0.ɵɵtext(15, " Export ");
|
|
77
77
|
i0.ɵɵelementEnd();
|
|
78
|
-
i0.ɵɵelementStart(16, "button",
|
|
79
|
-
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_16_listener() { i0.ɵɵrestoreView(
|
|
80
|
-
i0.ɵɵelement(17, "i",
|
|
78
|
+
i0.ɵɵelementStart(16, "button", 24);
|
|
79
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_div_1_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.shareConversation()); });
|
|
80
|
+
i0.ɵɵelement(17, "i", 25);
|
|
81
81
|
i0.ɵɵtext(18, " Share ");
|
|
82
82
|
i0.ɵɵelementEnd()()();
|
|
83
83
|
} if (rf & 2) {
|
|
84
|
-
const
|
|
85
|
-
const
|
|
84
|
+
const conversation_r4 = ctx.ngIf;
|
|
85
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
86
86
|
i0.ɵɵadvance(3);
|
|
87
|
-
i0.ɵɵtextInterpolate(
|
|
87
|
+
i0.ɵɵtextInterpolate(conversation_r4.Name);
|
|
88
88
|
i0.ɵɵadvance();
|
|
89
|
-
i0.ɵɵproperty("ngIf",
|
|
89
|
+
i0.ɵɵproperty("ngIf", conversation_r4.ProjectID);
|
|
90
90
|
i0.ɵɵadvance(4);
|
|
91
|
-
i0.ɵɵtextInterpolate2("",
|
|
91
|
+
i0.ɵɵtextInterpolate2("", ctx_r2.memberCount, " member", ctx_r2.memberCount !== 1 ? "s" : "", "");
|
|
92
92
|
i0.ɵɵadvance();
|
|
93
|
-
i0.ɵɵproperty("ngIf",
|
|
93
|
+
i0.ɵɵproperty("ngIf", ctx_r2.artifactCountDisplay > 0);
|
|
94
94
|
i0.ɵɵadvance();
|
|
95
|
-
i0.ɵɵproperty("conversationId",
|
|
95
|
+
i0.ɵɵproperty("conversationId", ctx_r2.conversationState.activeConversation.ID)("currentUser", ctx_r2.currentUser);
|
|
96
96
|
i0.ɵɵadvance(2);
|
|
97
|
-
i0.ɵɵproperty("currentUser",
|
|
97
|
+
i0.ɵɵproperty("currentUser", ctx_r2.currentUser);
|
|
98
98
|
i0.ɵɵadvance(4);
|
|
99
|
-
i0.ɵɵclassProp("shared",
|
|
100
|
-
i0.ɵɵproperty("title",
|
|
99
|
+
i0.ɵɵclassProp("shared", ctx_r2.isShared);
|
|
100
|
+
i0.ɵɵproperty("title", ctx_r2.isShared ? "Manage sharing" : "Share conversation");
|
|
101
101
|
} }
|
|
102
|
-
function
|
|
102
|
+
function ConversationChatAreaComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
103
|
+
i0.ɵɵelementStart(0, "div", 5)(1, "div", 30);
|
|
104
|
+
i0.ɵɵelement(2, "i", 31);
|
|
105
|
+
i0.ɵɵelementStart(3, "span");
|
|
106
|
+
i0.ɵɵtext(4, "Loading conversation...");
|
|
107
|
+
i0.ɵɵelementEnd()()();
|
|
108
|
+
} }
|
|
109
|
+
function ConversationChatAreaComponent_Conditional_5_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
103
110
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
104
|
-
i0.ɵɵelementStart(0, "span",
|
|
105
|
-
i0.ɵɵlistener("click", function
|
|
106
|
-
i0.ɵɵelement(1, "i",
|
|
111
|
+
i0.ɵɵelementStart(0, "span", 38);
|
|
112
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_5_span_4_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.scrollToBottomAnimate()); });
|
|
113
|
+
i0.ɵɵelement(1, "i", 39);
|
|
107
114
|
i0.ɵɵelementEnd();
|
|
108
115
|
} }
|
|
109
|
-
function
|
|
110
|
-
i0.ɵɵelementStart(0, "div",
|
|
111
|
-
i0.ɵɵelement(2, "i",
|
|
116
|
+
function ConversationChatAreaComponent_Conditional_5_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
117
|
+
i0.ɵɵelementStart(0, "div", 36)(1, "div", 40);
|
|
118
|
+
i0.ɵɵelement(2, "i", 31);
|
|
112
119
|
i0.ɵɵelementStart(3, "span");
|
|
113
120
|
i0.ɵɵtext(4, "Loading conversation data...");
|
|
114
121
|
i0.ɵɵelementEnd()()();
|
|
115
122
|
} }
|
|
116
|
-
function
|
|
123
|
+
function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template(rf, ctx) { if (rf & 1) {
|
|
117
124
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
118
|
-
i0.ɵɵelementStart(0, "mj-message-input",
|
|
119
|
-
i0.ɵɵlistener("messageSent", function
|
|
125
|
+
i0.ɵɵelementStart(0, "mj-message-input", 42);
|
|
126
|
+
i0.ɵɵlistener("messageSent", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_messageSent_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onMessageSent($event)); })("agentResponse", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_agentResponse_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onAgentResponse($event)); })("agentRunDetected", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_agentRunDetected_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onAgentRunDetected($event)); })("agentRunUpdate", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_agentRunUpdate_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onAgentRunUpdate($event)); })("messageComplete", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_messageComplete_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onMessageComplete($event)); })("artifactCreated", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_artifactCreated_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onArtifactCreated($event)); })("conversationRenamed", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_conversationRenamed_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onConversationRenamed($event)); })("intentCheckStarted", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_intentCheckStarted_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onIntentCheckStarted()); })("intentCheckCompleted", function ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template_mj_message_input_intentCheckCompleted_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onIntentCheckCompleted()); });
|
|
120
127
|
i0.ɵɵelementEnd();
|
|
121
128
|
} if (rf & 2) {
|
|
122
|
-
const
|
|
123
|
-
i0.ɵɵproperty("conversationId",
|
|
129
|
+
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
130
|
+
i0.ɵɵproperty("conversationId", ctx_r2.conversationState.activeConversation.ID)("currentUser", ctx_r2.currentUser)("conversationHistory", ctx_r2.messages)("disabled", ctx_r2.isProcessing);
|
|
124
131
|
} }
|
|
125
|
-
function
|
|
126
|
-
i0.ɵɵtemplate(0,
|
|
132
|
+
function ConversationChatAreaComponent_Conditional_5_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
133
|
+
i0.ɵɵtemplate(0, ConversationChatAreaComponent_Conditional_5_Conditional_7_mj_message_input_0_Template, 1, 4, "mj-message-input", 41);
|
|
127
134
|
} if (rf & 2) {
|
|
128
|
-
const
|
|
129
|
-
i0.ɵɵproperty("ngIf",
|
|
135
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
136
|
+
i0.ɵɵproperty("ngIf", ctx_r2.conversationState.activeConversation);
|
|
130
137
|
} }
|
|
131
|
-
function
|
|
138
|
+
function ConversationChatAreaComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
139
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
140
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "div", 32, 0);
|
|
141
|
+
i0.ɵɵlistener("scroll", function ConversationChatAreaComponent_Conditional_5_Template_div_scroll_1_listener() { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.checkScroll()); });
|
|
142
|
+
i0.ɵɵelementStart(3, "mj-conversation-message-list", 33);
|
|
143
|
+
i0.ɵɵlistener("replyInThread", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_replyInThread_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onReplyInThread($event)); })("viewThread", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_viewThread_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onViewThread($event)); })("retryMessage", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_retryMessage_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onRetryMessage($event)); })("artifactClicked", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_artifactClicked_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onArtifactClicked($event)); })("messageEdited", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_messageEdited_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onMessageEdited($event)); })("openEntityRecord", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_openEntityRecord_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onOpenEntityRecord($event)); })("suggestedResponseSelected", function ConversationChatAreaComponent_Conditional_5_Template_mj_conversation_message_list_suggestedResponseSelected_3_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSuggestedResponseSelected($event)); });
|
|
144
|
+
i0.ɵɵelementEnd();
|
|
145
|
+
i0.ɵɵtemplate(4, ConversationChatAreaComponent_Conditional_5_span_4_Template, 2, 0, "span", 34);
|
|
146
|
+
i0.ɵɵelementEnd();
|
|
147
|
+
i0.ɵɵelementStart(5, "div", 35);
|
|
148
|
+
i0.ɵɵtemplate(6, ConversationChatAreaComponent_Conditional_5_Conditional_6_Template, 5, 0, "div", 36)(7, ConversationChatAreaComponent_Conditional_5_Conditional_7_Template, 1, 1, "mj-message-input", 37);
|
|
149
|
+
i0.ɵɵelementEnd()();
|
|
150
|
+
} if (rf & 2) {
|
|
151
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
152
|
+
i0.ɵɵadvance(3);
|
|
153
|
+
i0.ɵɵproperty("messages", ctx_r2.messages)("conversation", ctx_r2.conversationState.activeConversation)("currentUser", ctx_r2.currentUser)("isProcessing", ctx_r2.isProcessing)("artifactMap", ctx_r2.effectiveArtifactsMap)("agentRunMap", ctx_r2.agentRunsByDetailId)("userAvatarMap", ctx_r2.userAvatarMap);
|
|
154
|
+
i0.ɵɵadvance();
|
|
155
|
+
i0.ɵɵproperty("ngIf", ctx_r2.showScrollToBottomIcon && ctx_r2.messages && ctx_r2.messages.length > 0);
|
|
156
|
+
i0.ɵɵadvance(2);
|
|
157
|
+
i0.ɵɵconditional(ctx_r2.isLoadingPeripheralData ? 6 : 7);
|
|
158
|
+
} }
|
|
159
|
+
function ConversationChatAreaComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
132
160
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
133
|
-
i0.ɵɵelementStart(0, "div",
|
|
134
|
-
i0.ɵɵlistener("mousedown", function
|
|
161
|
+
i0.ɵɵelementStart(0, "div", 43);
|
|
162
|
+
i0.ɵɵlistener("mousedown", function ConversationChatAreaComponent_Conditional_6_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onResizeStart($event)); });
|
|
135
163
|
i0.ɵɵelementEnd();
|
|
136
|
-
i0.ɵɵelementStart(1, "div",
|
|
137
|
-
i0.ɵɵlistener("closed", function
|
|
164
|
+
i0.ɵɵelementStart(1, "div", 44)(2, "mj-artifact-viewer-panel", 45);
|
|
165
|
+
i0.ɵɵlistener("closed", function ConversationChatAreaComponent_Conditional_6_Template_mj_artifact_viewer_panel_closed_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCloseArtifactPanel()); })("saveToCollectionRequested", function ConversationChatAreaComponent_Conditional_6_Template_mj_artifact_viewer_panel_saveToCollectionRequested_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSaveToCollectionRequested($event)); });
|
|
138
166
|
i0.ɵɵelementEnd()();
|
|
139
167
|
} if (rf & 2) {
|
|
140
|
-
const
|
|
168
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
141
169
|
i0.ɵɵadvance();
|
|
142
|
-
i0.ɵɵstyleProp("width",
|
|
170
|
+
i0.ɵɵstyleProp("width", ctx_r2.artifactPaneWidth, "%");
|
|
143
171
|
i0.ɵɵadvance();
|
|
144
|
-
i0.ɵɵproperty("artifactId",
|
|
172
|
+
i0.ɵɵproperty("artifactId", ctx_r2.selectedArtifactId)("currentUser", ctx_r2.currentUser)("environmentId", ctx_r2.environmentId)("versionNumber", ctx_r2.selectedVersionNumber)("refreshTrigger", ctx_r2.artifactViewerRefresh$);
|
|
145
173
|
} }
|
|
146
|
-
function
|
|
174
|
+
function ConversationChatAreaComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
147
175
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
148
|
-
i0.ɵɵelementStart(0, "mj-thread-panel",
|
|
149
|
-
i0.ɵɵlistener("closed", function
|
|
176
|
+
i0.ɵɵelementStart(0, "mj-thread-panel", 46);
|
|
177
|
+
i0.ɵɵlistener("closed", function ConversationChatAreaComponent_Conditional_7_Template_mj_thread_panel_closed_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onThreadClosed()); })("replyAdded", function ConversationChatAreaComponent_Conditional_7_Template_mj_thread_panel_replyAdded_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onThreadReplyAdded($event)); });
|
|
150
178
|
i0.ɵɵelementEnd();
|
|
151
179
|
} if (rf & 2) {
|
|
152
|
-
const
|
|
153
|
-
i0.ɵɵproperty("parentMessageId",
|
|
180
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
181
|
+
i0.ɵɵproperty("parentMessageId", ctx_r2.conversationState.activeThreadId)("conversationId", (ctx_r2.conversationState.activeConversation == null ? null : ctx_r2.conversationState.activeConversation.ID) || "")("currentUser", ctx_r2.currentUser);
|
|
154
182
|
} }
|
|
155
|
-
function
|
|
183
|
+
function ConversationChatAreaComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
156
184
|
const _r11 = i0.ɵɵgetCurrentView();
|
|
157
|
-
i0.ɵɵelementStart(0, "div",
|
|
158
|
-
i0.ɵɵlistener("click", function
|
|
159
|
-
i0.ɵɵelementStart(1, "div",
|
|
160
|
-
i0.ɵɵlistener("click", function
|
|
161
|
-
i0.ɵɵelementStart(2, "div",
|
|
185
|
+
i0.ɵɵelementStart(0, "div", 47);
|
|
186
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_10_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.showProjectSelector = false); });
|
|
187
|
+
i0.ɵɵelementStart(1, "div", 48);
|
|
188
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_10_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r11); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
189
|
+
i0.ɵɵelementStart(2, "div", 49)(3, "h3");
|
|
162
190
|
i0.ɵɵtext(4, "Assign Project");
|
|
163
191
|
i0.ɵɵelementEnd();
|
|
164
|
-
i0.ɵɵelementStart(5, "button",
|
|
165
|
-
i0.ɵɵlistener("click", function
|
|
166
|
-
i0.ɵɵelement(6, "i",
|
|
192
|
+
i0.ɵɵelementStart(5, "button", 50);
|
|
193
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_10_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.showProjectSelector = false); });
|
|
194
|
+
i0.ɵɵelement(6, "i", 51);
|
|
167
195
|
i0.ɵɵelementEnd()();
|
|
168
|
-
i0.ɵɵelementStart(7, "div",
|
|
169
|
-
i0.ɵɵlistener("projectSelected", function
|
|
196
|
+
i0.ɵɵelementStart(7, "div", 52)(8, "mj-project-selector", 53);
|
|
197
|
+
i0.ɵɵlistener("projectSelected", function ConversationChatAreaComponent_Conditional_10_Template_mj_project_selector_projectSelected_8_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onProjectSelected($event)); });
|
|
170
198
|
i0.ɵɵelementEnd()()()();
|
|
171
199
|
} if (rf & 2) {
|
|
172
|
-
const
|
|
200
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
173
201
|
i0.ɵɵadvance(8);
|
|
174
|
-
i0.ɵɵproperty("environmentId",
|
|
202
|
+
i0.ɵɵproperty("environmentId", ctx_r2.environmentId)("currentUser", ctx_r2.currentUser)("selectedProjectId", ctx_r2.conversationState.activeConversation.ProjectID);
|
|
175
203
|
} }
|
|
176
|
-
function
|
|
177
|
-
i0.ɵɵ
|
|
178
|
-
i0.ɵɵ
|
|
179
|
-
i0.ɵɵ
|
|
204
|
+
function ConversationChatAreaComponent_Conditional_11_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
205
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
206
|
+
i0.ɵɵelementStart(0, "button", 60);
|
|
207
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.toggleSystemArtifacts()); });
|
|
208
|
+
i0.ɵɵelement(1, "i", 61);
|
|
209
|
+
i0.ɵɵelementStart(2, "span");
|
|
210
|
+
i0.ɵɵtext(3);
|
|
211
|
+
i0.ɵɵelementEnd()();
|
|
212
|
+
} if (rf & 2) {
|
|
213
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
214
|
+
i0.ɵɵclassProp("active", ctx_r2.showSystemArtifacts);
|
|
215
|
+
i0.ɵɵadvance(3);
|
|
216
|
+
i0.ɵɵtextInterpolate1("", ctx_r2.showSystemArtifacts ? "Hide" : "Show", " System");
|
|
217
|
+
} }
|
|
218
|
+
function ConversationChatAreaComponent_Conditional_11_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
219
|
+
i0.ɵɵelementStart(0, "div", 58);
|
|
220
|
+
i0.ɵɵelement(1, "i", 62);
|
|
221
|
+
i0.ɵɵelementStart(2, "p", 63);
|
|
180
222
|
i0.ɵɵtext(3, "No artifacts in this conversation yet");
|
|
181
223
|
i0.ɵɵelementEnd()();
|
|
182
224
|
} }
|
|
183
|
-
function
|
|
225
|
+
function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
184
226
|
i0.ɵɵtext(0);
|
|
185
227
|
} if (rf & 2) {
|
|
186
|
-
const
|
|
187
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
228
|
+
const artifact_r15 = i0.ɵɵnextContext().$implicit;
|
|
229
|
+
i0.ɵɵtextInterpolate1(" ", artifact_r15.versionCount, " versions ");
|
|
188
230
|
} }
|
|
189
|
-
function
|
|
231
|
+
function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
190
232
|
i0.ɵɵtext(0, " 1 version ");
|
|
191
233
|
} }
|
|
192
|
-
function
|
|
193
|
-
const
|
|
194
|
-
i0.ɵɵelementStart(0, "button",
|
|
195
|
-
i0.ɵɵlistener("click", function
|
|
196
|
-
i0.ɵɵelement(1, "i",
|
|
234
|
+
function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
235
|
+
const _r16 = i0.ɵɵgetCurrentView();
|
|
236
|
+
i0.ɵɵelementStart(0, "button", 75);
|
|
237
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_10_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r16); const artifact_r15 = i0.ɵɵnextContext().$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.toggleArtifactExpansion(artifact_r15.artifactId, $event)); });
|
|
238
|
+
i0.ɵɵelement(1, "i", 76);
|
|
197
239
|
i0.ɵɵelementEnd();
|
|
198
240
|
} if (rf & 2) {
|
|
199
|
-
const
|
|
200
|
-
const
|
|
241
|
+
const artifact_r15 = i0.ɵɵnextContext().$implicit;
|
|
242
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
201
243
|
i0.ɵɵadvance();
|
|
202
|
-
i0.ɵɵclassProp("fa-chevron-down",
|
|
244
|
+
i0.ɵɵclassProp("fa-chevron-down", ctx_r2.expandedArtifactId !== artifact_r15.artifactId)("fa-chevron-up", ctx_r2.expandedArtifactId === artifact_r15.artifactId);
|
|
203
245
|
} }
|
|
204
|
-
function
|
|
205
|
-
const
|
|
206
|
-
i0.ɵɵelementStart(0, "div",
|
|
207
|
-
i0.ɵɵlistener("click", function
|
|
208
|
-
i0.ɵɵelementStart(1, "span",
|
|
246
|
+
function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_13_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
247
|
+
const _r17 = i0.ɵɵgetCurrentView();
|
|
248
|
+
i0.ɵɵelementStart(0, "div", 78);
|
|
249
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_13_For_2_Template_div_click_0_listener($event) { const version_r18 = i0.ɵɵrestoreView(_r17).$implicit; const artifact_r15 = i0.ɵɵnextContext(2).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); ctx_r2.openArtifactFromModal(artifact_r15.artifactId, version_r18.versionNumber); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
250
|
+
i0.ɵɵelementStart(1, "span", 79);
|
|
209
251
|
i0.ɵɵtext(2);
|
|
210
252
|
i0.ɵɵelementEnd();
|
|
211
|
-
i0.ɵɵelementStart(3, "span",
|
|
253
|
+
i0.ɵɵelementStart(3, "span", 80);
|
|
212
254
|
i0.ɵɵtext(4, "Open this version");
|
|
213
255
|
i0.ɵɵelementEnd();
|
|
214
|
-
i0.ɵɵelement(5, "i",
|
|
256
|
+
i0.ɵɵelement(5, "i", 81);
|
|
215
257
|
i0.ɵɵelementEnd();
|
|
216
258
|
} if (rf & 2) {
|
|
217
|
-
const
|
|
259
|
+
const version_r18 = ctx.$implicit;
|
|
218
260
|
i0.ɵɵadvance(2);
|
|
219
|
-
i0.ɵɵtextInterpolate1("v",
|
|
261
|
+
i0.ɵɵtextInterpolate1("v", version_r18.versionNumber, "");
|
|
220
262
|
} }
|
|
221
|
-
function
|
|
222
|
-
i0.ɵɵelementStart(0, "div",
|
|
223
|
-
i0.ɵɵrepeaterCreate(1,
|
|
263
|
+
function ConversationChatAreaComponent_Conditional_11_For_12_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
264
|
+
i0.ɵɵelementStart(0, "div", 74);
|
|
265
|
+
i0.ɵɵrepeaterCreate(1, ConversationChatAreaComponent_Conditional_11_For_12_Conditional_13_For_2_Template, 6, 1, "div", 77, _forTrack1);
|
|
224
266
|
i0.ɵɵelementEnd();
|
|
225
267
|
} if (rf & 2) {
|
|
226
|
-
const
|
|
268
|
+
const artifact_r15 = i0.ɵɵnextContext().$implicit;
|
|
227
269
|
i0.ɵɵadvance();
|
|
228
|
-
i0.ɵɵrepeater(
|
|
270
|
+
i0.ɵɵrepeater(artifact_r15.versions);
|
|
229
271
|
} }
|
|
230
|
-
function
|
|
231
|
-
const
|
|
232
|
-
i0.ɵɵelementStart(0, "div",
|
|
233
|
-
i0.ɵɵlistener("click", function
|
|
234
|
-
i0.ɵɵelementStart(2, "div",
|
|
235
|
-
i0.ɵɵelement(3, "i",
|
|
272
|
+
function ConversationChatAreaComponent_Conditional_11_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
273
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
274
|
+
i0.ɵɵelementStart(0, "div", 64)(1, "div", 65);
|
|
275
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_For_12_Template_div_click_1_listener() { const artifact_r15 = i0.ɵɵrestoreView(_r14).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.openArtifactFromModal(artifact_r15.artifactId)); });
|
|
276
|
+
i0.ɵɵelementStart(2, "div", 66);
|
|
277
|
+
i0.ɵɵelement(3, "i", 67);
|
|
236
278
|
i0.ɵɵelementEnd();
|
|
237
|
-
i0.ɵɵelementStart(4, "div",
|
|
279
|
+
i0.ɵɵelementStart(4, "div", 68)(5, "div", 69);
|
|
238
280
|
i0.ɵɵtext(6);
|
|
239
281
|
i0.ɵɵelementEnd();
|
|
240
|
-
i0.ɵɵelementStart(7, "div",
|
|
241
|
-
i0.ɵɵtemplate(8,
|
|
282
|
+
i0.ɵɵelementStart(7, "div", 70);
|
|
283
|
+
i0.ɵɵtemplate(8, ConversationChatAreaComponent_Conditional_11_For_12_Conditional_8_Template, 1, 1)(9, ConversationChatAreaComponent_Conditional_11_For_12_Conditional_9_Template, 1, 0);
|
|
242
284
|
i0.ɵɵelementEnd()();
|
|
243
|
-
i0.ɵɵtemplate(10,
|
|
244
|
-
i0.ɵɵelementStart(11, "div",
|
|
245
|
-
i0.ɵɵelement(12, "i",
|
|
285
|
+
i0.ɵɵtemplate(10, ConversationChatAreaComponent_Conditional_11_For_12_Conditional_10_Template, 2, 4, "button", 71);
|
|
286
|
+
i0.ɵɵelementStart(11, "div", 72);
|
|
287
|
+
i0.ɵɵelement(12, "i", 73);
|
|
246
288
|
i0.ɵɵelementEnd()();
|
|
247
|
-
i0.ɵɵtemplate(13,
|
|
289
|
+
i0.ɵɵtemplate(13, ConversationChatAreaComponent_Conditional_11_For_12_Conditional_13_Template, 3, 0, "div", 74);
|
|
248
290
|
i0.ɵɵelementEnd();
|
|
249
291
|
} if (rf & 2) {
|
|
250
|
-
const
|
|
251
|
-
const
|
|
252
|
-
i0.ɵɵclassProp("expanded",
|
|
292
|
+
const artifact_r15 = ctx.$implicit;
|
|
293
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
294
|
+
i0.ɵɵclassProp("expanded", ctx_r2.expandedArtifactId === artifact_r15.artifactId)("system-artifact", artifact_r15.visibility === "System Only");
|
|
253
295
|
i0.ɵɵadvance(6);
|
|
254
|
-
i0.ɵɵtextInterpolate(
|
|
296
|
+
i0.ɵɵtextInterpolate(artifact_r15.name);
|
|
255
297
|
i0.ɵɵadvance(2);
|
|
256
|
-
i0.ɵɵconditional(
|
|
298
|
+
i0.ɵɵconditional(artifact_r15.versionCount > 1 ? 8 : 9);
|
|
257
299
|
i0.ɵɵadvance(2);
|
|
258
|
-
i0.ɵɵconditional(
|
|
300
|
+
i0.ɵɵconditional(artifact_r15.versionCount > 1 ? 10 : -1);
|
|
259
301
|
i0.ɵɵadvance(3);
|
|
260
|
-
i0.ɵɵconditional(
|
|
302
|
+
i0.ɵɵconditional(ctx_r2.expandedArtifactId === artifact_r15.artifactId && artifact_r15.versionCount > 1 ? 13 : -1);
|
|
261
303
|
} }
|
|
262
|
-
function
|
|
304
|
+
function ConversationChatAreaComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
263
305
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
264
|
-
i0.ɵɵelementStart(0, "div",
|
|
265
|
-
i0.ɵɵlistener("click", function
|
|
266
|
-
i0.ɵɵelementStart(1, "div",
|
|
267
|
-
i0.ɵɵlistener("click", function
|
|
268
|
-
i0.ɵɵelementStart(2, "div",
|
|
306
|
+
i0.ɵɵelementStart(0, "div", 47);
|
|
307
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.showArtifactsModal = false); });
|
|
308
|
+
i0.ɵɵelementStart(1, "div", 54);
|
|
309
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r12); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
310
|
+
i0.ɵɵelementStart(2, "div", 49)(3, "h3");
|
|
269
311
|
i0.ɵɵtext(4, "Conversation Artifacts");
|
|
270
312
|
i0.ɵɵelementEnd();
|
|
271
|
-
i0.ɵɵelementStart(5, "
|
|
272
|
-
i0.ɵɵ
|
|
273
|
-
i0.ɵɵ
|
|
274
|
-
i0.ɵɵ
|
|
275
|
-
i0.ɵɵ
|
|
276
|
-
i0.ɵɵ
|
|
277
|
-
i0.ɵɵ
|
|
313
|
+
i0.ɵɵelementStart(5, "div", 55);
|
|
314
|
+
i0.ɵɵtemplate(6, ConversationChatAreaComponent_Conditional_11_Conditional_6_Template, 4, 3, "button", 56);
|
|
315
|
+
i0.ɵɵelementStart(7, "button", 50);
|
|
316
|
+
i0.ɵɵlistener("click", function ConversationChatAreaComponent_Conditional_11_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r12); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.showArtifactsModal = false); });
|
|
317
|
+
i0.ɵɵelement(8, "i", 51);
|
|
318
|
+
i0.ɵɵelementEnd()()();
|
|
319
|
+
i0.ɵɵelementStart(9, "div", 57);
|
|
320
|
+
i0.ɵɵtemplate(10, ConversationChatAreaComponent_Conditional_11_Conditional_10_Template, 4, 0, "div", 58);
|
|
321
|
+
i0.ɵɵrepeaterCreate(11, ConversationChatAreaComponent_Conditional_11_For_12_Template, 14, 8, "div", 59, _forTrack0);
|
|
278
322
|
i0.ɵɵelementEnd()()();
|
|
279
323
|
} if (rf & 2) {
|
|
280
|
-
const
|
|
281
|
-
i0.ɵɵadvance(
|
|
282
|
-
i0.ɵɵconditional(
|
|
324
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
325
|
+
i0.ɵɵadvance(6);
|
|
326
|
+
i0.ɵɵconditional(ctx_r2.hasSystemArtifacts ? 6 : -1);
|
|
327
|
+
i0.ɵɵadvance(4);
|
|
328
|
+
i0.ɵɵconditional(ctx_r2.artifactsByDetailId.size === 0 ? 10 : -1);
|
|
283
329
|
i0.ɵɵadvance();
|
|
284
|
-
i0.ɵɵrepeater(
|
|
330
|
+
i0.ɵɵrepeater(ctx_r2.getArtifactsArray());
|
|
285
331
|
} }
|
|
286
|
-
function
|
|
287
|
-
const
|
|
288
|
-
i0.ɵɵelementStart(0, "mj-artifact-collection-picker-modal",
|
|
289
|
-
i0.ɵɵlistener("saved", function
|
|
332
|
+
function ConversationChatAreaComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
333
|
+
const _r19 = i0.ɵɵgetCurrentView();
|
|
334
|
+
i0.ɵɵelementStart(0, "mj-artifact-collection-picker-modal", 82);
|
|
335
|
+
i0.ɵɵlistener("saved", function ConversationChatAreaComponent_Conditional_12_Template_mj_artifact_collection_picker_modal_saved_0_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCollectionPickerSaved($event)); })("cancelled", function ConversationChatAreaComponent_Conditional_12_Template_mj_artifact_collection_picker_modal_cancelled_0_listener() { i0.ɵɵrestoreView(_r19); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCollectionPickerCancelled()); });
|
|
290
336
|
i0.ɵɵelementEnd();
|
|
291
337
|
} if (rf & 2) {
|
|
292
|
-
const
|
|
293
|
-
i0.ɵɵproperty("isOpen",
|
|
338
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
339
|
+
i0.ɵɵproperty("isOpen", ctx_r2.showCollectionPicker)("environmentId", ctx_r2.environmentId)("currentUser", ctx_r2.currentUser)("excludeCollectionIds", ctx_r2.collectionPickerExcludedIds);
|
|
294
340
|
} }
|
|
295
341
|
export class ConversationChatAreaComponent {
|
|
296
342
|
conversationState;
|
|
@@ -313,6 +359,11 @@ export class ConversationChatAreaComponent {
|
|
|
313
359
|
previousConversationId = null;
|
|
314
360
|
lastLoadedConversationId = null; // Track which conversation's peripheral data was loaded
|
|
315
361
|
isProcessing = false;
|
|
362
|
+
intentCheckMessage = null; // Temporary message shown during intent checking
|
|
363
|
+
isLoadingConversation = true; // True while loading initial conversation messages
|
|
364
|
+
// Store raw query results and derived data
|
|
365
|
+
rawConversationData = [];
|
|
366
|
+
userAvatarMap = new Map();
|
|
316
367
|
memberCount = 1;
|
|
317
368
|
artifactCount = 0;
|
|
318
369
|
isShared = false;
|
|
@@ -322,6 +373,7 @@ export class ConversationChatAreaComponent {
|
|
|
322
373
|
showProjectSelector = false;
|
|
323
374
|
showArtifactPanel = false;
|
|
324
375
|
showArtifactsModal = false;
|
|
376
|
+
showSystemArtifacts = false; // Toggle for showing system-only artifacts
|
|
325
377
|
selectedArtifactId = null;
|
|
326
378
|
selectedVersionNumber = undefined; // Version to show in artifact viewer
|
|
327
379
|
artifactPaneWidth = 40; // Default 40% width
|
|
@@ -336,13 +388,22 @@ export class ConversationChatAreaComponent {
|
|
|
336
388
|
// Uses lazy-loading pattern: display data loaded immediately, full entities on-demand
|
|
337
389
|
// Supports multiple artifacts per conversation detail (0-N relationship)
|
|
338
390
|
artifactsByDetailId = new Map();
|
|
391
|
+
// System artifacts mapping: ConversationDetailID -> Array of LazyArtifactInfo (Visibility='System Only')
|
|
392
|
+
// Kept separate so we can toggle their display without reloading
|
|
393
|
+
systemArtifactsByDetailId = new Map();
|
|
394
|
+
// Cached combined artifacts map - updated when toggle changes
|
|
395
|
+
_combinedArtifactsMap = null;
|
|
339
396
|
// Agent run mapping: ConversationDetailID -> AIAgentRunEntityExtended
|
|
340
397
|
// Loaded once per conversation and kept in sync as new runs are created
|
|
341
398
|
agentRunsByDetailId = new Map();
|
|
399
|
+
// Timer for smooth agent run UI updates (updates every second while agent runs)
|
|
400
|
+
agentRunUpdateTimer = null;
|
|
342
401
|
// Loading state for peripheral data
|
|
343
402
|
isLoadingPeripheralData = false;
|
|
344
403
|
// Subject to trigger artifact viewer refresh when new version is created
|
|
345
404
|
artifactViewerRefresh$ = new Subject();
|
|
405
|
+
// Track initialization state to prevent loading messages before agents are ready
|
|
406
|
+
isInitialized = false;
|
|
346
407
|
// Resize state
|
|
347
408
|
isResizing = false;
|
|
348
409
|
startX = 0;
|
|
@@ -358,20 +419,28 @@ export class ConversationChatAreaComponent {
|
|
|
358
419
|
this.mentionAutocompleteService = mentionAutocompleteService;
|
|
359
420
|
}
|
|
360
421
|
async ngOnInit() {
|
|
361
|
-
// Initialize mention service BEFORE loading messages
|
|
422
|
+
// CRITICAL: Initialize AI Engine and mention service BEFORE loading any messages
|
|
362
423
|
// This ensures agents are loaded and available for @mention parsing in existing messages
|
|
424
|
+
// Without this, @mentions won't be highlighted when reloading existing conversations
|
|
363
425
|
await this.mentionAutocompleteService.initialize(this.currentUser);
|
|
364
426
|
// Load saved artifact pane width
|
|
365
427
|
this.loadArtifactPaneWidth();
|
|
428
|
+
// Mark as initialized so ngDoCheck can proceed
|
|
429
|
+
this.isInitialized = true;
|
|
366
430
|
// Initial load if there's already an active conversation
|
|
367
431
|
if (this.conversationState.activeConversationId) {
|
|
368
|
-
this.onConversationChanged(this.conversationState.activeConversationId);
|
|
432
|
+
await this.onConversationChanged(this.conversationState.activeConversationId);
|
|
369
433
|
}
|
|
370
434
|
// Setup resize listeners
|
|
371
435
|
window.addEventListener('mousemove', this.onResizeMove.bind(this));
|
|
372
436
|
window.addEventListener('mouseup', this.onResizeEnd.bind(this));
|
|
373
437
|
}
|
|
374
438
|
ngDoCheck() {
|
|
439
|
+
// Don't process conversation changes until initialization is complete
|
|
440
|
+
// This prevents race condition where messages load before agents are ready
|
|
441
|
+
if (!this.isInitialized) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
375
444
|
// Detect conversation ID changes using change detection
|
|
376
445
|
const currentId = this.conversationState.activeConversationId;
|
|
377
446
|
if (currentId !== this.previousConversationId) {
|
|
@@ -396,6 +465,8 @@ export class ConversationChatAreaComponent {
|
|
|
396
465
|
ngOnDestroy() {
|
|
397
466
|
// Stop polling when component is destroyed
|
|
398
467
|
this.agentStateService.stopPolling();
|
|
468
|
+
// Stop agent run update timer
|
|
469
|
+
this.stopAgentRunUpdateTimer();
|
|
399
470
|
// Remove resize listeners
|
|
400
471
|
window.removeEventListener('mousemove', this.onResizeMove.bind(this));
|
|
401
472
|
window.removeEventListener('mouseup', this.onResizeEnd.bind(this));
|
|
@@ -406,12 +477,24 @@ export class ConversationChatAreaComponent {
|
|
|
406
477
|
this.showArtifactPanel = false;
|
|
407
478
|
this.selectedArtifactId = null;
|
|
408
479
|
if (conversationId) {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
this.
|
|
480
|
+
// Show loading state
|
|
481
|
+
this.isLoadingConversation = true;
|
|
482
|
+
this.messages = []; // Clear messages to avoid showing stale data
|
|
483
|
+
this.cdr.detectChanges();
|
|
484
|
+
try {
|
|
485
|
+
await this.loadMessages(conversationId);
|
|
486
|
+
await this.restoreActiveTasks(conversationId);
|
|
487
|
+
this.agentStateService.startPolling(this.currentUser, conversationId);
|
|
488
|
+
}
|
|
489
|
+
finally {
|
|
490
|
+
// Hide loading state
|
|
491
|
+
this.isLoadingConversation = false;
|
|
492
|
+
this.cdr.detectChanges();
|
|
493
|
+
}
|
|
412
494
|
}
|
|
413
495
|
else {
|
|
414
496
|
this.messages = [];
|
|
497
|
+
this.isLoadingConversation = false;
|
|
415
498
|
}
|
|
416
499
|
}
|
|
417
500
|
async loadMessages(conversationId) {
|
|
@@ -451,6 +534,8 @@ export class ConversationChatAreaComponent {
|
|
|
451
534
|
this.cdr.detectChanges();
|
|
452
535
|
});
|
|
453
536
|
}
|
|
537
|
+
// After loading messages, check for in-progress runs and ensure we're receiving updates
|
|
538
|
+
await this.detectAndReconnectToInProgressRuns(conversationId);
|
|
454
539
|
}
|
|
455
540
|
catch (error) {
|
|
456
541
|
console.error('Error loading messages:', error);
|
|
@@ -464,6 +549,10 @@ export class ConversationChatAreaComponent {
|
|
|
464
549
|
async buildMessagesFromCache(conversationData) {
|
|
465
550
|
const md = new Metadata();
|
|
466
551
|
const messages = [];
|
|
552
|
+
// Store raw conversation data for access to query-specific fields
|
|
553
|
+
this.rawConversationData = conversationData;
|
|
554
|
+
// Build user avatar map for fast lookups
|
|
555
|
+
this.buildUserAvatarMap(conversationData);
|
|
467
556
|
for (const row of conversationData) {
|
|
468
557
|
if (!row.ID)
|
|
469
558
|
continue;
|
|
@@ -478,6 +567,29 @@ export class ConversationChatAreaComponent {
|
|
|
478
567
|
this.scrollToBottom = true;
|
|
479
568
|
this.cdr.detectChanges(); // Show messages immediately
|
|
480
569
|
}
|
|
570
|
+
/**
|
|
571
|
+
* Builds a map of UserID -> Avatar data for fast lookups
|
|
572
|
+
* Extracts unique users from conversation data and their avatar settings
|
|
573
|
+
*/
|
|
574
|
+
buildUserAvatarMap(conversationData) {
|
|
575
|
+
this.userAvatarMap.clear();
|
|
576
|
+
// Get unique users and their avatar data
|
|
577
|
+
const userMap = new Map();
|
|
578
|
+
for (const row of conversationData) {
|
|
579
|
+
// Only process user messages that have a UserID
|
|
580
|
+
if (row.Role?.toLowerCase() === 'user' && row.UserID) {
|
|
581
|
+
// Only add if we haven't seen this user yet
|
|
582
|
+
if (!userMap.has(row.UserID)) {
|
|
583
|
+
userMap.set(row.UserID, {
|
|
584
|
+
imageUrl: row.UserImageURL || null,
|
|
585
|
+
iconClass: row.UserImageIconClass || null
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
this.userAvatarMap = userMap;
|
|
591
|
+
console.log(`👤 Built user avatar map with ${this.userAvatarMap.size} unique users`);
|
|
592
|
+
}
|
|
481
593
|
/**
|
|
482
594
|
* Process peripheral data (agent runs and artifacts) from cached conversation data
|
|
483
595
|
* Parses JSON columns and builds maps for display
|
|
@@ -538,22 +650,39 @@ export class ConversationChatAreaComponent {
|
|
|
538
650
|
// Build artifacts map - no need to load full entities, just create LazyArtifactInfo
|
|
539
651
|
if (parsed.artifacts.length > 0) {
|
|
540
652
|
const artifactList = [];
|
|
653
|
+
const systemArtifactList = [];
|
|
541
654
|
for (const artifactData of parsed.artifacts) {
|
|
542
655
|
// Create LazyArtifactInfo with display data from query
|
|
543
656
|
// Full entities will be loaded on-demand when artifact is clicked
|
|
544
657
|
const lazyInfo = new LazyArtifactInfo(artifactData, this.currentUser);
|
|
545
|
-
|
|
658
|
+
// Separate system-only artifacts from user-visible artifacts
|
|
659
|
+
if (artifactData.Visibility === 'System Only') {
|
|
660
|
+
systemArtifactList.push(lazyInfo);
|
|
661
|
+
}
|
|
662
|
+
else {
|
|
663
|
+
artifactList.push(lazyInfo);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
// Add to appropriate maps
|
|
667
|
+
if (artifactList.length > 0) {
|
|
668
|
+
this.artifactsByDetailId.set(row.ID, artifactList);
|
|
669
|
+
}
|
|
670
|
+
if (systemArtifactList.length > 0) {
|
|
671
|
+
this.systemArtifactsByDetailId.set(row.ID, systemArtifactList);
|
|
546
672
|
}
|
|
547
|
-
this.artifactsByDetailId.set(row.ID, artifactList);
|
|
548
673
|
}
|
|
549
674
|
}
|
|
550
675
|
// Create new Map references to trigger Angular change detection
|
|
551
676
|
this.agentRunsByDetailId = new Map(this.agentRunsByDetailId);
|
|
552
677
|
this.artifactsByDetailId = new Map(this.artifactsByDetailId);
|
|
678
|
+
this.systemArtifactsByDetailId = new Map(this.systemArtifactsByDetailId);
|
|
679
|
+
// Clear combined cache since we loaded new artifacts
|
|
680
|
+
this._combinedArtifactsMap = null;
|
|
553
681
|
// Update artifact count for header display (unique artifacts, not versions)
|
|
554
682
|
this.artifactCount = this.calculateUniqueArtifactCount();
|
|
555
683
|
// Debug: Log summary
|
|
556
|
-
|
|
684
|
+
const systemArtifactCount = this.systemArtifactsByDetailId.size;
|
|
685
|
+
console.log(`📊 Processed ${this.agentRunsByDetailId.size} agent runs, ${this.artifactsByDetailId.size} user artifact mappings, ${systemArtifactCount} system artifact mappings (${this.artifactCount} unique user artifacts)`);
|
|
557
686
|
// CRITICAL: Trigger message re-render now that agent runs and artifacts are loaded
|
|
558
687
|
// This updates all message components with the newly loaded agent run data
|
|
559
688
|
this.messages = [...this.messages]; // Create new array reference to trigger change detection
|
|
@@ -590,10 +719,32 @@ export class ConversationChatAreaComponent {
|
|
|
590
719
|
else {
|
|
591
720
|
// Add new message to the list
|
|
592
721
|
this.messages = [...this.messages, message];
|
|
722
|
+
// Ensure current user is in the avatar map for new messages
|
|
723
|
+
this.ensureCurrentUserInAvatarMap();
|
|
593
724
|
}
|
|
594
725
|
// Scroll to bottom when new message is sent
|
|
595
726
|
this.scrollToBottom = true;
|
|
596
727
|
}
|
|
728
|
+
/**
|
|
729
|
+
* Ensures the current user is in the avatar map
|
|
730
|
+
* Called when new messages are created to ensure avatar data is available
|
|
731
|
+
*/
|
|
732
|
+
async ensureCurrentUserInAvatarMap() {
|
|
733
|
+
const userId = this.currentUser.ID;
|
|
734
|
+
// If user already in map, skip
|
|
735
|
+
if (this.userAvatarMap.has(userId)) {
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
// Load the current user's avatar data
|
|
739
|
+
const md = new Metadata();
|
|
740
|
+
const userEntity = await md.GetEntityObject('Users');
|
|
741
|
+
await userEntity.Load(userId);
|
|
742
|
+
this.userAvatarMap.set(userId, {
|
|
743
|
+
imageUrl: userEntity.UserImageURL || null,
|
|
744
|
+
iconClass: userEntity.UserImageIconClass || null
|
|
745
|
+
});
|
|
746
|
+
console.log(`👤 Added current user to avatar map`);
|
|
747
|
+
}
|
|
597
748
|
/**
|
|
598
749
|
* Handle agent run detected event from progress updates
|
|
599
750
|
* This is called when the first progress update arrives with an agent run ID
|
|
@@ -601,6 +752,93 @@ export class ConversationChatAreaComponent {
|
|
|
601
752
|
async onAgentRunDetected(event) {
|
|
602
753
|
await this.addAgentRunToMap(event.conversationDetailId, event.agentRunId);
|
|
603
754
|
}
|
|
755
|
+
/**
|
|
756
|
+
* Handle message completion event from message-input
|
|
757
|
+
* Refreshes the agent run data in-place to get final status and timestamps
|
|
758
|
+
*/
|
|
759
|
+
async onMessageComplete(event) {
|
|
760
|
+
// Get existing agent run from map
|
|
761
|
+
const existingAgentRun = this.agentRunsByDetailId.get(event.conversationDetailId);
|
|
762
|
+
if (existingAgentRun?.ID) {
|
|
763
|
+
// Refresh the SAME object by calling Load() - preserves all references
|
|
764
|
+
await existingAgentRun.Load(existingAgentRun.ID);
|
|
765
|
+
// Trigger re-render to show updated status
|
|
766
|
+
this.messages = [...this.messages];
|
|
767
|
+
this.cdr.detectChanges();
|
|
768
|
+
// Stop timer since agent completed
|
|
769
|
+
this.stopAgentRunUpdateTimer();
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Handle agent run update event from progress updates
|
|
774
|
+
* This is called on EVERY progress update with the full, live agent run object
|
|
775
|
+
* Provides real-time updates of status, timestamps, tokens, cost during execution
|
|
776
|
+
*/
|
|
777
|
+
async onAgentRunUpdate(event) {
|
|
778
|
+
let run;
|
|
779
|
+
if (event.agentRun) {
|
|
780
|
+
// Directly update map with fresh data from progress (no database query needed)
|
|
781
|
+
// Don't create new Map - message-list component needs to keep the same reference
|
|
782
|
+
this.agentRunsByDetailId.set(event.conversationDetailId, event.agentRun);
|
|
783
|
+
run = event.agentRun;
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
// no agent run, should have agentRunId
|
|
787
|
+
run = await this.addAgentRunToMap(event.conversationDetailId, event.agentRunId);
|
|
788
|
+
}
|
|
789
|
+
// Force message list to re-render with updated agent run
|
|
790
|
+
// This ensures message components receive the fresh agent run data
|
|
791
|
+
this.messages = [...this.messages];
|
|
792
|
+
this.cdr.detectChanges();
|
|
793
|
+
// Start 1-second update timer for smooth UI updates (if not already running)
|
|
794
|
+
this.startAgentRunUpdateTimer();
|
|
795
|
+
// If agent completed or failed, stop the timer
|
|
796
|
+
const status = run.Status?.toLowerCase();
|
|
797
|
+
if (status === 'complete' || status === 'completed' || status === 'failed' || status === 'error') {
|
|
798
|
+
this.stopAgentRunUpdateTimer();
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Start 1-second timer for smooth agent run UI updates
|
|
803
|
+
* Updates the message list every second to keep elapsed times current
|
|
804
|
+
*/
|
|
805
|
+
startAgentRunUpdateTimer() {
|
|
806
|
+
// Don't start if already running
|
|
807
|
+
if (this.agentRunUpdateTimer !== null) {
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
console.log('⏱️ Starting agent run update timer (1-second interval)');
|
|
811
|
+
this.agentRunUpdateTimer = setInterval(() => {
|
|
812
|
+
// Check if we have any active agent runs
|
|
813
|
+
let hasActiveRuns = false;
|
|
814
|
+
for (const agentRun of this.agentRunsByDetailId.values()) {
|
|
815
|
+
const status = agentRun.Status?.toLowerCase();
|
|
816
|
+
if (status === 'in-progress' || status === 'running') {
|
|
817
|
+
hasActiveRuns = true;
|
|
818
|
+
break;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (hasActiveRuns) {
|
|
822
|
+
// Force message list to re-render so timers update
|
|
823
|
+
this.messages = [...this.messages];
|
|
824
|
+
this.cdr.detectChanges();
|
|
825
|
+
}
|
|
826
|
+
else {
|
|
827
|
+
// No active runs, stop the timer
|
|
828
|
+
this.stopAgentRunUpdateTimer();
|
|
829
|
+
}
|
|
830
|
+
}, 1000);
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Stop the agent run update timer
|
|
834
|
+
*/
|
|
835
|
+
stopAgentRunUpdateTimer() {
|
|
836
|
+
if (this.agentRunUpdateTimer !== null) {
|
|
837
|
+
console.log('⏹️ Stopping agent run update timer');
|
|
838
|
+
clearInterval(this.agentRunUpdateTimer);
|
|
839
|
+
this.agentRunUpdateTimer = null;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
604
842
|
async onAgentResponse(event) {
|
|
605
843
|
// Add the agent's response message to the conversation
|
|
606
844
|
this.messages = [...this.messages, event.message];
|
|
@@ -611,13 +849,11 @@ export class ConversationChatAreaComponent {
|
|
|
611
849
|
}
|
|
612
850
|
// Scroll to bottom when agent responds
|
|
613
851
|
this.scrollToBottom = true;
|
|
614
|
-
//
|
|
852
|
+
// CRITICAL FIX: Always refresh the agent run data when agent completes
|
|
853
|
+
// This ensures we get the final status and timestamps, replacing any stale data from when agent started
|
|
615
854
|
// agentResult is ExecuteAgentResult which contains agentRun property
|
|
616
855
|
if (event.agentResult?.agentRun?.ID) {
|
|
617
|
-
|
|
618
|
-
if (!this.agentRunsByDetailId.has(event.message.ID)) {
|
|
619
|
-
await this.addAgentRunToMap(event.message.ID, event.agentResult.agentRun.ID);
|
|
620
|
-
}
|
|
856
|
+
await this.addAgentRunToMap(event.message.ID, event.agentResult.agentRun.ID, true); // forceRefresh = true
|
|
621
857
|
}
|
|
622
858
|
// Reload artifact mapping for this message to pick up newly created artifacts
|
|
623
859
|
await this.reloadArtifactsForMessage(event.message.ID);
|
|
@@ -644,23 +880,30 @@ export class ConversationChatAreaComponent {
|
|
|
644
880
|
/**
|
|
645
881
|
* Add or update an agent run in the map
|
|
646
882
|
* Called when a new agent run completes to keep the map in sync
|
|
883
|
+
* @param forceRefresh If true, always reload from database even if already in map (used when status changes)
|
|
647
884
|
*/
|
|
648
|
-
async addAgentRunToMap(conversationDetailId, agentRunId) {
|
|
885
|
+
async addAgentRunToMap(conversationDetailId, agentRunId, forceRefresh = false) {
|
|
649
886
|
try {
|
|
650
|
-
if
|
|
887
|
+
// Always refresh if forced, or if not in map yet
|
|
888
|
+
if (forceRefresh || !this.agentRunsByDetailId.has(conversationDetailId)) {
|
|
651
889
|
const md = new Metadata();
|
|
652
890
|
const agentRun = await md.GetEntityObject('MJ: AI Agent Runs', this.currentUser);
|
|
653
891
|
if (await agentRun.Load(agentRunId)) {
|
|
654
892
|
this.agentRunsByDetailId.set(conversationDetailId, agentRun);
|
|
893
|
+
// Force message list to re-render with updated agent run
|
|
894
|
+
// Keep same Map reference so message-list component can access updates
|
|
895
|
+
this.messages = [...this.messages];
|
|
896
|
+
this.cdr.detectChanges();
|
|
655
897
|
}
|
|
898
|
+
return agentRun;
|
|
656
899
|
}
|
|
657
900
|
else {
|
|
658
|
-
|
|
659
|
-
console.log(`⏭️ Agent run for detail ${conversationDetailId} already in map, skipping load`);
|
|
901
|
+
return this.agentRunsByDetailId.get(conversationDetailId);
|
|
660
902
|
}
|
|
661
903
|
}
|
|
662
904
|
catch (error) {
|
|
663
905
|
console.error('Failed to load agent run for map:', error);
|
|
906
|
+
throw error;
|
|
664
907
|
}
|
|
665
908
|
}
|
|
666
909
|
/**
|
|
@@ -734,6 +977,20 @@ export class ConversationChatAreaComponent {
|
|
|
734
977
|
/**
|
|
735
978
|
* Calculate count of unique artifacts (not versions)
|
|
736
979
|
* Works with LazyArtifactInfo - uses artifactId from display data
|
|
980
|
+
* Respects showSystemArtifacts toggle to update count dynamically
|
|
981
|
+
*/
|
|
982
|
+
get artifactCountDisplay() {
|
|
983
|
+
const uniqueArtifactIds = new Set();
|
|
984
|
+
for (const artifactList of this.effectiveArtifactsMap.values()) {
|
|
985
|
+
for (const info of artifactList) {
|
|
986
|
+
uniqueArtifactIds.add(info.artifactId);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
return uniqueArtifactIds.size;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Calculate count of unique artifacts (not versions) - user-visible only
|
|
993
|
+
* Used for initial artifact count (doesn't change with toggle)
|
|
737
994
|
*/
|
|
738
995
|
calculateUniqueArtifactCount() {
|
|
739
996
|
const uniqueArtifactIds = new Set();
|
|
@@ -744,15 +1001,67 @@ export class ConversationChatAreaComponent {
|
|
|
744
1001
|
}
|
|
745
1002
|
return uniqueArtifactIds.size;
|
|
746
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* Get the effective artifacts map based on showSystemArtifacts toggle
|
|
1006
|
+
* Combines user-visible and system artifacts when toggle is on
|
|
1007
|
+
* Uses caching to prevent infinite change detection loops
|
|
1008
|
+
*/
|
|
1009
|
+
get effectiveArtifactsMap() {
|
|
1010
|
+
if (!this.showSystemArtifacts) {
|
|
1011
|
+
// Only user-visible artifacts - no need to cache
|
|
1012
|
+
return this.artifactsByDetailId;
|
|
1013
|
+
}
|
|
1014
|
+
// Return cached combined map if available
|
|
1015
|
+
if (this._combinedArtifactsMap) {
|
|
1016
|
+
return this._combinedArtifactsMap;
|
|
1017
|
+
}
|
|
1018
|
+
// Combine both maps when showing system artifacts
|
|
1019
|
+
const combined = new Map();
|
|
1020
|
+
// Add all user-visible artifacts
|
|
1021
|
+
for (const [key, value] of this.artifactsByDetailId) {
|
|
1022
|
+
combined.set(key, [...value]);
|
|
1023
|
+
}
|
|
1024
|
+
// Add system artifacts
|
|
1025
|
+
for (const [key, value] of this.systemArtifactsByDetailId) {
|
|
1026
|
+
if (combined.has(key)) {
|
|
1027
|
+
// Merge with existing artifacts for this detail
|
|
1028
|
+
combined.get(key).push(...value);
|
|
1029
|
+
}
|
|
1030
|
+
else {
|
|
1031
|
+
combined.set(key, [...value]);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
// Cache the result
|
|
1035
|
+
this._combinedArtifactsMap = combined;
|
|
1036
|
+
return combined;
|
|
1037
|
+
}
|
|
1038
|
+
/**
|
|
1039
|
+
* Toggles system artifacts visibility
|
|
1040
|
+
* Clears the cache so the map will be rebuilt on next access
|
|
1041
|
+
*/
|
|
1042
|
+
toggleSystemArtifacts() {
|
|
1043
|
+
this.showSystemArtifacts = !this.showSystemArtifacts;
|
|
1044
|
+
this._combinedArtifactsMap = null; // Clear cache
|
|
1045
|
+
this.cdr.detectChanges(); // Force update
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Check if there are any system artifacts in this conversation
|
|
1049
|
+
* Used to conditionally show/hide the "Show System" toggle button
|
|
1050
|
+
*/
|
|
1051
|
+
get hasSystemArtifacts() {
|
|
1052
|
+
return this.systemArtifactsByDetailId.size > 0;
|
|
1053
|
+
}
|
|
747
1054
|
/**
|
|
748
1055
|
* Get unique artifacts grouped by artifact ID (not by conversation detail)
|
|
749
1056
|
* Returns the latest version info for each unique artifact with all versions
|
|
750
1057
|
* Works with LazyArtifactInfo - uses display data without loading full entities
|
|
1058
|
+
* Respects showSystemArtifacts toggle
|
|
751
1059
|
*/
|
|
752
1060
|
getArtifactsArray() {
|
|
753
1061
|
const artifactMap = new Map();
|
|
754
1062
|
// Group by artifactId, collecting all version details
|
|
755
|
-
|
|
1063
|
+
// Use effectiveArtifactsMap to respect showSystemArtifacts toggle
|
|
1064
|
+
for (const artifactList of this.effectiveArtifactsMap.values()) {
|
|
756
1065
|
for (const info of artifactList) {
|
|
757
1066
|
const artifactId = info.artifactId;
|
|
758
1067
|
const versionId = info.artifactVersionId;
|
|
@@ -763,6 +1072,7 @@ export class ConversationChatAreaComponent {
|
|
|
763
1072
|
artifactId: artifactId,
|
|
764
1073
|
versionId: versionId, // Latest version ID
|
|
765
1074
|
name: name,
|
|
1075
|
+
visibility: info.visibility,
|
|
766
1076
|
versions: [{ versionId: versionId, versionNumber: versionNumber }]
|
|
767
1077
|
});
|
|
768
1078
|
}
|
|
@@ -782,6 +1092,7 @@ export class ConversationChatAreaComponent {
|
|
|
782
1092
|
artifactId: item.artifactId,
|
|
783
1093
|
versionId: item.versionId,
|
|
784
1094
|
name: item.name,
|
|
1095
|
+
visibility: item.visibility,
|
|
785
1096
|
versionCount: item.versions.length,
|
|
786
1097
|
versions: item.versions.sort((a, b) => b.versionNumber - a.versionNumber)
|
|
787
1098
|
}));
|
|
@@ -913,15 +1224,26 @@ export class ConversationChatAreaComponent {
|
|
|
913
1224
|
async onArtifactCreated(data) {
|
|
914
1225
|
// Reload artifacts to get full entities
|
|
915
1226
|
await this.reloadArtifactsForMessage(data.conversationDetailId);
|
|
916
|
-
|
|
1227
|
+
const artifactList = this.artifactsByDetailId.get(data.conversationDetailId);
|
|
1228
|
+
// Auto-open artifact panel if no artifact currently shown
|
|
917
1229
|
if (!this.showArtifactPanel) {
|
|
918
|
-
|
|
919
|
-
|
|
1230
|
+
if (artifactList && artifactList.length > 0) {
|
|
1231
|
+
// Show the LAST (most recent) artifact - use actual ID from map, not empty event data
|
|
1232
|
+
this.selectedArtifactId = artifactList[artifactList.length - 1].artifactId;
|
|
1233
|
+
this.showArtifactPanel = true;
|
|
1234
|
+
}
|
|
920
1235
|
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1236
|
+
else if (this.selectedArtifactId && artifactList && artifactList.length > 0) {
|
|
1237
|
+
// Panel is already open - check if new artifact is a new version of currently displayed artifact
|
|
1238
|
+
const currentArtifact = artifactList.find(a => a.artifactId === this.selectedArtifactId);
|
|
1239
|
+
if (currentArtifact) {
|
|
1240
|
+
// New version of the same artifact - refresh to show latest version
|
|
1241
|
+
const latestVersion = artifactList[artifactList.length - 1];
|
|
1242
|
+
this.artifactViewerRefresh$.next({
|
|
1243
|
+
artifactId: latestVersion.artifactId,
|
|
1244
|
+
versionNumber: latestVersion.versionNumber
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
925
1247
|
}
|
|
926
1248
|
// Force change detection to update the UI immediately
|
|
927
1249
|
this.cdr.detectChanges();
|
|
@@ -1084,6 +1406,68 @@ export class ConversationChatAreaComponent {
|
|
|
1084
1406
|
element.scroll({ top: element.scrollHeight, behavior: 'smooth' });
|
|
1085
1407
|
}
|
|
1086
1408
|
}
|
|
1409
|
+
/**
|
|
1410
|
+
* Detect in-progress agent runs/tasks and reconnect to their streaming updates
|
|
1411
|
+
* Called after loading a conversation to resume progress tracking
|
|
1412
|
+
*/
|
|
1413
|
+
async detectAndReconnectToInProgressRuns(conversationId) {
|
|
1414
|
+
// Check for in-progress messages
|
|
1415
|
+
const inProgressMessages = this.messages.filter(m => m.Status === 'In-Progress' && m.Role === 'AI');
|
|
1416
|
+
if (inProgressMessages.length === 0) {
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
console.log(`🔄 Found ${inProgressMessages.length} in-progress messages, reconnecting...`);
|
|
1420
|
+
// For each in-progress message, check if there's an active agent run
|
|
1421
|
+
for (const message of inProgressMessages) {
|
|
1422
|
+
if (message.AgentID) {
|
|
1423
|
+
// Check agent state service for this run
|
|
1424
|
+
const agentRun = this.agentRunsByDetailId.get(message.ID);
|
|
1425
|
+
if (agentRun && agentRun.Status === 'Running') {
|
|
1426
|
+
console.log(`🔌 Reconnecting to agent run ${agentRun.ID} for message ${message.ID}`);
|
|
1427
|
+
// Agent state service polling will automatically pick this up
|
|
1428
|
+
// The WebSocket subscription is already active via PushStatusUpdates()
|
|
1429
|
+
// No additional action needed - just log for visibility
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
// Agent state service is already polling via startPolling() in onConversationChanged()
|
|
1434
|
+
// WebSocket subscription is already active via message-input component's subscribeToPushStatus()
|
|
1435
|
+
// Both will automatically receive updates for these in-progress runs
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* Handle intent check started - show temporary "Analyzing intent..." message
|
|
1439
|
+
*/
|
|
1440
|
+
async onIntentCheckStarted() {
|
|
1441
|
+
const md = new Metadata();
|
|
1442
|
+
const tempMessage = await md.GetEntityObject('Conversation Details', this.currentUser);
|
|
1443
|
+
// Create a temporary message that looks like an AI response in-progress
|
|
1444
|
+
tempMessage.Message = '🔍 Analyzing your request to determine the best agent...';
|
|
1445
|
+
tempMessage.Role = 'AI';
|
|
1446
|
+
tempMessage.Status = 'In-Progress';
|
|
1447
|
+
// Set created date using LoadFromData to bypass read-only protection
|
|
1448
|
+
tempMessage.LoadFromData({
|
|
1449
|
+
Message: tempMessage.Message,
|
|
1450
|
+
Role: tempMessage.Role,
|
|
1451
|
+
Status: tempMessage.Status,
|
|
1452
|
+
__mj_CreatedAt: new Date()
|
|
1453
|
+
});
|
|
1454
|
+
// No ID means it's temporary (won't be saved)
|
|
1455
|
+
this.intentCheckMessage = tempMessage;
|
|
1456
|
+
this.messages = [...this.messages, tempMessage];
|
|
1457
|
+
this.scrollToBottom = true;
|
|
1458
|
+
this.cdr.detectChanges();
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
* Handle intent check completed - remove temporary message
|
|
1462
|
+
*/
|
|
1463
|
+
onIntentCheckCompleted() {
|
|
1464
|
+
if (this.intentCheckMessage) {
|
|
1465
|
+
// Remove the temporary intent check message
|
|
1466
|
+
this.messages = this.messages.filter(m => m !== this.intentCheckMessage);
|
|
1467
|
+
this.intentCheckMessage = null;
|
|
1468
|
+
this.cdr.detectChanges();
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1087
1471
|
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), i0.ɵɵdirectiveInject(i5.MentionAutocompleteService)); };
|
|
1088
1472
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationChatAreaComponent, selectors: [["mj-conversation-chat-area"]], viewQuery: function ConversationChatAreaComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1089
1473
|
i0.ɵɵviewQuery(_c0, 5);
|
|
@@ -1094,60 +1478,48 @@ export class ConversationChatAreaComponent {
|
|
|
1094
1478
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.scrollContainer = _t.first);
|
|
1095
1479
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.messageInputComponent = _t.first);
|
|
1096
1480
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.artifactViewerComponent = _t.first);
|
|
1097
|
-
} }, inputs: { environmentId: "environmentId", currentUser: "currentUser" }, outputs: { conversationRenamed: "conversationRenamed", openEntityRecord: "openEntityRecord", taskClicked: "taskClicked" }, decls:
|
|
1098
|
-
const _r1 = i0.ɵɵgetCurrentView();
|
|
1481
|
+
} }, inputs: { environmentId: "environmentId", currentUser: "currentUser" }, outputs: { conversationRenamed: "conversationRenamed", openEntityRecord: "openEntityRecord", taskClicked: "taskClicked" }, decls: 13, vars: 15, consts: [["scrollContainer", ""], [1, "chat-area"], ["class", "chat-header", 4, "ngIf"], [1, "chat-content-area"], [1, "chat-messages-pane"], [1, "conversation-loading-state"], [1, "chat-messages-wrapper"], [3, "parentMessageId", "conversationId", "currentUser"], [3, "cancelled", "exported", "isVisible", "conversation", "currentUser"], [3, "cancelled", "membersChanged", "isVisible", "conversation", "currentUser"], [1, "modal-overlay"], [3, "isOpen", "environmentId", "currentUser", "excludeCollectionIds"], [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, "togglePanel", "agentSelected", "conversationId", "currentUser"], [1, "chat-actions"], [3, "taskClicked", "currentUser"], ["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, "loading-content"], [1, "fas", "fa-spinner", "fa-spin"], [1, "chat-messages-container", 3, "scroll"], [3, "replyInThread", "viewThread", "retryMessage", "artifactClicked", "messageEdited", "openEntityRecord", "suggestedResponseSelected", "messages", "conversation", "currentUser", "isProcessing", "artifactMap", "agentRunMap", "userAvatarMap"], ["class", "scroll-to-bottom-icon", "style", "left: 50%;", 3, "click", 4, "ngIf"], [1, "chat-input-container"], [1, "loading-peripheral-placeholder"], [3, "conversationId", "currentUser", "conversationHistory", "disabled"], [1, "scroll-to-bottom-icon", 2, "left", "50%", 3, "click"], [1, "fas", "fa-arrow-down"], [1, "loading-peripheral-content"], [3, "conversationId", "currentUser", "conversationHistory", "disabled", "messageSent", "agentResponse", "agentRunDetected", "agentRunUpdate", "messageComplete", "artifactCreated", "conversationRenamed", "intentCheckStarted", "intentCheckCompleted", 4, "ngIf"], [3, "messageSent", "agentResponse", "agentRunDetected", "agentRunUpdate", "messageComplete", "artifactCreated", "conversationRenamed", "intentCheckStarted", "intentCheckCompleted", "conversationId", "currentUser", "conversationHistory", "disabled"], [1, "resize-handle", 3, "mousedown"], [1, "chat-artifact-pane"], [3, "closed", "saveToCollectionRequested", "artifactId", "currentUser", "environmentId", "versionNumber", "refreshTrigger"], [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-header-actions"], ["title", "Toggle system artifacts visibility", 1, "toggle-system-btn", 3, "active"], [1, "modal-body", "artifacts-grid"], [1, "empty-state"], [1, "artifact-modal-card", 3, "expanded", "system-artifact"], ["title", "Toggle system artifacts visibility", 1, "toggle-system-btn", 3, "click"], [1, "fas", "fa-cog"], [1, "fas", "fa-cube", 2, "font-size", "48px", "color", "#D1D5DB", "margin-bottom", "16px"], [2, "color", "#6B7280", "font-size", "14px"], [1, "artifact-modal-card"], [1, "artifact-card-header", 3, "click"], [1, "artifact-modal-icon"], [1, "fas", "fa-file-code"], [1, "artifact-modal-info"], [1, "artifact-modal-title"], [1, "artifact-modal-meta"], [1, "expand-btn"], [1, "artifact-modal-action"], [1, "fas", "fa-external-link-alt"], [1, "artifact-versions-list"], [1, "expand-btn", 3, "click"], [1, "fas"], [1, "artifact-version-item"], [1, "artifact-version-item", 3, "click"], [1, "version-badge"], [1, "version-open-text"], [1, "fas", "fa-arrow-right"], [3, "saved", "cancelled", "isOpen", "environmentId", "currentUser", "excludeCollectionIds"]], template: function ConversationChatAreaComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1099
1482
|
i0.ɵɵelementStart(0, "div", 1);
|
|
1100
1483
|
i0.ɵɵtemplate(1, ConversationChatAreaComponent_div_1_Template, 19, 11, "div", 2);
|
|
1101
|
-
i0.ɵɵelementStart(2, "div", 3)(3, "div", 4)
|
|
1102
|
-
i0.ɵɵ
|
|
1103
|
-
i0.ɵɵelementStart(7, "mj-conversation-message-list", 7);
|
|
1104
|
-
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)); })("suggestedResponseSelected", function ConversationChatAreaComponent_Template_mj_conversation_message_list_suggestedResponseSelected_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSuggestedResponseSelected($event)); });
|
|
1484
|
+
i0.ɵɵelementStart(2, "div", 3)(3, "div", 4);
|
|
1485
|
+
i0.ɵɵtemplate(4, ConversationChatAreaComponent_Conditional_4_Template, 5, 0, "div", 5)(5, ConversationChatAreaComponent_Conditional_5_Template, 8, 9, "div", 6);
|
|
1105
1486
|
i0.ɵɵelementEnd();
|
|
1106
|
-
i0.ɵɵtemplate(
|
|
1107
|
-
i0.ɵɵelementEnd();
|
|
1108
|
-
i0.ɵɵelementStart(9, "div", 9);
|
|
1109
|
-
i0.ɵɵtemplate(10, ConversationChatAreaComponent_Conditional_10_Template, 5, 0, "div", 10)(11, ConversationChatAreaComponent_Conditional_11_Template, 1, 1, "mj-message-input", 11);
|
|
1110
|
-
i0.ɵɵelementEnd()()();
|
|
1111
|
-
i0.ɵɵtemplate(12, ConversationChatAreaComponent_Conditional_12_Template, 3, 7);
|
|
1487
|
+
i0.ɵɵtemplate(6, ConversationChatAreaComponent_Conditional_6_Template, 3, 7);
|
|
1112
1488
|
i0.ɵɵelementEnd()();
|
|
1113
|
-
i0.ɵɵtemplate(
|
|
1114
|
-
i0.ɵɵelementStart(
|
|
1115
|
-
i0.ɵɵlistener("cancelled", function
|
|
1489
|
+
i0.ɵɵtemplate(7, ConversationChatAreaComponent_Conditional_7_Template, 1, 3, "mj-thread-panel", 7);
|
|
1490
|
+
i0.ɵɵelementStart(8, "mj-export-modal", 8);
|
|
1491
|
+
i0.ɵɵlistener("cancelled", function ConversationChatAreaComponent_Template_mj_export_modal_cancelled_8_listener() { return ctx.onExportModalCancelled(); })("exported", function ConversationChatAreaComponent_Template_mj_export_modal_exported_8_listener() { return ctx.onExportModalComplete(); });
|
|
1116
1492
|
i0.ɵɵelementEnd();
|
|
1117
|
-
i0.ɵɵelementStart(
|
|
1118
|
-
i0.ɵɵlistener("cancelled", function
|
|
1493
|
+
i0.ɵɵelementStart(9, "mj-members-modal", 9);
|
|
1494
|
+
i0.ɵɵlistener("cancelled", function ConversationChatAreaComponent_Template_mj_members_modal_cancelled_9_listener() { return ctx.showMembersModal = false; })("membersChanged", function ConversationChatAreaComponent_Template_mj_members_modal_membersChanged_9_listener() { return ctx.showMembersModal = false; });
|
|
1119
1495
|
i0.ɵɵelementEnd();
|
|
1120
|
-
i0.ɵɵtemplate(
|
|
1496
|
+
i0.ɵɵtemplate(10, ConversationChatAreaComponent_Conditional_10_Template, 9, 3, "div", 10)(11, ConversationChatAreaComponent_Conditional_11_Template, 13, 2, "div", 10)(12, ConversationChatAreaComponent_Conditional_12_Template, 1, 4, "mj-artifact-collection-picker-modal", 11);
|
|
1121
1497
|
} if (rf & 2) {
|
|
1122
1498
|
i0.ɵɵadvance();
|
|
1123
1499
|
i0.ɵɵproperty("ngIf", ctx.conversationState.activeConversation);
|
|
1124
1500
|
i0.ɵɵadvance(2);
|
|
1125
1501
|
i0.ɵɵclassProp("full-width", !ctx.showArtifactPanel);
|
|
1126
|
-
i0.ɵɵadvance(4);
|
|
1127
|
-
i0.ɵɵproperty("messages", ctx.messages)("conversation", ctx.conversationState.activeConversation)("currentUser", ctx.currentUser)("isProcessing", ctx.isProcessing)("artifactMap", ctx.artifactsByDetailId)("agentRunMap", ctx.agentRunsByDetailId);
|
|
1128
1502
|
i0.ɵɵadvance();
|
|
1129
|
-
i0.ɵɵ
|
|
1130
|
-
i0.ɵɵadvance(2);
|
|
1131
|
-
i0.ɵɵconditional(ctx.isLoadingPeripheralData ? 10 : 11);
|
|
1503
|
+
i0.ɵɵconditional(ctx.isLoadingConversation && ctx.conversationState.activeConversation ? 4 : ctx.conversationState.activeConversation ? 5 : -1);
|
|
1132
1504
|
i0.ɵɵadvance(2);
|
|
1133
|
-
i0.ɵɵconditional(ctx.showArtifactPanel && ctx.selectedArtifactId ?
|
|
1505
|
+
i0.ɵɵconditional(ctx.showArtifactPanel && ctx.selectedArtifactId ? 6 : -1);
|
|
1134
1506
|
i0.ɵɵadvance();
|
|
1135
|
-
i0.ɵɵconditional(ctx.conversationState.activeThreadId ?
|
|
1507
|
+
i0.ɵɵconditional(ctx.conversationState.activeThreadId ? 7 : -1);
|
|
1136
1508
|
i0.ɵɵadvance();
|
|
1137
1509
|
i0.ɵɵproperty("isVisible", ctx.showExportModal)("conversation", ctx.conversationState.activeConversation || undefined)("currentUser", ctx.currentUser);
|
|
1138
1510
|
i0.ɵɵadvance();
|
|
1139
1511
|
i0.ɵɵproperty("isVisible", ctx.showMembersModal)("conversation", ctx.conversationState.activeConversation || undefined)("currentUser", ctx.currentUser);
|
|
1140
1512
|
i0.ɵɵadvance();
|
|
1141
|
-
i0.ɵɵconditional(ctx.showProjectSelector && ctx.conversationState.activeConversation ?
|
|
1513
|
+
i0.ɵɵconditional(ctx.showProjectSelector && ctx.conversationState.activeConversation ? 10 : -1);
|
|
1142
1514
|
i0.ɵɵadvance();
|
|
1143
|
-
i0.ɵɵconditional(ctx.showArtifactsModal ?
|
|
1515
|
+
i0.ɵɵconditional(ctx.showArtifactsModal ? 11 : -1);
|
|
1144
1516
|
i0.ɵɵadvance();
|
|
1145
|
-
i0.ɵɵconditional(ctx.showCollectionPicker ?
|
|
1146
|
-
} }, dependencies: [i6.NgIf, i7.ArtifactViewerPanelComponent, i8.ArtifactCollectionPickerModalComponent, i9.MessageListComponent, i10.MessageInputComponent, i11.ThreadPanelComponent, i12.ProjectSelectorComponent, i13.TasksDropdownComponent, i14.ActiveAgentIndicatorComponent, i15.MembersModalComponent, i16.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}\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 position: relative;\n}\n.scroll-to-bottom-icon[_ngcontent-%COMP%] {\n position: sticky;\n bottom: 21px; // 21px from bottom of visible scroll area (moved up 5px from original 16px)\n left: 50%;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n margin-top: -40px; // Negative margin to not affect scroll height\n margin-left: auto;\n margin-right: auto;\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 pointer-events: auto;\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\n//[_ngcontent-%COMP%] Loading[_ngcontent-%COMP%] placeholder[_ngcontent-%COMP%] -[_ngcontent-%COMP%] replaces[_ngcontent-%COMP%] input[_ngcontent-%COMP%] while[_ngcontent-%COMP%] loading\n.loading-peripheral-placeholder[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 140px; // Match typical input area height\n padding: 24px;\n background: rgba(255, 255, 255, 0.5);\n backdrop-filter: blur(2px);\n border-radius: 12px;\n margin: 12px;\n animation: _ngcontent-%COMP%_fadeIn 0.2s ease-in-out;\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 flex-direction: column;\n background: white;\n border: 1.5px solid #E5E7EB;\n border-radius: 12px;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n overflow: hidden;\n}\n.artifact-modal-card.expanded[_ngcontent-%COMP%] {\n border-color: #3B82F6;\n}\n.artifact-card-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n cursor: pointer;\n}\n.artifact-card-header[_ngcontent-%COMP%]:hover {\n background: #F9FAFB;\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}\n.expand-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: #6B7280;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s;\n\n &:hover {\n background: #F3F4F6;\n color: #3B82F6;\n }\n}\n.artifact-versions-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n border-top: 1px solid #E5E7EB;\n background: #F9FAFB;\n}\n.artifact-version-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px 12px 68px; // Indent to align with title\n cursor: pointer;\n transition: background 0.15s;\n\n &:hover {\n background: #F3F4F6;\n }\n\n .version-badge {\n display: inline-block;\n padding: 4px 8px;\n background: #EEF2FF;\n color: #4F46E5;\n font-size: 12px;\n font-weight: 600;\n font-family: monospace;\n border-radius: 4px;\n }\n\n .version-open-text {\n flex: 1;\n font-size: 13px;\n color: #6B7280;\n }\n\n i {\n color: #9CA3AF;\n font-size: 12px;\n }\n\n &:hover {\n .version-badge {\n background: #4F46E5;\n color: white;\n }\n .version-open-text {\n color: #3B82F6;\n }\n i {\n color: #3B82F6;\n }\n }\n}\n\n//[_ngcontent-%COMP%] Loading[_ngcontent-%COMP%] content[_ngcontent-%COMP%] styling\n.loading-peripheral-content[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px 24px;\n background: white;\n border: 2px solid #E5E7EB;\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);\n color: #4B5563;\n font-size: 14px;\n font-weight: 500;\n\n i {\n font-size: 20px;\n color: #9333EA;\n }\n}\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}"] });
|
|
1517
|
+
i0.ɵɵconditional(ctx.showCollectionPicker ? 12 : -1);
|
|
1518
|
+
} }, dependencies: [i6.NgIf, i7.ArtifactViewerPanelComponent, i8.ArtifactCollectionPickerModalComponent, i9.MessageListComponent, i10.MessageInputComponent, i11.ThreadPanelComponent, i12.ProjectSelectorComponent, i13.TasksDropdownComponent, i14.ActiveAgentIndicatorComponent, i15.MembersModalComponent, i16.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}\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 position: relative;\n}\n.scroll-to-bottom-icon[_ngcontent-%COMP%] {\n position: sticky;\n bottom: 21px; // 21px from bottom of visible scroll area (moved up 5px from original 16px)\n left: 50%;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n margin-top: -40px; // Negative margin to not affect scroll height\n margin-left: auto;\n margin-right: auto;\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 pointer-events: auto;\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\n//[_ngcontent-%COMP%] Loading[_ngcontent-%COMP%] placeholder[_ngcontent-%COMP%] -[_ngcontent-%COMP%] replaces[_ngcontent-%COMP%] input[_ngcontent-%COMP%] while[_ngcontent-%COMP%] loading\n.loading-peripheral-placeholder[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 140px; // Match typical input area height\n padding: 24px;\n background: rgba(255, 255, 255, 0.5);\n backdrop-filter: blur(2px);\n border-radius: 12px;\n margin: 12px;\n animation: _ngcontent-%COMP%_fadeIn 0.2s ease-in-out;\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-header-actions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.toggle-system-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n background: #F3F4F6;\n border: 1px solid #E5E7EB;\n cursor: pointer;\n color: #6B7280;\n padding: 6px 12px;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n transition: all 0.2s;\n}\n.toggle-system-btn[_ngcontent-%COMP%]:hover {\n background: #E5E7EB;\n border-color: #D1D5DB;\n color: #374151;\n}\n.toggle-system-btn.active[_ngcontent-%COMP%] {\n background: #3B82F6;\n border-color: #3B82F6;\n color: white;\n}\n.toggle-system-btn.active[_ngcontent-%COMP%]:hover {\n background: #2563EB;\n border-color: #2563EB;\n}\n.toggle-system-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 12px;\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 flex-direction: column;\n background: white;\n border: 1.5px solid #E5E7EB;\n border-radius: 12px;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n overflow: hidden;\n}\n.artifact-modal-card.expanded[_ngcontent-%COMP%] {\n border-color: #3B82F6;\n}\n.artifact-modal-card.system-artifact[_ngcontent-%COMP%] {\n opacity: 0.85;\n border-color: #D1D5DB;\n border-style: dashed;\n position: relative;\n}\n.artifact-modal-card.system-artifact[_ngcontent-%COMP%]::before {\n content: 'SYSTEM';\n position: absolute;\n top: 8px;\n right: 8px;\n font-size: 9px;\n font-weight: 600;\n color: #9CA3AF;\n background: #F3F4F6;\n padding: 2px 6px;\n border-radius: 3px;\n letter-spacing: 0.5px;\n z-index: 10;\n}\n.artifact-modal-card.system-artifact[_ngcontent-%COMP%]:hover {\n border-color: #9CA3AF;\n box-shadow: 0 4px 12px rgba(156, 163, 175, 0.15);\n}\n.artifact-card-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n cursor: pointer;\n}\n.artifact-card-header[_ngcontent-%COMP%]:hover {\n background: #F9FAFB;\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}\n.expand-btn[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: #6B7280;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s;\n\n &:hover {\n background: #F3F4F6;\n color: #3B82F6;\n }\n}\n.artifact-versions-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n border-top: 1px solid #E5E7EB;\n background: #F9FAFB;\n}\n.artifact-version-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px 12px 68px; // Indent to align with title\n cursor: pointer;\n transition: background 0.15s;\n\n &:hover {\n background: #F3F4F6;\n }\n\n .version-badge {\n display: inline-block;\n padding: 4px 8px;\n background: #EEF2FF;\n color: #4F46E5;\n font-size: 12px;\n font-weight: 600;\n font-family: monospace;\n border-radius: 4px;\n }\n\n .version-open-text {\n flex: 1;\n font-size: 13px;\n color: #6B7280;\n }\n\n i {\n color: #9CA3AF;\n font-size: 12px;\n }\n\n &:hover {\n .version-badge {\n background: #4F46E5;\n color: white;\n }\n .version-open-text {\n color: #3B82F6;\n }\n i {\n color: #3B82F6;\n }\n }\n}\n\n//[_ngcontent-%COMP%] Loading[_ngcontent-%COMP%] content[_ngcontent-%COMP%] styling\n.loading-peripheral-content[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px 24px;\n background: white;\n border: 2px solid #E5E7EB;\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);\n color: #4B5563;\n font-size: 14px;\n font-weight: 500;\n\n i {\n font-size: 20px;\n color: #9333EA;\n }\n}\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n//[_ngcontent-%COMP%] Loading[_ngcontent-%COMP%] conversation[_ngcontent-%COMP%] state[_ngcontent-%COMP%] -[_ngcontent-%COMP%] centered[_ngcontent-%COMP%] spinner\n.conversation-loading-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.loading-content[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-top: 20px;\n gap: 16px;\n color: #6B7280;\n font-size: 15px;\n\n i {\n font-size: 32px;\n color: #3B82F6;\n }\n\n span {\n font-weight: 500;\n }\n}"] });
|
|
1147
1519
|
}
|
|
1148
1520
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationChatAreaComponent, [{
|
|
1149
1521
|
type: Component,
|
|
1150
|
-
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-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 <mj-tasks-dropdown\n [currentUser]=\"currentUser\"\n (taskClicked)=\"onTaskClicked($event)\">\n </mj-tasks-dropdown>\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 (suggestedResponseSelected)=\"onSuggestedResponseSelected($event)\">\n </mj-conversation-message-list>\n\n <!-- Scroll to Bottom Icon (positioned within scroll container for proper centering) -->\n <span class=\"scroll-to-bottom-icon\" style=\"left: 50%;\"\n *ngIf=\"showScrollToBottomIcon && messages && messages.length > 0\"\n (click)=\"scrollToBottomAnimate()\">\n <i class=\"fas fa-arrow-down\"></i>\n </span>\n </div>\n\n <!-- Fixed Input Area -->\n <div class=\"chat-input-container\">\n @if (isLoadingPeripheralData) {\n <!-- Loading State -->\n <div class=\"loading-peripheral-placeholder\">\n <div class=\"loading-peripheral-content\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading conversation data...</span>\n </div>\n </div>\n } @else {\n <!-- Input Component -->\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 }\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 [environmentId]=\"environmentId\"\n [versionNumber]=\"selectedVersionNumber\"\n [refreshTrigger]=\"artifactViewerRefresh$\"\n (closed)=\"onCloseArtifactPanel()\"\n (saveToCollectionRequested)=\"onSaveToCollectionRequested($event)\">\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<!-- 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\" [class.expanded]=\"expandedArtifactId === artifact.artifactId\">\n <!-- Main card header - click to open latest version -->\n <div class=\"artifact-card-header\" (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\">\n @if (artifact.versionCount > 1) {\n {{artifact.versionCount}} versions\n } @else {\n 1 version\n }\n </div>\n </div>\n @if (artifact.versionCount > 1) {\n <button class=\"expand-btn\" (click)=\"toggleArtifactExpansion(artifact.artifactId, $event)\">\n <i class=\"fas\" [class.fa-chevron-down]=\"expandedArtifactId !== artifact.artifactId\"\n [class.fa-chevron-up]=\"expandedArtifactId === artifact.artifactId\"></i>\n </button>\n }\n <div class=\"artifact-modal-action\">\n <i class=\"fas fa-external-link-alt\"></i>\n </div>\n </div>\n\n <!-- Expanded version list -->\n @if (expandedArtifactId === artifact.artifactId && artifact.versionCount > 1) {\n <div class=\"artifact-versions-list\">\n @for (version of artifact.versions; track version.versionId) {\n <div class=\"artifact-version-item\" (click)=\"openArtifactFromModal(artifact.artifactId, version.versionNumber); $event.stopPropagation()\">\n <span class=\"version-badge\">v{{version.versionNumber}}</span>\n <span class=\"version-open-text\">Open this version</span>\n <i class=\"fas fa-arrow-right\"></i>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n\n<!-- Collection Picker Modal -->\n@if (showCollectionPicker) {\n <mj-artifact-collection-picker-modal\n [isOpen]=\"showCollectionPicker\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [excludeCollectionIds]=\"collectionPickerExcludedIds\"\n (saved)=\"onCollectionPickerSaved($event)\"\n (cancelled)=\"onCollectionPickerCancelled()\">\n </mj-artifact-collection-picker-modal>\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}\n.chat-messages-container {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: #FFF;\n min-height: 0;\n position: relative;\n}\n.scroll-to-bottom-icon {\n position: sticky;\n bottom: 21px; // 21px from bottom of visible scroll area (moved up 5px from original 16px)\n left: 50%;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n margin-top: -40px; // Negative margin to not affect scroll height\n margin-left: auto;\n margin-right: auto;\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 pointer-events: auto;\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\n// Loading placeholder - replaces input while loading\n.loading-peripheral-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 140px; // Match typical input area height\n padding: 24px;\n background: rgba(255, 255, 255, 0.5);\n backdrop-filter: blur(2px);\n border-radius: 12px;\n margin: 12px;\n animation: fadeIn 0.2s ease-in-out;\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 flex-direction: column;\n background: white;\n border: 1.5px solid #E5E7EB;\n border-radius: 12px;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n overflow: hidden;\n}\n.artifact-modal-card.expanded {\n border-color: #3B82F6;\n}\n.artifact-card-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n cursor: pointer;\n}\n.artifact-card-header:hover {\n background: #F9FAFB;\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}\n.expand-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: #6B7280;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s;\n\n &:hover {\n background: #F3F4F6;\n color: #3B82F6;\n }\n}\n.artifact-versions-list {\n display: flex;\n flex-direction: column;\n border-top: 1px solid #E5E7EB;\n background: #F9FAFB;\n}\n.artifact-version-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px 12px 68px; // Indent to align with title\n cursor: pointer;\n transition: background 0.15s;\n\n &:hover {\n background: #F3F4F6;\n }\n\n .version-badge {\n display: inline-block;\n padding: 4px 8px;\n background: #EEF2FF;\n color: #4F46E5;\n font-size: 12px;\n font-weight: 600;\n font-family: monospace;\n border-radius: 4px;\n }\n\n .version-open-text {\n flex: 1;\n font-size: 13px;\n color: #6B7280;\n }\n\n i {\n color: #9CA3AF;\n font-size: 12px;\n }\n\n &:hover {\n .version-badge {\n background: #4F46E5;\n color: white;\n }\n .version-open-text {\n color: #3B82F6;\n }\n i {\n color: #3B82F6;\n }\n }\n}\n\n// Loading content styling\n.loading-peripheral-content {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px 24px;\n background: white;\n border: 2px solid #E5E7EB;\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);\n color: #4B5563;\n font-size: 14px;\n font-weight: 500;\n\n i {\n font-size: 20px;\n color: #9333EA;\n }\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}"] }]
|
|
1522
|
+
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=\"artifactCountDisplay > 0\">\n <i class=\"fas fa-cube\"></i>\n <span>{{ artifactCountDisplay }} artifact{{ artifactCountDisplay !== 1 ? 's' : '' }}</span>\n </button>\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 <mj-tasks-dropdown\n [currentUser]=\"currentUser\"\n (taskClicked)=\"onTaskClicked($event)\">\n </mj-tasks-dropdown>\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 @if (isLoadingConversation && conversationState.activeConversation) {\n <!-- Loading State - Show centered spinner while conversation loads -->\n <div class=\"conversation-loading-state\">\n <div class=\"loading-content\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading conversation...</span>\n </div>\n </div>\n } @else if (conversationState.activeConversation) {\n <!-- Normal Message View -->\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]=\"effectiveArtifactsMap\"\n [agentRunMap]=\"agentRunsByDetailId\"\n [userAvatarMap]=\"userAvatarMap\"\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 (suggestedResponseSelected)=\"onSuggestedResponseSelected($event)\">\n </mj-conversation-message-list>\n\n <!-- Scroll to Bottom Icon (positioned within scroll container for proper centering) -->\n <span class=\"scroll-to-bottom-icon\" style=\"left: 50%;\"\n *ngIf=\"showScrollToBottomIcon && messages && messages.length > 0\"\n (click)=\"scrollToBottomAnimate()\">\n <i class=\"fas fa-arrow-down\"></i>\n </span>\n </div>\n\n <!-- Fixed Input Area -->\n <div class=\"chat-input-container\">\n @if (isLoadingPeripheralData) {\n <!-- Loading State -->\n <div class=\"loading-peripheral-placeholder\">\n <div class=\"loading-peripheral-content\">\n <i class=\"fas fa-spinner fa-spin\"></i>\n <span>Loading conversation data...</span>\n </div>\n </div>\n } @else {\n <!-- Input Component -->\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 (agentRunUpdate)=\"onAgentRunUpdate($event)\"\n (messageComplete)=\"onMessageComplete($event)\"\n (artifactCreated)=\"onArtifactCreated($event)\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (intentCheckStarted)=\"onIntentCheckStarted()\"\n (intentCheckCompleted)=\"onIntentCheckCompleted()\">\n </mj-message-input>\n }\n </div>\n </div>\n }\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 [environmentId]=\"environmentId\"\n [versionNumber]=\"selectedVersionNumber\"\n [refreshTrigger]=\"artifactViewerRefresh$\"\n (closed)=\"onCloseArtifactPanel()\"\n (saveToCollectionRequested)=\"onSaveToCollectionRequested($event)\">\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<!-- 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 <div class=\"modal-header-actions\">\n @if (hasSystemArtifacts) {\n <button class=\"toggle-system-btn\"\n [class.active]=\"showSystemArtifacts\"\n (click)=\"toggleSystemArtifacts()\"\n title=\"Toggle system artifacts visibility\">\n <i class=\"fas fa-cog\"></i>\n <span>{{ showSystemArtifacts ? 'Hide' : 'Show' }} System</span>\n </button>\n }\n <button class=\"modal-close-btn\" (click)=\"showArtifactsModal = false\">\n <i class=\"fas fa-times\"></i>\n </button>\n </div>\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\"\n [class.expanded]=\"expandedArtifactId === artifact.artifactId\"\n [class.system-artifact]=\"artifact.visibility === 'System Only'\">\n <!-- Main card header - click to open latest version -->\n <div class=\"artifact-card-header\" (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\">\n @if (artifact.versionCount > 1) {\n {{artifact.versionCount}} versions\n } @else {\n 1 version\n }\n </div>\n </div>\n @if (artifact.versionCount > 1) {\n <button class=\"expand-btn\" (click)=\"toggleArtifactExpansion(artifact.artifactId, $event)\">\n <i class=\"fas\" [class.fa-chevron-down]=\"expandedArtifactId !== artifact.artifactId\"\n [class.fa-chevron-up]=\"expandedArtifactId === artifact.artifactId\"></i>\n </button>\n }\n <div class=\"artifact-modal-action\">\n <i class=\"fas fa-external-link-alt\"></i>\n </div>\n </div>\n\n <!-- Expanded version list -->\n @if (expandedArtifactId === artifact.artifactId && artifact.versionCount > 1) {\n <div class=\"artifact-versions-list\">\n @for (version of artifact.versions; track version.versionId) {\n <div class=\"artifact-version-item\" (click)=\"openArtifactFromModal(artifact.artifactId, version.versionNumber); $event.stopPropagation()\">\n <span class=\"version-badge\">v{{version.versionNumber}}</span>\n <span class=\"version-open-text\">Open this version</span>\n <i class=\"fas fa-arrow-right\"></i>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n </div>\n </div>\n}\n\n<!-- Collection Picker Modal -->\n@if (showCollectionPicker) {\n <mj-artifact-collection-picker-modal\n [isOpen]=\"showCollectionPicker\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [excludeCollectionIds]=\"collectionPickerExcludedIds\"\n (saved)=\"onCollectionPickerSaved($event)\"\n (cancelled)=\"onCollectionPickerCancelled()\">\n </mj-artifact-collection-picker-modal>\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}\n.chat-messages-container {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n background: #FFF;\n min-height: 0;\n position: relative;\n}\n.scroll-to-bottom-icon {\n position: sticky;\n bottom: 21px; // 21px from bottom of visible scroll area (moved up 5px from original 16px)\n left: 50%;\n transform: translateX(-50%);\n width: 40px;\n height: 40px;\n margin-top: -40px; // Negative margin to not affect scroll height\n margin-left: auto;\n margin-right: auto;\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 pointer-events: auto;\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\n// Loading placeholder - replaces input while loading\n.loading-peripheral-placeholder {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 140px; // Match typical input area height\n padding: 24px;\n background: rgba(255, 255, 255, 0.5);\n backdrop-filter: blur(2px);\n border-radius: 12px;\n margin: 12px;\n animation: fadeIn 0.2s ease-in-out;\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-header-actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.toggle-system-btn {\n display: flex;\n align-items: center;\n gap: 6px;\n background: #F3F4F6;\n border: 1px solid #E5E7EB;\n cursor: pointer;\n color: #6B7280;\n padding: 6px 12px;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n transition: all 0.2s;\n}\n.toggle-system-btn:hover {\n background: #E5E7EB;\n border-color: #D1D5DB;\n color: #374151;\n}\n.toggle-system-btn.active {\n background: #3B82F6;\n border-color: #3B82F6;\n color: white;\n}\n.toggle-system-btn.active:hover {\n background: #2563EB;\n border-color: #2563EB;\n}\n.toggle-system-btn i {\n font-size: 12px;\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 flex-direction: column;\n background: white;\n border: 1.5px solid #E5E7EB;\n border-radius: 12px;\n transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n overflow: hidden;\n}\n.artifact-modal-card.expanded {\n border-color: #3B82F6;\n}\n.artifact-modal-card.system-artifact {\n opacity: 0.85;\n border-color: #D1D5DB;\n border-style: dashed;\n position: relative;\n}\n.artifact-modal-card.system-artifact::before {\n content: 'SYSTEM';\n position: absolute;\n top: 8px;\n right: 8px;\n font-size: 9px;\n font-weight: 600;\n color: #9CA3AF;\n background: #F3F4F6;\n padding: 2px 6px;\n border-radius: 3px;\n letter-spacing: 0.5px;\n z-index: 10;\n}\n.artifact-modal-card.system-artifact:hover {\n border-color: #9CA3AF;\n box-shadow: 0 4px 12px rgba(156, 163, 175, 0.15);\n}\n.artifact-card-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n cursor: pointer;\n}\n.artifact-card-header:hover {\n background: #F9FAFB;\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}\n.expand-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: #6B7280;\n cursor: pointer;\n border-radius: 6px;\n transition: all 0.2s;\n\n &:hover {\n background: #F3F4F6;\n color: #3B82F6;\n }\n}\n.artifact-versions-list {\n display: flex;\n flex-direction: column;\n border-top: 1px solid #E5E7EB;\n background: #F9FAFB;\n}\n.artifact-version-item {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px 12px 68px; // Indent to align with title\n cursor: pointer;\n transition: background 0.15s;\n\n &:hover {\n background: #F3F4F6;\n }\n\n .version-badge {\n display: inline-block;\n padding: 4px 8px;\n background: #EEF2FF;\n color: #4F46E5;\n font-size: 12px;\n font-weight: 600;\n font-family: monospace;\n border-radius: 4px;\n }\n\n .version-open-text {\n flex: 1;\n font-size: 13px;\n color: #6B7280;\n }\n\n i {\n color: #9CA3AF;\n font-size: 12px;\n }\n\n &:hover {\n .version-badge {\n background: #4F46E5;\n color: white;\n }\n .version-open-text {\n color: #3B82F6;\n }\n i {\n color: #3B82F6;\n }\n }\n}\n\n// Loading content styling\n.loading-peripheral-content {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px 24px;\n background: white;\n border: 2px solid #E5E7EB;\n border-radius: 12px;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);\n color: #4B5563;\n font-size: 14px;\n font-weight: 500;\n\n i {\n font-size: 20px;\n color: #9333EA;\n }\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n// Loading conversation state - centered spinner\n.conversation-loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n\n.loading-content {\n display: flex;\n flex-direction: column;\n align-items: center;\n padding-top: 20px;\n gap: 16px;\n color: #6B7280;\n font-size: 15px;\n\n i {\n font-size: 32px;\n color: #3B82F6;\n }\n\n span {\n font-weight: 500;\n }\n}\n"] }]
|
|
1151
1523
|
}], () => [{ type: i1.ConversationStateService }, { type: i2.AgentStateService }, { type: i3.ConversationAgentService }, { type: i4.ActiveTasksService }, { type: i0.ChangeDetectorRef }, { type: i5.MentionAutocompleteService }], { environmentId: [{
|
|
1152
1524
|
type: Input
|
|
1153
1525
|
}], currentUser: [{
|