@memberjunction/ng-conversations 2.110.1 → 2.111.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/artifact/artifact-share-modal.component.d.ts +42 -0
- package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -0
- package/dist/lib/components/artifact/artifact-share-modal.component.js +659 -0
- package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -0
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts +15 -3
- package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
- package/dist/lib/components/collection/collection-artifact-card.component.js +89 -23
- package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +44 -6
- package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
- package/dist/lib/components/conversation/conversation-chat-area.component.js +321 -182
- package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +25 -0
- package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -0
- package/dist/lib/components/conversation/conversation-empty-state.component.js +233 -0
- package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -0
- package/dist/lib/components/mention/mention-dropdown.component.d.ts +2 -1
- package/dist/lib/components/mention/mention-dropdown.component.d.ts.map +1 -1
- package/dist/lib/components/mention/mention-dropdown.component.js +8 -5
- package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -1
- package/dist/lib/components/message/message-input-box.component.d.ts +72 -0
- package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -0
- package/dist/lib/components/message/message-input-box.component.js +267 -0
- package/dist/lib/components/message/message-input-box.component.js.map +1 -0
- package/dist/lib/components/message/message-input.component.d.ts +13 -37
- package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
- package/dist/lib/components/message/message-input.component.js +106 -190
- package/dist/lib/components/message/message-input.component.js.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts +2 -1
- package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
- package/dist/lib/components/navigation/conversation-navigation.component.js +12 -2
- package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts +24 -1
- package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
- package/dist/lib/components/workspace/conversation-workspace.component.js +119 -33
- package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
- package/dist/lib/conversations.module.d.ts +55 -52
- package/dist/lib/conversations.module.d.ts.map +1 -1
- package/dist/lib/conversations.module.js +15 -3
- package/dist/lib/conversations.module.js.map +1 -1
- package/dist/lib/services/artifact-permission.service.d.ts +94 -0
- package/dist/lib/services/artifact-permission.service.d.ts.map +1 -0
- package/dist/lib/services/artifact-permission.service.js +294 -0
- package/dist/lib/services/artifact-permission.service.js.map +1 -0
- package/dist/lib/services/artifact-state.service.d.ts +25 -2
- package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
- package/dist/lib/services/artifact-state.service.js +55 -4
- package/dist/lib/services/artifact-state.service.js.map +1 -1
- package/dist/lib/services/conversation-state.service.d.ts +1 -0
- package/dist/lib/services/conversation-state.service.d.ts.map +1 -1
- package/dist/lib/services/conversation-state.service.js +2 -0
- package/dist/lib/services/conversation-state.service.js.map +1 -1
- package/dist/public-api.d.ts +5 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +19 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter,
|
|
1
|
+
import { EventEmitter, 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';
|
|
@@ -8,7 +8,7 @@ import { ConversationStateService } from '../../services/conversation-state.serv
|
|
|
8
8
|
import { DataCacheService } from '../../services/data-cache.service';
|
|
9
9
|
import { ActiveTasksService } from '../../services/active-tasks.service';
|
|
10
10
|
import { BaseAgentSuggestedResponse } from '@memberjunction/ai-core-plus';
|
|
11
|
-
import { MentionAutocompleteService
|
|
11
|
+
import { MentionAutocompleteService } from '../../services/mention-autocomplete.service';
|
|
12
12
|
import { MentionParserService } from '../../services/mention-parser.service';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export declare class MessageInputComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
@@ -18,8 +18,8 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
18
18
|
private conversationState;
|
|
19
19
|
private dataCache;
|
|
20
20
|
private activeTasks;
|
|
21
|
-
private mentionAutocomplete;
|
|
22
21
|
private mentionParser;
|
|
22
|
+
private mentionAutocomplete;
|
|
23
23
|
private readonly JSON_ARTIFACT_TYPE_ID;
|
|
24
24
|
conversationId: string;
|
|
25
25
|
currentUser: UserInfo;
|
|
@@ -27,6 +27,7 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
27
27
|
placeholder: string;
|
|
28
28
|
parentMessageId?: string;
|
|
29
29
|
conversationHistory: ConversationDetailEntity[];
|
|
30
|
+
initialMessage: string | null;
|
|
30
31
|
messageSent: EventEmitter<ConversationDetailEntity>;
|
|
31
32
|
agentResponse: EventEmitter<{
|
|
32
33
|
message: ConversationDetailEntity;
|
|
@@ -59,25 +60,16 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
59
60
|
}>;
|
|
60
61
|
intentCheckStarted: EventEmitter<void>;
|
|
61
62
|
intentCheckCompleted: EventEmitter<void>;
|
|
62
|
-
|
|
63
|
+
inputBox: any;
|
|
63
64
|
messageText: string;
|
|
64
65
|
isSending: boolean;
|
|
65
66
|
isProcessing: boolean;
|
|
66
67
|
processingMessage: string;
|
|
67
68
|
converationManagerAgent: AIAgentEntityExtended | null;
|
|
68
|
-
showMentionDropdown: boolean;
|
|
69
|
-
mentionSuggestions: MentionSuggestion[];
|
|
70
|
-
mentionDropdownPosition: {
|
|
71
|
-
top: number;
|
|
72
|
-
left: number;
|
|
73
|
-
};
|
|
74
|
-
mentionDropdownShowAbove: boolean;
|
|
75
|
-
private mentionStartIndex;
|
|
76
|
-
private mentionQuery;
|
|
77
69
|
private pushStatusSubscription?;
|
|
78
70
|
private activeTaskExecutionMessageIds;
|
|
79
71
|
private completionTimestamps;
|
|
80
|
-
constructor(dialogService: DialogService, toastService: ToastService, agentService: ConversationAgentService, conversationState: ConversationStateService, dataCache: DataCacheService, activeTasks: ActiveTasksService,
|
|
72
|
+
constructor(dialogService: DialogService, toastService: ToastService, agentService: ConversationAgentService, conversationState: ConversationStateService, dataCache: DataCacheService, activeTasks: ActiveTasksService, mentionParser: MentionParserService, mentionAutocomplete: MentionAutocompleteService);
|
|
81
73
|
ngOnInit(): Promise<void>;
|
|
82
74
|
ngOnChanges(changes: SimpleChanges): void;
|
|
83
75
|
ngAfterViewInit(): void;
|
|
@@ -100,29 +92,9 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
100
92
|
private updateTaskExecutionMessages;
|
|
101
93
|
get canSend(): boolean;
|
|
102
94
|
/**
|
|
103
|
-
* Handle
|
|
104
|
-
*/
|
|
105
|
-
onInput(event: Event): void;
|
|
106
|
-
/**
|
|
107
|
-
* Handle keydown events in the textarea
|
|
108
|
-
* - Enter alone: Send message (unless dropdown is open)
|
|
109
|
-
* - Shift+Enter: Add new line
|
|
110
|
-
* - Arrow keys, Tab, Escape: Handle mention dropdown if open
|
|
111
|
-
*/
|
|
112
|
-
onKeyDown(event: KeyboardEvent): void;
|
|
113
|
-
/**
|
|
114
|
-
* Calculate position for mention dropdown
|
|
115
|
-
* Keeps dropdown anchored to textarea edge regardless of content size
|
|
95
|
+
* Handle text submitted from the input box
|
|
116
96
|
*/
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Handle mention suggestion selection
|
|
120
|
-
*/
|
|
121
|
-
onMentionSelected(suggestion: MentionSuggestion): void;
|
|
122
|
-
/**
|
|
123
|
-
* Close mention dropdown
|
|
124
|
-
*/
|
|
125
|
-
closeMentionDropdown(): void;
|
|
97
|
+
onTextSubmitted(text: string): Promise<void>;
|
|
126
98
|
onSend(): Promise<void>;
|
|
127
99
|
/**
|
|
128
100
|
* Send a message with custom text WITHOUT modifying the visible messageText input
|
|
@@ -133,6 +105,10 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
133
105
|
* Creates and configures a new conversation detail message
|
|
134
106
|
*/
|
|
135
107
|
private createMessageDetail;
|
|
108
|
+
/**
|
|
109
|
+
* Creates and configures a new conversation detail message from provided text
|
|
110
|
+
*/
|
|
111
|
+
private createMessageDetailFromText;
|
|
136
112
|
/**
|
|
137
113
|
* Handles successful message send - routes to appropriate agent
|
|
138
114
|
*/
|
|
@@ -247,6 +223,6 @@ export declare class MessageInputComponent implements OnInit, OnDestroy, OnChang
|
|
|
247
223
|
*/
|
|
248
224
|
private cleanupCompletionTimestamp;
|
|
249
225
|
static ɵfac: i0.ɵɵFactoryDeclaration<MessageInputComponent, 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>;
|
|
226
|
+
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; }; "initialMessage": { "alias": "initialMessage"; "required": false; }; }, { "messageSent": "messageSent"; "agentResponse": "agentResponse"; "agentRunDetected": "agentRunDetected"; "agentRunUpdate": "agentRunUpdate"; "messageComplete": "messageComplete"; "artifactCreated": "artifactCreated"; "conversationRenamed": "conversationRenamed"; "intentCheckStarted": "intentCheckStarted"; "intentCheckCompleted": "intentCheckCompleted"; }, never, never, false, never>;
|
|
251
227
|
}
|
|
252
228
|
//# 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,
|
|
1
|
+
{"version":3,"file":"message-input.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/message/message-input.component.ts"],"names":[],"mappings":"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"}
|
|
@@ -9,15 +9,14 @@ import * as i3 from "../../services/conversation-agent.service";
|
|
|
9
9
|
import * as i4 from "../../services/conversation-state.service";
|
|
10
10
|
import * as i5 from "../../services/data-cache.service";
|
|
11
11
|
import * as i6 from "../../services/active-tasks.service";
|
|
12
|
-
import * as i7 from "../../services/mention-
|
|
13
|
-
import * as i8 from "../../services/mention-
|
|
12
|
+
import * as i7 from "../../services/mention-parser.service";
|
|
13
|
+
import * as i8 from "../../services/mention-autocomplete.service";
|
|
14
14
|
import * as i9 from "@angular/common";
|
|
15
|
-
import * as i10 from "
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
i0.ɵɵ
|
|
20
|
-
i0.ɵɵelement(1, "i", 11);
|
|
15
|
+
import * as i10 from "./message-input-box.component";
|
|
16
|
+
const _c0 = ["inputBox"];
|
|
17
|
+
function MessageInputComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelementStart(0, "div", 4);
|
|
19
|
+
i0.ɵɵelement(1, "i", 5);
|
|
21
20
|
i0.ɵɵelementStart(2, "span");
|
|
22
21
|
i0.ɵɵtext(3);
|
|
23
22
|
i0.ɵɵelementEnd()();
|
|
@@ -33,8 +32,8 @@ export class MessageInputComponent {
|
|
|
33
32
|
conversationState;
|
|
34
33
|
dataCache;
|
|
35
34
|
activeTasks;
|
|
36
|
-
mentionAutocomplete;
|
|
37
35
|
mentionParser;
|
|
36
|
+
mentionAutocomplete;
|
|
38
37
|
// Default artifact type ID for JSON (when agent doesn't specify DefaultArtifactTypeID)
|
|
39
38
|
JSON_ARTIFACT_TYPE_ID = 'ae674c7e-ea0d-49ea-89e4-0649f5eb20d4';
|
|
40
39
|
conversationId;
|
|
@@ -43,6 +42,7 @@ export class MessageInputComponent {
|
|
|
43
42
|
placeholder = 'Type a message... (Ctrl+Enter to send)';
|
|
44
43
|
parentMessageId; // Optional: for replying in threads
|
|
45
44
|
conversationHistory = []; // For agent context
|
|
45
|
+
initialMessage = null; // Message to send automatically when component initializes
|
|
46
46
|
messageSent = new EventEmitter();
|
|
47
47
|
agentResponse = new EventEmitter();
|
|
48
48
|
agentRunDetected = new EventEmitter();
|
|
@@ -52,38 +52,31 @@ export class MessageInputComponent {
|
|
|
52
52
|
conversationRenamed = new EventEmitter();
|
|
53
53
|
intentCheckStarted = new EventEmitter(); // Emits when intent checking starts
|
|
54
54
|
intentCheckCompleted = new EventEmitter(); // Emits when intent checking completes
|
|
55
|
-
|
|
55
|
+
inputBox; // MessageInputBoxComponent
|
|
56
56
|
messageText = '';
|
|
57
57
|
isSending = false;
|
|
58
58
|
isProcessing = false; // True when waiting for agent/naming response
|
|
59
59
|
processingMessage = 'AI is responding...'; // Message shown during processing
|
|
60
60
|
converationManagerAgent = null;
|
|
61
|
-
// Mention autocomplete state
|
|
62
|
-
showMentionDropdown = false;
|
|
63
|
-
mentionSuggestions = [];
|
|
64
|
-
mentionDropdownPosition = { top: 0, left: 0 };
|
|
65
|
-
mentionDropdownShowAbove = false; // Controls transform direction
|
|
66
|
-
mentionStartIndex = -1;
|
|
67
|
-
mentionQuery = '';
|
|
68
61
|
// PubSub subscription for task progress updates
|
|
69
62
|
pushStatusSubscription;
|
|
70
63
|
// Track active task execution message IDs for real-time updates
|
|
71
64
|
activeTaskExecutionMessageIds = new Set();
|
|
72
65
|
// Track completion timestamps to prevent race conditions with late progress updates
|
|
73
66
|
completionTimestamps = new Map();
|
|
74
|
-
constructor(dialogService, toastService, agentService, conversationState, dataCache, activeTasks,
|
|
67
|
+
constructor(dialogService, toastService, agentService, conversationState, dataCache, activeTasks, mentionParser, mentionAutocomplete) {
|
|
75
68
|
this.dialogService = dialogService;
|
|
76
69
|
this.toastService = toastService;
|
|
77
70
|
this.agentService = agentService;
|
|
78
71
|
this.conversationState = conversationState;
|
|
79
72
|
this.dataCache = dataCache;
|
|
80
73
|
this.activeTasks = activeTasks;
|
|
81
|
-
this.mentionAutocomplete = mentionAutocomplete;
|
|
82
74
|
this.mentionParser = mentionParser;
|
|
75
|
+
this.mentionAutocomplete = mentionAutocomplete;
|
|
83
76
|
}
|
|
84
77
|
async ngOnInit() {
|
|
85
78
|
this.converationManagerAgent = await this.agentService.getConversationManagerAgent();
|
|
86
|
-
// Initialize mention autocomplete
|
|
79
|
+
// Initialize mention autocomplete (needed for parsing mentions in messages)
|
|
87
80
|
await this.mentionAutocomplete.initialize(this.currentUser);
|
|
88
81
|
// Subscribe to PubSub for task progress updates
|
|
89
82
|
this.subscribeToPushStatus();
|
|
@@ -97,6 +90,13 @@ export class MessageInputComponent {
|
|
|
97
90
|
ngAfterViewInit() {
|
|
98
91
|
// Focus input on initial load
|
|
99
92
|
this.focusInput();
|
|
93
|
+
// If there's an initial message to send (from empty state), send it automatically
|
|
94
|
+
if (this.initialMessage) {
|
|
95
|
+
console.log('📨 MessageInputComponent received initialMessage:', this.initialMessage);
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
this.sendMessageWithText(this.initialMessage);
|
|
98
|
+
}, 100);
|
|
99
|
+
}
|
|
100
100
|
}
|
|
101
101
|
ngOnDestroy() {
|
|
102
102
|
// Clean up PubSub subscription
|
|
@@ -110,8 +110,8 @@ export class MessageInputComponent {
|
|
|
110
110
|
focusInput() {
|
|
111
111
|
// Use setTimeout to ensure DOM is ready
|
|
112
112
|
setTimeout(() => {
|
|
113
|
-
if (this.
|
|
114
|
-
this.
|
|
113
|
+
if (this.inputBox) {
|
|
114
|
+
this.inputBox.focus();
|
|
115
115
|
}
|
|
116
116
|
}, 100);
|
|
117
117
|
}
|
|
@@ -201,130 +201,34 @@ export class MessageInputComponent {
|
|
|
201
201
|
return !this.disabled && !this.isSending && this.messageText.trim().length > 0;
|
|
202
202
|
}
|
|
203
203
|
/**
|
|
204
|
-
* Handle
|
|
204
|
+
* Handle text submitted from the input box
|
|
205
205
|
*/
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const mentionMatch = textBeforeCursor.match(/@(\S*)$/);
|
|
213
|
-
if (mentionMatch) {
|
|
214
|
-
// We found an @ mention being typed
|
|
215
|
-
this.mentionStartIndex = cursorPos - mentionMatch[0].length;
|
|
216
|
-
this.mentionQuery = mentionMatch[1] || '';
|
|
217
|
-
console.log('[MentionInput] Detected @mention:', this.mentionQuery);
|
|
218
|
-
// Get suggestions
|
|
219
|
-
this.mentionSuggestions = this.mentionAutocomplete.getSuggestions(this.mentionQuery);
|
|
220
|
-
console.log('[MentionInput] Got suggestions:', this.mentionSuggestions.length, this.mentionSuggestions);
|
|
221
|
-
// Calculate dropdown position
|
|
222
|
-
this.calculateDropdownPosition(textarea);
|
|
223
|
-
// Show dropdown if we have suggestions OR to show empty state
|
|
224
|
-
this.showMentionDropdown = true;
|
|
225
|
-
console.log('[MentionInput] Showing dropdown:', this.showMentionDropdown);
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
// No @ mention, close dropdown
|
|
229
|
-
this.closeMentionDropdown();
|
|
206
|
+
async onTextSubmitted(text) {
|
|
207
|
+
console.log('[MessageInput] onTextSubmitted called with text:', text);
|
|
208
|
+
// Use the text parameter directly since the box component already cleared its value
|
|
209
|
+
if (!text || !text.trim()) {
|
|
210
|
+
console.log('[MessageInput] Empty text, aborting');
|
|
211
|
+
return;
|
|
230
212
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if (['ArrowDown', 'ArrowUp', 'Enter', 'Tab', 'Escape'].includes(event.key)) {
|
|
242
|
-
// These keys are handled by the dropdown component
|
|
243
|
-
return;
|
|
213
|
+
this.isSending = true;
|
|
214
|
+
try {
|
|
215
|
+
const messageDetail = await this.createMessageDetailFromText(text.trim());
|
|
216
|
+
console.log('[MessageInput] Created message detail:', messageDetail.Message);
|
|
217
|
+
const saved = await messageDetail.Save();
|
|
218
|
+
if (saved) {
|
|
219
|
+
await this.handleSuccessfulSend(messageDetail);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
this.handleSendFailure(messageDetail);
|
|
244
223
|
}
|
|
245
224
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
// Prevent default behavior (adding newline)
|
|
249
|
-
event.preventDefault();
|
|
250
|
-
// Send the message
|
|
251
|
-
this.onSend();
|
|
252
|
-
}
|
|
253
|
-
// If Shift+Enter, allow default behavior (add newline)
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* Calculate position for mention dropdown
|
|
257
|
-
* Keeps dropdown anchored to textarea edge regardless of content size
|
|
258
|
-
*/
|
|
259
|
-
calculateDropdownPosition(textarea) {
|
|
260
|
-
const rect = textarea.getBoundingClientRect();
|
|
261
|
-
const container = textarea.closest('.message-input-container');
|
|
262
|
-
const containerRect = container?.getBoundingClientRect();
|
|
263
|
-
if (!containerRect) {
|
|
264
|
-
// Fallback to absolute positioning
|
|
265
|
-
this.mentionDropdownPosition = {
|
|
266
|
-
top: rect.bottom + window.scrollY + 4,
|
|
267
|
-
left: rect.left + window.scrollX
|
|
268
|
-
};
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
// Check if there's enough space below the textarea
|
|
272
|
-
const spaceBelow = window.innerHeight - rect.bottom;
|
|
273
|
-
const spaceAbove = rect.top;
|
|
274
|
-
this.mentionDropdownShowAbove = spaceBelow < 200 && spaceAbove > spaceBelow;
|
|
275
|
-
// Position relative to the container
|
|
276
|
-
// Always anchor to the textarea edge so dropdown stays in place as content changes
|
|
277
|
-
if (this.mentionDropdownShowAbove) {
|
|
278
|
-
// Show above the textarea - anchor to the TOP of the textarea
|
|
279
|
-
// CSS transform will make it grow upward from this anchor point
|
|
280
|
-
this.mentionDropdownPosition = {
|
|
281
|
-
top: rect.top - containerRect.top - 4, // Anchor just above textarea
|
|
282
|
-
left: rect.left - containerRect.left
|
|
283
|
-
};
|
|
225
|
+
catch (error) {
|
|
226
|
+
this.handleSendError(error);
|
|
284
227
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
this.mentionDropdownPosition = {
|
|
288
|
-
top: rect.bottom - containerRect.top + 4,
|
|
289
|
-
left: rect.left - containerRect.left
|
|
290
|
-
};
|
|
228
|
+
finally {
|
|
229
|
+
this.isSending = false;
|
|
291
230
|
}
|
|
292
231
|
}
|
|
293
|
-
/**
|
|
294
|
-
* Handle mention suggestion selection
|
|
295
|
-
*/
|
|
296
|
-
onMentionSelected(suggestion) {
|
|
297
|
-
if (this.mentionStartIndex === -1)
|
|
298
|
-
return;
|
|
299
|
-
const textarea = this.messageTextarea.nativeElement;
|
|
300
|
-
const cursorPos = textarea.selectionStart;
|
|
301
|
-
// Replace the @mention text with the selected name
|
|
302
|
-
const beforeMention = this.messageText.substring(0, this.mentionStartIndex);
|
|
303
|
-
const afterMention = this.messageText.substring(cursorPos);
|
|
304
|
-
// If name has spaces, wrap in quotes
|
|
305
|
-
const mentionText = suggestion.displayName.includes(' ')
|
|
306
|
-
? `@"${suggestion.displayName}" `
|
|
307
|
-
: `@${suggestion.displayName} `;
|
|
308
|
-
this.messageText = beforeMention + mentionText + afterMention;
|
|
309
|
-
// Close dropdown
|
|
310
|
-
this.closeMentionDropdown();
|
|
311
|
-
// Set cursor position after the mention
|
|
312
|
-
const newCursorPos = beforeMention.length + mentionText.length;
|
|
313
|
-
setTimeout(() => {
|
|
314
|
-
textarea.selectionStart = newCursorPos;
|
|
315
|
-
textarea.selectionEnd = newCursorPos;
|
|
316
|
-
textarea.focus();
|
|
317
|
-
}, 0);
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Close mention dropdown
|
|
321
|
-
*/
|
|
322
|
-
closeMentionDropdown() {
|
|
323
|
-
this.showMentionDropdown = false;
|
|
324
|
-
this.mentionSuggestions = [];
|
|
325
|
-
this.mentionStartIndex = -1;
|
|
326
|
-
this.mentionQuery = '';
|
|
327
|
-
}
|
|
328
232
|
async onSend() {
|
|
329
233
|
if (!this.canSend)
|
|
330
234
|
return;
|
|
@@ -399,6 +303,20 @@ export class MessageInputComponent {
|
|
|
399
303
|
}
|
|
400
304
|
return detail;
|
|
401
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Creates and configures a new conversation detail message from provided text
|
|
308
|
+
*/
|
|
309
|
+
async createMessageDetailFromText(text) {
|
|
310
|
+
const detail = await this.dataCache.createConversationDetail(this.currentUser);
|
|
311
|
+
detail.ConversationID = this.conversationId;
|
|
312
|
+
detail.Message = text;
|
|
313
|
+
detail.Role = 'User';
|
|
314
|
+
detail.UserID = this.currentUser.ID; // Set the user who sent the message
|
|
315
|
+
if (this.parentMessageId) {
|
|
316
|
+
detail.ParentID = this.parentMessageId;
|
|
317
|
+
}
|
|
318
|
+
return detail;
|
|
319
|
+
}
|
|
402
320
|
/**
|
|
403
321
|
* Handles successful message send - routes to appropriate agent
|
|
404
322
|
*/
|
|
@@ -516,8 +434,8 @@ export class MessageInputComponent {
|
|
|
516
434
|
*/
|
|
517
435
|
refocusTextarea() {
|
|
518
436
|
setTimeout(() => {
|
|
519
|
-
if (this.
|
|
520
|
-
this.
|
|
437
|
+
if (this.inputBox) {
|
|
438
|
+
this.inputBox.focus();
|
|
521
439
|
}
|
|
522
440
|
}, 100);
|
|
523
441
|
}
|
|
@@ -1365,22 +1283,36 @@ export class MessageInputComponent {
|
|
|
1365
1283
|
if (result.agentRun.AgentID) {
|
|
1366
1284
|
agentResponseMessage.AgentID = result.agentRun.AgentID;
|
|
1367
1285
|
}
|
|
1368
|
-
|
|
1369
|
-
//
|
|
1370
|
-
if (result.payload
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1286
|
+
// Multi-stage response handling (same logic as ambient Sage)
|
|
1287
|
+
// Stage 1: Check for task graph (multi-step orchestration)
|
|
1288
|
+
if (result.payload?.taskGraph) {
|
|
1289
|
+
console.log('📋 Task graph detected from @mention, starting task orchestration');
|
|
1290
|
+
await this.handleTaskGraphExecution(userMessage, result, conversationId, agentResponseMessage);
|
|
1291
|
+
}
|
|
1292
|
+
// Stage 2: Check for sub-agent invocation (single-step delegation)
|
|
1293
|
+
else if (result.agentRun.FinalStep === 'Success' && result.payload?.invokeAgent) {
|
|
1294
|
+
console.log('🎯 Sub-agent invocation detected from @mention');
|
|
1295
|
+
await this.handleSubAgentInvocation(userMessage, result, conversationId, agentResponseMessage);
|
|
1296
|
+
}
|
|
1297
|
+
// Stage 3: Normal chat response
|
|
1298
|
+
else {
|
|
1299
|
+
await this.updateConversationDetail(agentResponseMessage, result.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
|
|
1300
|
+
// Server created artifacts - emit event to trigger UI reload
|
|
1301
|
+
if (result.payload && Object.keys(result.payload).length > 0) {
|
|
1302
|
+
this.artifactCreated.emit({
|
|
1303
|
+
artifactId: '',
|
|
1304
|
+
versionId: '',
|
|
1305
|
+
versionNumber: 0,
|
|
1306
|
+
conversationDetailId: agentResponseMessage.ID,
|
|
1307
|
+
name: ''
|
|
1308
|
+
});
|
|
1309
|
+
this.messageSent.emit(agentResponseMessage);
|
|
1310
|
+
}
|
|
1311
|
+
// Mark user message as complete
|
|
1312
|
+
userMessage.Status = 'Complete';
|
|
1313
|
+
await userMessage.Save();
|
|
1314
|
+
this.messageSent.emit(userMessage);
|
|
1379
1315
|
}
|
|
1380
|
-
// Mark user message as complete
|
|
1381
|
-
userMessage.Status = 'Complete';
|
|
1382
|
-
await userMessage.Save();
|
|
1383
|
-
this.messageSent.emit(userMessage);
|
|
1384
1316
|
}
|
|
1385
1317
|
else {
|
|
1386
1318
|
// Agent failed - create error message
|
|
@@ -1636,50 +1568,32 @@ export class MessageInputComponent {
|
|
|
1636
1568
|
this.completionTimestamps.delete(conversationDetailId);
|
|
1637
1569
|
}, 5000); // 5 seconds should be more than enough
|
|
1638
1570
|
}
|
|
1639
|
-
static ɵfac = function MessageInputComponent_Factory(t) { return new (t || MessageInputComponent)(i0.ɵɵdirectiveInject(i1.DialogService), i0.ɵɵdirectiveInject(i2.ToastService), i0.ɵɵdirectiveInject(i3.ConversationAgentService), i0.ɵɵdirectiveInject(i4.ConversationStateService), i0.ɵɵdirectiveInject(i5.DataCacheService), i0.ɵɵdirectiveInject(i6.ActiveTasksService), i0.ɵɵdirectiveInject(i7.
|
|
1571
|
+
static ɵfac = function MessageInputComponent_Factory(t) { return new (t || MessageInputComponent)(i0.ɵɵdirectiveInject(i1.DialogService), i0.ɵɵdirectiveInject(i2.ToastService), i0.ɵɵdirectiveInject(i3.ConversationAgentService), i0.ɵɵdirectiveInject(i4.ConversationStateService), i0.ɵɵdirectiveInject(i5.DataCacheService), i0.ɵɵdirectiveInject(i6.ActiveTasksService), i0.ɵɵdirectiveInject(i7.MentionParserService), i0.ɵɵdirectiveInject(i8.MentionAutocompleteService)); };
|
|
1640
1572
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MessageInputComponent, selectors: [["mj-message-input"]], viewQuery: function MessageInputComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1641
1573
|
i0.ɵɵviewQuery(_c0, 5);
|
|
1642
1574
|
} if (rf & 2) {
|
|
1643
1575
|
let _t;
|
|
1644
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.
|
|
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:
|
|
1576
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputBox = _t.first);
|
|
1577
|
+
} }, inputs: { conversationId: "conversationId", currentUser: "currentUser", disabled: "disabled", placeholder: "placeholder", parentMessageId: "parentMessageId", conversationHistory: "conversationHistory", initialMessage: "initialMessage" }, outputs: { messageSent: "messageSent", agentResponse: "agentResponse", agentRunDetected: "agentRunDetected", agentRunUpdate: "agentRunUpdate", messageComplete: "messageComplete", artifactCreated: "artifactCreated", conversationRenamed: "conversationRenamed", intentCheckStarted: "intentCheckStarted", intentCheckCompleted: "intentCheckCompleted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 4, vars: 8, consts: [["inputBox", ""], [1, "message-input-wrapper"], ["class", "processing-indicator", 4, "ngIf"], [3, "valueChange", "textSubmitted", "placeholder", "disabled", "showCharacterCount", "enableMentions", "currentUser", "rows", "value"], [1, "processing-indicator"], [1, "fas", "fa-circle-notch", "fa-spin"]], template: function MessageInputComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1646
1578
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
1647
|
-
i0.ɵɵelementStart(0, "div", 1)
|
|
1648
|
-
i0.ɵɵ
|
|
1649
|
-
i0.ɵɵ
|
|
1650
|
-
i0.ɵɵ
|
|
1651
|
-
i0.ɵɵ
|
|
1652
|
-
i0.ɵɵ
|
|
1653
|
-
i0.ɵɵlistener("suggestionSelected", function MessageInputComponent_Template_mj_mention_dropdown_suggestionSelected_4_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onMentionSelected($event)); })("closed", function MessageInputComponent_Template_mj_mention_dropdown_closed_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.closeMentionDropdown()); });
|
|
1654
|
-
i0.ɵɵelementEnd();
|
|
1655
|
-
i0.ɵɵelementStart(5, "div", 4);
|
|
1656
|
-
i0.ɵɵtemplate(6, MessageInputComponent_div_6_Template, 4, 1, "div", 5);
|
|
1657
|
-
i0.ɵɵelementStart(7, "button", 6);
|
|
1658
|
-
i0.ɵɵelement(8, "i", 7);
|
|
1659
|
-
i0.ɵɵelementEnd();
|
|
1660
|
-
i0.ɵɵelementStart(9, "button", 8);
|
|
1661
|
-
i0.ɵɵlistener("click", function MessageInputComponent_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onSend()); });
|
|
1662
|
-
i0.ɵɵelement(10, "i", 9);
|
|
1663
|
-
i0.ɵɵelementEnd()()();
|
|
1579
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
1580
|
+
i0.ɵɵtemplate(1, MessageInputComponent_div_1_Template, 4, 1, "div", 2);
|
|
1581
|
+
i0.ɵɵelementStart(2, "mj-message-input-box", 3, 0);
|
|
1582
|
+
i0.ɵɵtwoWayListener("valueChange", function MessageInputComponent_Template_mj_message_input_box_valueChange_2_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.messageText, $event) || (ctx.messageText = $event); return i0.ɵɵresetView($event); });
|
|
1583
|
+
i0.ɵɵlistener("textSubmitted", function MessageInputComponent_Template_mj_message_input_box_textSubmitted_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onTextSubmitted($event)); });
|
|
1584
|
+
i0.ɵɵelementEnd()();
|
|
1664
1585
|
} if (rf & 2) {
|
|
1665
1586
|
i0.ɵɵadvance();
|
|
1666
|
-
i0.ɵɵclassProp("intent-checking", ctx.isProcessing);
|
|
1667
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx.messageText);
|
|
1668
|
-
i0.ɵɵproperty("placeholder", ctx.placeholder)("disabled", ctx.disabled || ctx.isProcessing);
|
|
1669
|
-
i0.ɵɵadvance(3);
|
|
1670
|
-
i0.ɵɵproperty("suggestions", ctx.mentionSuggestions)("position", ctx.mentionDropdownPosition)("visible", ctx.showMentionDropdown)("showAbove", ctx.mentionDropdownShowAbove);
|
|
1671
|
-
i0.ɵɵadvance(2);
|
|
1672
1587
|
i0.ɵɵproperty("ngIf", ctx.isProcessing);
|
|
1673
1588
|
i0.ɵɵadvance();
|
|
1674
|
-
i0.ɵɵproperty("disabled", ctx.disabled);
|
|
1675
|
-
i0.ɵɵ
|
|
1676
|
-
|
|
1677
|
-
} }, dependencies: [i9.NgIf, i10.DefaultValueAccessor, i10.NgControlStatus, i10.NgModel, i11.MentionDropdownComponent], styles: [".message-input-container[_ngcontent-%COMP%] {\n position: relative;\n padding: 16px 24px;\n border-top: 1px solid #D9D9D9;\n background: #FFF;\n}\n\n.message-input-wrapper[_ngcontent-%COMP%] {\n border: 2px solid #D9D9D9;\n border-radius: 8px;\n padding: 12px;\n transition: border-color 0.2s, box-shadow 0.2s;\n background: #FFF;\n}\n\n.message-input-wrapper[_ngcontent-%COMP%]:focus-within {\n border-color: #0076B6;\n box-shadow: 0 0 0 3px rgba(0, 118, 182, 0.1);\n}\n\n.message-input[_ngcontent-%COMP%] {\n width: 100%;\n padding: 0;\n border: none;\n resize: none;\n font-family: inherit;\n font-size: 14px;\n min-height: 40px;\n max-height: 200px;\n line-height: 1.5;\n}\n\n.message-input[_ngcontent-%COMP%]:focus {\n outline: none;\n}\n\n.message-input[_ngcontent-%COMP%]:disabled {\n background: transparent;\n cursor: wait;\n}\n\n//[_ngcontent-%COMP%] Subtle[_ngcontent-%COMP%] visual[_ngcontent-%COMP%] feedback[_ngcontent-%COMP%] when[_ngcontent-%COMP%] checking[_ngcontent-%COMP%] intent[_ngcontent-%COMP%] (no[_ngcontent-%COMP%] ugly[_ngcontent-%COMP%] gray[_ngcontent-%COMP%] background)\n.message-input.intent-checking[_ngcontent-%COMP%] {\n opacity: 0.6;\n transition: opacity 0.2s;\n}\n.input-actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n}\n.btn-attach[_ngcontent-%COMP%] {\n padding: 8px 16px;\n background: transparent;\n border: 1px solid #D9D9D9;\n border-radius: 6px;\n cursor: pointer;\n color: #333;\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.btn-attach[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #F4F4F4;\n border-color: #AAA;\n}\n.btn-attach[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.btn-send[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n background: #3B82F6;\n color: white;\n border: none;\n border-radius: 8px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: background 0.2s;\n flex-shrink: 0;\n}\n.btn-send[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #2563EB;\n}\n.btn-send[_ngcontent-%COMP%]:disabled {\n background: #D9D9D9;\n color: #AAA;\n cursor: not-allowed;\n}\n.btn-send[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 16px;\n}\n.processing-indicator[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n color: #6B7280;\n margin-right: auto;\n}\n.processing-indicator[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #0076B6;\n}"] });
|
|
1589
|
+
i0.ɵɵproperty("placeholder", ctx.placeholder)("disabled", ctx.disabled || ctx.isProcessing)("showCharacterCount", false)("enableMentions", true)("currentUser", ctx.currentUser)("rows", 3);
|
|
1590
|
+
i0.ɵɵtwoWayProperty("value", ctx.messageText);
|
|
1591
|
+
} }, dependencies: [i9.NgIf, i10.MessageInputBoxComponent], styles: [".message-input-wrapper[_ngcontent-%COMP%] {\n position: relative;\n width: 100%;\n}\n\n.processing-indicator[_ngcontent-%COMP%] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.75rem 1.25rem;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n z-index: 10;\n pointer-events: none;\n\n i {\n color: var(--primary-color, #007bff);\n }\n\n span {\n font-size: 0.9rem;\n color: var(--text-primary, #333);\n }\n}"] });
|
|
1678
1592
|
}
|
|
1679
1593
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MessageInputComponent, [{
|
|
1680
1594
|
type: Component,
|
|
1681
|
-
args: [{ selector: 'mj-message-input', template: "<div class=\"message-input-
|
|
1682
|
-
}], () => [{ type: i1.DialogService }, { type: i2.ToastService }, { type: i3.ConversationAgentService }, { type: i4.ConversationStateService }, { type: i5.DataCacheService }, { type: i6.ActiveTasksService }, { type: i7.
|
|
1595
|
+
args: [{ selector: 'mj-message-input', template: "<div class=\"message-input-wrapper\">\n <!-- Processing Indicator Overlay -->\n <div class=\"processing-indicator\" *ngIf=\"isProcessing\">\n <i class=\"fas fa-circle-notch fa-spin\"></i>\n <span>{{ processingMessage }}</span>\n </div>\n\n <!-- Message Input Box -->\n <mj-message-input-box\n #inputBox\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled || isProcessing\"\n [showCharacterCount]=\"false\"\n [enableMentions]=\"true\"\n [currentUser]=\"currentUser\"\n [rows]=\"3\"\n [(value)]=\"messageText\"\n (textSubmitted)=\"onTextSubmitted($event)\">\n </mj-message-input-box>\n</div>", styles: [".message-input-wrapper {\n position: relative;\n width: 100%;\n}\n\n.processing-indicator {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.75rem 1.25rem;\n background: rgba(255, 255, 255, 0.95);\n border-radius: 8px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n z-index: 10;\n pointer-events: none;\n\n i {\n color: var(--primary-color, #007bff);\n }\n\n span {\n font-size: 0.9rem;\n color: var(--text-primary, #333);\n }\n}"] }]
|
|
1596
|
+
}], () => [{ type: i1.DialogService }, { type: i2.ToastService }, { type: i3.ConversationAgentService }, { type: i4.ConversationStateService }, { type: i5.DataCacheService }, { type: i6.ActiveTasksService }, { type: i7.MentionParserService }, { type: i8.MentionAutocompleteService }], { conversationId: [{
|
|
1683
1597
|
type: Input
|
|
1684
1598
|
}], currentUser: [{
|
|
1685
1599
|
type: Input
|
|
@@ -1691,6 +1605,8 @@ export class MessageInputComponent {
|
|
|
1691
1605
|
type: Input
|
|
1692
1606
|
}], conversationHistory: [{
|
|
1693
1607
|
type: Input
|
|
1608
|
+
}], initialMessage: [{
|
|
1609
|
+
type: Input
|
|
1694
1610
|
}], messageSent: [{
|
|
1695
1611
|
type: Output
|
|
1696
1612
|
}], agentResponse: [{
|
|
@@ -1709,9 +1625,9 @@ export class MessageInputComponent {
|
|
|
1709
1625
|
type: Output
|
|
1710
1626
|
}], intentCheckCompleted: [{
|
|
1711
1627
|
type: Output
|
|
1712
|
-
}],
|
|
1628
|
+
}], inputBox: [{
|
|
1713
1629
|
type: ViewChild,
|
|
1714
|
-
args: ['
|
|
1630
|
+
args: ['inputBox']
|
|
1715
1631
|
}] }); })();
|
|
1716
1632
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MessageInputComponent, { className: "MessageInputComponent", filePath: "src/lib/components/message/message-input.component.ts", lineNumber: 23 }); })();
|
|
1717
1633
|
//# sourceMappingURL=message-input.component.js.map
|