@memberjunction/ng-conversations 2.112.0 → 2.113.1
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/agent/active-agent-indicator.component.d.ts +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.d.ts.map +1 -1
- package/dist/lib/components/agent/active-agent-indicator.component.js +13 -15
- package/dist/lib/components/agent/active-agent-indicator.component.js.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.d.ts.map +1 -1
- package/dist/lib/components/agent/agent-process-panel.component.js +14 -18
- package/dist/lib/components/agent/agent-process-panel.component.js.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/artifact/artifact-share-modal.component.js +11 -11
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js +30 -24
- package/dist/lib/components/collection/artifact-collection-picker-modal.component.js.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/artifact-create-modal.component.js +10 -8
- package/dist/lib/components/collection/artifact-create-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +9 -8
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +51 -35
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-form-modal.component.js +6 -5
- package/dist/lib/components/collection/collection-form-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-share-modal.component.js +12 -12
- package/dist/lib/components/collection/collection-share-modal.component.js.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts +1 -1
- package/dist/lib/components/collection/collection-tree.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-tree.component.js +11 -11
- package/dist/lib/components/collection/collection-tree.component.js.map +1 -1
- package/dist/lib/components/collection/collection-view.component.d.ts +29 -10
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +128 -62
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.d.ts +19 -7
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +99 -69
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +38 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +303 -181
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +21 -21
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +11 -4
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +122 -81
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts +1 -1
- package/dist/lib/components/export/export-modal.component.d.ts.map +1 -1
- package/dist/lib/components/export/export-modal.component.js +11 -9
- package/dist/lib/components/export/export-modal.component.js.map +1 -1
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts +25 -0
- package/dist/lib/components/global-tasks/global-tasks-panel.component.d.ts.map +1 -0
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js +206 -0
- package/dist/lib/components/global-tasks/global-tasks-panel.component.js.map +1 -0
- package/dist/lib/components/library/library-full-view.component.d.ts +1 -1
- package/dist/lib/components/library/library-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/library/library-full-view.component.js +6 -5
- package/dist/lib/components/library/library-full-view.component.js.map +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts +1 -1
- package/dist/lib/components/members/members-modal.component.d.ts.map +1 -1
- package/dist/lib/components/members/members-modal.component.js +8 -8
- package/dist/lib/components/members/members-modal.component.js.map +1 -1
- package/dist/lib/components/message/conversation-message-rating.component.d.ts +47 -0
- package/dist/lib/components/message/conversation-message-rating.component.d.ts.map +1 -0
- package/dist/lib/components/message/conversation-message-rating.component.js +224 -0
- package/dist/lib/components/message/conversation-message-rating.component.js.map +1 -0
- package/dist/lib/components/message/message-input-box.component.d.ts +1 -1
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +4 -14
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +18 -3
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +288 -297
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +32 -2
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +253 -129
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +4 -2
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +35 -18
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +7 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +24 -14
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts +1 -1
- package/dist/lib/components/project/project-form-modal.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-form-modal.component.js +7 -7
- package/dist/lib/components/project/project-form-modal.component.js.map +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts +1 -1
- package/dist/lib/components/project/project-selector.component.d.ts.map +1 -1
- package/dist/lib/components/project/project-selector.component.js +10 -10
- package/dist/lib/components/project/project-selector.component.js.map +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts +1 -1
- package/dist/lib/components/search/search-panel.component.d.ts.map +1 -1
- package/dist/lib/components/search/search-panel.component.js +16 -8
- package/dist/lib/components/search/search-panel.component.js.map +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts +1 -1
- package/dist/lib/components/share/share-modal.component.d.ts.map +1 -1
- package/dist/lib/components/share/share-modal.component.js +12 -12
- package/dist/lib/components/share/share-modal.component.js.map +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts +1 -1
- package/dist/lib/components/shared/user-picker.component.d.ts.map +1 -1
- package/dist/lib/components/shared/user-picker.component.js +7 -7
- package/dist/lib/components/shared/user-picker.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts +1 -1
- package/dist/lib/components/task/tasks-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/task/tasks-full-view.component.js +20 -18
- package/dist/lib/components/task/tasks-full-view.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +18 -29
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +178 -218
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts +1 -1
- package/dist/lib/components/thread/thread-panel.component.d.ts.map +1 -1
- package/dist/lib/components/thread/thread-panel.component.js +2 -2
- package/dist/lib/components/thread/thread-panel.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +15 -9
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +126 -79
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +54 -52
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +11 -3
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.d.ts +31 -22
- package/dist/lib/models/conversation-complete-query.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.js +5 -2
- package/dist/lib/models/conversation-complete-query.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +4 -1
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +12 -4
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +18 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +53 -3
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/agent-state.service.d.ts +1 -1
- package/dist/lib/services/agent-state.service.d.ts.map +1 -1
- package/dist/lib/services/agent-state.service.js +11 -11
- package/dist/lib/services/agent-state.service.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-permission.service.js +15 -13
- package/dist/lib/services/artifact-permission.service.js.map +1 -1
- package/dist/lib/services/artifact-state.service.d.ts +23 -6
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +129 -38
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/artifact-use-tracking.service.d.ts +35 -0
- package/dist/lib/services/artifact-use-tracking.service.d.ts.map +1 -0
- package/dist/lib/services/artifact-use-tracking.service.js +76 -0
- package/dist/lib/services/artifact-use-tracking.service.js.map +1 -0
- package/dist/lib/services/collection-permission.service.d.ts +1 -1
- package/dist/lib/services/collection-permission.service.d.ts.map +1 -1
- package/dist/lib/services/collection-permission.service.js +13 -13
- package/dist/lib/services/collection-permission.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +30 -3
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +127 -34
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-state.service.d.ts +14 -1
- package/dist/lib/services/conversation-state.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-state.service.js +36 -9
- package/dist/lib/services/conversation-state.service.js.map +1 -1
- package/dist/lib/services/data-cache.service.d.ts +1 -1
- package/dist/lib/services/data-cache.service.d.ts.map +1 -1
- package/dist/lib/services/data-cache.service.js +13 -13
- package/dist/lib/services/data-cache.service.js.map +1 -1
- package/dist/lib/services/export.service.d.ts +1 -1
- package/dist/lib/services/export.service.d.ts.map +1 -1
- package/dist/lib/services/export.service.js +13 -15
- package/dist/lib/services/export.service.js.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.d.ts +1 -1
- package/dist/lib/services/mention-autocomplete.service.d.ts.map +1 -1
- package/dist/lib/services/mention-autocomplete.service.js +5 -5
- package/dist/lib/services/mention-autocomplete.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +1 -1
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +16 -13
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/lib/services/search.service.d.ts +1 -1
- package/dist/lib/services/search.service.d.ts.map +1 -1
- package/dist/lib/services/search.service.js +32 -26
- package/dist/lib/services/search.service.js.map +1 -1
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +14 -13
|
@@ -1,260 +1,210 @@
|
|
|
1
1
|
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import { RunView } from '@memberjunction/global';
|
|
3
2
|
import { Subject } from 'rxjs';
|
|
4
3
|
import { takeUntil } from 'rxjs/operators';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "../../services/
|
|
7
|
-
import * as i2 from "../../services/
|
|
5
|
+
import * as i1 from "../../services/active-tasks.service";
|
|
6
|
+
import * as i2 from "../../services/conversation-state.service";
|
|
8
7
|
import * as i3 from "@angular/common";
|
|
9
|
-
|
|
10
|
-
function TasksDropdownComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
function TasksDropdownComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
11
9
|
i0.ɵɵelementStart(0, "span", 5);
|
|
12
10
|
i0.ɵɵtext(1);
|
|
13
11
|
i0.ɵɵelementEnd();
|
|
14
12
|
} if (rf & 2) {
|
|
15
13
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
14
|
i0.ɵɵadvance();
|
|
17
|
-
i0.ɵɵtextInterpolate(ctx_r0.
|
|
15
|
+
i0.ɵɵtextInterpolate(ctx_r0.allTasks.length);
|
|
18
16
|
} }
|
|
19
|
-
function
|
|
20
|
-
i0.ɵɵ
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
i0.ɵɵelement(
|
|
17
|
+
function TasksDropdownComponent_div_4_i_3_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelement(0, "i", 16);
|
|
19
|
+
} }
|
|
20
|
+
function TasksDropdownComponent_div_4_i_4_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
i0.ɵɵelement(0, "i", 17);
|
|
22
|
+
} }
|
|
23
|
+
function TasksDropdownComponent_div_4_div_10_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
25
|
+
i0.ɵɵelementStart(0, "div", 22);
|
|
26
|
+
i0.ɵɵlistener("click", function TasksDropdownComponent_div_4_div_10_div_5_Template_div_click_0_listener() { const task_r4 = i0.ɵɵrestoreView(_r3).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onTaskClick(task_r4)); });
|
|
27
|
+
i0.ɵɵelement(1, "div", 23);
|
|
28
|
+
i0.ɵɵelementStart(2, "div", 24)(3, "div", 25);
|
|
29
|
+
i0.ɵɵelement(4, "i", 26);
|
|
24
30
|
i0.ɵɵtext(5);
|
|
25
31
|
i0.ɵɵelementEnd();
|
|
26
|
-
i0.ɵɵelementStart(6, "div",
|
|
32
|
+
i0.ɵɵelementStart(6, "div", 27);
|
|
27
33
|
i0.ɵɵtext(7);
|
|
28
34
|
i0.ɵɵelementEnd();
|
|
29
|
-
i0.ɵɵelementStart(8, "div",
|
|
35
|
+
i0.ɵɵelementStart(8, "div", 28);
|
|
30
36
|
i0.ɵɵtext(9);
|
|
31
37
|
i0.ɵɵelementEnd()()();
|
|
32
38
|
} if (rf & 2) {
|
|
33
|
-
const
|
|
39
|
+
const task_r4 = ctx.$implicit;
|
|
34
40
|
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
35
41
|
i0.ɵɵadvance(5);
|
|
36
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
42
|
+
i0.ɵɵtextInterpolate1(" ", task_r4.agentName, " ");
|
|
37
43
|
i0.ɵɵadvance(2);
|
|
38
|
-
i0.ɵɵtextInterpolate(ctx_r0.getTrimmedStatus(
|
|
44
|
+
i0.ɵɵtextInterpolate(ctx_r0.getTrimmedStatus(task_r4.status));
|
|
39
45
|
i0.ɵɵadvance(2);
|
|
40
|
-
i0.ɵɵtextInterpolate(ctx_r0.getElapsedTime(
|
|
46
|
+
i0.ɵɵtextInterpolate(ctx_r0.getElapsedTime(task_r4));
|
|
41
47
|
} }
|
|
42
|
-
function
|
|
43
|
-
i0.ɵɵelementStart(0, "div",
|
|
44
|
-
i0.ɵɵelement(2, "i",
|
|
48
|
+
function TasksDropdownComponent_div_4_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "div", 19);
|
|
50
|
+
i0.ɵɵelement(2, "i", 20);
|
|
45
51
|
i0.ɵɵelementStart(3, "span");
|
|
46
52
|
i0.ɵɵtext(4);
|
|
47
53
|
i0.ɵɵelementEnd()();
|
|
48
|
-
i0.ɵɵtemplate(5,
|
|
54
|
+
i0.ɵɵtemplate(5, TasksDropdownComponent_div_4_div_10_div_5_Template, 10, 3, "div", 21);
|
|
49
55
|
i0.ɵɵelementEnd();
|
|
50
56
|
} if (rf & 2) {
|
|
51
57
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
52
58
|
i0.ɵɵadvance(4);
|
|
53
|
-
i0.ɵɵtextInterpolate1("
|
|
59
|
+
i0.ɵɵtextInterpolate1("Current Conversation (", ctx_r0.currentConversationTasks.length, ")");
|
|
54
60
|
i0.ɵɵadvance();
|
|
55
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.
|
|
61
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.currentConversationTasks);
|
|
56
62
|
} }
|
|
57
|
-
function
|
|
58
|
-
|
|
59
|
-
i0.ɵɵ
|
|
60
|
-
i0.ɵɵ
|
|
63
|
+
function TasksDropdownComponent_div_4_div_11_div_5_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
64
|
+
i0.ɵɵelementStart(0, "div", 35);
|
|
65
|
+
i0.ɵɵelement(1, "i", 36);
|
|
66
|
+
i0.ɵɵtext(2);
|
|
61
67
|
i0.ɵɵelementEnd();
|
|
62
68
|
} if (rf & 2) {
|
|
63
|
-
const
|
|
64
|
-
i0.ɵɵ
|
|
69
|
+
const task_r6 = i0.ɵɵnextContext().$implicit;
|
|
70
|
+
i0.ɵɵadvance(2);
|
|
71
|
+
i0.ɵɵtextInterpolate1(" ", task_r6.conversationName, " ");
|
|
65
72
|
} }
|
|
66
|
-
function
|
|
67
|
-
i0.ɵɵ
|
|
68
|
-
i0.ɵɵ
|
|
73
|
+
function TasksDropdownComponent_div_4_div_11_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
74
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
75
|
+
i0.ɵɵelementStart(0, "div", 31);
|
|
76
|
+
i0.ɵɵlistener("click", function TasksDropdownComponent_div_4_div_11_div_5_Template_div_click_0_listener() { const task_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onTaskClick(task_r6)); });
|
|
77
|
+
i0.ɵɵelement(1, "div", 23);
|
|
78
|
+
i0.ɵɵelementStart(2, "div", 24)(3, "div", 25);
|
|
79
|
+
i0.ɵɵelement(4, "i", 26);
|
|
80
|
+
i0.ɵɵtext(5);
|
|
81
|
+
i0.ɵɵelementStart(6, "span", 32);
|
|
82
|
+
i0.ɵɵelement(7, "i", 33);
|
|
83
|
+
i0.ɵɵelementEnd()();
|
|
84
|
+
i0.ɵɵtemplate(8, TasksDropdownComponent_div_4_div_11_div_5_div_8_Template, 3, 1, "div", 34);
|
|
85
|
+
i0.ɵɵelementStart(9, "div", 27);
|
|
86
|
+
i0.ɵɵtext(10);
|
|
87
|
+
i0.ɵɵelementEnd();
|
|
88
|
+
i0.ɵɵelementStart(11, "div", 28);
|
|
89
|
+
i0.ɵɵtext(12);
|
|
90
|
+
i0.ɵɵelementEnd()()();
|
|
91
|
+
} if (rf & 2) {
|
|
92
|
+
const task_r6 = ctx.$implicit;
|
|
93
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
94
|
+
i0.ɵɵadvance(5);
|
|
95
|
+
i0.ɵɵtextInterpolate1(" ", task_r6.agentName, " ");
|
|
96
|
+
i0.ɵɵadvance(3);
|
|
97
|
+
i0.ɵɵproperty("ngIf", task_r6.conversationName);
|
|
98
|
+
i0.ɵɵadvance(2);
|
|
99
|
+
i0.ɵɵtextInterpolate(ctx_r0.getTrimmedStatus(task_r6.status));
|
|
100
|
+
i0.ɵɵadvance(2);
|
|
101
|
+
i0.ɵɵtextInterpolate(ctx_r0.getElapsedTime(task_r6));
|
|
102
|
+
} }
|
|
103
|
+
function TasksDropdownComponent_div_4_div_11_Template(rf, ctx) { if (rf & 1) {
|
|
104
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "div", 19);
|
|
105
|
+
i0.ɵɵelement(2, "i", 29);
|
|
69
106
|
i0.ɵɵelementStart(3, "span");
|
|
70
107
|
i0.ɵɵtext(4);
|
|
71
108
|
i0.ɵɵelementEnd()();
|
|
72
|
-
i0.ɵɵtemplate(5,
|
|
109
|
+
i0.ɵɵtemplate(5, TasksDropdownComponent_div_4_div_11_div_5_Template, 13, 4, "div", 30);
|
|
73
110
|
i0.ɵɵelementEnd();
|
|
74
111
|
} if (rf & 2) {
|
|
75
112
|
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
76
113
|
i0.ɵɵadvance(4);
|
|
77
|
-
i0.ɵɵtextInterpolate1("
|
|
114
|
+
i0.ɵɵtextInterpolate1("Other Conversations (", ctx_r0.otherConversationTasks.length, ")");
|
|
78
115
|
i0.ɵɵadvance();
|
|
79
|
-
i0.ɵɵproperty("ngForOf", ctx_r0.
|
|
116
|
+
i0.ɵɵproperty("ngForOf", ctx_r0.otherConversationTasks);
|
|
80
117
|
} }
|
|
81
|
-
function
|
|
82
|
-
i0.ɵɵelementStart(0, "div",
|
|
83
|
-
i0.ɵɵelement(1, "i",
|
|
118
|
+
function TasksDropdownComponent_div_4_div_12_Template(rf, ctx) { if (rf & 1) {
|
|
119
|
+
i0.ɵɵelementStart(0, "div", 37);
|
|
120
|
+
i0.ɵɵelement(1, "i", 38);
|
|
84
121
|
i0.ɵɵelementStart(2, "p");
|
|
85
122
|
i0.ɵɵtext(3, "No active tasks");
|
|
86
123
|
i0.ɵɵelementEnd()();
|
|
87
124
|
} }
|
|
88
|
-
function
|
|
125
|
+
function TasksDropdownComponent_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
89
126
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
90
127
|
i0.ɵɵelementStart(0, "div", 6)(1, "div", 7)(2, "div", 8);
|
|
91
|
-
i0.ɵɵ
|
|
92
|
-
i0.ɵɵelementStart(
|
|
93
|
-
i0.ɵɵtext(
|
|
128
|
+
i0.ɵɵtemplate(3, TasksDropdownComponent_div_4_i_3_Template, 1, 0, "i", 9)(4, TasksDropdownComponent_div_4_i_4_Template, 1, 0, "i", 10);
|
|
129
|
+
i0.ɵɵelementStart(5, "span");
|
|
130
|
+
i0.ɵɵtext(6);
|
|
94
131
|
i0.ɵɵelementEnd()();
|
|
95
|
-
i0.ɵɵelementStart(
|
|
96
|
-
i0.ɵɵlistener("click", function
|
|
97
|
-
i0.ɵɵelement(
|
|
132
|
+
i0.ɵɵelementStart(7, "button", 11);
|
|
133
|
+
i0.ɵɵlistener("click", function TasksDropdownComponent_div_4_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.closeDropdown()); });
|
|
134
|
+
i0.ɵɵelement(8, "i", 12);
|
|
98
135
|
i0.ɵɵelementEnd()();
|
|
99
|
-
i0.ɵɵelementStart(
|
|
100
|
-
i0.ɵɵtemplate(
|
|
136
|
+
i0.ɵɵelementStart(9, "div", 13);
|
|
137
|
+
i0.ɵɵtemplate(10, TasksDropdownComponent_div_4_div_10_Template, 6, 2, "div", 14)(11, TasksDropdownComponent_div_4_div_11_Template, 6, 2, "div", 14)(12, TasksDropdownComponent_div_4_div_12_Template, 4, 0, "div", 15);
|
|
101
138
|
i0.ɵɵelementEnd()();
|
|
102
139
|
} if (rf & 2) {
|
|
103
140
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
104
|
-
i0.ɵɵadvance(
|
|
105
|
-
i0.ɵɵproperty("ngIf", ctx_r0.
|
|
141
|
+
i0.ɵɵadvance(3);
|
|
142
|
+
i0.ɵɵproperty("ngIf", ctx_r0.allTasks.length > 0);
|
|
143
|
+
i0.ɵɵadvance();
|
|
144
|
+
i0.ɵɵproperty("ngIf", ctx_r0.allTasks.length === 0);
|
|
145
|
+
i0.ɵɵadvance(2);
|
|
146
|
+
i0.ɵɵtextInterpolate1("Active Tasks (", ctx_r0.allTasks.length, ")");
|
|
147
|
+
i0.ɵɵadvance(4);
|
|
148
|
+
i0.ɵɵproperty("ngIf", ctx_r0.currentConversationTasks.length > 0);
|
|
106
149
|
i0.ɵɵadvance();
|
|
107
|
-
i0.ɵɵproperty("ngIf", ctx_r0.
|
|
150
|
+
i0.ɵɵproperty("ngIf", ctx_r0.otherConversationTasks.length > 0);
|
|
108
151
|
i0.ɵɵadvance();
|
|
109
|
-
i0.ɵɵproperty("ngIf", ctx_r0.
|
|
152
|
+
i0.ɵɵproperty("ngIf", ctx_r0.allTasks.length === 0);
|
|
110
153
|
} }
|
|
111
154
|
/**
|
|
112
155
|
* Enhanced tasks dropdown component for chat header.
|
|
113
|
-
* Shows
|
|
114
|
-
* 1. Active (running) tasks from ActiveTasksService
|
|
115
|
-
* 2. Database tasks for the current conversation
|
|
156
|
+
* Shows ALL active tasks across ALL conversations, grouped by current vs other
|
|
116
157
|
*/
|
|
117
158
|
export class TasksDropdownComponent {
|
|
118
|
-
conversationState;
|
|
119
159
|
activeTasksService;
|
|
160
|
+
conversationState;
|
|
120
161
|
currentUser;
|
|
121
162
|
taskClicked = new EventEmitter();
|
|
163
|
+
navigateToConversation = new EventEmitter();
|
|
122
164
|
isOpen = false;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
previousConversationId = null;
|
|
165
|
+
allTasks = [];
|
|
166
|
+
currentConversationTasks = [];
|
|
167
|
+
otherConversationTasks = [];
|
|
127
168
|
destroy$ = new Subject();
|
|
128
|
-
|
|
129
|
-
_enablePolling = false;
|
|
130
|
-
_pollingInterval = 30000; // default to 30 seconds
|
|
131
|
-
constructor(conversationState, activeTasksService) {
|
|
132
|
-
this.conversationState = conversationState;
|
|
169
|
+
constructor(activeTasksService, conversationState) {
|
|
133
170
|
this.activeTasksService = activeTasksService;
|
|
134
|
-
|
|
135
|
-
get enablePolling() {
|
|
136
|
-
return this._enablePolling;
|
|
137
|
-
}
|
|
138
|
-
set enablePolling(value) {
|
|
139
|
-
this._enablePolling = value;
|
|
140
|
-
if (value) {
|
|
141
|
-
this.startPolling();
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
this.stopPolling();
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
get pollingInterval() {
|
|
148
|
-
return this._pollingInterval;
|
|
149
|
-
}
|
|
150
|
-
set pollingInterval(value) {
|
|
151
|
-
this._pollingInterval = value;
|
|
152
|
-
if (this.enablePolling) {
|
|
153
|
-
this.stopPolling();
|
|
154
|
-
this.startPolling();
|
|
155
|
-
}
|
|
171
|
+
this.conversationState = conversationState;
|
|
156
172
|
}
|
|
157
173
|
ngOnInit() {
|
|
158
|
-
// Subscribe to active tasks
|
|
159
|
-
this.activeTasksService.tasks
|
|
160
|
-
this.
|
|
161
|
-
|
|
174
|
+
// Subscribe to ALL active tasks across ALL conversations
|
|
175
|
+
this.activeTasksService.tasks$
|
|
176
|
+
.pipe(takeUntil(this.destroy$))
|
|
177
|
+
.subscribe(tasks => {
|
|
178
|
+
this.allTasks = tasks;
|
|
179
|
+
this.groupTasks();
|
|
162
180
|
});
|
|
163
|
-
// Initial load if there's an active conversation
|
|
164
|
-
if (this.conversationState.activeConversationId) {
|
|
165
|
-
this.loadDatabaseTasks();
|
|
166
|
-
}
|
|
167
|
-
// Poll for task updates every 3 seconds when conversation is active
|
|
168
|
-
if (this.enablePolling) {
|
|
169
|
-
this.startPolling();
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
startPolling() {
|
|
173
|
-
// if we already have a polling interval, do nothing
|
|
174
|
-
if (this._pollingIntervalObject) {
|
|
175
|
-
return;
|
|
176
|
-
}
|
|
177
|
-
this._pollingIntervalObject = setInterval(() => {
|
|
178
|
-
if (this.conversationState.activeConversationId) {
|
|
179
|
-
this.loadDatabaseTasks();
|
|
180
|
-
}
|
|
181
|
-
}, 3000); // Poll every 3 seconds
|
|
182
|
-
}
|
|
183
|
-
stopPolling() {
|
|
184
|
-
if (this._pollingIntervalObject) {
|
|
185
|
-
clearInterval(this._pollingIntervalObject);
|
|
186
|
-
this._pollingIntervalObject = null;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
ngDoCheck() {
|
|
190
|
-
// Detect conversation changes
|
|
191
|
-
const currentId = this.conversationState.activeConversationId;
|
|
192
|
-
if (currentId !== this.previousConversationId) {
|
|
193
|
-
this.previousConversationId = currentId;
|
|
194
|
-
if (currentId) {
|
|
195
|
-
this.loadDatabaseTasks();
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
this.dbTasks = [];
|
|
199
|
-
this.updateTotalCount();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
181
|
}
|
|
203
182
|
ngOnDestroy() {
|
|
204
|
-
this.stopPolling();
|
|
205
183
|
this.destroy$.next();
|
|
206
184
|
this.destroy$.complete();
|
|
207
185
|
}
|
|
186
|
+
groupTasks() {
|
|
187
|
+
const currentConvId = this.conversationState.activeConversationId;
|
|
188
|
+
this.currentConversationTasks = this.allTasks.filter(task => task.conversationId === currentConvId);
|
|
189
|
+
this.otherConversationTasks = this.allTasks.filter(task => task.conversationId && task.conversationId !== currentConvId);
|
|
190
|
+
}
|
|
208
191
|
toggleDropdown() {
|
|
209
192
|
this.isOpen = !this.isOpen;
|
|
210
|
-
if (this.isOpen) {
|
|
211
|
-
// Refresh database tasks when opening
|
|
212
|
-
this.loadDatabaseTasks();
|
|
213
|
-
}
|
|
214
193
|
}
|
|
215
194
|
closeDropdown() {
|
|
216
195
|
this.isOpen = false;
|
|
217
196
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
try {
|
|
227
|
-
const rv = new RunView();
|
|
228
|
-
// First get conversation details for this conversation
|
|
229
|
-
const detailsResult = await rv.RunView({
|
|
230
|
-
EntityName: 'Conversation Details',
|
|
231
|
-
ExtraFilter: `ConversationID='${activeId}'`,
|
|
232
|
-
OrderBy: '__mj_CreatedAt ASC',
|
|
233
|
-
ResultType: 'entity_object',
|
|
234
|
-
}, this.currentUser);
|
|
235
|
-
if (!detailsResult.Success || !detailsResult.Results || detailsResult.Results.length === 0) {
|
|
236
|
-
this.dbTasks = [];
|
|
237
|
-
this.updateTotalCount();
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
// Get all conversation detail IDs
|
|
241
|
-
const detailIds = detailsResult.Results.map((d) => `'${d.ID}'`).join(',');
|
|
242
|
-
// Load tasks for these conversation details (only top-level active ones)
|
|
243
|
-
const result = await rv.RunView({
|
|
244
|
-
EntityName: 'MJ: Tasks',
|
|
245
|
-
ExtraFilter: `ConversationDetailID IN (${detailIds}) AND Status IN ('Pending', 'In Progress') AND ParentID IS NULL`,
|
|
246
|
-
OrderBy: '__mj_CreatedAt DESC',
|
|
247
|
-
MaxRows: 50,
|
|
248
|
-
ResultType: 'entity_object',
|
|
249
|
-
}, this.currentUser);
|
|
250
|
-
if (result.Success) {
|
|
251
|
-
this.dbTasks = result.Results || [];
|
|
252
|
-
this.updateTotalCount();
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
catch (error) {
|
|
256
|
-
console.error('Failed to load database tasks:', error);
|
|
197
|
+
onTaskClick(task) {
|
|
198
|
+
// If task is from another conversation, emit navigation event
|
|
199
|
+
const currentConvId = this.conversationState.activeConversationId;
|
|
200
|
+
if (task.conversationId && task.conversationId !== currentConvId) {
|
|
201
|
+
this.navigateToConversation.emit({
|
|
202
|
+
conversationId: task.conversationId,
|
|
203
|
+
taskId: task.id
|
|
204
|
+
});
|
|
257
205
|
}
|
|
206
|
+
this.taskClicked.emit(task);
|
|
207
|
+
this.closeDropdown();
|
|
258
208
|
}
|
|
259
209
|
getElapsedTime(task) {
|
|
260
210
|
const elapsed = Date.now() - task.startTime;
|
|
@@ -267,36 +217,30 @@ export class TasksDropdownComponent {
|
|
|
267
217
|
return `${minutes}:${remainingSeconds.toString().padStart(2, '0')}`;
|
|
268
218
|
}
|
|
269
219
|
getTrimmedStatus(status) {
|
|
270
|
-
const maxLength =
|
|
220
|
+
const maxLength = 50;
|
|
271
221
|
if (status.length <= maxLength) {
|
|
272
222
|
return status;
|
|
273
223
|
}
|
|
274
224
|
return status.substring(0, maxLength) + '...';
|
|
275
225
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
this.closeDropdown();
|
|
279
|
-
}
|
|
280
|
-
static ɵfac = function TasksDropdownComponent_Factory(t) { return new (t || TasksDropdownComponent)(i0.ɵɵdirectiveInject(i1.ConversationStateService), i0.ɵɵdirectiveInject(i2.ActiveTasksService)); };
|
|
281
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TasksDropdownComponent, selectors: [["mj-tasks-dropdown"]], inputs: { currentUser: "currentUser" }, outputs: { taskClicked: "taskClicked" }, decls: 7, vars: 4, consts: [[1, "tasks-dropdown-container"], ["title", "View tasks", 1, "active-tasks-btn", 3, "click"], [1, "fas", "fa-tasks"], ["class", "task-count-badge", 4, "ngIf"], ["class", "active-tasks-dropdown", 4, "ngIf"], [1, "task-count-badge"], [1, "active-tasks-dropdown"], [1, "dropdown-header"], [1, "header-left"], [1, "close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "dropdown-content"], ["class", "section", 4, "ngIf"], ["class", "no-tasks", 4, "ngIf"], [1, "section"], [1, "section-header"], [1, "fas", "fa-circle-notch", "fa-spin"], ["class", "active-task-item", 4, "ngFor", "ngForOf"], [1, "active-task-item"], [1, "task-status-indicator", "active"], [1, "task-content"], [1, "task-title"], [1, "fas", "fa-robot"], [1, "task-status-text"], [1, "task-elapsed"], [1, "fas", "fa-list-check"], [3, "task", "compact", "clickable", "showProgress", "showDuration", "taskClick", 4, "ngFor", "ngForOf"], [3, "taskClick", "task", "compact", "clickable", "showProgress", "showDuration"], [1, "no-tasks"]], template: function TasksDropdownComponent_Template(rf, ctx) { if (rf & 1) {
|
|
226
|
+
static ɵfac = function TasksDropdownComponent_Factory(t) { return new (t || TasksDropdownComponent)(i0.ɵɵdirectiveInject(i1.ActiveTasksService), i0.ɵɵdirectiveInject(i2.ConversationStateService)); };
|
|
227
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TasksDropdownComponent, selectors: [["mj-tasks-dropdown"]], inputs: { currentUser: "currentUser" }, outputs: { taskClicked: "taskClicked", navigateToConversation: "navigateToConversation" }, decls: 5, vars: 7, consts: [[1, "tasks-dropdown-container"], [1, "active-tasks-btn", 3, "click", "title"], [1, "fas", "fa-bolt"], ["class", "task-count-badge", 4, "ngIf"], ["class", "active-tasks-dropdown", 4, "ngIf"], [1, "task-count-badge"], [1, "active-tasks-dropdown"], [1, "dropdown-header"], [1, "header-left"], ["class", "fas fa-circle-notch fa-spin", 4, "ngIf"], ["class", "fas fa-tasks", 4, "ngIf"], [1, "close-btn", 3, "click"], [1, "fas", "fa-times"], [1, "dropdown-content"], ["class", "section", 4, "ngIf"], ["class", "no-tasks", 4, "ngIf"], [1, "fas", "fa-circle-notch", "fa-spin"], [1, "fas", "fa-tasks"], [1, "section"], [1, "section-header"], [1, "fas", "fa-comment"], ["class", "active-task-item", 3, "click", 4, "ngFor", "ngForOf"], [1, "active-task-item", 3, "click"], [1, "task-status-indicator", "active"], [1, "task-content"], [1, "task-title"], [1, "fas", "fa-robot"], [1, "task-status-text"], [1, "task-elapsed"], [1, "fas", "fa-comments"], ["class", "active-task-item clickable", 3, "click", 4, "ngFor", "ngForOf"], [1, "active-task-item", "clickable", 3, "click"], [1, "go-btn"], [1, "fas", "fa-arrow-right"], ["class", "task-conversation", 4, "ngIf"], [1, "task-conversation"], [1, "fas", "fa-message"], [1, "no-tasks"], [1, "fas", "fa-check-circle"]], template: function TasksDropdownComponent_Template(rf, ctx) { if (rf & 1) {
|
|
282
228
|
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
283
229
|
i0.ɵɵlistener("click", function TasksDropdownComponent_Template_button_click_1_listener() { return ctx.toggleDropdown(); });
|
|
284
230
|
i0.ɵɵelement(2, "i", 2);
|
|
285
|
-
i0.ɵɵ
|
|
286
|
-
i0.ɵɵtext(4, "Tasks");
|
|
231
|
+
i0.ɵɵtemplate(3, TasksDropdownComponent_span_3_Template, 2, 1, "span", 3);
|
|
287
232
|
i0.ɵɵelementEnd();
|
|
288
|
-
i0.ɵɵtemplate(
|
|
289
|
-
i0.ɵɵelementEnd();
|
|
290
|
-
i0.ɵɵtemplate(6, TasksDropdownComponent_div_6_Template, 12, 3, "div", 4);
|
|
233
|
+
i0.ɵɵtemplate(4, TasksDropdownComponent_div_4_Template, 13, 6, "div", 4);
|
|
291
234
|
i0.ɵɵelementEnd();
|
|
292
235
|
} if (rf & 2) {
|
|
293
236
|
i0.ɵɵadvance();
|
|
294
|
-
i0.ɵɵclassProp("active", ctx.isOpen);
|
|
295
|
-
i0.ɵɵ
|
|
296
|
-
i0.ɵɵ
|
|
237
|
+
i0.ɵɵclassProp("active", ctx.isOpen)("has-tasks", ctx.allTasks.length > 0);
|
|
238
|
+
i0.ɵɵproperty("title", ctx.allTasks.length > 0 ? ctx.allTasks.length + " active task" + (ctx.allTasks.length > 1 ? "s" : "") : "View tasks");
|
|
239
|
+
i0.ɵɵadvance(2);
|
|
240
|
+
i0.ɵɵproperty("ngIf", ctx.allTasks.length > 0);
|
|
297
241
|
i0.ɵɵadvance();
|
|
298
242
|
i0.ɵɵproperty("ngIf", ctx.isOpen);
|
|
299
|
-
} }, dependencies: [i3.NgForOf, i3.NgIf
|
|
243
|
+
} }, dependencies: [i3.NgForOf, i3.NgIf], styles: [".tasks-dropdown-container[_ngcontent-%COMP%] {\n position: relative;\n }\n\n .active-tasks-btn[_ngcontent-%COMP%] {\n position: relative;\n width: 36px;\n height: 36px;\n border-radius: 6px;\n background: transparent;\n border: none;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n transition: all 0.2s;\n }\n\n .active-tasks-btn[_ngcontent-%COMP%]:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .active-tasks-btn.active[_ngcontent-%COMP%] {\n background: rgba(255,255,255,0.15);\n color: white;\n }\n\n .active-tasks-btn.has-tasks[_ngcontent-%COMP%] {\n color: #fb923c;\n }\n\n .active-tasks-btn.has-tasks[_ngcontent-%COMP%]:hover {\n color: #f97316;\n }\n\n .task-count-badge[_ngcontent-%COMP%] {\n position: absolute;\n top: -2px;\n right: -2px;\n background: #fb923c;\n color: white;\n padding: 2px 5px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: bold;\n min-width: 16px;\n text-align: center;\n line-height: 1;\n box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n }\n\n .active-tasks-dropdown[_ngcontent-%COMP%] {\n position: absolute;\n top: calc(100% + 8px);\n right: 0;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n z-index: 1000;\n min-width: 420px;\n max-width: 500px;\n }\n\n .dropdown-header[_ngcontent-%COMP%] {\n padding: 12px 16px;\n border-bottom: 1px solid #E5E7EB;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .header-left[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n color: #111827;\n }\n\n .header-left[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--accent, #1e40af);\n }\n\n .close-btn[_ngcontent-%COMP%] {\n background: none;\n border: none;\n color: #6B7280;\n cursor: pointer;\n font-size: 18px;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n }\n\n .close-btn[_ngcontent-%COMP%]:hover {\n background: #F3F4F6;\n color: #111827;\n }\n\n .dropdown-content[_ngcontent-%COMP%] {\n max-height: 500px;\n overflow-y: auto;\n }\n\n .section[_ngcontent-%COMP%] {\n padding: 12px;\n border-bottom: 1px solid #F3F4F6;\n }\n\n .section[_ngcontent-%COMP%]:last-child {\n border-bottom: none;\n }\n\n .section-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n font-weight: 600;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 12px;\n padding: 0 4px;\n }\n\n .section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n }\n\n .active-task-item[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 10px 12px;\n border-radius: 6px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n margin-bottom: 8px;\n transition: all 0.2s ease;\n }\n\n .active-task-item.clickable[_ngcontent-%COMP%] {\n cursor: pointer;\n }\n\n .active-task-item.clickable[_ngcontent-%COMP%]:hover {\n background: #EEF2FF;\n border-color: #C7D2FE;\n transform: translateX(2px);\n }\n\n .active-task-item[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n }\n\n .task-status-indicator[_ngcontent-%COMP%] {\n width: 4px;\n border-radius: 2px;\n flex-shrink: 0;\n }\n\n .task-status-indicator.active[_ngcontent-%COMP%] {\n background: #3B82F6;\n animation: _ngcontent-%COMP%_pulse 2s ease-in-out infinite;\n }\n\n @keyframes _ngcontent-%COMP%_pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n\n .task-content[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .task-title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .task-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #3B82F6;\n font-size: 12px;\n }\n\n .go-btn[_ngcontent-%COMP%] {\n margin-left: auto;\n color: #3B82F6;\n font-size: 10px;\n opacity: 0.7;\n }\n\n .active-task-item.clickable[_ngcontent-%COMP%]:hover .go-btn[_ngcontent-%COMP%] {\n opacity: 1;\n }\n\n .task-conversation[_ngcontent-%COMP%] {\n font-size: 11px;\n color: #9CA3AF;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .task-conversation[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n }\n\n .task-status-text[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #6B7280;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .task-elapsed[_ngcontent-%COMP%] {\n font-size: 11px;\n color: #3B82F6;\n font-weight: 600;\n }\n\n .no-tasks[_ngcontent-%COMP%] {\n padding: 40px 16px;\n text-align: center;\n color: #9CA3AF;\n }\n\n .no-tasks[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 32px;\n margin-bottom: 8px;\n opacity: 0.5;\n color: #10B981;\n }\n\n .no-tasks[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n }\n\n \n\n .dropdown-content[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 6px;\n }\n\n .dropdown-content[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #F9FAFB;\n }\n\n .dropdown-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #D1D5DB;\n border-radius: 3px;\n }\n\n .dropdown-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #9CA3AF;\n }"] });
|
|
300
244
|
}
|
|
301
245
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TasksDropdownComponent, [{
|
|
302
246
|
type: Component,
|
|
@@ -306,17 +250,18 @@ export class TasksDropdownComponent {
|
|
|
306
250
|
class="active-tasks-btn"
|
|
307
251
|
(click)="toggleDropdown()"
|
|
308
252
|
[class.active]="isOpen"
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
<
|
|
312
|
-
<span class="task-count-badge" *ngIf="
|
|
253
|
+
[class.has-tasks]="allTasks.length > 0"
|
|
254
|
+
[title]="allTasks.length > 0 ? allTasks.length + ' active task' + (allTasks.length > 1 ? 's' : '') : 'View tasks'">
|
|
255
|
+
<i class="fas fa-bolt"></i>
|
|
256
|
+
<span class="task-count-badge" *ngIf="allTasks.length > 0">{{ allTasks.length }}</span>
|
|
313
257
|
</button>
|
|
314
258
|
|
|
315
259
|
<div class="active-tasks-dropdown" *ngIf="isOpen">
|
|
316
260
|
<div class="dropdown-header">
|
|
317
261
|
<div class="header-left">
|
|
318
|
-
<i class="fas fa-
|
|
319
|
-
<
|
|
262
|
+
<i class="fas fa-circle-notch fa-spin" *ngIf="allTasks.length > 0"></i>
|
|
263
|
+
<i class="fas fa-tasks" *ngIf="allTasks.length === 0"></i>
|
|
264
|
+
<span>Active Tasks ({{ allTasks.length }})</span>
|
|
320
265
|
</div>
|
|
321
266
|
<button class="close-btn" (click)="closeDropdown()">
|
|
322
267
|
<i class="fas fa-times"></i>
|
|
@@ -324,13 +269,15 @@ export class TasksDropdownComponent {
|
|
|
324
269
|
</div>
|
|
325
270
|
|
|
326
271
|
<div class="dropdown-content">
|
|
327
|
-
<!--
|
|
328
|
-
<div class="section" *ngIf="
|
|
272
|
+
<!-- Current Conversation Tasks -->
|
|
273
|
+
<div class="section" *ngIf="currentConversationTasks.length > 0">
|
|
329
274
|
<div class="section-header">
|
|
330
|
-
<i class="fas fa-
|
|
331
|
-
<span>
|
|
275
|
+
<i class="fas fa-comment"></i>
|
|
276
|
+
<span>Current Conversation ({{ currentConversationTasks.length }})</span>
|
|
332
277
|
</div>
|
|
333
|
-
<div class="active-task-item"
|
|
278
|
+
<div class="active-task-item"
|
|
279
|
+
*ngFor="let task of currentConversationTasks"
|
|
280
|
+
(click)="onTaskClick(task)">
|
|
334
281
|
<div class="task-status-indicator active"></div>
|
|
335
282
|
<div class="task-content">
|
|
336
283
|
<div class="task-title">
|
|
@@ -343,36 +290,49 @@ export class TasksDropdownComponent {
|
|
|
343
290
|
</div>
|
|
344
291
|
</div>
|
|
345
292
|
|
|
346
|
-
<!--
|
|
347
|
-
<div class="section" *ngIf="
|
|
293
|
+
<!-- Other Conversations Tasks -->
|
|
294
|
+
<div class="section" *ngIf="otherConversationTasks.length > 0">
|
|
348
295
|
<div class="section-header">
|
|
349
|
-
<i class="fas fa-
|
|
350
|
-
<span>
|
|
296
|
+
<i class="fas fa-comments"></i>
|
|
297
|
+
<span>Other Conversations ({{ otherConversationTasks.length }})</span>
|
|
298
|
+
</div>
|
|
299
|
+
<div class="active-task-item clickable"
|
|
300
|
+
*ngFor="let task of otherConversationTasks"
|
|
301
|
+
(click)="onTaskClick(task)">
|
|
302
|
+
<div class="task-status-indicator active"></div>
|
|
303
|
+
<div class="task-content">
|
|
304
|
+
<div class="task-title">
|
|
305
|
+
<i class="fas fa-robot"></i>
|
|
306
|
+
{{ task.agentName }}
|
|
307
|
+
<span class="go-btn">
|
|
308
|
+
<i class="fas fa-arrow-right"></i>
|
|
309
|
+
</span>
|
|
310
|
+
</div>
|
|
311
|
+
<div class="task-conversation" *ngIf="task.conversationName">
|
|
312
|
+
<i class="fas fa-message"></i>
|
|
313
|
+
{{ task.conversationName }}
|
|
314
|
+
</div>
|
|
315
|
+
<div class="task-status-text">{{ getTrimmedStatus(task.status) }}</div>
|
|
316
|
+
<div class="task-elapsed">{{ getElapsedTime(task) }}</div>
|
|
317
|
+
</div>
|
|
351
318
|
</div>
|
|
352
|
-
<mj-task-widget
|
|
353
|
-
*ngFor="let task of dbTasks"
|
|
354
|
-
[task]="task"
|
|
355
|
-
[compact]="true"
|
|
356
|
-
[clickable]="true"
|
|
357
|
-
[showProgress]="true"
|
|
358
|
-
[showDuration]="false"
|
|
359
|
-
(taskClick)="onTaskClick($event)">
|
|
360
|
-
</mj-task-widget>
|
|
361
319
|
</div>
|
|
362
320
|
|
|
363
321
|
<!-- No Tasks State -->
|
|
364
|
-
<div *ngIf="
|
|
365
|
-
<i class="fas fa-
|
|
322
|
+
<div *ngIf="allTasks.length === 0" class="no-tasks">
|
|
323
|
+
<i class="fas fa-check-circle"></i>
|
|
366
324
|
<p>No active tasks</p>
|
|
367
325
|
</div>
|
|
368
326
|
</div>
|
|
369
327
|
</div>
|
|
370
328
|
</div>
|
|
371
|
-
`, styles: ["\n .tasks-dropdown-container {\n position: relative;\n }\n\n .active-tasks-btn {\n
|
|
372
|
-
}], () => [{ type: i1.
|
|
329
|
+
`, styles: ["\n .tasks-dropdown-container {\n position: relative;\n }\n\n .active-tasks-btn {\n position: relative;\n width: 36px;\n height: 36px;\n border-radius: 6px;\n background: transparent;\n border: none;\n color: rgba(255,255,255,0.7);\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n transition: all 0.2s;\n }\n\n .active-tasks-btn:hover {\n background: rgba(255,255,255,0.1);\n color: white;\n }\n\n .active-tasks-btn.active {\n background: rgba(255,255,255,0.15);\n color: white;\n }\n\n .active-tasks-btn.has-tasks {\n color: #fb923c;\n }\n\n .active-tasks-btn.has-tasks:hover {\n color: #f97316;\n }\n\n .task-count-badge {\n position: absolute;\n top: -2px;\n right: -2px;\n background: #fb923c;\n color: white;\n padding: 2px 5px;\n border-radius: 10px;\n font-size: 10px;\n font-weight: bold;\n min-width: 16px;\n text-align: center;\n line-height: 1;\n box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n }\n\n .active-tasks-dropdown {\n position: absolute;\n top: calc(100% + 8px);\n right: 0;\n background: white;\n border: 1px solid #E5E7EB;\n border-radius: 8px;\n box-shadow: 0 4px 12px rgba(0,0,0,0.15);\n z-index: 1000;\n min-width: 420px;\n max-width: 500px;\n }\n\n .dropdown-header {\n padding: 12px 16px;\n border-bottom: 1px solid #E5E7EB;\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n color: #111827;\n }\n\n .header-left i {\n color: var(--accent, #1e40af);\n }\n\n .close-btn {\n background: none;\n border: none;\n color: #6B7280;\n cursor: pointer;\n font-size: 18px;\n padding: 0;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n }\n\n .close-btn:hover {\n background: #F3F4F6;\n color: #111827;\n }\n\n .dropdown-content {\n max-height: 500px;\n overflow-y: auto;\n }\n\n .section {\n padding: 12px;\n border-bottom: 1px solid #F3F4F6;\n }\n\n .section:last-child {\n border-bottom: none;\n }\n\n .section-header {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12px;\n font-weight: 600;\n color: #6B7280;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n margin-bottom: 12px;\n padding: 0 4px;\n }\n\n .section-header i {\n font-size: 11px;\n }\n\n .active-task-item {\n display: flex;\n gap: 12px;\n padding: 10px 12px;\n border-radius: 6px;\n background: #F9FAFB;\n border: 1px solid #E5E7EB;\n margin-bottom: 8px;\n transition: all 0.2s ease;\n }\n\n .active-task-item.clickable {\n cursor: pointer;\n }\n\n .active-task-item.clickable:hover {\n background: #EEF2FF;\n border-color: #C7D2FE;\n transform: translateX(2px);\n }\n\n .active-task-item:last-child {\n margin-bottom: 0;\n }\n\n .task-status-indicator {\n width: 4px;\n border-radius: 2px;\n flex-shrink: 0;\n }\n\n .task-status-indicator.active {\n background: #3B82F6;\n animation: pulse 2s ease-in-out infinite;\n }\n\n @keyframes pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n\n .task-content {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n }\n\n .task-title {\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n display: flex;\n align-items: center;\n gap: 6px;\n }\n\n .task-title i {\n color: #3B82F6;\n font-size: 12px;\n }\n\n .go-btn {\n margin-left: auto;\n color: #3B82F6;\n font-size: 10px;\n opacity: 0.7;\n }\n\n .active-task-item.clickable:hover .go-btn {\n opacity: 1;\n }\n\n .task-conversation {\n font-size: 11px;\n color: #9CA3AF;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .task-conversation i {\n font-size: 10px;\n }\n\n .task-status-text {\n font-size: 12px;\n color: #6B7280;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .task-elapsed {\n font-size: 11px;\n color: #3B82F6;\n font-weight: 600;\n }\n\n .no-tasks {\n padding: 40px 16px;\n text-align: center;\n color: #9CA3AF;\n }\n\n .no-tasks i {\n font-size: 32px;\n margin-bottom: 8px;\n opacity: 0.5;\n color: #10B981;\n }\n\n .no-tasks p {\n margin: 0;\n font-size: 14px;\n }\n\n /* Scrollbar Styling */\n .dropdown-content::-webkit-scrollbar {\n width: 6px;\n }\n\n .dropdown-content::-webkit-scrollbar-track {\n background: #F9FAFB;\n }\n\n .dropdown-content::-webkit-scrollbar-thumb {\n background: #D1D5DB;\n border-radius: 3px;\n }\n\n .dropdown-content::-webkit-scrollbar-thumb:hover {\n background: #9CA3AF;\n }\n "] }]
|
|
330
|
+
}], () => [{ type: i1.ActiveTasksService }, { type: i2.ConversationStateService }], { currentUser: [{
|
|
373
331
|
type: Input
|
|
374
332
|
}], taskClicked: [{
|
|
375
333
|
type: Output
|
|
334
|
+
}], navigateToConversation: [{
|
|
335
|
+
type: Output
|
|
376
336
|
}] }); })();
|
|
377
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TasksDropdownComponent, { className: "TasksDropdownComponent", filePath: "src/lib/components/tasks/tasks-dropdown.component.ts", lineNumber:
|
|
337
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TasksDropdownComponent, { className: "TasksDropdownComponent", filePath: "src/lib/components/tasks/tasks-dropdown.component.ts", lineNumber: 373 }); })();
|
|
378
338
|
//# sourceMappingURL=tasks-dropdown.component.js.map
|