@memberjunction/ng-conversations 6.1.1 → 6.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts +36 -1
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.d.ts.map +1 -1
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.js +23 -0
- package/dist/lib/components/realtime/channels/base-realtime-channel-client.js.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-activity-rail.component.js +2 -2
- package/dist/lib/components/realtime/realtime-activity-rail.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts +2 -2
- package/dist/lib/components/realtime/realtime-delegation-card.component.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-delegation-card.component.js +104 -72
- package/dist/lib/components/realtime/realtime-delegation-card.component.js.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.d.ts +11 -4
- package/dist/lib/components/realtime/realtime-session-state.d.ts.map +1 -1
- package/dist/lib/components/realtime/realtime-session-state.js +43 -1
- package/dist/lib/components/realtime/realtime-session-state.js.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts +58 -2
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js +154 -4
- package/dist/lib/components/realtime/remote-browser/remote-browser-channel.js.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts +51 -2
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.d.ts.map +1 -1
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js +285 -5
- package/dist/lib/components/realtime/whiteboard/whiteboard-channel.js.map +1 -1
- package/dist/lib/services/realtime-session.service.d.ts +39 -4
- package/dist/lib/services/realtime-session.service.d.ts.map +1 -1
- package/dist/lib/services/realtime-session.service.js +128 -8
- package/dist/lib/services/realtime-session.service.js.map +1 -1
- package/package.json +31 -31
|
@@ -20,6 +20,18 @@ function RealtimeDelegationCardComponent_Conditional_0_Conditional_2_Template(rf
|
|
|
20
20
|
} }
|
|
21
21
|
function RealtimeDelegationCardComponent_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
22
22
|
i0.ɵɵelementStart(0, "div", 15);
|
|
23
|
+
i0.ɵɵelement(1, "i", 16);
|
|
24
|
+
i0.ɵɵelementEnd();
|
|
25
|
+
i0.ɵɵelementStart(2, "div", 14);
|
|
26
|
+
i0.ɵɵtext(3);
|
|
27
|
+
i0.ɵɵelementEnd();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
30
|
+
i0.ɵɵadvance(3);
|
|
31
|
+
i0.ɵɵtextInterpolate1("", ctx_r0.Card.AgentName, " is thinking\u2026");
|
|
32
|
+
} }
|
|
33
|
+
function RealtimeDelegationCardComponent_Conditional_0_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
i0.ɵɵelementStart(0, "div", 17);
|
|
23
35
|
i0.ɵɵtext(1);
|
|
24
36
|
i0.ɵɵelementEnd();
|
|
25
37
|
i0.ɵɵelementStart(2, "div", 14);
|
|
@@ -32,23 +44,23 @@ function RealtimeDelegationCardComponent_Conditional_0_Conditional_3_Template(rf
|
|
|
32
44
|
i0.ɵɵadvance(2);
|
|
33
45
|
i0.ɵɵtextInterpolate1("", ctx_r0.Card.AgentName, " is working\u2026");
|
|
34
46
|
} }
|
|
35
|
-
function
|
|
47
|
+
function RealtimeDelegationCardComponent_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
36
48
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
37
|
-
i0.ɵɵelementStart(0, "button",
|
|
38
|
-
i0.ɵɵlistener("click", function
|
|
39
|
-
i0.ɵɵelement(1, "i",
|
|
49
|
+
i0.ɵɵelementStart(0, "button", 18);
|
|
50
|
+
i0.ɵɵlistener("click", function RealtimeDelegationCardComponent_Conditional_0_Conditional_8_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OpenRun($event)); });
|
|
51
|
+
i0.ɵɵelement(1, "i", 19);
|
|
40
52
|
i0.ɵɵelementStart(2, "span");
|
|
41
53
|
i0.ɵɵtext(3, "Open run");
|
|
42
54
|
i0.ɵɵelementEnd()();
|
|
43
55
|
} }
|
|
44
|
-
function
|
|
56
|
+
function RealtimeDelegationCardComponent_Conditional_0_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
45
57
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
46
|
-
i0.ɵɵelementStart(0, "button",
|
|
47
|
-
i0.ɵɵlistener("click", function
|
|
48
|
-
i0.ɵɵelement(1, "i",
|
|
58
|
+
i0.ɵɵelementStart(0, "button", 20);
|
|
59
|
+
i0.ɵɵlistener("click", function RealtimeDelegationCardComponent_Conditional_0_Conditional_9_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.CancelWork($event)); });
|
|
60
|
+
i0.ɵɵelement(1, "i", 21);
|
|
49
61
|
i0.ɵɵelementEnd();
|
|
50
62
|
} }
|
|
51
|
-
function
|
|
63
|
+
function RealtimeDelegationCardComponent_Conditional_0_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
52
64
|
i0.ɵɵelementStart(0, "div", 8);
|
|
53
65
|
i0.ɵɵtext(1);
|
|
54
66
|
i0.ɵɵelementEnd();
|
|
@@ -57,72 +69,75 @@ function RealtimeDelegationCardComponent_Conditional_0_Conditional_11_Template(r
|
|
|
57
69
|
i0.ɵɵadvance();
|
|
58
70
|
i0.ɵɵtextInterpolate(ctx_r0.Card.LatestMessage);
|
|
59
71
|
} }
|
|
60
|
-
function
|
|
61
|
-
i0.ɵɵelement(0, "div",
|
|
72
|
+
function RealtimeDelegationCardComponent_Conditional_0_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0.ɵɵelement(0, "div", 22);
|
|
62
74
|
} if (rf & 2) {
|
|
63
75
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
64
76
|
i0.ɵɵstyleProp("width", ctx_r0.Card.Percentage, "%");
|
|
65
77
|
} }
|
|
66
|
-
function
|
|
78
|
+
function RealtimeDelegationCardComponent_Conditional_0_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
67
79
|
i0.ɵɵelement(0, "div", 11);
|
|
68
80
|
} }
|
|
69
81
|
function RealtimeDelegationCardComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
70
82
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 2);
|
|
71
|
-
i0.ɵɵconditionalCreate(2, RealtimeDelegationCardComponent_Conditional_0_Conditional_2_Template, 4, 1)(3, RealtimeDelegationCardComponent_Conditional_0_Conditional_3_Template, 4, 2);
|
|
72
|
-
i0.ɵɵelementStart(
|
|
73
|
-
i0.ɵɵelement(
|
|
74
|
-
i0.ɵɵtext(
|
|
83
|
+
i0.ɵɵconditionalCreate(2, RealtimeDelegationCardComponent_Conditional_0_Conditional_2_Template, 4, 1)(3, RealtimeDelegationCardComponent_Conditional_0_Conditional_3_Template, 4, 1)(4, RealtimeDelegationCardComponent_Conditional_0_Conditional_4_Template, 4, 2);
|
|
84
|
+
i0.ɵɵelementStart(5, "span", 3);
|
|
85
|
+
i0.ɵɵelement(6, "i", 4);
|
|
86
|
+
i0.ɵɵtext(7, " Running ");
|
|
75
87
|
i0.ɵɵelementEnd();
|
|
76
|
-
i0.ɵɵconditionalCreate(
|
|
77
|
-
i0.ɵɵconditionalCreate(
|
|
88
|
+
i0.ɵɵconditionalCreate(8, RealtimeDelegationCardComponent_Conditional_0_Conditional_8_Template, 4, 0, "button", 5);
|
|
89
|
+
i0.ɵɵconditionalCreate(9, RealtimeDelegationCardComponent_Conditional_0_Conditional_9_Template, 2, 0, "button", 6);
|
|
78
90
|
i0.ɵɵelementEnd();
|
|
79
|
-
i0.ɵɵelementStart(
|
|
80
|
-
i0.ɵɵtext(
|
|
91
|
+
i0.ɵɵelementStart(10, "div", 7);
|
|
92
|
+
i0.ɵɵtext(11);
|
|
81
93
|
i0.ɵɵelementEnd();
|
|
82
|
-
i0.ɵɵconditionalCreate(
|
|
83
|
-
i0.ɵɵelementStart(
|
|
84
|
-
i0.ɵɵconditionalCreate(
|
|
94
|
+
i0.ɵɵconditionalCreate(12, RealtimeDelegationCardComponent_Conditional_0_Conditional_12_Template, 2, 1, "div", 8);
|
|
95
|
+
i0.ɵɵelementStart(13, "div", 9);
|
|
96
|
+
i0.ɵɵconditionalCreate(14, RealtimeDelegationCardComponent_Conditional_0_Conditional_14_Template, 1, 2, "div", 10)(15, RealtimeDelegationCardComponent_Conditional_0_Conditional_15_Template, 1, 0, "div", 11);
|
|
85
97
|
i0.ɵɵelementEnd()();
|
|
86
98
|
} if (rf & 2) {
|
|
87
99
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
88
100
|
i0.ɵɵadvance(2);
|
|
89
|
-
i0.ɵɵconditional(ctx_r0.Card.Kind === "action" ? 2 : 3);
|
|
90
|
-
i0.ɵɵadvance(
|
|
91
|
-
i0.ɵɵconditional(ctx_r0.ShowOpenRun ?
|
|
101
|
+
i0.ɵɵconditional(ctx_r0.Card.Kind === "action" ? 2 : ctx_r0.Card.Kind === "narration" ? 3 : 4);
|
|
102
|
+
i0.ɵɵadvance(6);
|
|
103
|
+
i0.ɵɵconditional(ctx_r0.ShowOpenRun ? 8 : -1);
|
|
92
104
|
i0.ɵɵadvance();
|
|
93
|
-
i0.ɵɵconditional(ctx_r0.Card.Kind
|
|
105
|
+
i0.ɵɵconditional(ctx_r0.Card.Kind === "agent" ? 9 : -1);
|
|
94
106
|
i0.ɵɵadvance(2);
|
|
95
107
|
i0.ɵɵtextInterpolate(ctx_r0.StepLabel);
|
|
96
108
|
i0.ɵɵadvance();
|
|
97
|
-
i0.ɵɵconditional(ctx_r0.ShowDetailLine ?
|
|
109
|
+
i0.ɵɵconditional(ctx_r0.ShowDetailLine ? 12 : -1);
|
|
98
110
|
i0.ɵɵadvance();
|
|
99
111
|
i0.ɵɵclassProp("work-progress--indeterminate", ctx_r0.Card.Percentage == null);
|
|
100
112
|
i0.ɵɵadvance();
|
|
101
|
-
i0.ɵɵconditional(ctx_r0.Card.Percentage != null ?
|
|
113
|
+
i0.ɵɵconditional(ctx_r0.Card.Percentage != null ? 14 : 15);
|
|
102
114
|
} }
|
|
103
115
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_9_Template(rf, ctx) { if (rf & 1) {
|
|
104
116
|
i0.ɵɵtext(0, " tool ");
|
|
105
117
|
} }
|
|
106
118
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
119
|
+
i0.ɵɵtext(0, " narration ");
|
|
120
|
+
} }
|
|
121
|
+
function RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
107
122
|
i0.ɵɵtext(0);
|
|
108
123
|
} if (rf & 2) {
|
|
109
124
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
110
125
|
i0.ɵɵtextInterpolate1(" via ", ctx_r0.Card.AgentName, " ");
|
|
111
126
|
} }
|
|
112
127
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Template(rf, ctx) { if (rf & 1) {
|
|
113
|
-
i0.ɵɵelement(0, "i",
|
|
114
|
-
i0.ɵɵelementStart(1, "span",
|
|
128
|
+
i0.ɵɵelement(0, "i", 27);
|
|
129
|
+
i0.ɵɵelementStart(1, "span", 28);
|
|
115
130
|
i0.ɵɵtext(2);
|
|
116
131
|
i0.ɵɵelementEnd();
|
|
117
|
-
i0.ɵɵelementStart(3, "span",
|
|
132
|
+
i0.ɵɵelementStart(3, "span", 29);
|
|
118
133
|
i0.ɵɵtext(4, "\u00B7");
|
|
119
134
|
i0.ɵɵelementEnd();
|
|
120
|
-
i0.ɵɵelementStart(5, "span",
|
|
135
|
+
i0.ɵɵelementStart(5, "span", 30);
|
|
121
136
|
i0.ɵɵtext(6);
|
|
122
137
|
i0.ɵɵelementEnd();
|
|
123
|
-
i0.ɵɵelementStart(7, "span",
|
|
124
|
-
i0.ɵɵelement(8, "i",
|
|
125
|
-
i0.ɵɵconditionalCreate(9, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_9_Template, 1, 0)(10, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_10_Template, 1, 1);
|
|
138
|
+
i0.ɵɵelementStart(7, "span", 31);
|
|
139
|
+
i0.ɵɵelement(8, "i", 32);
|
|
140
|
+
i0.ɵɵconditionalCreate(9, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_9_Template, 1, 0)(10, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_10_Template, 1, 0)(11, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Conditional_11_Template, 1, 1);
|
|
126
141
|
i0.ɵɵelementEnd();
|
|
127
142
|
} if (rf & 2) {
|
|
128
143
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
@@ -134,17 +149,17 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Template(rf
|
|
|
134
149
|
i0.ɵɵadvance(2);
|
|
135
150
|
i0.ɵɵproperty("title", ctx_r0.ProvenanceTitle);
|
|
136
151
|
i0.ɵɵadvance();
|
|
137
|
-
i0.ɵɵconditional(ctx_r0.Card.Kind === "action" ? 9 : 10);
|
|
152
|
+
i0.ɵɵconditional(ctx_r0.Card.Kind === "action" ? 9 : ctx_r0.Card.Kind === "narration" ? 10 : 11);
|
|
138
153
|
} }
|
|
139
154
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_For_1_Template(rf, ctx) { if (rf & 1) {
|
|
140
155
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
141
|
-
i0.ɵɵelementStart(0, "button",
|
|
156
|
+
i0.ɵɵelementStart(0, "button", 34);
|
|
142
157
|
i0.ɵɵlistener("click", function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_For_1_Template_button_click_0_listener($event) { const artifact_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OpenArtifact($event, artifact_r6)); });
|
|
143
|
-
i0.ɵɵelement(1, "i",
|
|
158
|
+
i0.ɵɵelement(1, "i", 35);
|
|
144
159
|
i0.ɵɵelementStart(2, "span");
|
|
145
160
|
i0.ɵɵtext(3, "View");
|
|
146
161
|
i0.ɵɵelementEnd();
|
|
147
|
-
i0.ɵɵelement(4, "i",
|
|
162
|
+
i0.ɵɵelement(4, "i", 36);
|
|
148
163
|
i0.ɵɵelementEnd();
|
|
149
164
|
} if (rf & 2) {
|
|
150
165
|
const artifact_r6 = ctx.$implicit;
|
|
@@ -152,15 +167,15 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_For_1_Templ
|
|
|
152
167
|
} }
|
|
153
168
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
154
169
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
155
|
-
i0.ɵɵelementStart(0, "button",
|
|
170
|
+
i0.ɵɵelementStart(0, "button", 18);
|
|
156
171
|
i0.ɵɵlistener("click", function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_Conditional_2_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OpenRun($event)); });
|
|
157
|
-
i0.ɵɵelement(1, "i",
|
|
172
|
+
i0.ɵɵelement(1, "i", 19);
|
|
158
173
|
i0.ɵɵelementStart(2, "span");
|
|
159
174
|
i0.ɵɵtext(3, "Open run");
|
|
160
175
|
i0.ɵɵelementEnd()();
|
|
161
176
|
} }
|
|
162
177
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
163
|
-
i0.ɵɵrepeaterCreate(0, RealtimeDelegationCardComponent_Conditional_1_ng_template_2_For_1_Template, 5, 1, "button",
|
|
178
|
+
i0.ɵɵrepeaterCreate(0, RealtimeDelegationCardComponent_Conditional_1_ng_template_2_For_1_Template, 5, 1, "button", 33, _forTrack0);
|
|
164
179
|
i0.ɵɵconditionalCreate(2, RealtimeDelegationCardComponent_Conditional_1_ng_template_2_Conditional_2_Template, 4, 0, "button", 5);
|
|
165
180
|
} if (rf & 2) {
|
|
166
181
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
@@ -170,13 +185,13 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_2_Template(rf
|
|
|
170
185
|
} }
|
|
171
186
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_For_4_Template(rf, ctx) { if (rf & 1) {
|
|
172
187
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
173
|
-
i0.ɵɵelementStart(0, "button",
|
|
188
|
+
i0.ɵɵelementStart(0, "button", 41);
|
|
174
189
|
i0.ɵɵlistener("click", function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_For_4_Template_button_click_0_listener($event) { const artifact_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.OpenArtifact($event, artifact_r9)); });
|
|
175
|
-
i0.ɵɵelement(1, "i",
|
|
190
|
+
i0.ɵɵelement(1, "i", 35);
|
|
176
191
|
i0.ɵɵelementStart(2, "span");
|
|
177
192
|
i0.ɵɵtext(3);
|
|
178
193
|
i0.ɵɵelementEnd();
|
|
179
|
-
i0.ɵɵelement(4, "i",
|
|
194
|
+
i0.ɵɵelement(4, "i", 36);
|
|
180
195
|
i0.ɵɵelementEnd();
|
|
181
196
|
} if (rf & 2) {
|
|
182
197
|
const artifact_r9 = ctx.$implicit;
|
|
@@ -185,8 +200,8 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_For_4_Templ
|
|
|
185
200
|
i0.ɵɵtextInterpolate(artifact_r9.Name);
|
|
186
201
|
} }
|
|
187
202
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
188
|
-
i0.ɵɵelementStart(0, "div",
|
|
189
|
-
i0.ɵɵelement(1, "i",
|
|
203
|
+
i0.ɵɵelementStart(0, "div", 40);
|
|
204
|
+
i0.ɵɵelement(1, "i", 32);
|
|
190
205
|
i0.ɵɵtext(2);
|
|
191
206
|
i0.ɵɵelementEnd();
|
|
192
207
|
} if (rf & 2) {
|
|
@@ -196,20 +211,32 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional
|
|
|
196
211
|
i0.ɵɵadvance();
|
|
197
212
|
i0.ɵɵtextInterpolate1(" Direct action \u00B7 ", ctx_r0.Card.AgentName, " ");
|
|
198
213
|
} }
|
|
199
|
-
function
|
|
214
|
+
function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
215
|
+
i0.ɵɵelementStart(0, "div", 40);
|
|
216
|
+
i0.ɵɵelement(1, "i", 42);
|
|
217
|
+
i0.ɵɵtext(2);
|
|
218
|
+
i0.ɵɵelementEnd();
|
|
219
|
+
} if (rf & 2) {
|
|
220
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
221
|
+
i0.ɵɵadvance();
|
|
222
|
+
i0.ɵɵproperty("title", ctx_r0.ProvenanceTitle);
|
|
223
|
+
i0.ɵɵadvance();
|
|
224
|
+
i0.ɵɵtextInterpolate1(" Thought narration \u00B7 ", ctx_r0.Card.AgentName, " ");
|
|
225
|
+
} }
|
|
226
|
+
function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_7_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
200
227
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
201
|
-
i0.ɵɵelementStart(0, "button",
|
|
202
|
-
i0.ɵɵlistener("click", function
|
|
203
|
-
i0.ɵɵelement(1, "i",
|
|
228
|
+
i0.ɵɵelementStart(0, "button", 44);
|
|
229
|
+
i0.ɵɵlistener("click", function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_7_Conditional_3_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.OpenRun($event)); });
|
|
230
|
+
i0.ɵɵelement(1, "i", 19);
|
|
204
231
|
i0.ɵɵelementStart(2, "span");
|
|
205
232
|
i0.ɵɵtext(3, "Open run");
|
|
206
233
|
i0.ɵɵelementEnd()();
|
|
207
234
|
} }
|
|
208
|
-
function
|
|
209
|
-
i0.ɵɵelementStart(0, "div",
|
|
210
|
-
i0.ɵɵelement(1, "i",
|
|
235
|
+
function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
+
i0.ɵɵelementStart(0, "div", 40);
|
|
237
|
+
i0.ɵɵelement(1, "i", 32);
|
|
211
238
|
i0.ɵɵtext(2);
|
|
212
|
-
i0.ɵɵconditionalCreate(3,
|
|
239
|
+
i0.ɵɵconditionalCreate(3, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_7_Conditional_3_Template, 4, 0, "button", 43);
|
|
213
240
|
i0.ɵɵelementEnd();
|
|
214
241
|
} if (rf & 2) {
|
|
215
242
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
@@ -221,11 +248,11 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional
|
|
|
221
248
|
i0.ɵɵconditional(ctx_r0.ShowOpenRun ? 3 : -1);
|
|
222
249
|
} }
|
|
223
250
|
function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
224
|
-
i0.ɵɵelementStart(0, "div",
|
|
251
|
+
i0.ɵɵelementStart(0, "div", 37)(1, "div", 38);
|
|
225
252
|
i0.ɵɵtext(2);
|
|
226
253
|
i0.ɵɵelementEnd();
|
|
227
|
-
i0.ɵɵrepeaterCreate(3, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_For_4_Template, 5, 2, "button",
|
|
228
|
-
i0.ɵɵconditionalCreate(5, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_5_Template, 3, 2, "div",
|
|
254
|
+
i0.ɵɵrepeaterCreate(3, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_For_4_Template, 5, 2, "button", 39, _forTrack0);
|
|
255
|
+
i0.ɵɵconditionalCreate(5, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_5_Template, 3, 2, "div", 40)(6, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_6_Template, 3, 2, "div", 40)(7, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Conditional_7_Template, 4, 4, "div", 40);
|
|
229
256
|
i0.ɵɵelementEnd();
|
|
230
257
|
} if (rf & 2) {
|
|
231
258
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
@@ -234,13 +261,13 @@ function RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Template(rf
|
|
|
234
261
|
i0.ɵɵadvance();
|
|
235
262
|
i0.ɵɵrepeater(ctx_r0.Artifacts);
|
|
236
263
|
i0.ɵɵadvance(2);
|
|
237
|
-
i0.ɵɵconditional(ctx_r0.Card.Kind === "action" ? 5 : ctx_r0.Card.
|
|
264
|
+
i0.ɵɵconditional(ctx_r0.Card.Kind === "action" ? 5 : ctx_r0.Card.Kind === "narration" ? 6 : ctx_r0.Card.RunRef ? 7 : -1);
|
|
238
265
|
} }
|
|
239
266
|
function RealtimeDelegationCardComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
240
267
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
241
|
-
i0.ɵɵelementStart(0, "mj-accordion-panel",
|
|
268
|
+
i0.ɵɵelementStart(0, "mj-accordion-panel", 23);
|
|
242
269
|
i0.ɵɵtwoWayListener("ExpandedChange", function RealtimeDelegationCardComponent_Conditional_1_Template_mj_accordion_panel_ExpandedChange_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.Expanded, $event) || (ctx_r0.Expanded = $event); return i0.ɵɵresetView($event); });
|
|
243
|
-
i0.ɵɵtemplate(1, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Template,
|
|
270
|
+
i0.ɵɵtemplate(1, RealtimeDelegationCardComponent_Conditional_1_ng_template_1_Template, 12, 5, "ng-template", 24)(2, RealtimeDelegationCardComponent_Conditional_1_ng_template_2_Template, 3, 1, "ng-template", 25)(3, RealtimeDelegationCardComponent_Conditional_1_ng_template_3_Template, 8, 2, "ng-template", 26);
|
|
244
271
|
i0.ɵɵelementEnd();
|
|
245
272
|
} if (rf & 2) {
|
|
246
273
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
@@ -286,18 +313,18 @@ export class RealtimeDelegationCardComponent {
|
|
|
286
313
|
CancelRequested = new EventEmitter();
|
|
287
314
|
/** Whether the done chip is expanded inline to show the full result text. */
|
|
288
315
|
Expanded = false;
|
|
289
|
-
/** The artifacts this (done) delegation produced (empty array while running / when none). Suppressed for direct actions. */
|
|
316
|
+
/** The artifacts this (done) delegation produced (empty array while running / when none). Suppressed for direct actions and narration. */
|
|
290
317
|
get Artifacts() {
|
|
291
|
-
return this.Card.Done && this.Card.Kind
|
|
318
|
+
return this.Card.Done && this.Card.Kind === 'agent' && this.Card.Artifacts ? this.Card.Artifacts : [];
|
|
292
319
|
}
|
|
293
320
|
/** Emits the open-artifact request for one of this card's produced artifacts. */
|
|
294
321
|
OpenArtifact(event, artifact) {
|
|
295
322
|
event.stopPropagation();
|
|
296
323
|
this.OpenArtifactRequested.emit(artifact);
|
|
297
324
|
}
|
|
298
|
-
/** True when the dev "Open run" link should render (gear on + run id known). Suppressed for direct actions. */
|
|
325
|
+
/** True when the dev "Open run" link should render (gear on + run id known). Suppressed for direct actions and narration. */
|
|
299
326
|
get ShowOpenRun() {
|
|
300
|
-
return this.DevMode && this.Card.Kind
|
|
327
|
+
return this.DevMode && this.Card.Kind === 'agent' && !!this.Card.RunID;
|
|
301
328
|
}
|
|
302
329
|
/** Emits the open-run request for this card's delegated run. */
|
|
303
330
|
OpenRun(event) {
|
|
@@ -309,7 +336,7 @@ export class RealtimeDelegationCardComponent {
|
|
|
309
336
|
/** Emits the cancel request for this (still-working) delegation. */
|
|
310
337
|
CancelWork(event) {
|
|
311
338
|
event.stopPropagation();
|
|
312
|
-
if (!this.Card.Done) {
|
|
339
|
+
if (!this.Card.Done && this.Card.Kind === 'agent') {
|
|
313
340
|
this.CancelRequested.emit(this.Card.CallID);
|
|
314
341
|
}
|
|
315
342
|
}
|
|
@@ -330,7 +357,9 @@ export class RealtimeDelegationCardComponent {
|
|
|
330
357
|
|| this.Card.LatestMessage
|
|
331
358
|
|| (this.Card.Kind === 'action'
|
|
332
359
|
? `${this.Card.AgentName} executed.`
|
|
333
|
-
:
|
|
360
|
+
: this.Card.Kind === 'narration'
|
|
361
|
+
? `${this.Card.AgentName} shared a thought.`
|
|
362
|
+
: `${this.Card.AgentName} completed the delegated work.`);
|
|
334
363
|
}
|
|
335
364
|
/** One-line, ~120-char preview of the result for the collapsed chip. */
|
|
336
365
|
get ResultPreview() {
|
|
@@ -343,19 +372,22 @@ export class RealtimeDelegationCardComponent {
|
|
|
343
372
|
if (this.Card.Kind === 'action') {
|
|
344
373
|
return `Result produced directly by the ${this.Card.AgentName} action.`;
|
|
345
374
|
}
|
|
375
|
+
if (this.Card.Kind === 'narration') {
|
|
376
|
+
return `Thought / narration authored by ${this.Card.AgentName}.`;
|
|
377
|
+
}
|
|
346
378
|
const run = this.Card.RunRef ? ` (run ${this.Card.RunRef})` : '';
|
|
347
379
|
return `Result produced by ${this.Card.AgentName}'s own agent run${run} — not invented by the voice co-agent.`;
|
|
348
380
|
}
|
|
349
381
|
static ɵfac = function RealtimeDelegationCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RealtimeDelegationCardComponent)(); };
|
|
350
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RealtimeDelegationCardComponent, selectors: [["mj-realtime-delegation-card"]], inputs: { Card: "Card", DevMode: "DevMode" }, outputs: { OpenRunRequested: "OpenRunRequested", OpenArtifactRequested: "OpenArtifactRequested", CancelRequested: "CancelRequested" }, decls: 2, vars: 1, consts: [["role", "status", "aria-live", "polite", 1, "work-card"], ["Size", "sm", 1, "done-accordion", 3, "done-accordion--failed", "FlushBody", "Expanded"], [1, "work-card__head"], [1, "pill", "pill--running"], ["aria-hidden", "true", 1, "fa-solid", "fa-spinner", "spin"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link"], ["type", "button", "title", "Cancel this work", "aria-label", "Cancel this work", 1, "cancel-work"], [1, "work-card__step"], [1, "work-card__detail"], [1, "work-progress"], [1, "work-progress__fill", 3, "width"], [1, "work-progress__fill", "work-progress__fill--slide"], ["aria-hidden", "true", 1, "avatar", "avatar--action"], [1, "fa-solid", "fa-wrench"], [1, "work-card__title"], ["aria-hidden", "true", 1, "avatar"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-up-right-from-square"], ["type", "button", "title", "Cancel this work", "aria-label", "Cancel this work", 1, "cancel-work", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-xmark"], [1, "work-progress__fill"], ["Size", "sm", 1, "done-accordion", 3, "ExpandedChange", "FlushBody", "Expanded"], ["mjAccordionTitle", ""], ["mjAccordionActions", ""], ["mjAccordionBody", ""], ["aria-hidden", "true", 1, "fa-solid", "done-chip__mark", 3, "ngClass"], [1, "done-chip__agent"], ["aria-hidden", "true", 1, "done-chip__sep"], [1, "done-chip__preview"], [1, "via-badge"], ["aria-hidden", "true", 1, "fa-solid", "fa-shield-halved", 3, "title"], ["type", "button", 1, "artifact-link", 3, "title"], ["type", "button", 1, "artifact-link", 3, "click", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-file-lines"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-right"], [1, "done-detail"], [1, "done-detail__body"], ["type", "button", 1, "artifact-link", "artifact-link--detail", 3, "title"], [1, "done-detail__meta"], ["type", "button", 1, "artifact-link", "artifact-link--detail", 3, "click", "title"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link", "dev-link--inline"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link", "dev-link--inline", 3, "click"]], template: function RealtimeDelegationCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
351
|
-
i0.ɵɵconditionalCreate(0, RealtimeDelegationCardComponent_Conditional_0_Template,
|
|
382
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RealtimeDelegationCardComponent, selectors: [["mj-realtime-delegation-card"]], inputs: { Card: "Card", DevMode: "DevMode" }, outputs: { OpenRunRequested: "OpenRunRequested", OpenArtifactRequested: "OpenArtifactRequested", CancelRequested: "CancelRequested" }, decls: 2, vars: 1, consts: [["role", "status", "aria-live", "polite", 1, "work-card"], ["Size", "sm", 1, "done-accordion", 3, "done-accordion--failed", "FlushBody", "Expanded"], [1, "work-card__head"], [1, "pill", "pill--running"], ["aria-hidden", "true", 1, "fa-solid", "fa-spinner", "spin"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link"], ["type", "button", "title", "Cancel this work", "aria-label", "Cancel this work", 1, "cancel-work"], [1, "work-card__step"], [1, "work-card__detail"], [1, "work-progress"], [1, "work-progress__fill", 3, "width"], [1, "work-progress__fill", "work-progress__fill--slide"], ["aria-hidden", "true", 1, "avatar", "avatar--action"], [1, "fa-solid", "fa-wrench"], [1, "work-card__title"], ["aria-hidden", "true", 1, "avatar", "avatar--narration"], [1, "fa-solid", "fa-brain"], ["aria-hidden", "true", 1, "avatar"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-up-right-from-square"], ["type", "button", "title", "Cancel this work", "aria-label", "Cancel this work", 1, "cancel-work", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-xmark"], [1, "work-progress__fill"], ["Size", "sm", 1, "done-accordion", 3, "ExpandedChange", "FlushBody", "Expanded"], ["mjAccordionTitle", ""], ["mjAccordionActions", ""], ["mjAccordionBody", ""], ["aria-hidden", "true", 1, "fa-solid", "done-chip__mark", 3, "ngClass"], [1, "done-chip__agent"], ["aria-hidden", "true", 1, "done-chip__sep"], [1, "done-chip__preview"], [1, "via-badge"], ["aria-hidden", "true", 1, "fa-solid", "fa-shield-halved", 3, "title"], ["type", "button", 1, "artifact-link", 3, "title"], ["type", "button", 1, "artifact-link", 3, "click", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-file-lines"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-right"], [1, "done-detail"], [1, "done-detail__body"], ["type", "button", 1, "artifact-link", "artifact-link--detail", 3, "title"], [1, "done-detail__meta"], ["type", "button", 1, "artifact-link", "artifact-link--detail", 3, "click", "title"], ["aria-hidden", "true", 1, "fa-solid", "fa-brain", 3, "title"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link", "dev-link--inline"], ["type", "button", "title", "Open the delegated agent run record", 1, "dev-link", "dev-link--inline", 3, "click"]], template: function RealtimeDelegationCardComponent_Template(rf, ctx) { if (rf & 1) {
|
|
383
|
+
i0.ɵɵconditionalCreate(0, RealtimeDelegationCardComponent_Conditional_0_Template, 16, 8, "div", 0)(1, RealtimeDelegationCardComponent_Conditional_1_Template, 4, 4, "mj-accordion-panel", 1);
|
|
352
384
|
} if (rf & 2) {
|
|
353
385
|
i0.ɵɵconditional(!ctx.Card.Done ? 0 : 1);
|
|
354
|
-
} }, dependencies: [CommonModule, i1.NgClass, MJAccordionModule, i2.MJAccordionPanelComponent, i2.MJAccordionTitleDirective, i2.MJAccordionActionsDirective, i2.MJAccordionBodyDirective], styles: ["[_nghost-%COMP%] {\n display: block;\n \n --sage: var(--mj-color-violet-400, #a78bfa);\n --sage-bg: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 12%, transparent);\n --sage-border: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 40%, transparent);\n}\n\n.avatar[_ngcontent-%COMP%] {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: grid;\n place-items: center;\n font-weight: 600;\n font-size: 11px;\n flex-shrink: 0;\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-primary));\n border: 1px solid var(--sage-border);\n}\n.avatar--action[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n\n.work-card[_ngcontent-%COMP%] {\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n border-radius: var(--mj-radius-lg, 12px);\n padding: 10px 14px;\n max-width: 560px;\n}\n.work-card__head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n}\n.work-card__title[_ngcontent-%COMP%] {\n font-weight: 700;\n font-size: 13px;\n color: var(--mj-text-primary);\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.work-card__step[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.work-card__detail[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n padding-left: 14px;\n margin-top: 3px;\n border-left: 2px solid var(--sage-border);\n}\n\n.pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 9999px);\n font-size: 10.5px;\n font-weight: 700;\n flex-shrink: 0;\n line-height: 1.5;\n}\n.pill--running[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n border: 1px solid var(--sage-border);\n}\n.pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 9px; }\n.spin[_ngcontent-%COMP%] { animation: _ngcontent-%COMP%_rt-spin 1.1s linear infinite; }\n\n\n.work-progress[_ngcontent-%COMP%] {\n height: 3px;\n border-radius: var(--mj-radius-full, 9999px);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n overflow: hidden;\n margin-top: 9px;\n position: relative;\n}\n.work-progress__fill[_ngcontent-%COMP%] {\n height: 100%;\n border-radius: var(--mj-radius-full, 9999px);\n background: var(--sage);\n transition: width 240ms ease;\n}\n.work-progress__fill--slide[_ngcontent-%COMP%] {\n position: absolute;\n width: 35%;\n animation: _ngcontent-%COMP%_rt-slide 1.6s ease-in-out infinite;\n}\n\n\n\n.done-accordion[_ngcontent-%COMP%] {\n display: block;\n max-width: 560px;\n}\n\n\n\n\n.dev-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 9px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px dashed var(--mj-border-strong);\n background: transparent;\n color: var(--mj-text-muted);\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.dev-link[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-link, var(--mj-brand-primary));\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n}\n.dev-link[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 9px;\n}\n.dev-link--inline[_ngcontent-%COMP%] {\n margin-left: 8px;\n}\n\n\n.artifact-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.artifact-link[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-primary);\n border-color: var(--sage);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n}\n.artifact-link[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 9px;\n}\n.artifact-link--detail[_ngcontent-%COMP%] {\n margin-top: 8px;\n max-width: 100%;\n}\n.artifact-link--detail[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n\n\n.done-chip__mark[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-status-success);\n flex-shrink: 0;\n}\n.done-accordion--failed[_ngcontent-%COMP%] .done-chip__mark[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n.done-chip__agent[_ngcontent-%COMP%] {\n font-weight: 700;\n color: var(--mj-text-primary);\n flex-shrink: 0;\n}\n.done-chip__sep[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n flex-shrink: 0;\n}\n.done-chip__preview[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--mj-text-secondary);\n}\n.via-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10px;\n font-weight: 700;\n color: var(--mj-color-violet-300, var(--mj-text-muted));\n flex-shrink: 0;\n}\n.via-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 9px;\n cursor: help;\n}\n\n\n\n.done-detail[_ngcontent-%COMP%] {\n margin-top: 6px;\n margin-left: 12px;\n padding: 10px 14px;\n border-left: 2px solid var(--sage);\n background: var(--mj-bg-surface);\n border-radius: 0 var(--mj-radius-lg, 12px) var(--mj-radius-lg, 12px) 0;\n border-top: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-right: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n}\n.done-detail__body[_ngcontent-%COMP%] {\n font-size: 13px;\n line-height: 1.55;\n color: var(--mj-text-primary);\n white-space: pre-wrap;\n}\n.done-detail__meta[_ngcontent-%COMP%] {\n margin-top: 8px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.done-detail__meta[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n cursor: help;\n}\n\n@keyframes _ngcontent-%COMP%_rt-spin {\n to { transform: rotate(360deg); }\n}\n@keyframes _ngcontent-%COMP%_rt-slide {\n 0% { left: -35%; }\n 100% { left: 100%; }\n}\n\n\n.cancel-work[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid transparent;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n flex-shrink: 0;\n}\n.cancel-work[_ngcontent-%COMP%]:hover {\n color: var(--mj-status-error);\n border-color: var(--mj-status-error-border, var(--mj-status-error));\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n}\n.cancel-work[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}"] });
|
|
386
|
+
} }, dependencies: [CommonModule, i1.NgClass, MJAccordionModule, i2.MJAccordionPanelComponent, i2.MJAccordionTitleDirective, i2.MJAccordionActionsDirective, i2.MJAccordionBodyDirective], styles: ["[_nghost-%COMP%] {\n display: block;\n \n --sage: var(--mj-color-violet-400, #a78bfa);\n --sage-bg: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 12%, transparent);\n --sage-border: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 40%, transparent);\n}\n\n.avatar[_ngcontent-%COMP%] {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: grid;\n place-items: center;\n font-weight: 600;\n font-size: 11px;\n flex-shrink: 0;\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-primary));\n border: 1px solid var(--sage-border);\n}\n.avatar--action[_ngcontent-%COMP%] i[_ngcontent-%COMP%], \n.avatar--narration[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n\n.work-card[_ngcontent-%COMP%] {\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n border-radius: var(--mj-radius-lg, 12px);\n padding: 10px 14px;\n max-width: 560px;\n}\n.work-card__head[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n}\n.work-card__title[_ngcontent-%COMP%] {\n font-weight: 700;\n font-size: 13px;\n color: var(--mj-text-primary);\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.work-card__step[_ngcontent-%COMP%] {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.work-card__detail[_ngcontent-%COMP%] {\n font-size: 12px;\n color: var(--mj-text-muted);\n padding-left: 14px;\n margin-top: 3px;\n border-left: 2px solid var(--sage-border);\n}\n\n.pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 9999px);\n font-size: 10.5px;\n font-weight: 700;\n flex-shrink: 0;\n line-height: 1.5;\n}\n.pill--running[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n border: 1px solid var(--sage-border);\n}\n.pill[_ngcontent-%COMP%] i[_ngcontent-%COMP%] { font-size: 9px; }\n.spin[_ngcontent-%COMP%] { animation: _ngcontent-%COMP%_rt-spin 1.1s linear infinite; }\n\n\n.work-progress[_ngcontent-%COMP%] {\n height: 3px;\n border-radius: var(--mj-radius-full, 9999px);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n overflow: hidden;\n margin-top: 9px;\n position: relative;\n}\n.work-progress__fill[_ngcontent-%COMP%] {\n height: 100%;\n border-radius: var(--mj-radius-full, 9999px);\n background: var(--sage);\n transition: width 240ms ease;\n}\n.work-progress__fill--slide[_ngcontent-%COMP%] {\n position: absolute;\n width: 35%;\n animation: _ngcontent-%COMP%_rt-slide 1.6s ease-in-out infinite;\n}\n\n\n\n.done-accordion[_ngcontent-%COMP%] {\n display: block;\n max-width: 560px;\n}\n\n\n\n\n.dev-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 9px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px dashed var(--mj-border-strong);\n background: transparent;\n color: var(--mj-text-muted);\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.dev-link[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-link, var(--mj-brand-primary));\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n}\n.dev-link[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 9px;\n}\n.dev-link--inline[_ngcontent-%COMP%] {\n margin-left: 8px;\n}\n\n\n.artifact-link[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.artifact-link[_ngcontent-%COMP%]:hover {\n color: var(--mj-text-primary);\n border-color: var(--sage);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n}\n.artifact-link[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 9px;\n}\n.artifact-link--detail[_ngcontent-%COMP%] {\n margin-top: 8px;\n max-width: 100%;\n}\n.artifact-link--detail[_ngcontent-%COMP%] span[_ngcontent-%COMP%] {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n\n\n.done-chip__mark[_ngcontent-%COMP%] {\n font-size: 11px;\n color: var(--mj-status-success);\n flex-shrink: 0;\n}\n.done-accordion--failed[_ngcontent-%COMP%] .done-chip__mark[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n.done-chip__agent[_ngcontent-%COMP%] {\n font-weight: 700;\n color: var(--mj-text-primary);\n flex-shrink: 0;\n}\n.done-chip__sep[_ngcontent-%COMP%] {\n color: var(--mj-text-disabled);\n flex-shrink: 0;\n}\n.done-chip__preview[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--mj-text-secondary);\n}\n.via-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10px;\n font-weight: 700;\n color: var(--mj-color-violet-300, var(--mj-text-muted));\n flex-shrink: 0;\n}\n.via-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 9px;\n cursor: help;\n}\n\n\n\n.done-detail[_ngcontent-%COMP%] {\n margin-top: 6px;\n margin-left: 12px;\n padding: 10px 14px;\n border-left: 2px solid var(--sage);\n background: var(--mj-bg-surface);\n border-radius: 0 var(--mj-radius-lg, 12px) var(--mj-radius-lg, 12px) 0;\n border-top: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-right: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n}\n.done-detail__body[_ngcontent-%COMP%] {\n font-size: 13px;\n line-height: 1.55;\n color: var(--mj-text-primary);\n white-space: pre-wrap;\n}\n.done-detail__meta[_ngcontent-%COMP%] {\n margin-top: 8px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.done-detail__meta[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n cursor: help;\n}\n\n@keyframes _ngcontent-%COMP%_rt-spin {\n to { transform: rotate(360deg); }\n}\n@keyframes _ngcontent-%COMP%_rt-slide {\n 0% { left: -35%; }\n 100% { left: 100%; }\n}\n\n\n.cancel-work[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid transparent;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n flex-shrink: 0;\n}\n.cancel-work[_ngcontent-%COMP%]:hover {\n color: var(--mj-status-error);\n border-color: var(--mj-status-error-border, var(--mj-status-error));\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n}\n.cancel-work[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}"] });
|
|
355
387
|
}
|
|
356
388
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RealtimeDelegationCardComponent, [{
|
|
357
389
|
type: Component,
|
|
358
|
-
args: [{ standalone: true, selector: 'mj-realtime-delegation-card', imports: [CommonModule, MJAccordionModule], template: "@if (!Card.Done) {\n <!-- WORKING \u2014 compact live card -->\n <div class=\"work-card\" role=\"status\" aria-live=\"polite\">\n <div class=\"work-card__head\">\n @if (Card.Kind === 'action') {\n <div class=\"avatar avatar--action\" aria-hidden=\"true\"><i class=\"fa-solid fa-wrench\"></i></div>\n <div class=\"work-card__title\">{{ Card.AgentName }}</div>\n } @else {\n <div class=\"avatar\" aria-hidden=\"true\">{{ Card.AgentName.charAt(0) }}</div>\n <div class=\"work-card__title\">{{ Card.AgentName }} is working\u2026</div>\n }\n <span class=\"pill pill--running\">\n <i class=\"fa-solid fa-spinner spin\" aria-hidden=\"true\"></i> Running\n </span>\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n @if (Card.Kind !== 'action') {\n <button type=\"button\" class=\"cancel-work\" (click)=\"CancelWork($event)\"\n title=\"Cancel this work\" aria-label=\"Cancel this work\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n <div class=\"work-card__step\">{{ StepLabel }}</div>\n @if (ShowDetailLine) {\n <div class=\"work-card__detail\">{{ Card.LatestMessage }}</div>\n }\n <div class=\"work-progress\" [class.work-progress--indeterminate]=\"Card.Percentage == null\">\n @if (Card.Percentage != null) {\n <div class=\"work-progress__fill\" [style.width.%]=\"Card.Percentage\"></div>\n } @else {\n <div class=\"work-progress__fill work-progress__fill--slide\"></div>\n }\n </div>\n </div>\n} @else {\n <!-- DONE / FAILED \u2014 collapsed single-line chip, expandable inline.\n Migrated from a bespoke done-chip button + chevron + @if(Expanded) detail to\n mj-accordion-panel: title = result chip (mark/agent/preview/via-badge),\n actions = artifact \"View\" + dev \"Open run\" chips, body = full result detail.\n Failed state is carried via .done-accordion--failed on the panel. -->\n <mj-accordion-panel class=\"done-accordion\" [class.done-accordion--failed]=\"!Card.Success\"\n Size=\"sm\" [FlushBody]=\"true\" [(Expanded)]=\"Expanded\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid done-chip__mark\" [ngClass]=\"Card.Success ? 'fa-check' : 'fa-xmark'\" aria-hidden=\"true\"></i>\n <span class=\"done-chip__agent\">{{ Card.AgentName }}</span>\n <span class=\"done-chip__sep\" aria-hidden=\"true\">\u00B7</span>\n <span class=\"done-chip__preview\">{{ ResultPreview }}</span>\n <span class=\"via-badge\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n @if (Card.Kind === 'action') {\n tool\n } @else {\n via {{ Card.AgentName }}\n }\n </span>\n </ng-template>\n <ng-template mjAccordionActions>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>View</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"done-detail\">\n <div class=\"done-detail__body\">{{ ResultText }}</div>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link artifact-link--detail\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>{{ artifact.Name }}</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (Card.Kind === 'action') {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n Direct action \u00B7 {{ Card.AgentName }}\n </div>\n } @else if (Card.RunRef) {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n via {{ Card.AgentName }} \u00B7 run {{ Card.RunRef }}\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link dev-link--inline\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </div>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n}\n", styles: [":host {\n display: block;\n /* sage / delegated-agent accent (distinct from the co-agent brand blue) */\n --sage: var(--mj-color-violet-400, #a78bfa);\n --sage-bg: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 12%, transparent);\n --sage-border: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 40%, transparent);\n}\n\n.avatar {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: grid;\n place-items: center;\n font-weight: 600;\n font-size: 11px;\n flex-shrink: 0;\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-primary));\n border: 1px solid var(--sage-border);\n}\n.avatar--action i {\n font-size: 10px;\n}\n\n/* ---------- Working card (compact) ---------- */\n.work-card {\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n border-radius: var(--mj-radius-lg, 12px);\n padding: 10px 14px;\n max-width: 560px;\n}\n.work-card__head {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n}\n.work-card__title {\n font-weight: 700;\n font-size: 13px;\n color: var(--mj-text-primary);\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.work-card__step {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.work-card__detail {\n font-size: 12px;\n color: var(--mj-text-muted);\n padding-left: 14px;\n margin-top: 3px;\n border-left: 2px solid var(--sage-border);\n}\n\n.pill {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 9999px);\n font-size: 10.5px;\n font-weight: 700;\n flex-shrink: 0;\n line-height: 1.5;\n}\n.pill--running {\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n border: 1px solid var(--sage-border);\n}\n.pill i { font-size: 9px; }\n.spin { animation: rt-spin 1.1s linear infinite; }\n\n/* Thin progress bar \u2014 determinate (server %) or indeterminate slide */\n.work-progress {\n height: 3px;\n border-radius: var(--mj-radius-full, 9999px);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n overflow: hidden;\n margin-top: 9px;\n position: relative;\n}\n.work-progress__fill {\n height: 100%;\n border-radius: var(--mj-radius-full, 9999px);\n background: var(--sage);\n transition: width 240ms ease;\n}\n.work-progress__fill--slide {\n position: absolute;\n width: 35%;\n animation: rt-slide 1.6s ease-in-out infinite;\n}\n\n/* ---------- Done state (collapsed single line) ---------- */\n/* Width constraint preserved on the migrated accordion panel. */\n.done-accordion {\n display: block;\n max-width: 560px;\n}\n/* Removed bespoke .done / .done-row / .done-row .done-chip layout chrome \u2014 the header\n row layout is now owned by mj-accordion-panel (header-row + actions slot). */\n\n/* ---------- Developer link (gear-gated \"Open run\") ---------- */\n.dev-link {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 9px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px dashed var(--mj-border-strong);\n background: transparent;\n color: var(--mj-text-muted);\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.dev-link:hover {\n color: var(--mj-text-link, var(--mj-brand-primary));\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n}\n.dev-link i {\n font-size: 9px;\n}\n.dev-link--inline {\n margin-left: 8px;\n}\n\n/* ---------- \"View \u2192\" artifact chip (focuses the artifact's surface tab) ---------- */\n.artifact-link {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.artifact-link:hover {\n color: var(--mj-text-primary);\n border-color: var(--sage);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n}\n.artifact-link i {\n font-size: 9px;\n}\n.artifact-link--detail {\n margin-top: 8px;\n max-width: 100%;\n}\n.artifact-link--detail span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n/* Removed bespoke .done-chip button chrome (background/border/radius/hover) \u2014 the\n clickable header is now the mj-accordion-panel toggle. The chip's inner content\n styling (mark/agent/sep/preview/via-badge) is retained as accordion title content. */\n.done-chip__mark {\n font-size: 11px;\n color: var(--mj-status-success);\n flex-shrink: 0;\n}\n.done-accordion--failed .done-chip__mark {\n color: var(--mj-status-error);\n}\n.done-chip__agent {\n font-weight: 700;\n color: var(--mj-text-primary);\n flex-shrink: 0;\n}\n.done-chip__sep {\n color: var(--mj-text-disabled);\n flex-shrink: 0;\n}\n.done-chip__preview {\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--mj-text-secondary);\n}\n.via-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10px;\n font-weight: 700;\n color: var(--mj-color-violet-300, var(--mj-text-muted));\n flex-shrink: 0;\n}\n.via-badge i {\n font-size: 9px;\n cursor: help;\n}\n/* Removed .done-chip__chev \u2014 mj-accordion-panel provides its own chevron. */\n\n/* ---------- Expanded result detail ---------- */\n.done-detail {\n margin-top: 6px;\n margin-left: 12px;\n padding: 10px 14px;\n border-left: 2px solid var(--sage);\n background: var(--mj-bg-surface);\n border-radius: 0 var(--mj-radius-lg, 12px) var(--mj-radius-lg, 12px) 0;\n border-top: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-right: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n}\n.done-detail__body {\n font-size: 13px;\n line-height: 1.55;\n color: var(--mj-text-primary);\n white-space: pre-wrap;\n}\n.done-detail__meta {\n margin-top: 8px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.done-detail__meta i {\n cursor: help;\n}\n\n@keyframes rt-spin {\n to { transform: rotate(360deg); }\n}\n@keyframes rt-slide {\n 0% { left: -35%; }\n 100% { left: 100%; }\n}\n\n/* ---------- \u2715 cancel affordance on the WORKING card (explicit user cancel) ---------- */\n.cancel-work {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid transparent;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n flex-shrink: 0;\n}\n.cancel-work:hover {\n color: var(--mj-status-error);\n border-color: var(--mj-status-error-border, var(--mj-status-error));\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n}\n.cancel-work i {\n font-size: 11px;\n}\n"] }]
|
|
390
|
+
args: [{ standalone: true, selector: 'mj-realtime-delegation-card', imports: [CommonModule, MJAccordionModule], template: "@if (!Card.Done) {\n <!-- WORKING \u2014 compact live card -->\n <div class=\"work-card\" role=\"status\" aria-live=\"polite\">\n <div class=\"work-card__head\">\n @if (Card.Kind === 'action') {\n <div class=\"avatar avatar--action\" aria-hidden=\"true\"><i class=\"fa-solid fa-wrench\"></i></div>\n <div class=\"work-card__title\">{{ Card.AgentName }}</div>\n } @else if (Card.Kind === 'narration') {\n <div class=\"avatar avatar--narration\" aria-hidden=\"true\"><i class=\"fa-solid fa-brain\"></i></div>\n <div class=\"work-card__title\">{{ Card.AgentName }} is thinking\u2026</div>\n } @else {\n <div class=\"avatar\" aria-hidden=\"true\">{{ Card.AgentName.charAt(0) }}</div>\n <div class=\"work-card__title\">{{ Card.AgentName }} is working\u2026</div>\n }\n <span class=\"pill pill--running\">\n <i class=\"fa-solid fa-spinner spin\" aria-hidden=\"true\"></i> Running\n </span>\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n @if (Card.Kind === 'agent') {\n <button type=\"button\" class=\"cancel-work\" (click)=\"CancelWork($event)\"\n title=\"Cancel this work\" aria-label=\"Cancel this work\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n <div class=\"work-card__step\">{{ StepLabel }}</div>\n @if (ShowDetailLine) {\n <div class=\"work-card__detail\">{{ Card.LatestMessage }}</div>\n }\n <div class=\"work-progress\" [class.work-progress--indeterminate]=\"Card.Percentage == null\">\n @if (Card.Percentage != null) {\n <div class=\"work-progress__fill\" [style.width.%]=\"Card.Percentage\"></div>\n } @else {\n <div class=\"work-progress__fill work-progress__fill--slide\"></div>\n }\n </div>\n </div>\n} @else {\n <!-- DONE / FAILED \u2014 collapsed single-line chip, expandable inline.\n Migrated from a bespoke done-chip button + chevron + @if(Expanded) detail to\n mj-accordion-panel: title = result chip (mark/agent/preview/via-badge),\n actions = artifact \"View\" + dev \"Open run\" chips, body = full result detail.\n Failed state is carried via .done-accordion--failed on the panel. -->\n <mj-accordion-panel class=\"done-accordion\" [class.done-accordion--failed]=\"!Card.Success\"\n Size=\"sm\" [FlushBody]=\"true\" [(Expanded)]=\"Expanded\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid done-chip__mark\" [ngClass]=\"Card.Success ? 'fa-check' : 'fa-xmark'\" aria-hidden=\"true\"></i>\n <span class=\"done-chip__agent\">{{ Card.AgentName }}</span>\n <span class=\"done-chip__sep\" aria-hidden=\"true\">\u00B7</span>\n <span class=\"done-chip__preview\">{{ ResultPreview }}</span>\n <span class=\"via-badge\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n @if (Card.Kind === 'action') {\n tool\n } @else if (Card.Kind === 'narration') {\n narration\n } @else {\n via {{ Card.AgentName }}\n }\n </span>\n </ng-template>\n <ng-template mjAccordionActions>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>View</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"done-detail\">\n <div class=\"done-detail__body\">{{ ResultText }}</div>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link artifact-link--detail\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>{{ artifact.Name }}</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (Card.Kind === 'action') {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n Direct action \u00B7 {{ Card.AgentName }}\n </div>\n } @else if (Card.Kind === 'narration') {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-brain\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n Thought narration \u00B7 {{ Card.AgentName }}\n </div>\n } @else if (Card.RunRef) {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n via {{ Card.AgentName }} \u00B7 run {{ Card.RunRef }}\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link dev-link--inline\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </div>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n}\n", styles: [":host {\n display: block;\n /* sage / delegated-agent accent (distinct from the co-agent brand blue) */\n --sage: var(--mj-color-violet-400, #a78bfa);\n --sage-bg: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 12%, transparent);\n --sage-border: color-mix(in srgb, var(--mj-color-violet-400, #a78bfa) 40%, transparent);\n}\n\n.avatar {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: grid;\n place-items: center;\n font-weight: 600;\n font-size: 11px;\n flex-shrink: 0;\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-primary));\n border: 1px solid var(--sage-border);\n}\n.avatar--action i,\n.avatar--narration i {\n font-size: 10px;\n}\n\n/* ---------- Working card (compact) ---------- */\n.work-card {\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n border-radius: var(--mj-radius-lg, 12px);\n padding: 10px 14px;\n max-width: 560px;\n}\n.work-card__head {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 8px;\n}\n.work-card__title {\n font-weight: 700;\n font-size: 13px;\n color: var(--mj-text-primary);\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.work-card__step {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.work-card__detail {\n font-size: 12px;\n color: var(--mj-text-muted);\n padding-left: 14px;\n margin-top: 3px;\n border-left: 2px solid var(--sage-border);\n}\n\n.pill {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 9999px);\n font-size: 10.5px;\n font-weight: 700;\n flex-shrink: 0;\n line-height: 1.5;\n}\n.pill--running {\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n border: 1px solid var(--sage-border);\n}\n.pill i { font-size: 9px; }\n.spin { animation: rt-spin 1.1s linear infinite; }\n\n/* Thin progress bar \u2014 determinate (server %) or indeterminate slide */\n.work-progress {\n height: 3px;\n border-radius: var(--mj-radius-full, 9999px);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n overflow: hidden;\n margin-top: 9px;\n position: relative;\n}\n.work-progress__fill {\n height: 100%;\n border-radius: var(--mj-radius-full, 9999px);\n background: var(--sage);\n transition: width 240ms ease;\n}\n.work-progress__fill--slide {\n position: absolute;\n width: 35%;\n animation: rt-slide 1.6s ease-in-out infinite;\n}\n\n/* ---------- Done state (collapsed single line) ---------- */\n/* Width constraint preserved on the migrated accordion panel. */\n.done-accordion {\n display: block;\n max-width: 560px;\n}\n/* Removed bespoke .done / .done-row / .done-row .done-chip layout chrome \u2014 the header\n row layout is now owned by mj-accordion-panel (header-row + actions slot). */\n\n/* ---------- Developer link (gear-gated \"Open run\") ---------- */\n.dev-link {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 9px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px dashed var(--mj-border-strong);\n background: transparent;\n color: var(--mj-text-muted);\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.dev-link:hover {\n color: var(--mj-text-link, var(--mj-brand-primary));\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 8%, transparent);\n}\n.dev-link i {\n font-size: 9px;\n}\n.dev-link--inline {\n margin-left: 8px;\n}\n\n/* ---------- \"View \u2192\" artifact chip (focuses the artifact's surface tab) ---------- */\n.artifact-link {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 3px 10px;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid var(--sage-border);\n background: var(--sage-bg);\n color: var(--mj-color-violet-300, var(--mj-text-secondary));\n font-family: inherit;\n font-size: 10.5px;\n font-weight: 700;\n white-space: nowrap;\n flex-shrink: 0;\n cursor: pointer;\n transition: color 140ms ease, border-color 140ms ease, background 140ms ease;\n}\n.artifact-link:hover {\n color: var(--mj-text-primary);\n border-color: var(--sage);\n background: color-mix(in srgb, var(--sage) 18%, transparent);\n}\n.artifact-link i {\n font-size: 9px;\n}\n.artifact-link--detail {\n margin-top: 8px;\n max-width: 100%;\n}\n.artifact-link--detail span {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n/* Removed bespoke .done-chip button chrome (background/border/radius/hover) \u2014 the\n clickable header is now the mj-accordion-panel toggle. The chip's inner content\n styling (mark/agent/sep/preview/via-badge) is retained as accordion title content. */\n.done-chip__mark {\n font-size: 11px;\n color: var(--mj-status-success);\n flex-shrink: 0;\n}\n.done-accordion--failed .done-chip__mark {\n color: var(--mj-status-error);\n}\n.done-chip__agent {\n font-weight: 700;\n color: var(--mj-text-primary);\n flex-shrink: 0;\n}\n.done-chip__sep {\n color: var(--mj-text-disabled);\n flex-shrink: 0;\n}\n.done-chip__preview {\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--mj-text-secondary);\n}\n.via-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 10px;\n font-weight: 700;\n color: var(--mj-color-violet-300, var(--mj-text-muted));\n flex-shrink: 0;\n}\n.via-badge i {\n font-size: 9px;\n cursor: help;\n}\n/* Removed .done-chip__chev \u2014 mj-accordion-panel provides its own chevron. */\n\n/* ---------- Expanded result detail ---------- */\n.done-detail {\n margin-top: 6px;\n margin-left: 12px;\n padding: 10px 14px;\n border-left: 2px solid var(--sage);\n background: var(--mj-bg-surface);\n border-radius: 0 var(--mj-radius-lg, 12px) var(--mj-radius-lg, 12px) 0;\n border-top: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-right: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default));\n}\n.done-detail__body {\n font-size: 13px;\n line-height: 1.55;\n color: var(--mj-text-primary);\n white-space: pre-wrap;\n}\n.done-detail__meta {\n margin-top: 8px;\n font-size: 10.5px;\n font-weight: 700;\n color: var(--mj-text-muted);\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.done-detail__meta i {\n cursor: help;\n}\n\n@keyframes rt-spin {\n to { transform: rotate(360deg); }\n}\n@keyframes rt-slide {\n 0% { left: -35%; }\n 100% { left: 100%; }\n}\n\n/* ---------- \u2715 cancel affordance on the WORKING card (explicit user cancel) ---------- */\n.cancel-work {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n padding: 0;\n border-radius: var(--mj-radius-full, 9999px);\n border: 1px solid transparent;\n background: transparent;\n color: var(--mj-text-muted);\n cursor: pointer;\n flex-shrink: 0;\n}\n.cancel-work:hover {\n color: var(--mj-status-error);\n border-color: var(--mj-status-error-border, var(--mj-status-error));\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n}\n.cancel-work i {\n font-size: 11px;\n}\n"] }]
|
|
359
391
|
}], null, { Card: [{
|
|
360
392
|
type: Input,
|
|
361
393
|
args: [{ required: true }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"realtime-delegation-card.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-delegation-card.component.ts","../../../../src/lib/components/realtime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;kFAvBI,+BAA+B","sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MJAccordionModule } from '@memberjunction/ng-ui-components';\nimport { RealtimeDelegationCardVM, FriendlyStepLabel } from './realtime-session-state';\nimport { ParsedDelegationArtifact } from '../../services/delegation-result-parser';\n\n/**\n * Renders a single delegation in the live session thread:\n * - **Working**: a compact card — agent avatar, \"<agent> is working…\", the CURRENT\n * friendly step label, the latest raw message indented + muted beneath it, and a\n * thin progress bar (determinate when the server supplies a percentage,\n * indeterminate shimmer otherwise).\n * - **Done**: COLLAPSED to a single-line chip — `✓ <agent> · <one-line result preview>\n * · via <agent>` — expandable inline (click / chevron) to the full result text.\n * Failures render the `✗` variant.\n *\n * Provenance is a small `via <agent>` badge + a shield icon whose `title` tooltip\n * carries the full provenance sentence (no repeated sentence under every card).\n *\n * DEVELOPER MODE (gear-gated by the overlay shell): when {@link DevMode} is on and the\n * card knows its delegated run id, an \"Open run\" link is revealed that emits\n * {@link OpenRunRequested} so the shell can navigate to the `MJ: AI Agent Runs` record.\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-delegation-card',\n imports: [CommonModule, MJAccordionModule],\n templateUrl: './realtime-delegation-card.component.html',\n styleUrl: './realtime-delegation-card.component.css'\n})\nexport class RealtimeDelegationCardComponent {\n /** Maximum characters of the result shown in the collapsed done chip. */\n private static readonly PreviewMaxChars = 120;\n\n /** The delegation card view-model to render (immutable — replaced on every update). */\n @Input({ required: true }) Card!: RealtimeDelegationCardVM;\n\n /** Whether developer affordances (the \"Open run\" link) are revealed. */\n @Input() DevMode = false;\n\n /** Emitted with the delegated run's ID when the dev \"Open run\" link is clicked. */\n @Output() OpenRunRequested = new EventEmitter<string>();\n\n /** Emitted when a \"View\" artifact chip is clicked (the overlay focuses the artifact's tab). */\n @Output() OpenArtifactRequested = new EventEmitter<ParsedDelegationArtifact>();\n\n /**\n * Emitted with the call's ID when the WORKING card's ✕ cancel affordance is clicked —\n * EXPLICIT user intent to kill the in-flight delegated run (by deliberate host policy,\n * barge-in alone never cancels delegations; only this button does). The overlay routes\n * it to `RealtimeSessionService.CancelDelegation`, which flips this card to a failed\n * \"Cancelled by user\" result.\n */\n @Output() CancelRequested = new EventEmitter<string>();\n\n /** Whether the done chip is expanded inline to show the full result text. */\n public Expanded = false;\n\n /** The artifacts this (done) delegation produced (empty array while running / when none). Suppressed for direct actions. */\n public get Artifacts(): ParsedDelegationArtifact[] {\n return this.Card.Done && this.Card.Kind !== 'action' && this.Card.Artifacts ? this.Card.Artifacts : [];\n }\n\n /** Emits the open-artifact request for one of this card's produced artifacts. */\n public OpenArtifact(event: MouseEvent, artifact: ParsedDelegationArtifact): void {\n event.stopPropagation();\n this.OpenArtifactRequested.emit(artifact);\n }\n\n /** True when the dev \"Open run\" link should render (gear on + run id known). Suppressed for direct actions. */\n public get ShowOpenRun(): boolean {\n return this.DevMode && this.Card.Kind !== 'action' && !!this.Card.RunID;\n }\n\n /** Emits the open-run request for this card's delegated run. */\n public OpenRun(event: MouseEvent): void {\n event.stopPropagation();\n if (this.Card.RunID) {\n this.OpenRunRequested.emit(this.Card.RunID);\n }\n }\n\n /** Emits the cancel request for this (still-working) delegation. */\n public CancelWork(event: MouseEvent): void {\n event.stopPropagation();\n if (!this.Card.Done) {\n this.CancelRequested.emit(this.Card.CallID);\n }\n }\n\n /** Friendly label for the current delegation step (raw message as fallback). */\n public get StepLabel(): string {\n return FriendlyStepLabel(this.Card.LatestStep, this.Card.LatestMessage);\n }\n\n /**\n * Whether to render the latest raw message as the indented detail line. Hidden when\n * it would just repeat the step label (the unknown-step fallback maps label = message).\n */\n public get ShowDetailLine(): boolean {\n return !!this.Card.LatestMessage && this.Card.LatestMessage !== this.StepLabel;\n }\n\n /** Full result text (falls back to the last progress message / a generic line). */\n public get ResultText(): string {\n return this.Card.Result\n || this.Card.LatestMessage\n || (this.Card.Kind === 'action'\n ? `${this.Card.AgentName} executed.`\n : `${this.Card.AgentName} completed the delegated work.`);\n }\n\n /** One-line, ~120-char preview of the result for the collapsed chip. */\n public get ResultPreview(): string {\n const oneLine = this.ResultText.replace(/\\s+/g, ' ').trim();\n const max = RealtimeDelegationCardComponent.PreviewMaxChars;\n return oneLine.length > max ? `${oneLine.slice(0, max).trimEnd()}…` : oneLine;\n }\n\n /** Tooltip text for the provenance shield icon. */\n public get ProvenanceTitle(): string {\n if (this.Card.Kind === 'action') {\n return `Result produced directly by the ${this.Card.AgentName} action.`;\n }\n const run = this.Card.RunRef ? ` (run ${this.Card.RunRef})` : '';\n return `Result produced by ${this.Card.AgentName}'s own agent run${run} — not invented by the voice co-agent.`;\n }\n}\n","@if (!Card.Done) {\n <!-- WORKING — compact live card -->\n <div class=\"work-card\" role=\"status\" aria-live=\"polite\">\n <div class=\"work-card__head\">\n @if (Card.Kind === 'action') {\n <div class=\"avatar avatar--action\" aria-hidden=\"true\"><i class=\"fa-solid fa-wrench\"></i></div>\n <div class=\"work-card__title\">{{ Card.AgentName }}</div>\n } @else {\n <div class=\"avatar\" aria-hidden=\"true\">{{ Card.AgentName.charAt(0) }}</div>\n <div class=\"work-card__title\">{{ Card.AgentName }} is working…</div>\n }\n <span class=\"pill pill--running\">\n <i class=\"fa-solid fa-spinner spin\" aria-hidden=\"true\"></i> Running\n </span>\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n @if (Card.Kind !== 'action') {\n <button type=\"button\" class=\"cancel-work\" (click)=\"CancelWork($event)\"\n title=\"Cancel this work\" aria-label=\"Cancel this work\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n <div class=\"work-card__step\">{{ StepLabel }}</div>\n @if (ShowDetailLine) {\n <div class=\"work-card__detail\">{{ Card.LatestMessage }}</div>\n }\n <div class=\"work-progress\" [class.work-progress--indeterminate]=\"Card.Percentage == null\">\n @if (Card.Percentage != null) {\n <div class=\"work-progress__fill\" [style.width.%]=\"Card.Percentage\"></div>\n } @else {\n <div class=\"work-progress__fill work-progress__fill--slide\"></div>\n }\n </div>\n </div>\n} @else {\n <!-- DONE / FAILED — collapsed single-line chip, expandable inline.\n Migrated from a bespoke done-chip button + chevron + @if(Expanded) detail to\n mj-accordion-panel: title = result chip (mark/agent/preview/via-badge),\n actions = artifact \"View\" + dev \"Open run\" chips, body = full result detail.\n Failed state is carried via .done-accordion--failed on the panel. -->\n <mj-accordion-panel class=\"done-accordion\" [class.done-accordion--failed]=\"!Card.Success\"\n Size=\"sm\" [FlushBody]=\"true\" [(Expanded)]=\"Expanded\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid done-chip__mark\" [ngClass]=\"Card.Success ? 'fa-check' : 'fa-xmark'\" aria-hidden=\"true\"></i>\n <span class=\"done-chip__agent\">{{ Card.AgentName }}</span>\n <span class=\"done-chip__sep\" aria-hidden=\"true\">·</span>\n <span class=\"done-chip__preview\">{{ ResultPreview }}</span>\n <span class=\"via-badge\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n @if (Card.Kind === 'action') {\n tool\n } @else {\n via {{ Card.AgentName }}\n }\n </span>\n </ng-template>\n <ng-template mjAccordionActions>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>View</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"done-detail\">\n <div class=\"done-detail__body\">{{ ResultText }}</div>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link artifact-link--detail\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>{{ artifact.Name }}</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (Card.Kind === 'action') {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n Direct action · {{ Card.AgentName }}\n </div>\n } @else if (Card.RunRef) {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n via {{ Card.AgentName }} · run {{ Card.RunRef }}\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link dev-link--inline\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </div>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"realtime-delegation-card.component.js","sourceRoot":"","sources":["../../../../src/lib/components/realtime/realtime-delegation-card.component.ts","../../../../src/lib/components/realtime/realtime-delegation-card.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAA4B,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;;;;;;ICE/E,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6DAA/B,+BAA+B;YCa1C,AA3CF,kGAAkB,0FA2CT;;YA3CT,wCAyHC;4BD/FW,YAAY,cAAE,iBAAiB;;iFAI9B,+BAA+B;cAP3C,SAAS;6BACI,IAAI,YACN,6BAA6B,WAC9B,CAAC,YAAY,EAAE,iBAAiB,CAAC;;kBASzC,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kBAGxB,KAAK;;kBAGL,MAAM;;kBAGN,MAAM;;kBASN,MAAM;;kFAvBI,+BAA+B","sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MJAccordionModule } from '@memberjunction/ng-ui-components';\nimport { RealtimeDelegationCardVM, FriendlyStepLabel } from './realtime-session-state';\nimport { ParsedDelegationArtifact } from '../../services/delegation-result-parser';\n\n/**\n * Renders a single delegation in the live session thread:\n * - **Working**: a compact card — agent avatar, \"<agent> is working…\", the CURRENT\n * friendly step label, the latest raw message indented + muted beneath it, and a\n * thin progress bar (determinate when the server supplies a percentage,\n * indeterminate shimmer otherwise).\n * - **Done**: COLLAPSED to a single-line chip — `✓ <agent> · <one-line result preview>\n * · via <agent>` — expandable inline (click / chevron) to the full result text.\n * Failures render the `✗` variant.\n *\n * Provenance is a small `via <agent>` badge + a shield icon whose `title` tooltip\n * carries the full provenance sentence (no repeated sentence under every card).\n *\n * DEVELOPER MODE (gear-gated by the overlay shell): when {@link DevMode} is on and the\n * card knows its delegated run id, an \"Open run\" link is revealed that emits\n * {@link OpenRunRequested} so the shell can navigate to the `MJ: AI Agent Runs` record.\n */\n@Component({\n standalone: true,\n selector: 'mj-realtime-delegation-card',\n imports: [CommonModule, MJAccordionModule],\n templateUrl: './realtime-delegation-card.component.html',\n styleUrl: './realtime-delegation-card.component.css'\n})\nexport class RealtimeDelegationCardComponent {\n /** Maximum characters of the result shown in the collapsed done chip. */\n private static readonly PreviewMaxChars = 120;\n\n /** The delegation card view-model to render (immutable — replaced on every update). */\n @Input({ required: true }) Card!: RealtimeDelegationCardVM;\n\n /** Whether developer affordances (the \"Open run\" link) are revealed. */\n @Input() DevMode = false;\n\n /** Emitted with the delegated run's ID when the dev \"Open run\" link is clicked. */\n @Output() OpenRunRequested = new EventEmitter<string>();\n\n /** Emitted when a \"View\" artifact chip is clicked (the overlay focuses the artifact's tab). */\n @Output() OpenArtifactRequested = new EventEmitter<ParsedDelegationArtifact>();\n\n /**\n * Emitted with the call's ID when the WORKING card's ✕ cancel affordance is clicked —\n * EXPLICIT user intent to kill the in-flight delegated run (by deliberate host policy,\n * barge-in alone never cancels delegations; only this button does). The overlay routes\n * it to `RealtimeSessionService.CancelDelegation`, which flips this card to a failed\n * \"Cancelled by user\" result.\n */\n @Output() CancelRequested = new EventEmitter<string>();\n\n /** Whether the done chip is expanded inline to show the full result text. */\n public Expanded = false;\n\n /** The artifacts this (done) delegation produced (empty array while running / when none). Suppressed for direct actions and narration. */\n public get Artifacts(): ParsedDelegationArtifact[] {\n return this.Card.Done && this.Card.Kind === 'agent' && this.Card.Artifacts ? this.Card.Artifacts : [];\n }\n\n /** Emits the open-artifact request for one of this card's produced artifacts. */\n public OpenArtifact(event: MouseEvent, artifact: ParsedDelegationArtifact): void {\n event.stopPropagation();\n this.OpenArtifactRequested.emit(artifact);\n }\n\n /** True when the dev \"Open run\" link should render (gear on + run id known). Suppressed for direct actions and narration. */\n public get ShowOpenRun(): boolean {\n return this.DevMode && this.Card.Kind === 'agent' && !!this.Card.RunID;\n }\n\n /** Emits the open-run request for this card's delegated run. */\n public OpenRun(event: MouseEvent): void {\n event.stopPropagation();\n if (this.Card.RunID) {\n this.OpenRunRequested.emit(this.Card.RunID);\n }\n }\n\n /** Emits the cancel request for this (still-working) delegation. */\n public CancelWork(event: MouseEvent): void {\n event.stopPropagation();\n if (!this.Card.Done && this.Card.Kind === 'agent') {\n this.CancelRequested.emit(this.Card.CallID);\n }\n }\n\n /** Friendly label for the current delegation step (raw message as fallback). */\n public get StepLabel(): string {\n return FriendlyStepLabel(this.Card.LatestStep, this.Card.LatestMessage);\n }\n\n /**\n * Whether to render the latest raw message as the indented detail line. Hidden when\n * it would just repeat the step label (the unknown-step fallback maps label = message).\n */\n public get ShowDetailLine(): boolean {\n return !!this.Card.LatestMessage && this.Card.LatestMessage !== this.StepLabel;\n }\n\n /** Full result text (falls back to the last progress message / a generic line). */\n public get ResultText(): string {\n return this.Card.Result\n || this.Card.LatestMessage\n || (this.Card.Kind === 'action'\n ? `${this.Card.AgentName} executed.`\n : this.Card.Kind === 'narration'\n ? `${this.Card.AgentName} shared a thought.`\n : `${this.Card.AgentName} completed the delegated work.`);\n }\n\n /** One-line, ~120-char preview of the result for the collapsed chip. */\n public get ResultPreview(): string {\n const oneLine = this.ResultText.replace(/\\s+/g, ' ').trim();\n const max = RealtimeDelegationCardComponent.PreviewMaxChars;\n return oneLine.length > max ? `${oneLine.slice(0, max).trimEnd()}…` : oneLine;\n }\n\n /** Tooltip text for the provenance shield icon. */\n public get ProvenanceTitle(): string {\n if (this.Card.Kind === 'action') {\n return `Result produced directly by the ${this.Card.AgentName} action.`;\n }\n if (this.Card.Kind === 'narration') {\n return `Thought / narration authored by ${this.Card.AgentName}.`;\n }\n const run = this.Card.RunRef ? ` (run ${this.Card.RunRef})` : '';\n return `Result produced by ${this.Card.AgentName}'s own agent run${run} — not invented by the voice co-agent.`;\n }\n}\n","@if (!Card.Done) {\n <!-- WORKING — compact live card -->\n <div class=\"work-card\" role=\"status\" aria-live=\"polite\">\n <div class=\"work-card__head\">\n @if (Card.Kind === 'action') {\n <div class=\"avatar avatar--action\" aria-hidden=\"true\"><i class=\"fa-solid fa-wrench\"></i></div>\n <div class=\"work-card__title\">{{ Card.AgentName }}</div>\n } @else if (Card.Kind === 'narration') {\n <div class=\"avatar avatar--narration\" aria-hidden=\"true\"><i class=\"fa-solid fa-brain\"></i></div>\n <div class=\"work-card__title\">{{ Card.AgentName }} is thinking…</div>\n } @else {\n <div class=\"avatar\" aria-hidden=\"true\">{{ Card.AgentName.charAt(0) }}</div>\n <div class=\"work-card__title\">{{ Card.AgentName }} is working…</div>\n }\n <span class=\"pill pill--running\">\n <i class=\"fa-solid fa-spinner spin\" aria-hidden=\"true\"></i> Running\n </span>\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n @if (Card.Kind === 'agent') {\n <button type=\"button\" class=\"cancel-work\" (click)=\"CancelWork($event)\"\n title=\"Cancel this work\" aria-label=\"Cancel this work\">\n <i class=\"fa-solid fa-xmark\" aria-hidden=\"true\"></i>\n </button>\n }\n </div>\n <div class=\"work-card__step\">{{ StepLabel }}</div>\n @if (ShowDetailLine) {\n <div class=\"work-card__detail\">{{ Card.LatestMessage }}</div>\n }\n <div class=\"work-progress\" [class.work-progress--indeterminate]=\"Card.Percentage == null\">\n @if (Card.Percentage != null) {\n <div class=\"work-progress__fill\" [style.width.%]=\"Card.Percentage\"></div>\n } @else {\n <div class=\"work-progress__fill work-progress__fill--slide\"></div>\n }\n </div>\n </div>\n} @else {\n <!-- DONE / FAILED — collapsed single-line chip, expandable inline.\n Migrated from a bespoke done-chip button + chevron + @if(Expanded) detail to\n mj-accordion-panel: title = result chip (mark/agent/preview/via-badge),\n actions = artifact \"View\" + dev \"Open run\" chips, body = full result detail.\n Failed state is carried via .done-accordion--failed on the panel. -->\n <mj-accordion-panel class=\"done-accordion\" [class.done-accordion--failed]=\"!Card.Success\"\n Size=\"sm\" [FlushBody]=\"true\" [(Expanded)]=\"Expanded\">\n <ng-template mjAccordionTitle>\n <i class=\"fa-solid done-chip__mark\" [ngClass]=\"Card.Success ? 'fa-check' : 'fa-xmark'\" aria-hidden=\"true\"></i>\n <span class=\"done-chip__agent\">{{ Card.AgentName }}</span>\n <span class=\"done-chip__sep\" aria-hidden=\"true\">·</span>\n <span class=\"done-chip__preview\">{{ ResultPreview }}</span>\n <span class=\"via-badge\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n @if (Card.Kind === 'action') {\n tool\n } @else if (Card.Kind === 'narration') {\n narration\n } @else {\n via {{ Card.AgentName }}\n }\n </span>\n </ng-template>\n <ng-template mjAccordionActions>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>View</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </ng-template>\n <ng-template mjAccordionBody>\n <div class=\"done-detail\">\n <div class=\"done-detail__body\">{{ ResultText }}</div>\n @for (artifact of Artifacts; track artifact.ArtifactVersionID) {\n <button type=\"button\" class=\"artifact-link artifact-link--detail\" (click)=\"OpenArtifact($event, artifact)\"\n [title]=\"'View ' + artifact.Name\">\n <i class=\"fa-solid fa-file-lines\" aria-hidden=\"true\"></i>\n <span>{{ artifact.Name }}</span>\n <i class=\"fa-solid fa-arrow-right\" aria-hidden=\"true\"></i>\n </button>\n }\n @if (Card.Kind === 'action') {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n Direct action · {{ Card.AgentName }}\n </div>\n } @else if (Card.Kind === 'narration') {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-brain\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n Thought narration · {{ Card.AgentName }}\n </div>\n } @else if (Card.RunRef) {\n <div class=\"done-detail__meta\">\n <i class=\"fa-solid fa-shield-halved\" [title]=\"ProvenanceTitle\" aria-hidden=\"true\"></i>\n via {{ Card.AgentName }} · run {{ Card.RunRef }}\n @if (ShowOpenRun) {\n <button type=\"button\" class=\"dev-link dev-link--inline\" (click)=\"OpenRun($event)\"\n title=\"Open the delegated agent run record\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i>\n <span>Open run</span>\n </button>\n }\n </div>\n }\n </div>\n </ng-template>\n </mj-accordion-panel>\n}\n"]}
|