@memberjunction/ng-conversations 2.122.1 → 2.123.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components/collection/collections-full-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collections-full-view.component.js +22 -5
- package/dist/lib/components/collection/collections-full-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +25 -11
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +215 -184
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +10 -5
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +49 -30
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/mention/mention-dropdown.component.js +2 -2
- package/dist/lib/components/message/message-input.component.d.ts +3 -3
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +7 -7
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.js +2 -2
- 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 +15 -2
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +2 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +7 -3
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts +6 -8
- package/dist/lib/components/sidebar/conversation-sidebar.component.d.ts.map +1 -1
- package/dist/lib/components/sidebar/conversation-sidebar.component.js +31 -29
- package/dist/lib/components/sidebar/conversation-sidebar.component.js.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts +3 -4
- package/dist/lib/components/tasks/tasks-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/tasks/tasks-dropdown.component.js +13 -15
- package/dist/lib/components/tasks/tasks-dropdown.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +50 -3
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +124 -43
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/services/{conversation-state.service.d.ts → conversation-data.service.d.ts} +22 -62
- package/dist/lib/services/conversation-data.service.d.ts.map +1 -0
- package/dist/lib/services/{conversation-state.service.js → conversation-data.service.js} +36 -106
- package/dist/lib/services/conversation-data.service.js.map +1 -0
- package/dist/public-api.d.ts +1 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +26 -23
- package/dist/lib/services/conversation-state.service.d.ts.map +0 -1
- package/dist/lib/services/conversation-state.service.js.map +0 -1
|
@@ -2,7 +2,7 @@ import { EventEmitter, OnInit, OnDestroy, DoCheck, ChangeDetectorRef } from '@an
|
|
|
2
2
|
import { ConversationEntity, ArtifactEntity, TaskEntity } from '@memberjunction/core-entities';
|
|
3
3
|
import { UserInfo, CompositeKey } from '@memberjunction/core';
|
|
4
4
|
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
5
|
-
import {
|
|
5
|
+
import { ConversationDataService } from '../../services/conversation-data.service';
|
|
6
6
|
import { ArtifactStateService } from '../../services/artifact-state.service';
|
|
7
7
|
import { CollectionStateService } from '../../services/collection-state.service';
|
|
8
8
|
import { ArtifactPermissionService } from '../../services/artifact-permission.service';
|
|
@@ -20,7 +20,7 @@ import * as i0 from "@angular/core";
|
|
|
20
20
|
* Supports context-based navigation (library or task views)
|
|
21
21
|
*/
|
|
22
22
|
export declare class ConversationWorkspaceComponent extends BaseAngularComponent implements OnInit, OnDestroy, DoCheck {
|
|
23
|
-
|
|
23
|
+
conversationData: ConversationDataService;
|
|
24
24
|
artifactState: ArtifactStateService;
|
|
25
25
|
collectionState: CollectionStateService;
|
|
26
26
|
private artifactPermissionService;
|
|
@@ -86,7 +86,54 @@ export declare class ConversationWorkspaceComponent extends BaseAngularComponent
|
|
|
86
86
|
private readonly SIDEBAR_WIDTH_KEY;
|
|
87
87
|
private readonly ARTIFACT_PANEL_WIDTH_KEY;
|
|
88
88
|
tasksFilter: string;
|
|
89
|
-
|
|
89
|
+
selectedConversationId: string | null;
|
|
90
|
+
selectedConversation: ConversationEntity | null;
|
|
91
|
+
selectedThreadId: string | null;
|
|
92
|
+
isNewUnsavedConversation: boolean;
|
|
93
|
+
pendingMessageToSend: string | null;
|
|
94
|
+
pendingArtifactId: string | null;
|
|
95
|
+
pendingArtifactVersionNumber: number | null;
|
|
96
|
+
constructor(conversationData: ConversationDataService, artifactState: ArtifactStateService, collectionState: CollectionStateService, artifactPermissionService: ArtifactPermissionService, mentionAutocompleteService: MentionAutocompleteService, notificationService: MJNotificationService, streamingService: ConversationStreamingService, uiCommandHandler: UICommandHandlerService, cdr: ChangeDetectorRef);
|
|
97
|
+
/**
|
|
98
|
+
* Sets the active conversation for this workspace instance
|
|
99
|
+
* @param id The conversation ID to activate (or null to clear)
|
|
100
|
+
*/
|
|
101
|
+
setActiveConversation(id: string | null): void;
|
|
102
|
+
/**
|
|
103
|
+
* Initiates a new unsaved conversation (doesn't create DB record yet)
|
|
104
|
+
* This shows the welcome screen and delays DB creation until first message
|
|
105
|
+
*/
|
|
106
|
+
startNewConversation(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Clears the new unsaved conversation state
|
|
109
|
+
* Called when the conversation is actually created or cancelled
|
|
110
|
+
*/
|
|
111
|
+
clearNewConversationState(): void;
|
|
112
|
+
/**
|
|
113
|
+
* Opens a thread panel for a specific message
|
|
114
|
+
* @param messageId The parent message ID
|
|
115
|
+
*/
|
|
116
|
+
openThread(messageId: string): void;
|
|
117
|
+
/**
|
|
118
|
+
* Closes the currently open thread panel
|
|
119
|
+
*/
|
|
120
|
+
closeThread(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Handler for conversation selection from sidebar/list
|
|
123
|
+
*/
|
|
124
|
+
onConversationSelected(conversationId: string): void;
|
|
125
|
+
/**
|
|
126
|
+
* Handler for new conversation creation from chat area
|
|
127
|
+
*/
|
|
128
|
+
onConversationCreated(conversation: ConversationEntity): void;
|
|
129
|
+
/**
|
|
130
|
+
* Handler for thread opened from chat area
|
|
131
|
+
*/
|
|
132
|
+
onThreadOpened(threadId: string): void;
|
|
133
|
+
/**
|
|
134
|
+
* Handler for thread closed from chat area
|
|
135
|
+
*/
|
|
136
|
+
onThreadClosed(): void;
|
|
90
137
|
ngOnInit(): Promise<void>;
|
|
91
138
|
/**
|
|
92
139
|
* Builds the SQL filter for tasks in conversations the user has access to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-workspace.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/workspace/conversation-workspace.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,OAAO,EACP,iBAAiB,EAElB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,UAAU,EAA0B,MAAM,+BAA+B,CAAC;AACvH,OAAO,EAAE,QAAQ,EAAE,YAAY,EAA0B,MAAM,sBAAsB,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"conversation-workspace.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/workspace/conversation-workspace.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,OAAO,EACP,iBAAiB,EAElB,MAAM,eAAe,CAAC;A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IAKrD;;;OAGG;IACH,kBAAkB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;yCAl8BxC,8BAA8B;2CAA9B,8BAA8B;CAs8B1C"}
|
|
@@ -5,7 +5,7 @@ import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
|
5
5
|
import { Subject, takeUntil } from 'rxjs';
|
|
6
6
|
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "../../services/conversation-
|
|
8
|
+
import * as i1 from "../../services/conversation-data.service";
|
|
9
9
|
import * as i2 from "../../services/artifact-state.service";
|
|
10
10
|
import * as i3 from "../../services/collection-state.service";
|
|
11
11
|
import * as i4 from "../../services/artifact-permission.service";
|
|
@@ -38,26 +38,27 @@ function ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template(rf,
|
|
|
38
38
|
i0.ɵɵelementEnd();
|
|
39
39
|
} }
|
|
40
40
|
function ConversationWorkspaceComponent_Conditional_4_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
-
i0.ɵɵ
|
|
42
|
-
i0.ɵɵ
|
|
43
|
-
i0.ɵɵ
|
|
41
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
42
|
+
i0.ɵɵelementStart(0, "div", 14)(1, "mj-conversation-sidebar", 15);
|
|
43
|
+
i0.ɵɵlistener("conversationSelected", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_conversationSelected_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationSelected($event)); })("newConversationRequested", function ConversationWorkspaceComponent_Conditional_4_div_2_Template_mj_conversation_sidebar_newConversationRequested_1_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.startNewConversation()); });
|
|
44
|
+
i0.ɵɵelementEnd()();
|
|
44
45
|
} if (rf & 2) {
|
|
45
46
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
46
47
|
i0.ɵɵstyleProp("width", ctx_r1.sidebarWidth, "px");
|
|
47
48
|
i0.ɵɵclassProp("open", ctx_r1.isSidebarVisible);
|
|
48
49
|
i0.ɵɵadvance();
|
|
49
|
-
i0.ɵɵproperty("activeTab", ctx_r1.activeTab)("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("renamedConversationId", ctx_r1.renamedConversationId);
|
|
50
|
+
i0.ɵɵproperty("activeTab", ctx_r1.activeTab)("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("selectedConversationId", ctx_r1.selectedConversationId)("renamedConversationId", ctx_r1.renamedConversationId);
|
|
50
51
|
} }
|
|
51
52
|
function ConversationWorkspaceComponent_Conditional_4_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
-
const
|
|
53
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
53
54
|
i0.ɵɵelementStart(0, "div", 16);
|
|
54
|
-
i0.ɵɵlistener("mousedown", function ConversationWorkspaceComponent_Conditional_4_div_3_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(
|
|
55
|
+
i0.ɵɵlistener("mousedown", function ConversationWorkspaceComponent_Conditional_4_div_3_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onSidebarResizeStart($event)); });
|
|
55
56
|
i0.ɵɵelementEnd();
|
|
56
57
|
} }
|
|
57
58
|
function ConversationWorkspaceComponent_Conditional_4_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
58
|
-
const
|
|
59
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
59
60
|
i0.ɵɵelementStart(0, "div", 17)(1, "mj-collections-full-view", 18);
|
|
60
|
-
i0.ɵɵlistener("collectionNavigated", function ConversationWorkspaceComponent_Conditional_4_div_4_Template_mj_collections_full_view_collectionNavigated_1_listener($event) { i0.ɵɵrestoreView(
|
|
61
|
+
i0.ɵɵlistener("collectionNavigated", function ConversationWorkspaceComponent_Conditional_4_div_4_Template_mj_collections_full_view_collectionNavigated_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onCollectionNavigated($event)); });
|
|
61
62
|
i0.ɵɵelementEnd()();
|
|
62
63
|
} if (rf & 2) {
|
|
63
64
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -65,9 +66,9 @@ function ConversationWorkspaceComponent_Conditional_4_div_4_Template(rf, ctx) {
|
|
|
65
66
|
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser);
|
|
66
67
|
} }
|
|
67
68
|
function ConversationWorkspaceComponent_Conditional_4_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
68
|
-
const
|
|
69
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
69
70
|
i0.ɵɵelementStart(0, "div", 17)(1, "mj-tasks-full-view", 19);
|
|
70
|
-
i0.ɵɵlistener("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_5_Template_mj_tasks_full_view_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(
|
|
71
|
+
i0.ɵɵlistener("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_5_Template_mj_tasks_full_view_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onOpenEntityRecordFromTasks($event)); });
|
|
71
72
|
i0.ɵɵelementEnd()();
|
|
72
73
|
} if (rf & 2) {
|
|
73
74
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -75,26 +76,26 @@ function ConversationWorkspaceComponent_Conditional_4_div_5_Template(rf, ctx) {
|
|
|
75
76
|
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("baseFilter", ctx_r1.tasksFilter)("activeTaskId", ctx_r1.activeTaskId);
|
|
76
77
|
} }
|
|
77
78
|
function ConversationWorkspaceComponent_Conditional_4_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
-
const
|
|
79
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
79
80
|
i0.ɵɵelementStart(0, "div", 17)(1, "mj-conversation-chat-area", 20);
|
|
80
|
-
i0.ɵɵlistener("conversationRenamed", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_conversationRenamed_1_listener($event) { i0.ɵɵrestoreView(
|
|
81
|
+
i0.ɵɵlistener("conversationRenamed", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_conversationRenamed_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationRenamed($event)); })("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onOpenEntityRecord($event)); })("taskClicked", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_taskClicked_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTaskClicked($event)); })("artifactLinkClicked", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_artifactLinkClicked_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactLinkNavigation($event)); })("conversationCreated", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_conversationCreated_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationCreated($event)); })("threadOpened", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_threadOpened_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadOpened($event)); })("threadClosed", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_threadClosed_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadClosed()); })("pendingArtifactConsumed", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_pendingArtifactConsumed_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.pendingArtifactId = null; return i0.ɵɵresetView(ctx_r1.pendingArtifactVersionNumber = null); })("pendingMessageConsumed", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_pendingMessageConsumed_1_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.pendingMessageToSend = null); })("pendingMessageRequested", function ConversationWorkspaceComponent_Conditional_4_div_6_Template_mj_conversation_chat_area_pendingMessageRequested_1_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.pendingMessageToSend = $event); });
|
|
81
82
|
i0.ɵɵelementEnd()();
|
|
82
83
|
} if (rf & 2) {
|
|
83
84
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
84
85
|
i0.ɵɵadvance();
|
|
85
|
-
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser);
|
|
86
|
+
i0.ɵɵproperty("environmentId", ctx_r1.environmentId)("currentUser", ctx_r1.currentUser)("conversationId", ctx_r1.selectedConversationId)("conversation", ctx_r1.selectedConversation)("threadId", ctx_r1.selectedThreadId)("isNewConversation", ctx_r1.isNewUnsavedConversation)("pendingMessage", ctx_r1.pendingMessageToSend)("pendingArtifactId", ctx_r1.pendingArtifactId)("pendingArtifactVersionNumber", ctx_r1.pendingArtifactVersionNumber);
|
|
86
87
|
} }
|
|
87
88
|
function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
88
|
-
const
|
|
89
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
89
90
|
i0.ɵɵelementStart(0, "div", 24);
|
|
90
|
-
i0.ɵɵlistener("mousedown", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Conditional_0_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(
|
|
91
|
+
i0.ɵɵlistener("mousedown", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Conditional_0_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onArtifactPanelResizeStart($event)); });
|
|
91
92
|
i0.ɵɵelementEnd();
|
|
92
93
|
} }
|
|
93
94
|
function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
94
|
-
const
|
|
95
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
95
96
|
i0.ɵɵtemplate(0, ConversationWorkspaceComponent_Conditional_4_Conditional_7_Conditional_0_Template, 1, 0, "div", 21);
|
|
96
97
|
i0.ɵɵelementStart(1, "div", 22)(2, "mj-artifact-viewer-panel", 23);
|
|
97
|
-
i0.ɵɵlistener("closed", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template_mj_artifact_viewer_panel_closed_2_listener() { i0.ɵɵrestoreView(
|
|
98
|
+
i0.ɵɵlistener("closed", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template_mj_artifact_viewer_panel_closed_2_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.closeArtifactPanel()); })("navigateToLink", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template_mj_artifact_viewer_panel_navigateToLink_2_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactLinkNavigation($event)); })("shareRequested", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template_mj_artifact_viewer_panel_shareRequested_2_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactShareRequested($event)); })("maximizeToggled", function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template_mj_artifact_viewer_panel_maximizeToggled_2_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.toggleMaximizeArtifactPanel()); });
|
|
98
99
|
i0.ɵɵelementEnd()();
|
|
99
100
|
} if (rf & 2) {
|
|
100
101
|
let tmp_8_0;
|
|
@@ -109,7 +110,7 @@ function ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template(rf,
|
|
|
109
110
|
} }
|
|
110
111
|
function ConversationWorkspaceComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
111
112
|
i0.ɵɵelementStart(0, "div", 4);
|
|
112
|
-
i0.ɵɵtemplate(1, ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template, 1, 0, "div", 8)(2, ConversationWorkspaceComponent_Conditional_4_div_2_Template, 2,
|
|
113
|
+
i0.ɵɵtemplate(1, ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template, 1, 0, "div", 8)(2, ConversationWorkspaceComponent_Conditional_4_div_2_Template, 2, 9, "div", 9)(3, ConversationWorkspaceComponent_Conditional_4_div_3_Template, 1, 0, "div", 10)(4, ConversationWorkspaceComponent_Conditional_4_div_4_Template, 2, 2, "div", 11)(5, ConversationWorkspaceComponent_Conditional_4_div_5_Template, 2, 4, "div", 11)(6, ConversationWorkspaceComponent_Conditional_4_div_6_Template, 2, 9, "div", 11)(7, ConversationWorkspaceComponent_Conditional_4_Conditional_7_Template, 3, 15, "div", 12);
|
|
113
114
|
i0.ɵɵelementEnd();
|
|
114
115
|
} if (rf & 2) {
|
|
115
116
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -134,7 +135,7 @@ function ConversationWorkspaceComponent_Conditional_4_Template(rf, ctx) { if (rf
|
|
|
134
135
|
* Supports context-based navigation (library or task views)
|
|
135
136
|
*/
|
|
136
137
|
export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
137
|
-
|
|
138
|
+
conversationData;
|
|
138
139
|
artifactState;
|
|
139
140
|
collectionState;
|
|
140
141
|
artifactPermissionService;
|
|
@@ -156,10 +157,10 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
159
|
set activeConversationInput(value) {
|
|
159
|
-
if (value && value !== this.
|
|
160
|
+
if (value && value !== this.selectedConversationId) {
|
|
160
161
|
console.log('🔗 Deep link to conversation:', value);
|
|
161
162
|
this.activeTab = 'conversations';
|
|
162
|
-
this.
|
|
163
|
+
this.setActiveConversation(value);
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
set activeCollectionInput(value) {
|
|
@@ -232,9 +233,18 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
232
233
|
ARTIFACT_PANEL_WIDTH_KEY = 'mj-artifact-panel-width';
|
|
233
234
|
// Task filter for conversation-specific filtering
|
|
234
235
|
tasksFilter = '1=1';
|
|
235
|
-
|
|
236
|
+
// LOCAL CONVERSATION STATE - enables multiple workspace instances
|
|
237
|
+
// Each workspace manages its own selection state independently
|
|
238
|
+
selectedConversationId = null;
|
|
239
|
+
selectedConversation = null;
|
|
240
|
+
selectedThreadId = null;
|
|
241
|
+
isNewUnsavedConversation = false;
|
|
242
|
+
pendingMessageToSend = null;
|
|
243
|
+
pendingArtifactId = null;
|
|
244
|
+
pendingArtifactVersionNumber = null;
|
|
245
|
+
constructor(conversationData, artifactState, collectionState, artifactPermissionService, mentionAutocompleteService, notificationService, streamingService, uiCommandHandler, cdr) {
|
|
236
246
|
super();
|
|
237
|
-
this.
|
|
247
|
+
this.conversationData = conversationData;
|
|
238
248
|
this.artifactState = artifactState;
|
|
239
249
|
this.collectionState = collectionState;
|
|
240
250
|
this.artifactPermissionService = artifactPermissionService;
|
|
@@ -244,6 +254,81 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
244
254
|
this.uiCommandHandler = uiCommandHandler;
|
|
245
255
|
this.cdr = cdr;
|
|
246
256
|
}
|
|
257
|
+
// =========================================================================
|
|
258
|
+
// LOCAL CONVERSATION STATE MANAGEMENT
|
|
259
|
+
// These methods manage the workspace's local selection state
|
|
260
|
+
// =========================================================================
|
|
261
|
+
/**
|
|
262
|
+
* Sets the active conversation for this workspace instance
|
|
263
|
+
* @param id The conversation ID to activate (or null to clear)
|
|
264
|
+
*/
|
|
265
|
+
setActiveConversation(id) {
|
|
266
|
+
console.log('🎯 Setting active conversation:', id);
|
|
267
|
+
this.selectedConversationId = id;
|
|
268
|
+
this.selectedConversation = id ? this.conversationData.getConversationById(id) : null;
|
|
269
|
+
// Clear unsaved state when switching to an existing conversation
|
|
270
|
+
if (id) {
|
|
271
|
+
this.isNewUnsavedConversation = false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Initiates a new unsaved conversation (doesn't create DB record yet)
|
|
276
|
+
* This shows the welcome screen and delays DB creation until first message
|
|
277
|
+
*/
|
|
278
|
+
startNewConversation() {
|
|
279
|
+
console.log('✨ Starting new unsaved conversation');
|
|
280
|
+
this.selectedConversationId = null;
|
|
281
|
+
this.selectedConversation = null;
|
|
282
|
+
this.isNewUnsavedConversation = true;
|
|
283
|
+
this.pendingMessageToSend = null;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Clears the new unsaved conversation state
|
|
287
|
+
* Called when the conversation is actually created or cancelled
|
|
288
|
+
*/
|
|
289
|
+
clearNewConversationState() {
|
|
290
|
+
this.isNewUnsavedConversation = false;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Opens a thread panel for a specific message
|
|
294
|
+
* @param messageId The parent message ID
|
|
295
|
+
*/
|
|
296
|
+
openThread(messageId) {
|
|
297
|
+
this.selectedThreadId = messageId;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Closes the currently open thread panel
|
|
301
|
+
*/
|
|
302
|
+
closeThread() {
|
|
303
|
+
this.selectedThreadId = null;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Handler for conversation selection from sidebar/list
|
|
307
|
+
*/
|
|
308
|
+
onConversationSelected(conversationId) {
|
|
309
|
+
this.setActiveConversation(conversationId);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Handler for new conversation creation from chat area
|
|
313
|
+
*/
|
|
314
|
+
onConversationCreated(conversation) {
|
|
315
|
+
this.selectedConversationId = conversation.ID;
|
|
316
|
+
this.selectedConversation = conversation;
|
|
317
|
+
this.isNewUnsavedConversation = false;
|
|
318
|
+
// The conversation is already added to conversationData by the chat area
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Handler for thread opened from chat area
|
|
322
|
+
*/
|
|
323
|
+
onThreadOpened(threadId) {
|
|
324
|
+
this.selectedThreadId = threadId;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Handler for thread closed from chat area
|
|
328
|
+
*/
|
|
329
|
+
onThreadClosed() {
|
|
330
|
+
this.selectedThreadId = null;
|
|
331
|
+
}
|
|
247
332
|
async ngOnInit() {
|
|
248
333
|
// Initialize global streaming service FIRST
|
|
249
334
|
// This establishes the single PubSub connection for all conversations
|
|
@@ -291,7 +376,6 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
291
376
|
// Mark workspace as ready - this allows UI to render
|
|
292
377
|
this.isWorkspaceReady = true;
|
|
293
378
|
this.cdr.detectChanges();
|
|
294
|
-
console.log('✅ Workspace ready - UI can now render');
|
|
295
379
|
}
|
|
296
380
|
catch (error) {
|
|
297
381
|
console.error('❌ Failed to initialize engines:', error);
|
|
@@ -303,14 +387,12 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
303
387
|
this.artifactState.isPanelOpen$
|
|
304
388
|
.pipe(takeUntil(this.destroy$))
|
|
305
389
|
.subscribe(isOpen => {
|
|
306
|
-
console.log('📡 Workspace received isPanelOpen$:', isOpen);
|
|
307
390
|
this.isArtifactPanelOpen = isOpen;
|
|
308
391
|
});
|
|
309
392
|
// Subscribe to active artifact ID
|
|
310
393
|
this.artifactState.activeArtifactId$
|
|
311
394
|
.pipe(takeUntil(this.destroy$))
|
|
312
395
|
.subscribe(async (id) => {
|
|
313
|
-
console.log('📡 Workspace received activeArtifactId$:', id);
|
|
314
396
|
this.activeArtifactId = id;
|
|
315
397
|
// Load permissions when artifact changes
|
|
316
398
|
if (id) {
|
|
@@ -325,12 +407,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
325
407
|
this.artifactState.activeVersionNumber$
|
|
326
408
|
.pipe(takeUntil(this.destroy$))
|
|
327
409
|
.subscribe(versionNumber => {
|
|
328
|
-
console.log('📡 Workspace received activeVersionNumber$:', versionNumber);
|
|
329
410
|
this.activeVersionNumber = versionNumber;
|
|
330
411
|
});
|
|
331
412
|
// Set initial conversation if provided
|
|
332
413
|
if (this.initialConversationId) {
|
|
333
|
-
this.
|
|
414
|
+
this.setActiveConversation(this.initialConversationId);
|
|
334
415
|
}
|
|
335
416
|
// Handle context-based navigation
|
|
336
417
|
if (this.activeContext === 'library') {
|
|
@@ -366,7 +447,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
366
447
|
}
|
|
367
448
|
ngDoCheck() {
|
|
368
449
|
// Detect new unsaved conversation state changes
|
|
369
|
-
const currentIsNewConversation = this.
|
|
450
|
+
const currentIsNewConversation = this.isNewUnsavedConversation;
|
|
370
451
|
if (currentIsNewConversation !== this.previousIsNewConversation) {
|
|
371
452
|
this.previousIsNewConversation = currentIsNewConversation;
|
|
372
453
|
if (currentIsNewConversation) {
|
|
@@ -377,10 +458,10 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
377
458
|
}
|
|
378
459
|
}
|
|
379
460
|
// Detect conversation changes and emit event
|
|
380
|
-
const currentId = this.
|
|
461
|
+
const currentId = this.selectedConversationId;
|
|
381
462
|
if (currentId !== this.previousConversationId) {
|
|
382
463
|
this.previousConversationId = currentId;
|
|
383
|
-
const conversation = this.
|
|
464
|
+
const conversation = this.selectedConversation;
|
|
384
465
|
if (conversation) {
|
|
385
466
|
this.conversationChanged.emit(conversation);
|
|
386
467
|
// Also emit navigationChanged for URL updates (only if on conversations tab)
|
|
@@ -444,7 +525,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
444
525
|
tab: tab
|
|
445
526
|
};
|
|
446
527
|
if (tab === 'conversations') {
|
|
447
|
-
navEvent.conversationId = this.
|
|
528
|
+
navEvent.conversationId = this.selectedConversationId || undefined;
|
|
448
529
|
}
|
|
449
530
|
else if (tab === 'collections') {
|
|
450
531
|
// If switching TO collections tab from another tab, clear to root level
|
|
@@ -509,7 +590,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
509
590
|
case 'conversation':
|
|
510
591
|
// Switch to conversations tab and select conversation
|
|
511
592
|
this.activeTab = 'conversations';
|
|
512
|
-
this.
|
|
593
|
+
this.setActiveConversation(result.id);
|
|
513
594
|
this.navigationChanged.emit({
|
|
514
595
|
tab: 'conversations',
|
|
515
596
|
conversationId: result.id
|
|
@@ -519,7 +600,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
519
600
|
// Switch to conversations tab, open conversation, and scroll to message (future enhancement)
|
|
520
601
|
this.activeTab = 'conversations';
|
|
521
602
|
if (result.conversationId) {
|
|
522
|
-
this.
|
|
603
|
+
this.setActiveConversation(result.conversationId);
|
|
523
604
|
this.navigationChanged.emit({
|
|
524
605
|
tab: 'conversations',
|
|
525
606
|
conversationId: result.conversationId
|
|
@@ -818,11 +899,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
818
899
|
this.artifactState.closeArtifact();
|
|
819
900
|
// Store pending artifact info so chat area can show it and scroll to message
|
|
820
901
|
if (event.artifactId) {
|
|
821
|
-
this.
|
|
822
|
-
this.
|
|
902
|
+
this.pendingArtifactId = event.artifactId;
|
|
903
|
+
this.pendingArtifactVersionNumber = event.versionNumber || null;
|
|
823
904
|
console.log('📦 Pending artifact set:', event.artifactId, 'v' + event.versionNumber);
|
|
824
905
|
}
|
|
825
|
-
this.
|
|
906
|
+
this.setActiveConversation(event.id);
|
|
826
907
|
this.navigationChanged.emit({
|
|
827
908
|
tab: 'conversations',
|
|
828
909
|
conversationId: event.id
|
|
@@ -915,10 +996,10 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
915
996
|
console.log('📤 Bubbling up automatic command:', command);
|
|
916
997
|
this.automaticCommandExecuted.emit(command);
|
|
917
998
|
}
|
|
918
|
-
static ɵfac = function ConversationWorkspaceComponent_Factory(t) { return new (t || ConversationWorkspaceComponent)(i0.ɵɵdirectiveInject(i1.
|
|
999
|
+
static ɵfac = function ConversationWorkspaceComponent_Factory(t) { return new (t || ConversationWorkspaceComponent)(i0.ɵɵdirectiveInject(i1.ConversationDataService), i0.ɵɵdirectiveInject(i2.ArtifactStateService), i0.ɵɵdirectiveInject(i3.CollectionStateService), i0.ɵɵdirectiveInject(i4.ArtifactPermissionService), i0.ɵɵdirectiveInject(i5.MentionAutocompleteService), i0.ɵɵdirectiveInject(i6.MJNotificationService), i0.ɵɵdirectiveInject(i7.ConversationStreamingService), i0.ɵɵdirectiveInject(i8.UICommandHandlerService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
919
1000
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationWorkspaceComponent, selectors: [["mj-conversation-workspace"]], hostBindings: function ConversationWorkspaceComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
920
1001
|
i0.ɵɵlistener("resize", function ConversationWorkspaceComponent_resize_HostBindingHandler() { return ctx.onWindowResize(); }, false, i0.ɵɵresolveWindow);
|
|
921
|
-
} }, inputs: { environmentId: "environmentId", initialConversationId: "initialConversationId", layout: "layout", currentUser: "currentUser", activeContext: "activeContext", contextItemId: "contextItemId", activeTabInput: "activeTabInput", activeConversationInput: "activeConversationInput", activeCollectionInput: "activeCollectionInput", activeVersionIdInput: "activeVersionIdInput", activeTaskInput: "activeTaskInput" }, outputs: { conversationChanged: "conversationChanged", artifactOpened: "artifactOpened", navigationChanged: "navigationChanged", newConversationStarted: "newConversationStarted", actionableCommandExecuted: "actionableCommandExecuted", automaticCommandExecuted: "automaticCommandExecuted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars:
|
|
1002
|
+
} }, inputs: { environmentId: "environmentId", initialConversationId: "initialConversationId", layout: "layout", currentUser: "currentUser", activeContext: "activeContext", contextItemId: "contextItemId", activeTabInput: "activeTabInput", activeConversationInput: "activeConversationInput", activeCollectionInput: "activeCollectionInput", activeVersionIdInput: "activeVersionIdInput", activeTaskInput: "activeTaskInput" }, outputs: { conversationChanged: "conversationChanged", artifactOpened: "artifactOpened", navigationChanged: "navigationChanged", newConversationStarted: "newConversationStarted", actionableCommandExecuted: "actionableCommandExecuted", automaticCommandExecuted: "automaticCommandExecuted" }, features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 13, consts: [["mjSearchShortcut", "", "kendoDialogContainer", "", 1, "conversation-workspace", 3, "searchTriggered"], [1, "workspace-navigation"], [3, "tabChanged", "sidebarToggled", "searchTriggered", "refreshTriggered", "activeTab", "environmentId", "currentUser", "conversationId"], [1, "workspace-loading"], [1, "workspace-content"], [3, "close", "resultSelected", "isOpen", "environmentId", "currentUser"], [3, "saved", "cancelled", "isOpen", "artifact", "currentUser"], ["text", "Loading agents...", "size", "large"], [1, "mobile-sidebar-backdrop", "visible"], ["class", "workspace-sidebar", 3, "open", "width", 4, "ngIf"], ["class", "sidebar-resize-handle", 3, "mousedown", 4, "ngIf"], ["class", "workspace-main", 4, "ngIf"], [1, "workspace-artifact-panel", 3, "width", "maximized"], [1, "mobile-sidebar-backdrop", "visible", 3, "click"], [1, "workspace-sidebar"], [3, "conversationSelected", "newConversationRequested", "activeTab", "environmentId", "currentUser", "selectedConversationId", "renamedConversationId"], [1, "sidebar-resize-handle", 3, "mousedown"], [1, "workspace-main"], [3, "collectionNavigated", "environmentId", "currentUser"], [3, "openEntityRecord", "environmentId", "currentUser", "baseFilter", "activeTaskId"], [3, "conversationRenamed", "openEntityRecord", "taskClicked", "artifactLinkClicked", "conversationCreated", "threadOpened", "threadClosed", "pendingArtifactConsumed", "pendingMessageConsumed", "pendingMessageRequested", "environmentId", "currentUser", "conversationId", "conversation", "threadId", "isNewConversation", "pendingMessage", "pendingArtifactId", "pendingArtifactVersionNumber"], [1, "artifact-panel-resize-handle"], [1, "workspace-artifact-panel"], [3, "closed", "navigateToLink", "shareRequested", "maximizeToggled", "artifactId", "currentUser", "environmentId", "versionNumber", "showSaveToCollection", "viewContext", "contextCollectionId", "canShare", "canEdit", "isMaximized"], [1, "artifact-panel-resize-handle", 3, "mousedown"]], template: function ConversationWorkspaceComponent_Template(rf, ctx) { if (rf & 1) {
|
|
922
1003
|
i0.ɵɵelementStart(0, "div", 0);
|
|
923
1004
|
i0.ɵɵlistener("searchTriggered", function ConversationWorkspaceComponent_Template_div_searchTriggered_0_listener() { return ctx.openSearch(); });
|
|
924
1005
|
i0.ɵɵelementStart(1, "div", 1)(2, "mj-conversation-navigation", 2);
|
|
@@ -935,7 +1016,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
935
1016
|
} if (rf & 2) {
|
|
936
1017
|
i0.ɵɵattribute("data-layout", ctx.layout);
|
|
937
1018
|
i0.ɵɵadvance(2);
|
|
938
|
-
i0.ɵɵproperty("activeTab", ctx.activeTab)("environmentId", ctx.environmentId);
|
|
1019
|
+
i0.ɵɵproperty("activeTab", ctx.activeTab)("environmentId", ctx.environmentId)("currentUser", ctx.currentUser)("conversationId", ctx.selectedConversationId);
|
|
939
1020
|
i0.ɵɵadvance();
|
|
940
1021
|
i0.ɵɵconditional(!ctx.isWorkspaceReady ? 3 : -1);
|
|
941
1022
|
i0.ɵɵadvance();
|
|
@@ -948,8 +1029,8 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
948
1029
|
}
|
|
949
1030
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationWorkspaceComponent, [{
|
|
950
1031
|
type: Component,
|
|
951
|
-
args: [{ selector: 'mj-conversation-workspace', template: "<div class=\"conversation-workspace\" [attr.data-layout]=\"layout\" mjSearchShortcut (searchTriggered)=\"openSearch()\" kendoDialogContainer>\n <!-- Top Navigation Bar -->\n <div class=\"workspace-navigation\">\n <mj-conversation-navigation\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n (tabChanged)=\"onTabChanged($event)\"\n (sidebarToggled)=\"toggleSidebar()\"\n (searchTriggered)=\"openSearch()\"\n (refreshTriggered)=\"onRefreshAgentCache()\">\n </mj-conversation-navigation>\n </div>\n\n <!-- Loading spinner while initializing agents -->\n @if (!isWorkspaceReady) {\n <div class=\"workspace-loading\">\n <mj-loading text=\"Loading agents...\" size=\"large\"></mj-loading>\n </div>\n }\n\n <!-- Main workspace content - only renders when agents are ready -->\n @if (isWorkspaceReady) {\n <div class=\"workspace-content\">\n <!-- Mobile sidebar backdrop -->\n @if (isMobileView && isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks') {\n <div class=\"mobile-sidebar-backdrop visible\" (click)=\"closeSidebar()\"></div>\n }\n\n <!-- Left Sidebar (hidden when Collections or Tasks view is active) -->\n <div class=\"workspace-sidebar\"\n *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\"\n [class.open]=\"isSidebarVisible\"\n [style.width.px]=\"sidebarWidth\">\n <mj-conversation-sidebar\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [renamedConversationId]=\"renamedConversationId\">\n </mj-conversation-sidebar>\n </div>\n\n <!-- Resize handle for sidebar -->\n <div class=\"sidebar-resize-handle\" *ngIf=\"isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks'\" (mousedown)=\"onSidebarResizeStart($event)\"></div>\n\n <!-- Collections Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'collections'\">\n <mj-collections-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (collectionNavigated)=\"onCollectionNavigated($event)\">\n </mj-collections-full-view>\n </div>\n\n <!-- Tasks Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'tasks'\">\n <mj-tasks-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [baseFilter]=\"tasksFilter\"\n [activeTaskId]=\"activeTaskId\"\n (openEntityRecord)=\"onOpenEntityRecordFromTasks($event)\">\n </mj-tasks-full-view>\n </div>\n\n <!-- Main Chat Area (only shown when not in Collections or Tasks view) -->\n <div class=\"workspace-main\" *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\">\n <mj-conversation-chat-area\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (taskClicked)=\"onTaskClicked($event)\"\n (artifactLinkClicked)=\"onArtifactLinkNavigation($event)\">\n </mj-conversation-chat-area>\n </div>\n\n <!-- Right Artifact Panel -->\n @if (isArtifactPanelOpen && activeArtifactId) {\n @if (!isArtifactPanelMaximized) {\n <div class=\"artifact-panel-resize-handle\" (mousedown)=\"onArtifactPanelResizeStart($event)\"></div>\n }\n <div class=\"workspace-artifact-panel\"\n [style.width.%]=\"artifactPanelWidth\"\n [class.maximized]=\"isArtifactPanelMaximized\">\n <mj-artifact-viewer-panel\n [artifactId]=\"activeArtifactId\"\n [currentUser]=\"currentUser\"\n [environmentId]=\"environmentId\"\n [versionNumber]=\"activeVersionNumber ?? undefined\"\n [showSaveToCollection]=\"activeTab !== 'collections'\"\n [viewContext]=\"activeTab === 'collections' ? 'collection' : 'conversation'\"\n [contextCollectionId]=\"collectionState.activeCollectionId ?? undefined\"\n [canShare]=\"canShareActiveArtifact\"\n [canEdit]=\"canEditActiveArtifact\"\n [isMaximized]=\"isArtifactPanelMaximized\"\n (closed)=\"closeArtifactPanel()\"\n (navigateToLink)=\"onArtifactLinkNavigation($event)\"\n (shareRequested)=\"onArtifactShareRequested($event)\"\n (maximizeToggled)=\"toggleMaximizeArtifactPanel()\">\n </mj-artifact-viewer-panel>\n </div>\n }\n </div>\n }\n\n <!-- Global Search Panel -->\n <mj-search-panel\n [isOpen]=\"isSearchPanelOpen\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (close)=\"closeSearch()\"\n (resultSelected)=\"handleSearchResult($event)\">\n </mj-search-panel>\n\n <!-- Toast Notifications -->\n <mj-toast></mj-toast>\n\n <!-- Artifact Share Modal -->\n <mj-artifact-share-modal\n [isOpen]=\"isArtifactShareModalOpen\"\n [artifact]=\"artifactToShare\"\n [currentUser]=\"currentUser\"\n (saved)=\"onArtifactShared()\"\n (cancelled)=\"onArtifactShareModalClose()\">\n </mj-artifact-share-modal>\n</div>", styles: [".conversation-workspace {\n display: flex;\n flex-direction: column;\n height: 100%; /* Fill parent container - works in any context (tabs, embedded, etc.) */\n min-height: 0; /* Allow flex shrinking in nested flex containers */\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation {\n flex-shrink: 0;\n height: 48px;\n background-color: #092340;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.workspace-content {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-sidebar {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n}\n\n.sidebar-resize-handle {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.sidebar-resize-handle:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n}\n\n.workspace-main {\n flex: 1;\n display: flex;\n flex-direction: column;\n background-color: #FFF;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-main > mj-conversation-chat-area {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel {\n flex-shrink: 0;\n background-color: #FFF;\n overflow: hidden;\n min-width: 300px;\n max-width: 70%;\n}\n\n.artifact-panel-resize-handle {\n width: 4px;\n background-color: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n transition: background-color 0.2s;\n position: relative;\n z-index: 10;\n}\n\n/* Wider hit area for easier grabbing */\n.artifact-panel-resize-handle::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -4px;\n right: -4px;\n cursor: ew-resize;\n}\n\n.artifact-panel-resize-handle:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle:active {\n background-color: #1e3a8a;\n}\n\n/* Maximized artifact panel */\n.workspace-artifact-panel.maximized {\n width: 100% !important;\n max-width: 100%;\n}\n\n/* Compact layout */\n.conversation-workspace[data-layout=\"compact\"] .workspace-sidebar {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"] .workspace-artifact-panel {\n width: 400px;\n}\n\n/* Embedded layout */\n.conversation-workspace[data-layout=\"embedded\"] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"] .workspace-navigation {\n height: 48px;\n}\n\n/* Responsive */\n@media (max-width: 1024px) {\n .workspace-sidebar {\n position: absolute;\n left: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n right: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);\n }\n}\n\n/* Desktop sidebar toggle animation */\n@media (min-width: 769px) {\n .workspace-sidebar {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar:not(.open) ~ .sidebar-resize-handle {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n/* Mobile adjustments: 481px - 768px */\n@media (max-width: 768px) {\n .workspace-sidebar {\n position: fixed;\n left: 0;\n top: 80px;\n z-index: 1000;\n width: 260px !important;\n height: calc(100vh - 80px);\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .workspace-sidebar.open {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top: 48px;\n z-index: 1000;\n max-width: 100%;\n }\n\n .sidebar-resize-handle,\n .artifact-panel-resize-handle {\n display: none;\n }\n\n /* Mobile sidebar backdrop */\n .mobile-sidebar-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s ease;\n z-index: 999;\n }\n\n .mobile-sidebar-backdrop.visible {\n opacity: 1;\n pointer-events: auto;\n }\n}\n\n/* Small Phone adjustments: <= 480px */\n@media (max-width: 480px) {\n .workspace-navigation {\n height: 48px;\n }\n\n .workspace-sidebar {\n width: 100%;\n }\n}\n\n/* Loading spinner (shown while initializing agents) */\n.workspace-loading {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n background: #FFF;\n gap: 1rem;\n}\n\n.loading-spinner {\n font-size: 3rem;\n color: #0078d4;\n}\n\n.workspace-loading p {\n font-size: 1rem;\n color: #666;\n margin: 0;\n}"] }]
|
|
952
|
-
}], () => [{ type: i1.
|
|
1032
|
+
args: [{ selector: 'mj-conversation-workspace', template: "<div class=\"conversation-workspace\" [attr.data-layout]=\"layout\" mjSearchShortcut (searchTriggered)=\"openSearch()\" kendoDialogContainer>\n <!-- Top Navigation Bar -->\n <div class=\"workspace-navigation\">\n <mj-conversation-navigation\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n (tabChanged)=\"onTabChanged($event)\"\n (sidebarToggled)=\"toggleSidebar()\"\n (searchTriggered)=\"openSearch()\"\n (refreshTriggered)=\"onRefreshAgentCache()\">\n </mj-conversation-navigation>\n </div>\n\n <!-- Loading spinner while initializing agents -->\n @if (!isWorkspaceReady) {\n <div class=\"workspace-loading\">\n <mj-loading text=\"Loading agents...\" size=\"large\"></mj-loading>\n </div>\n }\n\n <!-- Main workspace content - only renders when agents are ready -->\n @if (isWorkspaceReady) {\n <div class=\"workspace-content\">\n <!-- Mobile sidebar backdrop -->\n @if (isMobileView && isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks') {\n <div class=\"mobile-sidebar-backdrop visible\" (click)=\"closeSidebar()\"></div>\n }\n\n <!-- Left Sidebar (hidden when Collections or Tasks view is active) -->\n <div class=\"workspace-sidebar\"\n *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\"\n [class.open]=\"isSidebarVisible\"\n [style.width.px]=\"sidebarWidth\">\n <mj-conversation-sidebar\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (newConversationRequested)=\"startNewConversation()\">\n </mj-conversation-sidebar>\n </div>\n\n <!-- Resize handle for sidebar -->\n <div class=\"sidebar-resize-handle\" *ngIf=\"isSidebarVisible && activeTab !== 'collections' && activeTab !== 'tasks'\" (mousedown)=\"onSidebarResizeStart($event)\"></div>\n\n <!-- Collections Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'collections'\">\n <mj-collections-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (collectionNavigated)=\"onCollectionNavigated($event)\">\n </mj-collections-full-view>\n </div>\n\n <!-- Tasks Full-Panel View -->\n <div class=\"workspace-main\" *ngIf=\"activeTab === 'tasks'\">\n <mj-tasks-full-view\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [baseFilter]=\"tasksFilter\"\n [activeTaskId]=\"activeTaskId\"\n (openEntityRecord)=\"onOpenEntityRecordFromTasks($event)\">\n </mj-tasks-full-view>\n </div>\n\n <!-- Main Chat Area (only shown when not in Collections or Tasks view) -->\n <div class=\"workspace-main\" *ngIf=\"activeTab !== 'collections' && activeTab !== 'tasks'\">\n <mj-conversation-chat-area\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [conversationId]=\"selectedConversationId\"\n [conversation]=\"selectedConversation\"\n [threadId]=\"selectedThreadId\"\n [isNewConversation]=\"isNewUnsavedConversation\"\n [pendingMessage]=\"pendingMessageToSend\"\n [pendingArtifactId]=\"pendingArtifactId\"\n [pendingArtifactVersionNumber]=\"pendingArtifactVersionNumber\"\n (conversationRenamed)=\"onConversationRenamed($event)\"\n (openEntityRecord)=\"onOpenEntityRecord($event)\"\n (taskClicked)=\"onTaskClicked($event)\"\n (artifactLinkClicked)=\"onArtifactLinkNavigation($event)\"\n (conversationCreated)=\"onConversationCreated($event)\"\n (threadOpened)=\"onThreadOpened($event)\"\n (threadClosed)=\"onThreadClosed()\"\n (pendingArtifactConsumed)=\"pendingArtifactId = null; pendingArtifactVersionNumber = null\"\n (pendingMessageConsumed)=\"pendingMessageToSend = null\"\n (pendingMessageRequested)=\"pendingMessageToSend = $event\">\n </mj-conversation-chat-area>\n </div>\n\n <!-- Right Artifact Panel -->\n @if (isArtifactPanelOpen && activeArtifactId) {\n @if (!isArtifactPanelMaximized) {\n <div class=\"artifact-panel-resize-handle\" (mousedown)=\"onArtifactPanelResizeStart($event)\"></div>\n }\n <div class=\"workspace-artifact-panel\"\n [style.width.%]=\"artifactPanelWidth\"\n [class.maximized]=\"isArtifactPanelMaximized\">\n <mj-artifact-viewer-panel\n [artifactId]=\"activeArtifactId\"\n [currentUser]=\"currentUser\"\n [environmentId]=\"environmentId\"\n [versionNumber]=\"activeVersionNumber ?? undefined\"\n [showSaveToCollection]=\"activeTab !== 'collections'\"\n [viewContext]=\"activeTab === 'collections' ? 'collection' : 'conversation'\"\n [contextCollectionId]=\"collectionState.activeCollectionId ?? undefined\"\n [canShare]=\"canShareActiveArtifact\"\n [canEdit]=\"canEditActiveArtifact\"\n [isMaximized]=\"isArtifactPanelMaximized\"\n (closed)=\"closeArtifactPanel()\"\n (navigateToLink)=\"onArtifactLinkNavigation($event)\"\n (shareRequested)=\"onArtifactShareRequested($event)\"\n (maximizeToggled)=\"toggleMaximizeArtifactPanel()\">\n </mj-artifact-viewer-panel>\n </div>\n }\n </div>\n }\n\n <!-- Global Search Panel -->\n <mj-search-panel\n [isOpen]=\"isSearchPanelOpen\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n (close)=\"closeSearch()\"\n (resultSelected)=\"handleSearchResult($event)\">\n </mj-search-panel>\n\n <!-- Toast Notifications -->\n <mj-toast></mj-toast>\n\n <!-- Artifact Share Modal -->\n <mj-artifact-share-modal\n [isOpen]=\"isArtifactShareModalOpen\"\n [artifact]=\"artifactToShare\"\n [currentUser]=\"currentUser\"\n (saved)=\"onArtifactShared()\"\n (cancelled)=\"onArtifactShareModalClose()\">\n </mj-artifact-share-modal>\n</div>", styles: [".conversation-workspace {\n display: flex;\n flex-direction: column;\n height: 100%; /* Fill parent container - works in any context (tabs, embedded, etc.) */\n min-height: 0; /* Allow flex shrinking in nested flex containers */\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation {\n flex-shrink: 0;\n height: 48px;\n background-color: #092340;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n}\n\n.workspace-content {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-sidebar {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n}\n\n.sidebar-resize-handle {\n width: 4px;\n background: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.sidebar-resize-handle:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle::before {\n content: '';\n position: absolute;\n left: -4px;\n right: -4px;\n top: 0;\n bottom: 0;\n cursor: ew-resize;\n}\n\n.workspace-main {\n flex: 1;\n display: flex;\n flex-direction: column;\n background-color: #FFF;\n overflow: hidden;\n min-height: 0;\n}\n\n.workspace-main > mj-conversation-chat-area {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel {\n flex-shrink: 0;\n background-color: #FFF;\n overflow: hidden;\n min-width: 300px;\n max-width: 70%;\n}\n\n.artifact-panel-resize-handle {\n width: 4px;\n background-color: transparent;\n cursor: ew-resize;\n flex-shrink: 0;\n transition: background-color 0.2s;\n position: relative;\n z-index: 10;\n}\n\n/* Wider hit area for easier grabbing */\n.artifact-panel-resize-handle::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: -4px;\n right: -4px;\n cursor: ew-resize;\n}\n\n.artifact-panel-resize-handle:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle:active {\n background-color: #1e3a8a;\n}\n\n/* Maximized artifact panel */\n.workspace-artifact-panel.maximized {\n width: 100% !important;\n max-width: 100%;\n}\n\n/* Compact layout */\n.conversation-workspace[data-layout=\"compact\"] .workspace-sidebar {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"] .workspace-artifact-panel {\n width: 400px;\n}\n\n/* Embedded layout */\n.conversation-workspace[data-layout=\"embedded\"] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"] .workspace-navigation {\n height: 48px;\n}\n\n/* Responsive */\n@media (max-width: 1024px) {\n .workspace-sidebar {\n position: absolute;\n left: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n right: 0;\n top: 60px;\n bottom: 0;\n z-index: 100;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);\n }\n}\n\n/* Desktop sidebar toggle animation */\n@media (min-width: 769px) {\n .workspace-sidebar {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar:not(.open) ~ .sidebar-resize-handle {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n/* Mobile adjustments: 481px - 768px */\n@media (max-width: 768px) {\n .workspace-sidebar {\n position: fixed;\n left: 0;\n top: 80px;\n z-index: 1000;\n width: 260px !important;\n height: calc(100vh - 80px);\n transform: translateX(-100%);\n transition: transform 0.3s ease;\n }\n\n .workspace-sidebar.open {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top: 48px;\n z-index: 1000;\n max-width: 100%;\n }\n\n .sidebar-resize-handle,\n .artifact-panel-resize-handle {\n display: none;\n }\n\n /* Mobile sidebar backdrop */\n .mobile-sidebar-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s ease;\n z-index: 999;\n }\n\n .mobile-sidebar-backdrop.visible {\n opacity: 1;\n pointer-events: auto;\n }\n}\n\n/* Small Phone adjustments: <= 480px */\n@media (max-width: 480px) {\n .workspace-navigation {\n height: 48px;\n }\n\n .workspace-sidebar {\n width: 100%;\n }\n}\n\n/* Loading spinner (shown while initializing agents) */\n.workspace-loading {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n flex: 1;\n width: 100%;\n background: #FFF;\n gap: 1rem;\n}\n\n.loading-spinner {\n font-size: 3rem;\n color: #0078d4;\n}\n\n.workspace-loading p {\n font-size: 1rem;\n color: #666;\n margin: 0;\n}"] }]
|
|
1033
|
+
}], () => [{ type: i1.ConversationDataService }, { type: i2.ArtifactStateService }, { type: i3.CollectionStateService }, { type: i4.ArtifactPermissionService }, { type: i5.MentionAutocompleteService }, { type: i6.MJNotificationService }, { type: i7.ConversationStreamingService }, { type: i8.UICommandHandlerService }, { type: i0.ChangeDetectorRef }], { environmentId: [{
|
|
953
1034
|
type: Input
|
|
954
1035
|
}], initialConversationId: [{
|
|
955
1036
|
type: Input
|