@memberjunction/ng-explorer-core 5.22.0 → 5.23.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/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +3 -2
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +49 -49
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
- package/dist/lib/generic/form-toolbar.js +10 -10
- package/dist/lib/generic/form-toolbar.js.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.js +6 -6
- package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
- package/dist/lib/oauth/oauth.module.d.ts +2 -3
- package/dist/lib/oauth/oauth.module.d.ts.map +1 -1
- package/dist/lib/oauth/oauth.module.js +0 -4
- package/dist/lib/oauth/oauth.module.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +6 -25
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js +30 -124
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +7 -23
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +50 -142
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +3 -19
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +16 -98
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +13 -11
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +80 -89
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.js +18 -3
- package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +38 -16
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.js +57 -35
- package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts +33 -0
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +99 -16
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/services/settings-dialog.service.d.ts +8 -8
- package/dist/lib/shell/services/settings-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/settings-dialog.service.js +20 -26
- package/dist/lib/shell/services/settings-dialog.service.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +17 -16
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/shell/shell.module.d.ts +4 -5
- package/dist/lib/shell/shell.module.d.ts.map +1 -1
- package/dist/lib/shell/shell.module.js +4 -8
- package/dist/lib/shell/shell.module.js.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +72 -71
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +11 -11
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +36 -12
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +78 -50
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +12 -5
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +44 -55
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts +10 -2
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +313 -243
- package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
- package/dist/module.d.ts +23 -34
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +33 -74
- package/dist/module.js.map +1 -1
- package/package.json +37 -47
|
@@ -5,18 +5,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { Component, ViewEncapsulation, ViewChild, HostListener } from '@angular/core';
|
|
8
|
-
import { NavigationEnd } from '@angular/router';
|
|
9
8
|
import { Metadata, CompositeKey } from '@memberjunction/core';
|
|
10
9
|
import { RegisterClass, UUIDsEqual } from '@memberjunction/global';
|
|
11
10
|
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
12
|
-
import { MJEnvironmentEntityExtended, UserInfoEngine } from '@memberjunction/core-entities';
|
|
11
|
+
import { MJEnvironmentEntityExtended, UserInfoEngine, ConversationEngine } from '@memberjunction/core-entities';
|
|
13
12
|
import { AIEngineBase } from '@memberjunction/ai-engine-base';
|
|
14
|
-
import { Subject, takeUntil
|
|
13
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
15
14
|
import * as i0 from "@angular/core";
|
|
16
15
|
import * as i1 from "@memberjunction/ng-shared";
|
|
17
16
|
import * as i2 from "@memberjunction/ng-conversations";
|
|
18
|
-
import * as i3 from "@
|
|
19
|
-
import * as i4 from "@memberjunction/ng-shared-generic";
|
|
17
|
+
import * as i3 from "@memberjunction/ng-shared-generic";
|
|
20
18
|
const _c0 = ["conversationList"];
|
|
21
19
|
const _c1 = ["chatArea"];
|
|
22
20
|
function ChatConversationsResource_Conditional_0_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -82,25 +80,23 @@ function ChatConversationsResource_Conditional_1_Template(rf, ctx) { if (rf & 1)
|
|
|
82
80
|
* Designed to work with the tab system for multi-tab conversation management
|
|
83
81
|
*
|
|
84
82
|
* This component manages its own selection state locally, following the encapsulation pattern:
|
|
85
|
-
* -
|
|
83
|
+
* - ConversationEngine singleton is used for shared DATA (caching, loading, saving)
|
|
86
84
|
* - Local state variables manage SELECTION state (which conversation is active)
|
|
87
85
|
* - State flows down to children via @Input, events flow up via @Output
|
|
88
86
|
*/
|
|
89
87
|
let ChatConversationsResource = class ChatConversationsResource extends BaseResourceComponent {
|
|
90
88
|
navigationService;
|
|
91
|
-
conversationData;
|
|
92
|
-
router;
|
|
93
89
|
mentionAutocompleteService;
|
|
94
90
|
cdr;
|
|
95
91
|
streamingService;
|
|
96
92
|
activeTasksService;
|
|
97
93
|
uiCommandHandler;
|
|
94
|
+
bridge;
|
|
98
95
|
conversationList;
|
|
99
96
|
chatArea;
|
|
100
97
|
currentUser = null;
|
|
101
98
|
destroy$ = new Subject();
|
|
102
99
|
skipUrlUpdate = true; // Skip URL updates during initialization
|
|
103
|
-
lastNavigatedUrl = ''; // Track URL to avoid reacting to our own navigation
|
|
104
100
|
// Ready flag - blocks child rendering until AIEngine is initialized
|
|
105
101
|
isReady = false;
|
|
106
102
|
// LOCAL SELECTION STATE - each wrapper instance manages its own selection
|
|
@@ -129,16 +125,16 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
129
125
|
// User Settings persistence
|
|
130
126
|
USER_SETTING_SIDEBAR_KEY = 'Conversations.SidebarState';
|
|
131
127
|
saveSettingsTimeout = null;
|
|
132
|
-
|
|
128
|
+
engine = ConversationEngine.Instance;
|
|
129
|
+
constructor(navigationService, mentionAutocompleteService, cdr, streamingService, activeTasksService, uiCommandHandler, bridge) {
|
|
133
130
|
super();
|
|
134
131
|
this.navigationService = navigationService;
|
|
135
|
-
this.conversationData = conversationData;
|
|
136
|
-
this.router = router;
|
|
137
132
|
this.mentionAutocompleteService = mentionAutocompleteService;
|
|
138
133
|
this.cdr = cdr;
|
|
139
134
|
this.streamingService = streamingService;
|
|
140
135
|
this.activeTasksService = activeTasksService;
|
|
141
136
|
this.uiCommandHandler = uiCommandHandler;
|
|
137
|
+
this.bridge = bridge;
|
|
142
138
|
}
|
|
143
139
|
async ngOnInit() {
|
|
144
140
|
const md = new Metadata();
|
|
@@ -169,40 +165,25 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
169
165
|
// Initialize global streaming service for PubSub updates
|
|
170
166
|
// This enables reconnection to in-progress agents after browser refresh
|
|
171
167
|
this.streamingService.initialize();
|
|
172
|
-
//
|
|
173
|
-
|
|
174
|
-
const urlState = this.parseUrlState();
|
|
175
|
-
if (urlState) {
|
|
176
|
-
// Set conversationId synchronously so child components see it immediately
|
|
177
|
-
if (urlState.conversationId) {
|
|
178
|
-
this.selectedConversationId = urlState.conversationId;
|
|
179
|
-
this.isNewUnsavedConversation = false;
|
|
180
|
-
}
|
|
181
|
-
if (urlState.artifactId) {
|
|
182
|
-
this.pendingArtifactId = urlState.artifactId;
|
|
183
|
-
this.pendingArtifactVersionNumber = urlState.versionNumber || null;
|
|
184
|
-
}
|
|
185
|
-
// Load the conversation entity asynchronously (non-blocking)
|
|
186
|
-
this.loadConversationEntity(urlState.conversationId);
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
// Check if we have navigation params from config (e.g., from Collections linking here)
|
|
190
|
-
this.applyConfigurationParams();
|
|
191
|
-
}
|
|
192
|
-
// Subscribe to router NavigationEnd events for back/forward button support
|
|
193
|
-
this.router.events
|
|
194
|
-
.pipe(filter((event) => event instanceof NavigationEnd), takeUntil(this.destroy$))
|
|
195
|
-
.subscribe(event => {
|
|
196
|
-
const currentUrl = event.urlAfterRedirects || event.url;
|
|
197
|
-
if (currentUrl !== this.lastNavigatedUrl) {
|
|
198
|
-
this.onExternalNavigation(currentUrl);
|
|
199
|
-
}
|
|
200
|
-
});
|
|
168
|
+
// Apply initial state from tab configuration (populated by shell from URL or nav params)
|
|
169
|
+
this.applyConfigurationParams();
|
|
201
170
|
// Subscribe to actionable commands (open:resource) from the UI command handler service.
|
|
202
171
|
// open:url commands are handled directly by the service; open:resource needs NavigationService.
|
|
203
172
|
this.uiCommandHandler.actionableCommandRequested
|
|
204
173
|
.pipe(takeUntil(this.destroy$))
|
|
205
174
|
.subscribe(command => this.handleActionableCommand(command));
|
|
175
|
+
// Subscribe to bridge switch events so the overlay can hand off a conversation to this workspace
|
|
176
|
+
this.bridge.SwitchEvent$
|
|
177
|
+
.pipe(takeUntil(this.destroy$))
|
|
178
|
+
.subscribe(event => {
|
|
179
|
+
if (event.Target === 'workspace' && event.ConversationID) {
|
|
180
|
+
void this.selectConversation(event.ConversationID);
|
|
181
|
+
this.updateTabTitle();
|
|
182
|
+
this.cdr.detectChanges();
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
// Notify the bridge that the workspace is active
|
|
186
|
+
this.bridge.NotifyWorkspaceActive(true);
|
|
206
187
|
// Enable URL updates after initialization
|
|
207
188
|
this.skipUrlUpdate = false;
|
|
208
189
|
// Update URL to reflect current state
|
|
@@ -213,6 +194,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
213
194
|
}, 100);
|
|
214
195
|
}
|
|
215
196
|
ngOnDestroy() {
|
|
197
|
+
this.bridge.NotifyWorkspaceActive(false);
|
|
216
198
|
this.destroy$.next();
|
|
217
199
|
this.destroy$.complete();
|
|
218
200
|
// Clear any pending save timeout
|
|
@@ -233,7 +215,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
233
215
|
// Initialize AIEngine, conversations, and mention service in parallel
|
|
234
216
|
await Promise.all([
|
|
235
217
|
AIEngineBase.Instance.Config(false),
|
|
236
|
-
this.
|
|
218
|
+
this.engine.LoadConversations(this.environmentId, this.currentUser, false),
|
|
237
219
|
this.mentionAutocompleteService.initialize(this.currentUser)
|
|
238
220
|
]);
|
|
239
221
|
// Restore active tasks AFTER conversations are cached (uses in-memory lookup)
|
|
@@ -249,28 +231,6 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
249
231
|
this.cdr.detectChanges();
|
|
250
232
|
}
|
|
251
233
|
}
|
|
252
|
-
/**
|
|
253
|
-
* Parse URL query string for conversation state.
|
|
254
|
-
* Query params: conversationId, artifactId, versionNumber
|
|
255
|
-
*/
|
|
256
|
-
parseUrlState() {
|
|
257
|
-
const url = this.router.url;
|
|
258
|
-
const queryIndex = url.indexOf('?');
|
|
259
|
-
if (queryIndex === -1)
|
|
260
|
-
return null;
|
|
261
|
-
const queryString = url.substring(queryIndex + 1);
|
|
262
|
-
const params = new URLSearchParams(queryString);
|
|
263
|
-
const conversationId = params.get('conversationId');
|
|
264
|
-
const artifactId = params.get('artifactId');
|
|
265
|
-
const versionNumber = params.get('versionNumber');
|
|
266
|
-
if (!conversationId && !artifactId)
|
|
267
|
-
return null;
|
|
268
|
-
return {
|
|
269
|
-
conversationId: conversationId || undefined,
|
|
270
|
-
artifactId: artifactId || undefined,
|
|
271
|
-
versionNumber: versionNumber ? parseInt(versionNumber, 10) : undefined
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
234
|
/**
|
|
275
235
|
* Load the conversation entity asynchronously (non-blocking).
|
|
276
236
|
* The conversationId is already set synchronously, this just loads the full entity.
|
|
@@ -279,7 +239,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
279
239
|
if (!conversationId)
|
|
280
240
|
return;
|
|
281
241
|
// Try to get from cache first
|
|
282
|
-
const conversation = this.
|
|
242
|
+
const conversation = this.engine.GetConversation(conversationId);
|
|
283
243
|
if (conversation) {
|
|
284
244
|
this.selectedConversation = conversation;
|
|
285
245
|
this.updateTabTitle();
|
|
@@ -287,51 +247,49 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
287
247
|
// If not in cache, the chat area component will handle loading it
|
|
288
248
|
}
|
|
289
249
|
/**
|
|
290
|
-
* Apply
|
|
250
|
+
* Apply initial state from tab configuration.
|
|
251
|
+
* The shell populates queryParams from the URL, and nav params come from cross-resource linking.
|
|
291
252
|
* Sets state synchronously so child components see values immediately.
|
|
292
253
|
*/
|
|
293
254
|
applyConfigurationParams() {
|
|
294
255
|
const config = this.Data?.Configuration;
|
|
295
256
|
if (!config)
|
|
296
257
|
return;
|
|
258
|
+
// Check queryParams first (shell populates these from the URL for deep-linking)
|
|
259
|
+
const qp = config['queryParams'];
|
|
260
|
+
const conversationId = qp?.['conversationId'] || config.conversationId;
|
|
261
|
+
const artifactId = qp?.['artifactId'] || config.artifactId;
|
|
262
|
+
const versionNumber = qp?.['versionNumber'] ? parseInt(qp['versionNumber'], 10)
|
|
263
|
+
: config.versionNumber ? config.versionNumber : null;
|
|
297
264
|
// Set pending artifact if provided
|
|
298
|
-
if (
|
|
299
|
-
this.pendingArtifactId =
|
|
300
|
-
this.pendingArtifactVersionNumber =
|
|
265
|
+
if (artifactId) {
|
|
266
|
+
this.pendingArtifactId = artifactId;
|
|
267
|
+
this.pendingArtifactVersionNumber = versionNumber;
|
|
301
268
|
}
|
|
302
269
|
// Set conversationId synchronously so child components see it immediately
|
|
303
|
-
if (
|
|
304
|
-
this.selectedConversationId =
|
|
270
|
+
if (conversationId) {
|
|
271
|
+
this.selectedConversationId = conversationId;
|
|
272
|
+
this.bridge.SetActiveFromWorkspace(conversationId);
|
|
305
273
|
this.isNewUnsavedConversation = false;
|
|
306
274
|
// Load entity asynchronously
|
|
307
|
-
this.loadConversationEntity(
|
|
275
|
+
this.loadConversationEntity(conversationId);
|
|
308
276
|
}
|
|
309
277
|
}
|
|
310
278
|
/**
|
|
311
279
|
* Apply navigation state to local selection state.
|
|
312
280
|
* Sets state synchronously so child components see values immediately.
|
|
313
281
|
*/
|
|
314
|
-
applyNavigationState(state) {
|
|
315
|
-
// Set pending artifact if provided (will be consumed by chat area after loading)
|
|
316
|
-
if (state.artifactId) {
|
|
317
|
-
this.pendingArtifactId = state.artifactId;
|
|
318
|
-
this.pendingArtifactVersionNumber = state.versionNumber || null;
|
|
319
|
-
}
|
|
320
|
-
// Set the conversation synchronously
|
|
321
|
-
if (state.conversationId) {
|
|
322
|
-
this.selectedConversationId = state.conversationId;
|
|
323
|
-
this.isNewUnsavedConversation = false;
|
|
324
|
-
this.loadConversationEntity(state.conversationId);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
282
|
/**
|
|
328
283
|
* Select a conversation by ID - loads the entity and updates local state
|
|
329
284
|
*/
|
|
330
285
|
async selectConversation(conversationId) {
|
|
331
286
|
this.selectedConversationId = conversationId;
|
|
332
287
|
this.isNewUnsavedConversation = false;
|
|
288
|
+
// Keep bridge in sync so other consumers (toast suppression, overlay) know
|
|
289
|
+
// which conversation the workspace is viewing
|
|
290
|
+
this.bridge.SetActiveFromWorkspace(conversationId);
|
|
333
291
|
// Load the conversation entity from data service
|
|
334
|
-
const conversation = this.
|
|
292
|
+
const conversation = this.engine.GetConversation(conversationId);
|
|
335
293
|
if (conversation) {
|
|
336
294
|
this.selectedConversation = conversation;
|
|
337
295
|
}
|
|
@@ -384,57 +342,6 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
384
342
|
this.NotifyDisplayNameChanged(name);
|
|
385
343
|
}
|
|
386
344
|
}
|
|
387
|
-
/**
|
|
388
|
-
* Handle external navigation (back/forward buttons).
|
|
389
|
-
* Parses the URL and applies the state without triggering a new navigation.
|
|
390
|
-
*/
|
|
391
|
-
onExternalNavigation(url) {
|
|
392
|
-
// Check if this URL is for our component (contains our base path)
|
|
393
|
-
const currentPath = this.router.url.split('?')[0];
|
|
394
|
-
const newPath = url.split('?')[0];
|
|
395
|
-
// Only handle if we're still on the same base path (same component instance)
|
|
396
|
-
if (currentPath !== newPath) {
|
|
397
|
-
return; // Different route entirely, shell will handle it
|
|
398
|
-
}
|
|
399
|
-
// Parse the new URL state
|
|
400
|
-
const urlState = this.parseUrlFromString(url);
|
|
401
|
-
// Apply the state without triggering URL updates
|
|
402
|
-
this.skipUrlUpdate = true;
|
|
403
|
-
if (urlState) {
|
|
404
|
-
this.applyNavigationState(urlState);
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
407
|
-
// No params means clear state
|
|
408
|
-
this.selectedConversationId = null;
|
|
409
|
-
this.selectedConversation = null;
|
|
410
|
-
this.selectedThreadId = null;
|
|
411
|
-
this.pendingArtifactId = null;
|
|
412
|
-
this.pendingArtifactVersionNumber = null;
|
|
413
|
-
}
|
|
414
|
-
this.skipUrlUpdate = false;
|
|
415
|
-
// Update the tracked URL
|
|
416
|
-
this.lastNavigatedUrl = url;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Parse URL state from a URL string (used for external navigation).
|
|
420
|
-
*/
|
|
421
|
-
parseUrlFromString(url) {
|
|
422
|
-
const queryIndex = url.indexOf('?');
|
|
423
|
-
if (queryIndex === -1)
|
|
424
|
-
return null;
|
|
425
|
-
const queryString = url.substring(queryIndex + 1);
|
|
426
|
-
const params = new URLSearchParams(queryString);
|
|
427
|
-
const conversationId = params.get('conversationId');
|
|
428
|
-
const artifactId = params.get('artifactId');
|
|
429
|
-
const versionNumber = params.get('versionNumber');
|
|
430
|
-
if (!conversationId && !artifactId)
|
|
431
|
-
return null;
|
|
432
|
-
return {
|
|
433
|
-
conversationId: conversationId || undefined,
|
|
434
|
-
artifactId: artifactId || undefined,
|
|
435
|
-
versionNumber: versionNumber ? parseInt(versionNumber, 10) : undefined
|
|
436
|
-
};
|
|
437
|
-
}
|
|
438
345
|
/**
|
|
439
346
|
* Get the environment ID from configuration or use default
|
|
440
347
|
*/
|
|
@@ -475,7 +382,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
475
382
|
*/
|
|
476
383
|
onConversationDeleted(deletedId) {
|
|
477
384
|
if (this.selectedConversationId === deletedId) {
|
|
478
|
-
const remaining = this.
|
|
385
|
+
const remaining = this.engine.Conversations.filter(c => !UUIDsEqual(c.ID, deletedId));
|
|
479
386
|
if (remaining.length > 0) {
|
|
480
387
|
void this.selectConversation(remaining[0].ID);
|
|
481
388
|
this.updateUrl();
|
|
@@ -713,6 +620,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
713
620
|
this.selectedConversationId = event.conversation.ID;
|
|
714
621
|
this.selectedConversation = event.conversation;
|
|
715
622
|
this.isNewUnsavedConversation = false;
|
|
623
|
+
this.bridge.SetActiveFromWorkspace(event.conversation.ID);
|
|
716
624
|
this.updateUrl();
|
|
717
625
|
this.updateTabTitle();
|
|
718
626
|
}
|
|
@@ -866,7 +774,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
866
774
|
console.warn('No artifacts found in conversation to open for Report/Dashboard command');
|
|
867
775
|
}
|
|
868
776
|
}
|
|
869
|
-
static ɵfac = function ChatConversationsResource_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ChatConversationsResource)(i0.ɵɵdirectiveInject(i1.NavigationService), i0.ɵɵdirectiveInject(i2.
|
|
777
|
+
static ɵfac = function ChatConversationsResource_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ChatConversationsResource)(i0.ɵɵdirectiveInject(i1.NavigationService), i0.ɵɵdirectiveInject(i2.MentionAutocompleteService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2.ConversationStreamingService), i0.ɵɵdirectiveInject(i2.ActiveTasksService), i0.ɵɵdirectiveInject(i2.UICommandHandlerService), i0.ɵɵdirectiveInject(i2.ConversationBridgeService)); };
|
|
870
778
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ChatConversationsResource, selectors: [["mj-chat-conversations-resource"]], viewQuery: function ChatConversationsResource_Query(rf, ctx) { if (rf & 1) {
|
|
871
779
|
i0.ɵɵviewQuery(_c0, 5)(_c1, 5);
|
|
872
780
|
} if (rf & 2) {
|
|
@@ -880,7 +788,7 @@ let ChatConversationsResource = class ChatConversationsResource extends BaseReso
|
|
|
880
788
|
i0.ɵɵelement(2, "mj-toast");
|
|
881
789
|
} if (rf & 2) {
|
|
882
790
|
i0.ɵɵconditional(ctx.isReady ? 0 : 1);
|
|
883
|
-
} }, dependencies: [i2.ConversationListComponent, i2.ConversationChatAreaComponent, i2.ToastComponent,
|
|
791
|
+
} }, dependencies: [i2.ConversationListComponent, i2.ConversationChatAreaComponent, i2.ToastComponent, i3.LoadingComponent], styles: ["\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .chat-conversations-container {\n display: flex;\n width: 100%;\n height: 100%;\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n .conversation-sidebar {\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n overflow-y: auto;\n background: var(--mj-bg-surface-sunken);\n transition: width 0.3s ease;\n }\n\n /* Disable transitions during initial load to prevent jarring animation */\n .conversation-sidebar.no-transition {\n transition: none !important;\n }\n\n .conversation-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n }\n\n /* Resize handle for sidebar */\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: var(--mj-brand-primary);\n }\n\n .sidebar-resize-handle:active {\n background: var(--mj-brand-primary-hover);\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 .conversation-main {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .initializing-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n flex: 1;\n }\n "], encapsulation: 2 });
|
|
884
792
|
};
|
|
885
793
|
ChatConversationsResource = __decorate([
|
|
886
794
|
RegisterClass(BaseResourceComponent, 'ChatConversationsResource')
|
|
@@ -961,7 +869,7 @@ export { ChatConversationsResource };
|
|
|
961
869
|
<!-- Toast notifications container -->
|
|
962
870
|
<mj-toast></mj-toast>
|
|
963
871
|
`, encapsulation: ViewEncapsulation.None, styles: ["\n :host {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n }\n\n .chat-conversations-container {\n display: flex;\n width: 100%;\n height: 100%;\n flex: 1;\n overflow: hidden;\n position: relative;\n }\n\n .conversation-sidebar {\n flex-shrink: 0;\n border-right: 1px solid var(--mj-border-default);\n overflow-y: auto;\n background: var(--mj-bg-surface-sunken);\n transition: width 0.3s ease;\n }\n\n /* Disable transitions during initial load to prevent jarring animation */\n .conversation-sidebar.no-transition {\n transition: none !important;\n }\n\n .conversation-sidebar.collapsed {\n width: 0 !important;\n min-width: 0;\n border-right: none;\n overflow: hidden;\n }\n\n /* Resize handle for sidebar */\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: var(--mj-brand-primary);\n }\n\n .sidebar-resize-handle:active {\n background: var(--mj-brand-primary-hover);\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 .conversation-main {\n flex: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n\n .initializing-container {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n flex: 1;\n }\n "] }]
|
|
964
|
-
}], () => [{ type: i1.NavigationService }, { type: i2.
|
|
872
|
+
}], () => [{ type: i1.NavigationService }, { type: i2.MentionAutocompleteService }, { type: i0.ChangeDetectorRef }, { type: i2.ConversationStreamingService }, { type: i2.ActiveTasksService }, { type: i2.UICommandHandlerService }, { type: i2.ConversationBridgeService }], { conversationList: [{
|
|
965
873
|
type: ViewChild,
|
|
966
874
|
args: ['conversationList']
|
|
967
875
|
}], chatArea: [{
|
|
@@ -974,5 +882,5 @@ export { ChatConversationsResource };
|
|
|
974
882
|
type: HostListener,
|
|
975
883
|
args: ['document:click', ['$event']]
|
|
976
884
|
}] }); })();
|
|
977
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChatConversationsResource, { className: "ChatConversationsResource", filePath: "src/lib/resource-wrappers/chat-conversations-resource.component.ts", lineNumber:
|
|
885
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ChatConversationsResource, { className: "ChatConversationsResource", filePath: "src/lib/resource-wrappers/chat-conversations-resource.component.ts", lineNumber: 182 }); })();
|
|
978
886
|
//# sourceMappingURL=chat-conversations-resource.component.js.map
|