@memberjunction/ng-conversations 2.129.0 → 2.130.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/attachment/image-viewer.component.d.ts +95 -0
- package/dist/lib/components/attachment/image-viewer.component.d.ts.map +1 -0
- package/dist/lib/components/attachment/image-viewer.component.js +293 -0
- package/dist/lib/components/attachment/image-viewer.component.js.map +1 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +76 -7
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +433 -193
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +12 -3
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.js +68 -55
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts +2 -0
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +157 -145
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.d.ts +102 -5
- package/dist/lib/components/mention/mention-editor.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-editor.component.js +349 -21
- package/dist/lib/components/mention/mention-editor.component.js.map +1 -1
- package/dist/lib/components/message/message-input-box.component.d.ts +29 -2
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input-box.component.js +79 -12
- package/dist/lib/components/message/message-input-box.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +56 -4
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +227 -60
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +34 -1
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +181 -93
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +4 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +12 -1
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +44 -13
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +82 -108
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +26 -25
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +7 -3
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/services/active-tasks.service.d.ts +23 -0
- package/dist/lib/services/active-tasks.service.d.ts.map +1 -1
- package/dist/lib/services/active-tasks.service.js +91 -2
- package/dist/lib/services/active-tasks.service.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +36 -5
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +233 -71
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-attachment.service.d.ts +79 -0
- package/dist/lib/services/conversation-attachment.service.d.ts.map +1 -0
- package/dist/lib/services/conversation-attachment.service.js +327 -0
- package/dist/lib/services/conversation-attachment.service.js.map +1 -0
- package/dist/lib/services/conversation-data.service.d.ts +15 -1
- package/dist/lib/services/conversation-data.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-data.service.js +23 -1
- package/dist/lib/services/conversation-data.service.js.map +1 -1
- package/dist/lib/services/conversation-streaming.service.d.ts +26 -1
- package/dist/lib/services/conversation-streaming.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-streaming.service.js +18 -3
- package/dist/lib/services/conversation-streaming.service.js.map +1 -1
- package/dist/lib/services/mention-parser.service.d.ts +15 -0
- package/dist/lib/services/mention-parser.service.d.ts.map +1 -1
- package/dist/lib/services/mention-parser.service.js +30 -0
- package/dist/lib/services/mention-parser.service.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +17 -17
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ============================================================================
|
|
3
|
+
* DEPRECATED - DO NOT USE
|
|
4
|
+
* ============================================================================
|
|
5
|
+
*
|
|
6
|
+
* This workspace component was used when conversations, collections, and tasks
|
|
7
|
+
* were all combined into a single tabbed interface.
|
|
8
|
+
*
|
|
9
|
+
* The new architecture uses SEPARATE resource components for each feature:
|
|
10
|
+
* - ChatConversationsResource for conversations
|
|
11
|
+
* - CollectionsResource for collections
|
|
12
|
+
* - TasksResource for tasks
|
|
13
|
+
*
|
|
14
|
+
* These resource components are located in @memberjunction/ng-explorer-core
|
|
15
|
+
* and integrate with MJExplorer's tab/navigation system.
|
|
16
|
+
*
|
|
17
|
+
* This file is kept for backwards compatibility only. Any new features or
|
|
18
|
+
* bug fixes should be made to the individual resource components instead.
|
|
19
|
+
* ============================================================================
|
|
20
|
+
*/
|
|
1
21
|
import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
|
2
22
|
import { ArtifactMetadataEngine, UserInfoEngine } from '@memberjunction/core-entities';
|
|
3
23
|
import { Metadata } from '@memberjunction/core';
|
|
@@ -51,8 +71,8 @@ function ConversationWorkspaceComponent_Conditional_4_div_2_Template(rf, ctx) {
|
|
|
51
71
|
} }
|
|
52
72
|
function ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
53
73
|
const _r4 = i0.ɵɵgetCurrentView();
|
|
54
|
-
i0.ɵɵelementStart(0, "
|
|
55
|
-
i0.ɵɵlistener("click", function
|
|
74
|
+
i0.ɵɵelementStart(0, "button", 17);
|
|
75
|
+
i0.ɵɵlistener("click", function ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.expandSidebar()); });
|
|
56
76
|
i0.ɵɵelement(1, "i", 18);
|
|
57
77
|
i0.ɵɵelementEnd();
|
|
58
78
|
} }
|
|
@@ -85,12 +105,12 @@ function ConversationWorkspaceComponent_Conditional_4_div_6_Template(rf, ctx) {
|
|
|
85
105
|
function ConversationWorkspaceComponent_Conditional_4_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
86
106
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
87
107
|
i0.ɵɵelementStart(0, "div", 20)(1, "mj-conversation-chat-area", 23);
|
|
88
|
-
i0.ɵɵlistener("conversationRenamed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_conversationRenamed_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationRenamed($event)); })("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onOpenEntityRecord($event)); })("taskClicked", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_taskClicked_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTaskClicked($event)); })("artifactLinkClicked", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_artifactLinkClicked_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactLinkNavigation($event)); })("conversationCreated", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_conversationCreated_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationCreated($event)); })("threadOpened", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_threadOpened_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadOpened($event)); })("threadClosed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_threadClosed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadClosed()); })("pendingArtifactConsumed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingArtifactConsumed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.pendingArtifactId = null; return i0.ɵɵresetView(ctx_r1.pendingArtifactVersionNumber = null); })("pendingMessageConsumed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingMessageConsumed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.
|
|
108
|
+
i0.ɵɵlistener("conversationRenamed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_conversationRenamed_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationRenamed($event)); })("openEntityRecord", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_openEntityRecord_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onOpenEntityRecord($event)); })("taskClicked", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_taskClicked_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTaskClicked($event)); })("artifactLinkClicked", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_artifactLinkClicked_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onArtifactLinkNavigation($event)); })("conversationCreated", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_conversationCreated_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onConversationCreated($event)); })("threadOpened", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_threadOpened_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadOpened($event)); })("threadClosed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_threadClosed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onThreadClosed()); })("pendingArtifactConsumed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingArtifactConsumed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.pendingArtifactId = null; return i0.ɵɵresetView(ctx_r1.pendingArtifactVersionNumber = null); })("pendingMessageConsumed", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingMessageConsumed_1_listener() { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.pendingMessageToSend = null; return i0.ɵɵresetView(ctx_r1.pendingAttachmentsToSend = null); })("pendingMessageRequested", function ConversationWorkspaceComponent_Conditional_4_div_7_Template_mj_conversation_chat_area_pendingMessageRequested_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onPendingMessageRequested($event)); });
|
|
89
109
|
i0.ɵɵelementEnd()();
|
|
90
110
|
} if (rf & 2) {
|
|
91
111
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
92
112
|
i0.ɵɵadvance();
|
|
93
|
-
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);
|
|
113
|
+
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)("pendingAttachments", ctx_r1.pendingAttachmentsToSend)("pendingArtifactId", ctx_r1.pendingArtifactId)("pendingArtifactVersionNumber", ctx_r1.pendingArtifactVersionNumber);
|
|
94
114
|
} }
|
|
95
115
|
function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
96
116
|
const _r10 = i0.ɵɵgetCurrentView();
|
|
@@ -117,7 +137,7 @@ function ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template(rf,
|
|
|
117
137
|
} }
|
|
118
138
|
function ConversationWorkspaceComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
119
139
|
i0.ɵɵelementStart(0, "div", 4);
|
|
120
|
-
i0.ɵɵtemplate(1, ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template, 1, 0, "div", 8)(2, ConversationWorkspaceComponent_Conditional_4_div_2_Template, 2, 15, "div", 9)(3, ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template, 2, 0, "
|
|
140
|
+
i0.ɵɵtemplate(1, ConversationWorkspaceComponent_Conditional_4_Conditional_1_Template, 1, 0, "div", 8)(2, ConversationWorkspaceComponent_Conditional_4_div_2_Template, 2, 15, "div", 9)(3, ConversationWorkspaceComponent_Conditional_4_Conditional_3_Template, 2, 0, "button", 10)(4, ConversationWorkspaceComponent_Conditional_4_div_4_Template, 1, 0, "div", 11)(5, ConversationWorkspaceComponent_Conditional_4_div_5_Template, 2, 2, "div", 12)(6, ConversationWorkspaceComponent_Conditional_4_div_6_Template, 2, 4, "div", 12)(7, ConversationWorkspaceComponent_Conditional_4_div_7_Template, 2, 10, "div", 12)(8, ConversationWorkspaceComponent_Conditional_4_Conditional_8_Template, 3, 15, "div", 13);
|
|
121
141
|
i0.ɵɵelementEnd();
|
|
122
142
|
} if (rf & 2) {
|
|
123
143
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -142,6 +162,10 @@ function ConversationWorkspaceComponent_Conditional_4_Template(rf, ctx) { if (rf
|
|
|
142
162
|
* Top-level workspace component for conversations
|
|
143
163
|
* Provides 3-column Slack-style layout: Navigation | Sidebar | Chat Area | Artifact Panel
|
|
144
164
|
* Supports context-based navigation (library or task views)
|
|
165
|
+
*
|
|
166
|
+
* @deprecated Use ChatConversationsResource from @memberjunction/ng-explorer-core instead.
|
|
167
|
+
* This component is maintained for backwards compatibility but the resource-wrapper pattern
|
|
168
|
+
* is the preferred approach for MJExplorer integration.
|
|
145
169
|
*/
|
|
146
170
|
export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
147
171
|
conversationData;
|
|
@@ -241,10 +265,6 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
241
265
|
previousVersionId = null; // Used to track version changes in ngDoCheck
|
|
242
266
|
previousIsNewConversation = false; // Track new conversation state changes
|
|
243
267
|
destroy$ = new Subject();
|
|
244
|
-
// LocalStorage keys (fallback for User Settings)
|
|
245
|
-
SIDEBAR_WIDTH_KEY = 'mj-conversations-sidebar-width';
|
|
246
|
-
SIDEBAR_COLLAPSED_KEY = 'mj-conversations-sidebar-collapsed';
|
|
247
|
-
ARTIFACT_PANEL_WIDTH_KEY = 'mj-artifact-panel-width';
|
|
248
268
|
// User Settings key for server-side persistence
|
|
249
269
|
USER_SETTING_SIDEBAR_KEY = 'Conversations.SidebarState';
|
|
250
270
|
saveSettingsTimeout = null;
|
|
@@ -258,6 +278,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
258
278
|
selectedThreadId = null;
|
|
259
279
|
isNewUnsavedConversation = false;
|
|
260
280
|
pendingMessageToSend = null;
|
|
281
|
+
pendingAttachmentsToSend = null;
|
|
261
282
|
pendingArtifactId = null;
|
|
262
283
|
pendingArtifactVersionNumber = null;
|
|
263
284
|
constructor(conversationData, artifactState, collectionState, artifactPermissionService, mentionAutocompleteService, notificationService, streamingService, uiCommandHandler, cdr) {
|
|
@@ -299,6 +320,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
299
320
|
this.selectedConversation = null;
|
|
300
321
|
this.isNewUnsavedConversation = true;
|
|
301
322
|
this.pendingMessageToSend = null;
|
|
323
|
+
this.pendingAttachmentsToSend = null;
|
|
302
324
|
// Auto-collapse if mobile OR if sidebar is not pinned
|
|
303
325
|
if (this.isMobileView || !this.isSidebarPinned) {
|
|
304
326
|
this.collapseSidebar();
|
|
@@ -336,12 +358,30 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
336
358
|
}
|
|
337
359
|
/**
|
|
338
360
|
* Handler for new conversation creation from chat area
|
|
361
|
+
* Now includes pending message and attachments to ensure atomic state update
|
|
339
362
|
*/
|
|
340
|
-
onConversationCreated(
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
363
|
+
onConversationCreated(event) {
|
|
364
|
+
try {
|
|
365
|
+
// Set ALL state atomically before Angular change detection runs
|
|
366
|
+
// This ensures the new message-input component receives the pending data
|
|
367
|
+
this.pendingMessageToSend = event.pendingMessage || null;
|
|
368
|
+
this.pendingAttachmentsToSend = event.pendingAttachments || null;
|
|
369
|
+
this.selectedConversationId = event.conversation.ID;
|
|
370
|
+
this.selectedConversation = event.conversation;
|
|
371
|
+
this.isNewUnsavedConversation = false;
|
|
372
|
+
// The conversation is already added to conversationData by the chat area
|
|
373
|
+
}
|
|
374
|
+
catch (error) {
|
|
375
|
+
console.error('onConversationCreated ERROR:', error);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Handler for pending message requested from chat area (empty state)
|
|
380
|
+
* @deprecated Use onConversationCreated with pendingMessage instead
|
|
381
|
+
*/
|
|
382
|
+
onPendingMessageRequested(event) {
|
|
383
|
+
this.pendingMessageToSend = event.text;
|
|
384
|
+
this.pendingAttachmentsToSend = event.attachments;
|
|
345
385
|
}
|
|
346
386
|
/**
|
|
347
387
|
* Handler for thread opened from chat area
|
|
@@ -374,9 +414,6 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
374
414
|
});
|
|
375
415
|
// Check initial mobile state FIRST
|
|
376
416
|
this.checkMobileView();
|
|
377
|
-
// Load saved widths from localStorage
|
|
378
|
-
this.loadSidebarWidth();
|
|
379
|
-
this.loadArtifactPanelWidth();
|
|
380
417
|
// Load sidebar state - but on mobile, always default to collapsed
|
|
381
418
|
if (this.isMobileView) {
|
|
382
419
|
this.isSidebarCollapsed = true;
|
|
@@ -621,38 +658,34 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
621
658
|
this.saveSidebarState();
|
|
622
659
|
}
|
|
623
660
|
/**
|
|
624
|
-
* Save sidebar state to User Settings (server)
|
|
661
|
+
* Save sidebar state to User Settings (server)
|
|
625
662
|
* Uses debouncing to avoid excessive database writes
|
|
626
663
|
*/
|
|
627
664
|
saveSidebarState() {
|
|
628
|
-
const stateToSave = {
|
|
629
|
-
collapsed: this.isSidebarCollapsed,
|
|
630
|
-
pinned: this.isSidebarPinned
|
|
631
|
-
};
|
|
632
|
-
// Save to localStorage immediately as backup
|
|
633
|
-
try {
|
|
634
|
-
localStorage.setItem(this.SIDEBAR_COLLAPSED_KEY, JSON.stringify(stateToSave));
|
|
635
|
-
}
|
|
636
|
-
catch (error) {
|
|
637
|
-
console.warn('Failed to save sidebar state to localStorage:', error);
|
|
638
|
-
}
|
|
639
665
|
// Debounce the server save to avoid excessive writes
|
|
640
666
|
if (this.saveSettingsTimeout) {
|
|
641
667
|
clearTimeout(this.saveSettingsTimeout);
|
|
642
668
|
}
|
|
643
669
|
this.saveSettingsTimeout = setTimeout(() => {
|
|
644
|
-
this.saveSidebarStateToServer(
|
|
670
|
+
this.saveSidebarStateToServer();
|
|
645
671
|
}, 1000); // 1 second debounce
|
|
646
672
|
}
|
|
647
673
|
/**
|
|
648
674
|
* Save sidebar state to User Settings entity on server using UserInfoEngine for cached lookup
|
|
675
|
+
* Includes collapsed, pinned, sidebarWidth, and artifactPanelWidth
|
|
649
676
|
*/
|
|
650
|
-
async saveSidebarStateToServer(
|
|
677
|
+
async saveSidebarStateToServer() {
|
|
651
678
|
try {
|
|
652
679
|
const userId = this.currentUser?.ID;
|
|
653
680
|
if (!userId) {
|
|
654
681
|
return;
|
|
655
682
|
}
|
|
683
|
+
const stateToSave = {
|
|
684
|
+
collapsed: this.isSidebarCollapsed,
|
|
685
|
+
pinned: this.isSidebarPinned,
|
|
686
|
+
sidebarWidth: this.sidebarWidth,
|
|
687
|
+
artifactPanelWidth: this.artifactPanelWidth
|
|
688
|
+
};
|
|
656
689
|
const engine = UserInfoEngine.Instance;
|
|
657
690
|
const md = new Metadata();
|
|
658
691
|
// Find existing setting from cached user settings
|
|
@@ -663,7 +696,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
663
696
|
setting.UserID = userId;
|
|
664
697
|
setting.Setting = this.USER_SETTING_SIDEBAR_KEY;
|
|
665
698
|
}
|
|
666
|
-
setting.Value = JSON.stringify(
|
|
699
|
+
setting.Value = JSON.stringify(stateToSave);
|
|
667
700
|
await setting.Save();
|
|
668
701
|
}
|
|
669
702
|
catch (error) {
|
|
@@ -671,7 +704,8 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
671
704
|
}
|
|
672
705
|
}
|
|
673
706
|
/**
|
|
674
|
-
* Load sidebar state from User Settings (server) using UserInfoEngine
|
|
707
|
+
* Load sidebar state from User Settings (server) using UserInfoEngine
|
|
708
|
+
* Includes collapsed, pinned, sidebarWidth, and artifactPanelWidth
|
|
675
709
|
* For new users with no saved state, defaults to collapsed with new conversation
|
|
676
710
|
*/
|
|
677
711
|
async loadSidebarState() {
|
|
@@ -679,33 +713,20 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
679
713
|
try {
|
|
680
714
|
const userId = this.currentUser?.ID;
|
|
681
715
|
if (userId) {
|
|
682
|
-
// Try loading from cached User Settings
|
|
716
|
+
// Try loading from cached User Settings
|
|
683
717
|
const engine = UserInfoEngine.Instance;
|
|
684
718
|
const setting = engine.UserSettings.find(s => s.Setting === this.USER_SETTING_SIDEBAR_KEY);
|
|
685
719
|
if (setting?.Value) {
|
|
686
720
|
const state = JSON.parse(setting.Value);
|
|
687
721
|
this.isSidebarCollapsed = state.collapsed ?? true;
|
|
688
722
|
this.isSidebarPinned = state.pinned ?? false;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
if (saved) {
|
|
696
|
-
try {
|
|
697
|
-
const state = JSON.parse(saved);
|
|
698
|
-
if (typeof state === 'object' && state !== null) {
|
|
699
|
-
this.isSidebarCollapsed = state.collapsed ?? true;
|
|
700
|
-
this.isSidebarPinned = state.pinned ?? false;
|
|
701
|
-
this.isLoadingSettings = false;
|
|
702
|
-
return;
|
|
723
|
+
// Load width values if present (with validation)
|
|
724
|
+
if (typeof state.sidebarWidth === 'number' && state.sidebarWidth >= 200 && state.sidebarWidth <= 500) {
|
|
725
|
+
this.sidebarWidth = state.sidebarWidth;
|
|
726
|
+
}
|
|
727
|
+
if (typeof state.artifactPanelWidth === 'number' && state.artifactPanelWidth >= 20 && state.artifactPanelWidth <= 70) {
|
|
728
|
+
this.artifactPanelWidth = state.artifactPanelWidth;
|
|
703
729
|
}
|
|
704
|
-
}
|
|
705
|
-
catch {
|
|
706
|
-
// Fall back to old boolean format
|
|
707
|
-
this.isSidebarCollapsed = saved === 'true';
|
|
708
|
-
this.isSidebarPinned = !this.isSidebarCollapsed;
|
|
709
730
|
this.isLoadingSettings = false;
|
|
710
731
|
return;
|
|
711
732
|
}
|
|
@@ -901,13 +922,13 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
901
922
|
this.isSidebarResizing = false;
|
|
902
923
|
document.body.style.cursor = '';
|
|
903
924
|
document.body.style.userSelect = '';
|
|
904
|
-
this.
|
|
925
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
905
926
|
}
|
|
906
927
|
else if (this.isArtifactPanelResizing) {
|
|
907
928
|
this.isArtifactPanelResizing = false;
|
|
908
929
|
document.body.style.cursor = '';
|
|
909
930
|
document.body.style.userSelect = '';
|
|
910
|
-
this.
|
|
931
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
911
932
|
}
|
|
912
933
|
}
|
|
913
934
|
/**
|
|
@@ -951,58 +972,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
951
972
|
onResizeTouchEnd(event) {
|
|
952
973
|
if (this.isSidebarResizing) {
|
|
953
974
|
this.isSidebarResizing = false;
|
|
954
|
-
this.
|
|
975
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
955
976
|
}
|
|
956
977
|
else if (this.isArtifactPanelResizing) {
|
|
957
978
|
this.isArtifactPanelResizing = false;
|
|
958
|
-
this.
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
* LocalStorage persistence methods
|
|
963
|
-
*/
|
|
964
|
-
loadSidebarWidth() {
|
|
965
|
-
try {
|
|
966
|
-
const saved = localStorage.getItem(this.SIDEBAR_WIDTH_KEY);
|
|
967
|
-
if (saved) {
|
|
968
|
-
const width = parseInt(saved, 10);
|
|
969
|
-
if (!isNaN(width) && width >= 200 && width <= 500) {
|
|
970
|
-
this.sidebarWidth = width;
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
catch (error) {
|
|
975
|
-
console.warn('Failed to load sidebar width from localStorage:', error);
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
saveSidebarWidth() {
|
|
979
|
-
try {
|
|
980
|
-
localStorage.setItem(this.SIDEBAR_WIDTH_KEY, this.sidebarWidth.toString());
|
|
981
|
-
}
|
|
982
|
-
catch (error) {
|
|
983
|
-
console.warn('Failed to save sidebar width to localStorage:', error);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
loadArtifactPanelWidth() {
|
|
987
|
-
try {
|
|
988
|
-
const saved = localStorage.getItem(this.ARTIFACT_PANEL_WIDTH_KEY);
|
|
989
|
-
if (saved) {
|
|
990
|
-
const width = parseFloat(saved);
|
|
991
|
-
if (!isNaN(width) && width >= 20 && width <= 70) {
|
|
992
|
-
this.artifactPanelWidth = width;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
catch (error) {
|
|
997
|
-
console.warn('Failed to load artifact panel width from localStorage:', error);
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
saveArtifactPanelWidth() {
|
|
1001
|
-
try {
|
|
1002
|
-
localStorage.setItem(this.ARTIFACT_PANEL_WIDTH_KEY, this.artifactPanelWidth.toString());
|
|
1003
|
-
}
|
|
1004
|
-
catch (error) {
|
|
1005
|
-
console.warn('Failed to save artifact panel width to localStorage:', error);
|
|
979
|
+
this.saveSidebarState(); // Save width to User Settings
|
|
1006
980
|
}
|
|
1007
981
|
}
|
|
1008
982
|
/**
|
|
@@ -1209,7 +1183,7 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
1209
1183
|
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)); };
|
|
1210
1184
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConversationWorkspaceComponent, selectors: [["mj-conversation-workspace"]], hostBindings: function ConversationWorkspaceComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1211
1185
|
i0.ɵɵlistener("resize", function ConversationWorkspaceComponent_resize_HostBindingHandler() { return ctx.onWindowResize(); }, false, i0.ɵɵresolveWindow)("click", function ConversationWorkspaceComponent_click_HostBindingHandler($event) { return ctx.onDocumentClick($event); }, false, i0.ɵɵresolveDocument);
|
|
1212
|
-
} }, 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", "collapsed", "no-transition", "width", 4, "ngIf"], ["title", "
|
|
1186
|
+
} }, 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", "collapsed", "no-transition", "width", 4, "ngIf"], ["title", "Show conversations", 1, "sidebar-floating-toggle"], ["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", "pinSidebarRequested", "unpinSidebarRequested", "activeTab", "environmentId", "currentUser", "selectedConversationId", "renamedConversationId", "isSidebarPinned", "isMobileView"], ["title", "Show conversations", 1, "sidebar-floating-toggle", 3, "click"], [1, "fas", "fa-table-columns"], [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", "pendingAttachments", "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) {
|
|
1213
1187
|
i0.ɵɵelementStart(0, "div", 0);
|
|
1214
1188
|
i0.ɵɵlistener("searchTriggered", function ConversationWorkspaceComponent_Template_div_searchTriggered_0_listener() { return ctx.openSearch(); });
|
|
1215
1189
|
i0.ɵɵelementStart(1, "div", 1)(2, "mj-conversation-navigation", 2);
|
|
@@ -1235,11 +1209,11 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
1235
1209
|
i0.ɵɵproperty("isOpen", ctx.isSearchPanelOpen)("environmentId", ctx.environmentId)("currentUser", ctx.currentUser);
|
|
1236
1210
|
i0.ɵɵadvance(2);
|
|
1237
1211
|
i0.ɵɵproperty("isOpen", ctx.isArtifactShareModalOpen)("artifact", ctx.artifactToShare)("currentUser", ctx.currentUser);
|
|
1238
|
-
} }, dependencies: [i9.NgIf, i10.DialogContainerDirective, i11.ArtifactViewerPanelComponent, i12.LoadingComponent, i13.TasksFullViewComponent, i14.ArtifactShareModalComponent, i15.ConversationNavigationComponent, i16.ConversationSidebarComponent, i17.ConversationChatAreaComponent, i18.CollectionsFullViewComponent, i19.SearchPanelComponent, i20.ToastComponent, i21.SearchShortcutDirective], styles: [".conversation-workspace[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%; \n\n min-height: 0; \n\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n position: relative;\n}\n\n.workspace-sidebar[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n transition: width 0.3s ease;\n}\n\n\n\n.workspace-sidebar.no-transition[_ngcontent-%COMP%] {\n transition: none !important;\n}\n\n.workspace-sidebar.collapsed[_ngcontent-%COMP%] {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n}\n\n\n\n.sidebar-
|
|
1212
|
+
} }, dependencies: [i9.NgIf, i10.DialogContainerDirective, i11.ArtifactViewerPanelComponent, i12.LoadingComponent, i13.TasksFullViewComponent, i14.ArtifactShareModalComponent, i15.ConversationNavigationComponent, i16.ConversationSidebarComponent, i17.ConversationChatAreaComponent, i18.CollectionsFullViewComponent, i19.SearchPanelComponent, i20.ToastComponent, i21.SearchShortcutDirective], styles: [".conversation-workspace[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n height: 100%; \n\n min-height: 0; \n\n background-color: #F4F4F4;\n position: relative;\n}\n\n.workspace-navigation[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\n flex: 1;\n display: flex;\n overflow: hidden;\n min-height: 0;\n position: relative;\n}\n\n.workspace-sidebar[_ngcontent-%COMP%] {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n transition: width 0.3s ease;\n}\n\n\n\n.workspace-sidebar.no-transition[_ngcontent-%COMP%] {\n transition: none !important;\n}\n\n.workspace-sidebar.collapsed[_ngcontent-%COMP%] {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n}\n\n\n\n.sidebar-floating-toggle[_ngcontent-%COMP%] {\n position: absolute;\n top: 12px;\n left: 12px;\n z-index: 100;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #092340;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 8px;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: all 0.2s ease;\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%]:hover {\n background: #0a2d4d;\n border-color: rgba(255, 255, 255, 0.3);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n transform: scale(1.05);\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%]:active {\n transform: scale(0.98);\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: rgba(255, 255, 255, 0.85);\n font-size: 16px;\n transition: color 0.15s ease;\n}\n\n.sidebar-floating-toggle[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%] {\n color: white;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%]:hover {\n background: #1e40af;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]:active {\n background: #1e3a8a;\n}\n\n.sidebar-resize-handle[_ngcontent-%COMP%]::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[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] > mj-conversation-chat-area[_ngcontent-%COMP%] {\n display: flex;\n flex: 1;\n min-height: 0;\n}\n\n.workspace-artifact-panel[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\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\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]::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[_ngcontent-%COMP%]:hover {\n background-color: #1e40af;\n}\n\n.artifact-panel-resize-handle[_ngcontent-%COMP%]:active {\n background-color: #1e3a8a;\n}\n\n\n\n.workspace-artifact-panel.maximized[_ngcontent-%COMP%] {\n width: 100% !important;\n max-width: 100%;\n}\n\n\n\n.conversation-workspace[data-layout=\"compact\"][_ngcontent-%COMP%] .workspace-sidebar[_ngcontent-%COMP%] {\n width: 240px;\n}\n\n.conversation-workspace[data-layout=\"compact\"][_ngcontent-%COMP%] .workspace-artifact-panel[_ngcontent-%COMP%] {\n width: 400px;\n}\n\n\n\n.conversation-workspace[data-layout=\"embedded\"][_ngcontent-%COMP%] {\n height: 100%;\n}\n\n.conversation-workspace[data-layout=\"embedded\"][_ngcontent-%COMP%] .workspace-navigation[_ngcontent-%COMP%] {\n height: 48px;\n}\n\n\n\n@media (max-width: 1024px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\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\n\n@media (min-width: 769px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\n transition: width 0.3s ease, min-width 0.3s ease;\n overflow: hidden;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%]:not(.open) {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n }\n\n .sidebar-resize-handle[_ngcontent-%COMP%] {\n transition: opacity 0.3s ease, width 0.3s ease;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%]:not(.open) ~ .sidebar-resize-handle[_ngcontent-%COMP%] {\n opacity: 0;\n width: 0;\n pointer-events: none;\n }\n}\n\n\n\n@media (max-width: 768px) {\n .workspace-sidebar[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\n transform: translateX(0);\n }\n\n .workspace-artifact-panel[_ngcontent-%COMP%] {\n position: fixed;\n width: 100%;\n left: 0;\n right: 0;\n top: 56px; \n\n bottom: 0;\n z-index: 1000;\n max-width: 100%;\n height: auto;\n }\n\n .sidebar-resize-handle[_ngcontent-%COMP%], \n .artifact-panel-resize-handle[_ngcontent-%COMP%], \n .sidebar-floating-toggle[_ngcontent-%COMP%] {\n display: none;\n }\n\n \n\n .mobile-sidebar-backdrop[_ngcontent-%COMP%] {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n pointer-events: none;\n transition: opacity 0.3s ease;\n z-index: 999;\n }\n\n .mobile-sidebar-backdrop.visible[_ngcontent-%COMP%] {\n opacity: 1;\n pointer-events: auto;\n }\n}\n\n\n\n@media (max-width: 480px) {\n .workspace-navigation[_ngcontent-%COMP%] {\n height: 48px;\n }\n\n .workspace-sidebar[_ngcontent-%COMP%] {\n width: 100%;\n }\n}\n\n\n\n.workspace-loading[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\n font-size: 3rem;\n color: #0078d4;\n}\n\n.workspace-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n font-size: 1rem;\n color: #666;\n margin: 0;\n}"] });
|
|
1239
1213
|
}
|
|
1240
1214
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConversationWorkspaceComponent, [{
|
|
1241
1215
|
type: Component,
|
|
1242
|
-
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' && isSidebarSettingsLoaded\"\n [class.open]=\"isSidebarVisible\"\n [class.collapsed]=\"isSidebarCollapsed\"\n [class.no-transition]=\"!sidebarTransitionsEnabled\"\n [style.width.px]=\"isSidebarCollapsed ? 0 : sidebarWidth\">\n <mj-conversation-sidebar\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (newConversationRequested)=\"startNewConversation()\"\n (pinSidebarRequested)=\"pinSidebar()\"\n (unpinSidebarRequested)=\"unpinSidebar()\">\n </mj-conversation-sidebar>\n </div>\n\n <!-- Sidebar expand handle (only visible when collapsed and settings loaded) -->\n @if (activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarCollapsed && isSidebarSettingsLoaded) {\n <div class=\"sidebar-expand-handle\"\n (click)=\"expandSidebar()\"\n title=\"Expand sidebar\">\n <i class=\"fas fa-chevron-right\"></i>\n </div>\n }\n\n <!-- Resize handle for sidebar (only when expanded and settings loaded) -->\n <div class=\"sidebar-resize-handle\"\n *ngIf=\"isSidebarVisible && !isSidebarCollapsed && activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarSettingsLoaded\"\n (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 position: relative;\n}\n\n.workspace-sidebar {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n transition: width 0.3s ease;\n}\n\n/* Disable transitions during initial load to prevent jarring animation */\n.workspace-sidebar.no-transition {\n transition: none !important;\n}\n\n.workspace-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n}\n\n/* Sidebar expand handle (only visible when sidebar is collapsed) */\n.sidebar-expand-handle {\n flex-shrink: 0;\n width: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n background: #092340;\n border-right: 1px solid rgba(255, 255, 255, 0.15);\n transition: background 0.15s ease;\n z-index: 10;\n}\n\n.sidebar-expand-handle:hover {\n background: #1a3a5c;\n}\n\n.sidebar-expand-handle i {\n color: rgba(255, 255, 255, 0.7);\n font-size: 11px;\n transition: color 0.15s ease;\n}\n\n.sidebar-expand-handle:hover i {\n color: white;\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: 56px; /* 48px nav + 8px dark strip above blue border */\n bottom: 0;\n z-index: 1000;\n max-width: 100%;\n height: auto;\n }\n\n .sidebar-resize-handle,\n .artifact-panel-resize-handle,\n .sidebar-expand-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}"] }]
|
|
1216
|
+
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' && isSidebarSettingsLoaded\"\n [class.open]=\"isSidebarVisible\"\n [class.collapsed]=\"isSidebarCollapsed\"\n [class.no-transition]=\"!sidebarTransitionsEnabled\"\n [style.width.px]=\"isSidebarCollapsed ? 0 : sidebarWidth\">\n <mj-conversation-sidebar\n [activeTab]=\"activeTab\"\n [environmentId]=\"environmentId\"\n [currentUser]=\"currentUser\"\n [selectedConversationId]=\"selectedConversationId\"\n [renamedConversationId]=\"renamedConversationId\"\n [isSidebarPinned]=\"isSidebarPinned\"\n [isMobileView]=\"isMobileView\"\n (conversationSelected)=\"onConversationSelected($event)\"\n (newConversationRequested)=\"startNewConversation()\"\n (pinSidebarRequested)=\"pinSidebar()\"\n (unpinSidebarRequested)=\"unpinSidebar()\">\n </mj-conversation-sidebar>\n </div>\n\n <!-- Floating toggle button (only visible when sidebar is collapsed and settings loaded) -->\n @if (activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarCollapsed && isSidebarSettingsLoaded) {\n <button class=\"sidebar-floating-toggle\"\n (click)=\"expandSidebar()\"\n title=\"Show conversations\">\n <i class=\"fas fa-table-columns\"></i>\n </button>\n }\n\n <!-- Resize handle for sidebar (only when expanded and settings loaded) -->\n <div class=\"sidebar-resize-handle\"\n *ngIf=\"isSidebarVisible && !isSidebarCollapsed && activeTab !== 'collections' && activeTab !== 'tasks' && isSidebarSettingsLoaded\"\n (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 [pendingAttachments]=\"pendingAttachmentsToSend\"\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; pendingAttachmentsToSend = null\"\n (pendingMessageRequested)=\"onPendingMessageRequested($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 position: relative;\n}\n\n.workspace-sidebar {\n flex-shrink: 0;\n background-color: #092340;\n border-right: 1px solid #D9D9D9;\n overflow-y: auto;\n transition: width 0.3s ease;\n}\n\n/* Disable transitions during initial load to prevent jarring animation */\n.workspace-sidebar.no-transition {\n transition: none !important;\n}\n\n.workspace-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n}\n\n/* Floating toggle button (only visible when sidebar is collapsed) */\n.sidebar-floating-toggle {\n position: absolute;\n top: 12px;\n left: 12px;\n z-index: 100;\n width: 36px;\n height: 36px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #092340;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 8px;\n cursor: pointer;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n transition: all 0.2s ease;\n}\n\n.sidebar-floating-toggle:hover {\n background: #0a2d4d;\n border-color: rgba(255, 255, 255, 0.3);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n transform: scale(1.05);\n}\n\n.sidebar-floating-toggle:active {\n transform: scale(0.98);\n}\n\n.sidebar-floating-toggle i {\n color: rgba(255, 255, 255, 0.85);\n font-size: 16px;\n transition: color 0.15s ease;\n}\n\n.sidebar-floating-toggle:hover i {\n color: white;\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: 56px; /* 48px nav + 8px dark strip above blue border */\n bottom: 0;\n z-index: 1000;\n max-width: 100%;\n height: auto;\n }\n\n .sidebar-resize-handle,\n .artifact-panel-resize-handle,\n .sidebar-floating-toggle {\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}"] }]
|
|
1243
1217
|
}], () => [{ 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: [{
|
|
1244
1218
|
type: Input
|
|
1245
1219
|
}], initialConversationId: [{
|
|
@@ -1281,5 +1255,5 @@ export class ConversationWorkspaceComponent extends BaseAngularComponent {
|
|
|
1281
1255
|
type: HostListener,
|
|
1282
1256
|
args: ['document:click', ['$event']]
|
|
1283
1257
|
}] }); })();
|
|
1284
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationWorkspaceComponent, { className: "ConversationWorkspaceComponent", filePath: "src/lib/components/workspace/conversation-workspace.component.ts", lineNumber:
|
|
1258
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConversationWorkspaceComponent, { className: "ConversationWorkspaceComponent", filePath: "src/lib/components/workspace/conversation-workspace.component.ts", lineNumber: 65 }); })();
|
|
1285
1259
|
//# sourceMappingURL=conversation-workspace.component.js.map
|