@memberjunction/ng-conversations 2.108.0 → 2.110.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/components/collection/collection-view.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-view.component.js +2 -1
- package/dist/lib/components/collection/collection-view.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +87 -0
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +581 -209
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-list.component.js +22 -14
- package/dist/lib/components/conversation/conversation-list.component.js.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts +6 -1
- package/dist/lib/components/dialogs/input-dialog.component.d.ts.map +1 -1
- package/dist/lib/components/dialogs/input-dialog.component.js +61 -6
- package/dist/lib/components/dialogs/input-dialog.component.js.map +1 -1
- package/dist/lib/components/message/message-input.component.d.ts +22 -14
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +133 -132
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/message/message-item.component.d.ts +48 -7
- package/dist/lib/components/message/message-item.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-item.component.js +222 -132
- package/dist/lib/components/message/message-item.component.js.map +1 -1
- package/dist/lib/components/message/message-list.component.d.ts +5 -1
- package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-list.component.js +16 -10
- package/dist/lib/components/message/message-list.component.js.map +1 -1
- package/dist/lib/components/message/suggested-responses.component.js +3 -3
- package/dist/lib/components/message/suggested-responses.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +3 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +11 -2
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.d.ts +11 -0
- package/dist/lib/models/conversation-complete-query.model.d.ts.map +1 -1
- package/dist/lib/models/conversation-complete-query.model.js.map +1 -1
- package/dist/lib/models/lazy-artifact-info.d.ts +1 -0
- package/dist/lib/models/lazy-artifact-info.d.ts.map +1 -1
- package/dist/lib/models/lazy-artifact-info.js +2 -0
- package/dist/lib/models/lazy-artifact-info.js.map +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts +1 -1
- package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-agent.service.js +3 -3
- package/dist/lib/services/conversation-agent.service.js.map +1 -1
- package/dist/lib/services/conversation-state.service.js +1 -1
- package/dist/lib/services/conversation-state.service.js.map +1 -1
- package/dist/lib/services/dialog.service.d.ts +12 -2
- package/dist/lib/services/dialog.service.d.ts.map +1 -1
- package/dist/lib/services/dialog.service.js +27 -10
- package/dist/lib/services/dialog.service.js.map +1 -1
- package/dist/lib/services/search.service.js +1 -1
- package/dist/lib/services/search.service.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter, ElementRef, OnInit, OnDestroy } from '@angular/core';
|
|
1
|
+
import { EventEmitter, ElementRef, OnInit, OnDestroy, OnChanges, SimpleChanges, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { UserInfo } from '@memberjunction/core';
|
|
3
3
|
import { ConversationDetailEntity, AIAgentEntityExtended } from '@memberjunction/core-entities';
|
|
4
4
|
import { DialogService } from '../../services/dialog.service';
|
|
@@ -11,7 +11,7 @@ import { BaseAgentSuggestedResponse } from '@memberjunction/ai-core-plus';
|
|
|
11
11
|
import { MentionAutocompleteService, MentionSuggestion } from '../../services/mention-autocomplete.service';
|
|
12
12
|
import { MentionParserService } from '../../services/mention-parser.service';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
|
-
export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
14
|
+
export declare class MessageInputComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
15
15
|
private dialogService;
|
|
16
16
|
private toastService;
|
|
17
17
|
private agentService;
|
|
@@ -36,6 +36,15 @@ export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
|
36
36
|
conversationDetailId: string;
|
|
37
37
|
agentRunId: string;
|
|
38
38
|
}>;
|
|
39
|
+
agentRunUpdate: EventEmitter<{
|
|
40
|
+
conversationDetailId: string;
|
|
41
|
+
agentRun?: any;
|
|
42
|
+
agentRunId?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
messageComplete: EventEmitter<{
|
|
45
|
+
conversationDetailId: string;
|
|
46
|
+
agentRunId?: string | undefined;
|
|
47
|
+
}>;
|
|
39
48
|
artifactCreated: EventEmitter<{
|
|
40
49
|
artifactId: string;
|
|
41
50
|
versionId: string;
|
|
@@ -48,6 +57,8 @@ export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
|
48
57
|
name: string;
|
|
49
58
|
description: string;
|
|
50
59
|
}>;
|
|
60
|
+
intentCheckStarted: EventEmitter<void>;
|
|
61
|
+
intentCheckCompleted: EventEmitter<void>;
|
|
51
62
|
messageTextarea: ElementRef;
|
|
52
63
|
messageText: string;
|
|
53
64
|
isSending: boolean;
|
|
@@ -68,7 +79,13 @@ export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
|
68
79
|
private completionTimestamps;
|
|
69
80
|
constructor(dialogService: DialogService, toastService: ToastService, agentService: ConversationAgentService, conversationState: ConversationStateService, dataCache: DataCacheService, activeTasks: ActiveTasksService, mentionAutocomplete: MentionAutocompleteService, mentionParser: MentionParserService);
|
|
70
81
|
ngOnInit(): Promise<void>;
|
|
82
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
83
|
+
ngAfterViewInit(): void;
|
|
71
84
|
ngOnDestroy(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Focus the message input textarea
|
|
87
|
+
*/
|
|
88
|
+
private focusInput;
|
|
72
89
|
/**
|
|
73
90
|
* Subscribe to PubSub for real-time task orchestration progress updates
|
|
74
91
|
*/
|
|
@@ -147,7 +164,7 @@ export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
|
147
164
|
private findLastNonSageAgentId;
|
|
148
165
|
/**
|
|
149
166
|
* Checks if message should continue with the previous agent
|
|
150
|
-
*
|
|
167
|
+
* Emits events to show temporary intent checking message in conversation
|
|
151
168
|
*/
|
|
152
169
|
private checkContinuityIntent;
|
|
153
170
|
/**
|
|
@@ -216,22 +233,13 @@ export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
|
216
233
|
* Bypasses Sage - no status messages
|
|
217
234
|
*/
|
|
218
235
|
private continueWithAgent;
|
|
219
|
-
/**
|
|
220
|
-
* Creates an artifact from an agent's payload and links it to the conversation detail
|
|
221
|
-
* If previousArtifactInfo is provided, creates a new version of the existing artifact
|
|
222
|
-
* Otherwise, creates a new artifact with version 1
|
|
223
|
-
* @param payload The agent's payload object
|
|
224
|
-
* @param message The conversation detail message to link to
|
|
225
|
-
* @param agentId The ID of the agent that produced the payload
|
|
226
|
-
* @param previousArtifactInfo Optional info about previous artifact to create new version
|
|
227
|
-
*/
|
|
228
|
-
private createArtifactFromPayload;
|
|
229
236
|
/**
|
|
230
237
|
* Name the conversation based on the first message using GraphQL AI client
|
|
231
238
|
*/
|
|
232
239
|
private nameConversation;
|
|
233
240
|
/**
|
|
234
241
|
* Marks a conversation detail as complete and records timestamp to prevent race conditions
|
|
242
|
+
* Emits event to parent to refresh agent run data from database
|
|
235
243
|
*/
|
|
236
244
|
private markMessageComplete;
|
|
237
245
|
/**
|
|
@@ -239,6 +247,6 @@ export declare class MessageInputComponent implements OnInit, OnDestroy {
|
|
|
239
247
|
*/
|
|
240
248
|
private cleanupCompletionTimestamp;
|
|
241
249
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, never>;
|
|
242
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "mj-message-input", never, { "conversationId": { "alias": "conversationId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "conversationHistory": { "alias": "conversationHistory"; "required": false; }; }, { "messageSent": "messageSent"; "agentResponse": "agentResponse"; "agentRunDetected": "agentRunDetected"; "artifactCreated": "artifactCreated"; "conversationRenamed": "conversationRenamed"; }, never, never, false, never>;
|
|
250
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageInputComponent, "mj-message-input", never, { "conversationId": { "alias": "conversationId"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "parentMessageId": { "alias": "parentMessageId"; "required": false; }; "conversationHistory": { "alias": "conversationHistory"; "required": false; }; }, { "messageSent": "messageSent"; "agentResponse": "agentResponse"; "agentRunDetected": "agentRunDetected"; "agentRunUpdate": "agentRunUpdate"; "messageComplete": "messageComplete"; "artifactCreated": "artifactCreated"; "conversationRenamed": "conversationRenamed"; "intentCheckStarted": "intentCheckStarted"; "intentCheckCompleted": "intentCheckCompleted"; }, never, never, false, never>;
|
|
243
251
|
}
|
|
244
252
|
//# sourceMappingURL=message-input.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-input.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAa,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"message-input.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAa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,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,UAAU,GAAG,OAAO,EAAE,kBAAkB,CAAC,EAAE,0BAA0B,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAqChN;;;OAGG;YACW,yBAAyB;IA2FvC;;;OAGG;YACW,wBAAwB;IA2JtC;;;OAGG;YACW,uBAAuB;IAuLrC;;;OAGG;YACW,mBAAmB;IA2HjC;;;OAGG;YACW,iBAAiB;IAgL/B;;OAEG;YACW,gBAAgB;IAgE9B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;OAEG;IACH,OAAO,CAAC,0BAA0B;yCAt9DvB,qBAAqB;2CAArB,qBAAqB;CA49DjC"}
|
|
@@ -46,8 +46,12 @@ export class MessageInputComponent {
|
|
|
46
46
|
messageSent = new EventEmitter();
|
|
47
47
|
agentResponse = new EventEmitter();
|
|
48
48
|
agentRunDetected = new EventEmitter();
|
|
49
|
+
agentRunUpdate = new EventEmitter(); // Emits when agent run data updates during progress
|
|
50
|
+
messageComplete = new EventEmitter(); // Emits when message completes (success or error)
|
|
49
51
|
artifactCreated = new EventEmitter();
|
|
50
52
|
conversationRenamed = new EventEmitter();
|
|
53
|
+
intentCheckStarted = new EventEmitter(); // Emits when intent checking starts
|
|
54
|
+
intentCheckCompleted = new EventEmitter(); // Emits when intent checking completes
|
|
51
55
|
messageTextarea;
|
|
52
56
|
messageText = '';
|
|
53
57
|
isSending = false;
|
|
@@ -84,12 +88,33 @@ export class MessageInputComponent {
|
|
|
84
88
|
// Subscribe to PubSub for task progress updates
|
|
85
89
|
this.subscribeToPushStatus();
|
|
86
90
|
}
|
|
91
|
+
ngOnChanges(changes) {
|
|
92
|
+
// When conversation changes, focus the input
|
|
93
|
+
if (changes['conversationId'] && !changes['conversationId'].firstChange) {
|
|
94
|
+
this.focusInput();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
ngAfterViewInit() {
|
|
98
|
+
// Focus input on initial load
|
|
99
|
+
this.focusInput();
|
|
100
|
+
}
|
|
87
101
|
ngOnDestroy() {
|
|
88
102
|
// Clean up PubSub subscription
|
|
89
103
|
if (this.pushStatusSubscription) {
|
|
90
104
|
this.pushStatusSubscription.unsubscribe();
|
|
91
105
|
}
|
|
92
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* Focus the message input textarea
|
|
109
|
+
*/
|
|
110
|
+
focusInput() {
|
|
111
|
+
// Use setTimeout to ensure DOM is ready
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
if (this.messageTextarea?.nativeElement) {
|
|
114
|
+
this.messageTextarea.nativeElement.focus();
|
|
115
|
+
}
|
|
116
|
+
}, 100);
|
|
117
|
+
}
|
|
93
118
|
/**
|
|
94
119
|
* Subscribe to PubSub for real-time task orchestration progress updates
|
|
95
120
|
*/
|
|
@@ -338,6 +363,7 @@ export class MessageInputComponent {
|
|
|
338
363
|
detail.ConversationID = this.conversationId;
|
|
339
364
|
detail.Message = text.trim();
|
|
340
365
|
detail.Role = 'User';
|
|
366
|
+
detail.UserID = this.currentUser.ID; // Set the user who sent the message
|
|
341
367
|
if (this.parentMessageId) {
|
|
342
368
|
detail.ParentID = this.parentMessageId;
|
|
343
369
|
}
|
|
@@ -367,6 +393,7 @@ export class MessageInputComponent {
|
|
|
367
393
|
detail.ConversationID = this.conversationId;
|
|
368
394
|
detail.Message = this.messageText.trim();
|
|
369
395
|
detail.Role = 'User';
|
|
396
|
+
detail.UserID = this.currentUser.ID; // Set the user who sent the message
|
|
370
397
|
if (this.parentMessageId) {
|
|
371
398
|
detail.ParentID = this.parentMessageId;
|
|
372
399
|
}
|
|
@@ -452,11 +479,11 @@ export class MessageInputComponent {
|
|
|
452
479
|
}
|
|
453
480
|
/**
|
|
454
481
|
* Checks if message should continue with the previous agent
|
|
455
|
-
*
|
|
482
|
+
* Emits events to show temporary intent checking message in conversation
|
|
456
483
|
*/
|
|
457
484
|
async checkContinuityIntent(agentId, message) {
|
|
458
|
-
|
|
459
|
-
this.
|
|
485
|
+
// Emit event to show temporary "Analyzing intent..." message in conversation
|
|
486
|
+
this.intentCheckStarted.emit();
|
|
460
487
|
try {
|
|
461
488
|
const intent = await this.agentService.checkAgentContinuityIntent(agentId, message, this.conversationHistory);
|
|
462
489
|
return intent;
|
|
@@ -466,8 +493,8 @@ export class MessageInputComponent {
|
|
|
466
493
|
return 'UNSURE';
|
|
467
494
|
}
|
|
468
495
|
finally {
|
|
469
|
-
|
|
470
|
-
this.
|
|
496
|
+
// Emit event to remove temporary intent checking message
|
|
497
|
+
this.intentCheckCompleted.emit();
|
|
471
498
|
}
|
|
472
499
|
}
|
|
473
500
|
/**
|
|
@@ -534,17 +561,21 @@ export class MessageInputComponent {
|
|
|
534
561
|
// This allows us to filter out progress messages from other concurrent agents
|
|
535
562
|
let capturedAgentRunId = null;
|
|
536
563
|
return async (progress) => {
|
|
537
|
-
|
|
538
|
-
const progressAgentRunId = progress.metadata?.agentRunId;
|
|
564
|
+
let progressAgentRun = progress.metadata?.agentRun;
|
|
565
|
+
const progressAgentRunId = progressAgentRun?.ID || progress.metadata?.agentRunId;
|
|
566
|
+
// if (!progressAgentRun && progressAgentRunId) {
|
|
567
|
+
// // load the full agent run object from the database if we only have the ID
|
|
568
|
+
// const md = new Metadata();
|
|
569
|
+
// progressAgentRun = await md.GetEntityObject<AIAgentRunEntity>("MJ: AI Agent Runs");
|
|
570
|
+
// await progressAgentRun.Load(progressAgentRunId);
|
|
571
|
+
// }
|
|
539
572
|
// Capture the agent run ID from the first progress message
|
|
540
573
|
if (!capturedAgentRunId && progressAgentRunId) {
|
|
541
574
|
capturedAgentRunId = progressAgentRunId;
|
|
542
|
-
console.log(`[${agentName}] 📌 Captured agent run ID: ${capturedAgentRunId} for conversation detail: ${conversationDetail.ID}`);
|
|
543
575
|
}
|
|
544
576
|
// Filter out progress messages from other concurrent agents
|
|
545
577
|
// This prevents cross-contamination when multiple agents run in parallel
|
|
546
578
|
if (capturedAgentRunId && progressAgentRunId && progressAgentRunId !== capturedAgentRunId) {
|
|
547
|
-
console.log(`[${agentName}] 🚫 Ignoring progress from different agent run (expected: ${capturedAgentRunId}, got: ${progressAgentRunId})`);
|
|
548
579
|
return;
|
|
549
580
|
}
|
|
550
581
|
// Format progress message with visual indicator
|
|
@@ -554,21 +585,28 @@ export class MessageInputComponent {
|
|
|
554
585
|
// Update the ConversationDetail message in real-time
|
|
555
586
|
try {
|
|
556
587
|
if (conversationDetail) {
|
|
557
|
-
console.log(`[${agentName}] Got conversation detail from cache - Status: ${conversationDetail.Status}, ID: ${conversationDetail.ID}`);
|
|
558
588
|
// Check 1: Skip if message is already complete or errored
|
|
559
589
|
if (conversationDetail.Status === 'Complete' || conversationDetail.Status === 'Error') {
|
|
560
|
-
console.log(`[${agentName}] ⛔ Skipping progress update - message status is ${conversationDetail.Status}`);
|
|
561
590
|
return;
|
|
562
591
|
}
|
|
563
592
|
// Check 2: Skip if message was marked as completed (prevents race condition)
|
|
564
593
|
// Once a message is marked complete, we reject ALL further progress updates
|
|
565
594
|
const completionTime = this.completionTimestamps.get(conversationDetail.ID);
|
|
566
595
|
if (completionTime) {
|
|
567
|
-
console.log(`[${agentName}] ⛔ Skipping progress update - message was marked complete at ${completionTime}`);
|
|
568
596
|
return;
|
|
569
597
|
}
|
|
570
|
-
// Emit
|
|
571
|
-
|
|
598
|
+
// CRITICAL FIX: Emit FULL agent run object for incremental updates
|
|
599
|
+
// This contains live timestamps, status, and other fields that change during execution
|
|
600
|
+
if (progressAgentRun || progressAgentRunId) {
|
|
601
|
+
this.agentRunUpdate.emit({
|
|
602
|
+
conversationDetailId: conversationDetail.ID,
|
|
603
|
+
agentRun: progressAgentRun,
|
|
604
|
+
agentRunId: progressAgentRunId
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
else if (progressAgentRunId && !capturedAgentRunId) {
|
|
608
|
+
// Fallback: If we don't have the full object but have the ID, emit agentRunDetected
|
|
609
|
+
// This will trigger a database query to load the agent run
|
|
572
610
|
this.agentRunDetected.emit({
|
|
573
611
|
conversationDetailId: conversationDetail.ID,
|
|
574
612
|
agentRunId: progressAgentRunId
|
|
@@ -683,9 +721,16 @@ export class MessageInputComponent {
|
|
|
683
721
|
// use update helper to ensure that if there is a race condition with more streaming updates we don't allow that to override this final message
|
|
684
722
|
await this.updateConversationDetail(conversationManagerMessage, result.agentRun.Message, 'Complete', result.suggestedResponses);
|
|
685
723
|
// Handle artifacts if any (but NOT task graphs - those are intermediate work products)
|
|
724
|
+
// Server already created artifacts - just emit event to trigger UI reload
|
|
686
725
|
if (result.payload && Object.keys(result.payload).length > 0) {
|
|
687
|
-
|
|
688
|
-
|
|
726
|
+
this.artifactCreated.emit({
|
|
727
|
+
artifactId: '',
|
|
728
|
+
versionId: '',
|
|
729
|
+
versionNumber: 0,
|
|
730
|
+
conversationDetailId: conversationManagerMessage.ID,
|
|
731
|
+
name: ''
|
|
732
|
+
});
|
|
733
|
+
console.log('🎨 Server created artifact, UI will reload to show it');
|
|
689
734
|
this.messageSent.emit(conversationManagerMessage);
|
|
690
735
|
}
|
|
691
736
|
userMessage.Status = 'Complete';
|
|
@@ -818,12 +863,13 @@ export class MessageInputComponent {
|
|
|
818
863
|
const sessionId = GraphQLDataProvider.Instance.sessionId || '';
|
|
819
864
|
// Step 3: Call ExecuteTaskGraph mutation (links to taskExecutionMessage)
|
|
820
865
|
const mutation = `
|
|
821
|
-
mutation ExecuteTaskGraph($taskGraphJson: String!, $conversationDetailId: String!, $environmentId: String!, $sessionId: String
|
|
866
|
+
mutation ExecuteTaskGraph($taskGraphJson: String!, $conversationDetailId: String!, $environmentId: String!, $sessionId: String!, $createNotifications: Boolean) {
|
|
822
867
|
ExecuteTaskGraph(
|
|
823
868
|
taskGraphJson: $taskGraphJson
|
|
824
869
|
conversationDetailId: $conversationDetailId
|
|
825
870
|
environmentId: $environmentId
|
|
826
871
|
sessionId: $sessionId
|
|
872
|
+
createNotifications: $createNotifications
|
|
827
873
|
) {
|
|
828
874
|
success
|
|
829
875
|
errorMessage
|
|
@@ -840,7 +886,8 @@ export class MessageInputComponent {
|
|
|
840
886
|
taskGraphJson: JSON.stringify(taskGraph),
|
|
841
887
|
conversationDetailId: taskExecutionMessage.ID, // Link tasks to execution message, not CM message
|
|
842
888
|
environmentId: environmentId,
|
|
843
|
-
sessionId: sessionId
|
|
889
|
+
sessionId: sessionId,
|
|
890
|
+
createNotifications: true
|
|
844
891
|
};
|
|
845
892
|
const result = await GraphQLDataProvider.Instance.ExecuteGQL(mutation, variables);
|
|
846
893
|
console.log('📊 ExecuteTaskGraph result:', {
|
|
@@ -973,10 +1020,16 @@ export class MessageInputComponent {
|
|
|
973
1020
|
if (agentResult && agentResult.success) {
|
|
974
1021
|
// Update message with result
|
|
975
1022
|
await this.updateConversationDetail(agentResponseMessage, agentResult.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
|
|
976
|
-
//
|
|
1023
|
+
// Server created artifacts - emit event to trigger UI reload
|
|
977
1024
|
if (agentResult.payload && Object.keys(agentResult.payload).length > 0) {
|
|
978
|
-
|
|
979
|
-
|
|
1025
|
+
this.artifactCreated.emit({
|
|
1026
|
+
artifactId: '',
|
|
1027
|
+
versionId: '',
|
|
1028
|
+
versionNumber: 0,
|
|
1029
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1030
|
+
name: ''
|
|
1031
|
+
});
|
|
1032
|
+
console.log('🎨 Server created artifact from single task execution');
|
|
980
1033
|
this.messageSent.emit(agentResponseMessage);
|
|
981
1034
|
}
|
|
982
1035
|
}
|
|
@@ -1047,10 +1100,16 @@ export class MessageInputComponent {
|
|
|
1047
1100
|
agentResponseMessage.AgentID = subResult.agentRun.AgentID;
|
|
1048
1101
|
}
|
|
1049
1102
|
await this.updateConversationDetail(agentResponseMessage, subResult.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
|
|
1050
|
-
//
|
|
1103
|
+
// Server created artifacts - emit event to trigger UI reload
|
|
1051
1104
|
if (subResult.payload && Object.keys(subResult.payload).length > 0) {
|
|
1052
|
-
|
|
1053
|
-
|
|
1105
|
+
this.artifactCreated.emit({
|
|
1106
|
+
artifactId: '',
|
|
1107
|
+
versionId: '',
|
|
1108
|
+
versionNumber: 0,
|
|
1109
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1110
|
+
name: ''
|
|
1111
|
+
});
|
|
1112
|
+
console.log('🎨 Server created artifact for sub-agent message:', agentResponseMessage.ID);
|
|
1054
1113
|
// Re-emit to trigger artifact display
|
|
1055
1114
|
this.messageSent.emit(agentResponseMessage);
|
|
1056
1115
|
}
|
|
@@ -1074,9 +1133,15 @@ export class MessageInputComponent {
|
|
|
1074
1133
|
agentResponseMessage.AgentID = retryResult.agentRun.AgentID;
|
|
1075
1134
|
}
|
|
1076
1135
|
await this.updateConversationDetail(agentResponseMessage, retryResult.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
|
|
1077
|
-
//
|
|
1136
|
+
// Server created artifacts - emit event to trigger UI reload
|
|
1078
1137
|
if (retryResult.payload && Object.keys(retryResult.payload).length > 0) {
|
|
1079
|
-
|
|
1138
|
+
this.artifactCreated.emit({
|
|
1139
|
+
artifactId: '',
|
|
1140
|
+
versionId: '',
|
|
1141
|
+
versionNumber: 0,
|
|
1142
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1143
|
+
name: ''
|
|
1144
|
+
});
|
|
1080
1145
|
this.messageSent.emit(agentResponseMessage);
|
|
1081
1146
|
}
|
|
1082
1147
|
userMessage.Status = 'Complete';
|
|
@@ -1199,7 +1264,7 @@ export class MessageInputComponent {
|
|
|
1199
1264
|
});
|
|
1200
1265
|
try {
|
|
1201
1266
|
// Invoke the agent with the previous payload
|
|
1202
|
-
const continuityResult = await this.agentService.invokeSubAgent(agentName, conversationId, userMessage, this.conversationHistory, 'Continuing previous work based on user feedback', statusMessage.ID, previousPayload, this.createProgressCallback(statusMessage, agentName));
|
|
1267
|
+
const continuityResult = await this.agentService.invokeSubAgent(agentName, conversationId, userMessage, this.conversationHistory, 'Continuing previous work based on user feedback', statusMessage.ID, previousPayload, this.createProgressCallback(statusMessage, agentName), previousArtifactInfo?.artifactId, previousArtifactInfo?.versionId);
|
|
1203
1268
|
// Remove from active tasks
|
|
1204
1269
|
this.activeTasks.remove(taskId);
|
|
1205
1270
|
if (continuityResult && continuityResult.success) {
|
|
@@ -1214,11 +1279,16 @@ export class MessageInputComponent {
|
|
|
1214
1279
|
agentResponseMessage.AgentID = lastAIMessage.AgentID;
|
|
1215
1280
|
await agentResponseMessage.Save();
|
|
1216
1281
|
this.messageSent.emit(agentResponseMessage);
|
|
1217
|
-
//
|
|
1282
|
+
// Server created artifacts (handles versioning automatically) - emit event to trigger UI reload
|
|
1218
1283
|
if (continuityResult.payload && Object.keys(continuityResult.payload).length > 0) {
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1284
|
+
this.artifactCreated.emit({
|
|
1285
|
+
artifactId: '',
|
|
1286
|
+
versionId: '',
|
|
1287
|
+
versionNumber: 0,
|
|
1288
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1289
|
+
name: ''
|
|
1290
|
+
});
|
|
1291
|
+
console.log('🎨 Server created artifact (versioned) from agent continuity');
|
|
1222
1292
|
this.messageSent.emit(agentResponseMessage);
|
|
1223
1293
|
}
|
|
1224
1294
|
// Mark user message as complete
|
|
@@ -1296,9 +1366,15 @@ export class MessageInputComponent {
|
|
|
1296
1366
|
agentResponseMessage.AgentID = result.agentRun.AgentID;
|
|
1297
1367
|
}
|
|
1298
1368
|
await this.updateConversationDetail(agentResponseMessage, result.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
|
|
1299
|
-
//
|
|
1369
|
+
// Server created artifacts - emit event to trigger UI reload
|
|
1300
1370
|
if (result.payload && Object.keys(result.payload).length > 0) {
|
|
1301
|
-
|
|
1371
|
+
this.artifactCreated.emit({
|
|
1372
|
+
artifactId: '',
|
|
1373
|
+
versionId: '',
|
|
1374
|
+
versionNumber: 0,
|
|
1375
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1376
|
+
name: ''
|
|
1377
|
+
});
|
|
1302
1378
|
this.messageSent.emit(agentResponseMessage);
|
|
1303
1379
|
}
|
|
1304
1380
|
// Mark user message as complete
|
|
@@ -1427,16 +1503,21 @@ export class MessageInputComponent {
|
|
|
1427
1503
|
this.messageSent.emit(agentResponseMessage);
|
|
1428
1504
|
// Invoke the agent directly (continuation) with previous payload if available
|
|
1429
1505
|
const result = await this.agentService.invokeSubAgent(agentName, conversationId, userMessage, this.conversationHistory, 'Continuing previous conversation with user', agentResponseMessage.ID, previousPayload, // Pass previous OUTPUT artifact payload for continuity
|
|
1430
|
-
this.createProgressCallback(agentResponseMessage, agentName));
|
|
1506
|
+
this.createProgressCallback(agentResponseMessage, agentName), previousArtifactInfo?.artifactId, previousArtifactInfo?.versionId);
|
|
1431
1507
|
// Remove from active tasks
|
|
1432
1508
|
this.activeTasks.remove(taskId);
|
|
1433
1509
|
if (result && result.success) {
|
|
1434
1510
|
// Update the response message with agent result
|
|
1435
1511
|
await this.updateConversationDetail(agentResponseMessage, result.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
|
|
1436
|
-
//
|
|
1512
|
+
// Server created artifacts (handles versioning) - emit event to trigger UI reload
|
|
1437
1513
|
if (result.payload && Object.keys(result.payload).length > 0) {
|
|
1438
|
-
|
|
1439
|
-
|
|
1514
|
+
this.artifactCreated.emit({
|
|
1515
|
+
artifactId: '',
|
|
1516
|
+
versionId: '',
|
|
1517
|
+
versionNumber: 0,
|
|
1518
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1519
|
+
name: ''
|
|
1520
|
+
});
|
|
1440
1521
|
this.messageSent.emit(agentResponseMessage);
|
|
1441
1522
|
}
|
|
1442
1523
|
// Mark user message as complete
|
|
@@ -1479,99 +1560,6 @@ export class MessageInputComponent {
|
|
|
1479
1560
|
this.messageSent.emit(userMessage);
|
|
1480
1561
|
}
|
|
1481
1562
|
}
|
|
1482
|
-
/**
|
|
1483
|
-
* Creates an artifact from an agent's payload and links it to the conversation detail
|
|
1484
|
-
* If previousArtifactInfo is provided, creates a new version of the existing artifact
|
|
1485
|
-
* Otherwise, creates a new artifact with version 1
|
|
1486
|
-
* @param payload The agent's payload object
|
|
1487
|
-
* @param message The conversation detail message to link to
|
|
1488
|
-
* @param agentId The ID of the agent that produced the payload
|
|
1489
|
-
* @param previousArtifactInfo Optional info about previous artifact to create new version
|
|
1490
|
-
*/
|
|
1491
|
-
async createArtifactFromPayload(payload, message, agentId, previousArtifactInfo) {
|
|
1492
|
-
try {
|
|
1493
|
-
const md = new Metadata();
|
|
1494
|
-
let artifactId;
|
|
1495
|
-
let newVersionNumber;
|
|
1496
|
-
// If we have previous artifact info, we're creating a new version of existing artifact
|
|
1497
|
-
if (previousArtifactInfo) {
|
|
1498
|
-
artifactId = previousArtifactInfo.artifactId;
|
|
1499
|
-
newVersionNumber = previousArtifactInfo.versionNumber + 1;
|
|
1500
|
-
console.log(`📦 Creating version ${newVersionNumber} of existing artifact ${artifactId}`);
|
|
1501
|
-
}
|
|
1502
|
-
else {
|
|
1503
|
-
// Create new Artifact header
|
|
1504
|
-
const artifact = await md.GetEntityObject('MJ: Artifacts', this.currentUser);
|
|
1505
|
-
// Look up agent to get name and default artifact type
|
|
1506
|
-
const agent = agentId
|
|
1507
|
-
? AIEngineBase.Instance?.Agents?.find(a => a.ID === agentId)
|
|
1508
|
-
: null;
|
|
1509
|
-
const agentName = agent?.Name || 'Agent';
|
|
1510
|
-
artifact.Name = `${agentName} Payload - ${new Date().toLocaleString()}`;
|
|
1511
|
-
artifact.Description = `Payload returned by ${agentName}`;
|
|
1512
|
-
// Use agent's DefaultArtifactTypeID if available, otherwise fall back to JSON
|
|
1513
|
-
const defaultArtifactTypeId = agent?.DefaultArtifactTypeID;
|
|
1514
|
-
artifact.TypeID = defaultArtifactTypeId || this.JSON_ARTIFACT_TYPE_ID;
|
|
1515
|
-
artifact.UserID = this.currentUser.ID;
|
|
1516
|
-
artifact.EnvironmentID = this.currentUser.EnvironmentID || 'F51358F3-9447-4176-B313-BF8025FD8D09';
|
|
1517
|
-
const artifactSaved = await artifact.Save();
|
|
1518
|
-
if (!artifactSaved) {
|
|
1519
|
-
console.error('Failed to save artifact');
|
|
1520
|
-
return;
|
|
1521
|
-
}
|
|
1522
|
-
artifactId = artifact.ID;
|
|
1523
|
-
newVersionNumber = 1;
|
|
1524
|
-
console.log(`📦 Creating new artifact ${artifactId} with version 1`);
|
|
1525
|
-
}
|
|
1526
|
-
// Create Artifact Version with content
|
|
1527
|
-
const version = await md.GetEntityObject('MJ: Artifact Versions', this.currentUser);
|
|
1528
|
-
version.ArtifactID = artifactId;
|
|
1529
|
-
version.VersionNumber = newVersionNumber;
|
|
1530
|
-
version.Content = JSON.stringify(payload, null, 2);
|
|
1531
|
-
version.UserID = this.currentUser.ID;
|
|
1532
|
-
const versionSaved = await version.Save();
|
|
1533
|
-
if (!versionSaved) {
|
|
1534
|
-
console.error('Failed to save artifact version');
|
|
1535
|
-
return;
|
|
1536
|
-
}
|
|
1537
|
-
// Create M2M relationship using ConversationDetailArtifact junction table
|
|
1538
|
-
const junction = await md.GetEntityObject('MJ: Conversation Detail Artifacts', this.currentUser);
|
|
1539
|
-
junction.ConversationDetailID = message.ID;
|
|
1540
|
-
junction.ArtifactVersionID = version.ID;
|
|
1541
|
-
junction.Direction = 'Output'; // This artifact was produced as output from the agent
|
|
1542
|
-
const junctionSaved = await junction.Save();
|
|
1543
|
-
if (!junctionSaved) {
|
|
1544
|
-
console.error('Failed to create artifact-message association');
|
|
1545
|
-
}
|
|
1546
|
-
// Emit with artifact name (load from DB if versioning existing artifact)
|
|
1547
|
-
let artifactName;
|
|
1548
|
-
if (previousArtifactInfo) {
|
|
1549
|
-
const artifactEntity = await md.GetEntityObject('MJ: Artifacts', this.currentUser);
|
|
1550
|
-
if (await artifactEntity.Load(artifactId)) {
|
|
1551
|
-
artifactName = artifactEntity.Name || 'Artifact';
|
|
1552
|
-
}
|
|
1553
|
-
else {
|
|
1554
|
-
artifactName = 'Artifact';
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
else {
|
|
1558
|
-
const agentName = agentId
|
|
1559
|
-
? AIEngineBase.Instance?.Agents?.find(a => a.ID === agentId)?.Name || 'Agent'
|
|
1560
|
-
: 'Agent';
|
|
1561
|
-
artifactName = `${agentName} Payload - ${new Date().toLocaleString()}`;
|
|
1562
|
-
}
|
|
1563
|
-
this.artifactCreated.emit({
|
|
1564
|
-
artifactId,
|
|
1565
|
-
versionId: version.ID,
|
|
1566
|
-
versionNumber: newVersionNumber,
|
|
1567
|
-
conversationDetailId: message.ID,
|
|
1568
|
-
name: artifactName
|
|
1569
|
-
});
|
|
1570
|
-
}
|
|
1571
|
-
catch (error) {
|
|
1572
|
-
console.error('Error creating artifact from payload:', error);
|
|
1573
|
-
}
|
|
1574
|
-
}
|
|
1575
1563
|
/**
|
|
1576
1564
|
* Name the conversation based on the first message using GraphQL AI client
|
|
1577
1565
|
*/
|
|
@@ -1628,11 +1616,16 @@ export class MessageInputComponent {
|
|
|
1628
1616
|
}
|
|
1629
1617
|
/**
|
|
1630
1618
|
* Marks a conversation detail as complete and records timestamp to prevent race conditions
|
|
1619
|
+
* Emits event to parent to refresh agent run data from database
|
|
1631
1620
|
*/
|
|
1632
1621
|
markMessageComplete(conversationDetail) {
|
|
1633
1622
|
const now = Date.now();
|
|
1634
1623
|
this.completionTimestamps.set(conversationDetail.ID, now);
|
|
1635
|
-
|
|
1624
|
+
// Emit completion event to parent so it can refresh agent run data
|
|
1625
|
+
this.messageComplete.emit({
|
|
1626
|
+
conversationDetailId: conversationDetail.ID,
|
|
1627
|
+
agentRunId: conversationDetail.AgentRunID
|
|
1628
|
+
});
|
|
1636
1629
|
}
|
|
1637
1630
|
/**
|
|
1638
1631
|
* Cleans up completion timestamps for completed messages (prevents memory leak)
|
|
@@ -1649,7 +1642,7 @@ export class MessageInputComponent {
|
|
|
1649
1642
|
} if (rf & 2) {
|
|
1650
1643
|
let _t;
|
|
1651
1644
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.messageTextarea = _t.first);
|
|
1652
|
-
} }, inputs: { conversationId: "conversationId", currentUser: "currentUser", disabled: "disabled", placeholder: "placeholder", parentMessageId: "parentMessageId", conversationHistory: "conversationHistory" }, outputs: { messageSent: "messageSent", agentResponse: "agentResponse", agentRunDetected: "agentRunDetected", artifactCreated: "artifactCreated", conversationRenamed: "conversationRenamed" }, decls: 11, vars: 13, consts: [["messageTextarea", ""], [1, "message-input-container"], ["rows", "3", 1, "message-input", 3, "ngModelChange", "keydown", "input", "ngModel", "placeholder", "disabled"], [3, "suggestionSelected", "closed", "suggestions", "position", "visible", "showAbove"], [1, "input-actions"], ["class", "processing-indicator", 4, "ngIf"], ["title", "Attach file (coming soon)", 1, "btn-attach", 3, "disabled"], [1, "fas", "fa-paperclip"], [1, "btn-send", 3, "click", "disabled", "title"], [1, "fas", "fa-paper-plane"], [1, "processing-indicator"], [1, "fas", "fa-circle-notch", "fa-spin"]], template: function MessageInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1645
|
+
} }, inputs: { conversationId: "conversationId", currentUser: "currentUser", disabled: "disabled", placeholder: "placeholder", parentMessageId: "parentMessageId", conversationHistory: "conversationHistory" }, outputs: { messageSent: "messageSent", agentResponse: "agentResponse", agentRunDetected: "agentRunDetected", agentRunUpdate: "agentRunUpdate", messageComplete: "messageComplete", artifactCreated: "artifactCreated", conversationRenamed: "conversationRenamed", intentCheckStarted: "intentCheckStarted", intentCheckCompleted: "intentCheckCompleted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 11, vars: 13, consts: [["messageTextarea", ""], [1, "message-input-container"], ["rows", "3", 1, "message-input", 3, "ngModelChange", "keydown", "input", "ngModel", "placeholder", "disabled"], [3, "suggestionSelected", "closed", "suggestions", "position", "visible", "showAbove"], [1, "input-actions"], ["class", "processing-indicator", 4, "ngIf"], ["title", "Attach file (coming soon)", 1, "btn-attach", 3, "disabled"], [1, "fas", "fa-paperclip"], [1, "btn-send", 3, "click", "disabled", "title"], [1, "fas", "fa-paper-plane"], [1, "processing-indicator"], [1, "fas", "fa-circle-notch", "fa-spin"]], template: function MessageInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1653
1646
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
1654
1647
|
i0.ɵɵelementStart(0, "div", 1)(1, "textarea", 2, 0);
|
|
1655
1648
|
i0.ɵɵtwoWayListener("ngModelChange", function MessageInputComponent_Template_textarea_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.messageText, $event) || (ctx.messageText = $event); return i0.ɵɵresetView($event); });
|
|
@@ -1704,10 +1697,18 @@ export class MessageInputComponent {
|
|
|
1704
1697
|
type: Output
|
|
1705
1698
|
}], agentRunDetected: [{
|
|
1706
1699
|
type: Output
|
|
1700
|
+
}], agentRunUpdate: [{
|
|
1701
|
+
type: Output
|
|
1702
|
+
}], messageComplete: [{
|
|
1703
|
+
type: Output
|
|
1707
1704
|
}], artifactCreated: [{
|
|
1708
1705
|
type: Output
|
|
1709
1706
|
}], conversationRenamed: [{
|
|
1710
1707
|
type: Output
|
|
1708
|
+
}], intentCheckStarted: [{
|
|
1709
|
+
type: Output
|
|
1710
|
+
}], intentCheckCompleted: [{
|
|
1711
|
+
type: Output
|
|
1711
1712
|
}], messageTextarea: [{
|
|
1712
1713
|
type: ViewChild,
|
|
1713
1714
|
args: ['messageTextarea']
|