@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.
Files changed (57) hide show
  1. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts +42 -0
  2. package/dist/lib/components/artifact/artifact-share-modal.component.d.ts.map +1 -0
  3. package/dist/lib/components/artifact/artifact-share-modal.component.js +659 -0
  4. package/dist/lib/components/artifact/artifact-share-modal.component.js.map +1 -0
  5. package/dist/lib/components/collection/collection-artifact-card.component.d.ts +15 -3
  6. package/dist/lib/components/collection/collection-artifact-card.component.d.ts.map +1 -1
  7. package/dist/lib/components/collection/collection-artifact-card.component.js +89 -23
  8. package/dist/lib/components/collection/collection-artifact-card.component.js.map +1 -1
  9. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +44 -6
  10. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  11. package/dist/lib/components/conversation/conversation-chat-area.component.js +321 -182
  12. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  13. package/dist/lib/components/conversation/conversation-empty-state.component.d.ts +25 -0
  14. package/dist/lib/components/conversation/conversation-empty-state.component.d.ts.map +1 -0
  15. package/dist/lib/components/conversation/conversation-empty-state.component.js +233 -0
  16. package/dist/lib/components/conversation/conversation-empty-state.component.js.map +1 -0
  17. package/dist/lib/components/mention/mention-dropdown.component.d.ts +2 -1
  18. package/dist/lib/components/mention/mention-dropdown.component.d.ts.map +1 -1
  19. package/dist/lib/components/mention/mention-dropdown.component.js +8 -5
  20. package/dist/lib/components/mention/mention-dropdown.component.js.map +1 -1
  21. package/dist/lib/components/message/message-input-box.component.d.ts +72 -0
  22. package/dist/lib/components/message/message-input-box.component.d.ts.map +1 -0
  23. package/dist/lib/components/message/message-input-box.component.js +267 -0
  24. package/dist/lib/components/message/message-input-box.component.js.map +1 -0
  25. package/dist/lib/components/message/message-input.component.d.ts +13 -37
  26. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  27. package/dist/lib/components/message/message-input.component.js +106 -190
  28. package/dist/lib/components/message/message-input.component.js.map +1 -1
  29. package/dist/lib/components/navigation/conversation-navigation.component.d.ts +2 -1
  30. package/dist/lib/components/navigation/conversation-navigation.component.d.ts.map +1 -1
  31. package/dist/lib/components/navigation/conversation-navigation.component.js +12 -2
  32. package/dist/lib/components/navigation/conversation-navigation.component.js.map +1 -1
  33. package/dist/lib/components/workspace/conversation-workspace.component.d.ts +24 -1
  34. package/dist/lib/components/workspace/conversation-workspace.component.d.ts.map +1 -1
  35. package/dist/lib/components/workspace/conversation-workspace.component.js +119 -33
  36. package/dist/lib/components/workspace/conversation-workspace.component.js.map +1 -1
  37. package/dist/lib/conversations.module.d.ts +55 -52
  38. package/dist/lib/conversations.module.d.ts.map +1 -1
  39. package/dist/lib/conversations.module.js +15 -3
  40. package/dist/lib/conversations.module.js.map +1 -1
  41. package/dist/lib/services/artifact-permission.service.d.ts +94 -0
  42. package/dist/lib/services/artifact-permission.service.d.ts.map +1 -0
  43. package/dist/lib/services/artifact-permission.service.js +294 -0
  44. package/dist/lib/services/artifact-permission.service.js.map +1 -0
  45. package/dist/lib/services/artifact-state.service.d.ts +25 -2
  46. package/dist/lib/services/artifact-state.service.d.ts.map +1 -1
  47. package/dist/lib/services/artifact-state.service.js +55 -4
  48. package/dist/lib/services/artifact-state.service.js.map +1 -1
  49. package/dist/lib/services/conversation-state.service.d.ts +1 -0
  50. package/dist/lib/services/conversation-state.service.d.ts.map +1 -1
  51. package/dist/lib/services/conversation-state.service.js +2 -0
  52. package/dist/lib/services/conversation-state.service.js.map +1 -1
  53. package/dist/public-api.d.ts +5 -0
  54. package/dist/public-api.d.ts.map +1 -1
  55. package/dist/public-api.js +5 -0
  56. package/dist/public-api.js.map +1 -1
  57. package/package.json +19 -15
@@ -1,4 +1,4 @@
1
- import { EventEmitter, ElementRef, OnInit, OnDestroy, OnChanges, SimpleChanges, AfterViewInit } from '@angular/core';
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, MentionSuggestion } from '../../services/mention-autocomplete.service';
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
- messageTextarea: ElementRef;
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, mentionAutocomplete: MentionAutocompleteService, mentionParser: MentionParserService);
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 input events to detect @ mentions
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
- private calculateDropdownPosition;
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,EAAa,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1J,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAA2F,qBAAqB,EAAkD,MAAM,+BAA+B,CAAC;AACzO,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAGzE,OAAO,EAAsD,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC9H,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAC5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;;AAI7E,qBAKa,qBAAsB,YAAW,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa;IA6CrF,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,iBAAiB;IACzB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,WAAW;IACnB,OAAO,CAAC,mBAAmB;IAC3B,OAAO,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vB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAKvB;;;;;;OAMG;YACW,0BAA0B;IAcxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAyF9B;;;OAGG;YACW,0BAA0B;IAgNxC;;;OAGG;YACW,wBAAwB;cA0LtB,wBAAwB,CAAC,WAAW,EAAE,wBAAwB,EAAE,OAAO,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"}
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,EAAyB,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC1J,OAAO,EAAE,QAAQ,EAAqB,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAA2F,qBAAqB,EAAkD,MAAM,+BAA+B,CAAC;AACzO,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;A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IAalC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAa9B;;;OAGG;YACW,qBAAqB;IAoBnC;;OAEG;YACW,sBAAsB;IAepC;;OAEG;IACH,OAAO,CAAC,eAAe;IAQvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAKzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAKvB;;;;;;OAMG;YACW,0BAA0B;IAcxC;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAyF9B;;;OAGG;YACW,0BAA0B;IAgNxC;;;OAGG;YACW,wBAAwB;cA0LtB,wBAAwB,CAAC,WAAW,EAAE,wBAAwB,EAAE,OAAO,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;IAyIjC;;;OAGG;YACW,iBAAiB;IAgL/B;;OAEG;YACW,gBAAgB;IAgE9B;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAW3B;;OAEG;IACH,OAAO,CAAC,0BAA0B;yCAr4DvB,qBAAqB;2CAArB,qBAAqB;CA24DjC"}
@@ -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-autocomplete.service";
13
- import * as i8 from "../../services/mention-parser.service";
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 "@angular/forms";
16
- import * as i11 from "../mention/mention-dropdown.component";
17
- const _c0 = ["messageTextarea"];
18
- function MessageInputComponent_div_6_Template(rf, ctx) { if (rf & 1) {
19
- i0.ɵɵelementStart(0, "div", 10);
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
- messageTextarea;
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, mentionAutocomplete, mentionParser) {
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.messageTextarea?.nativeElement) {
114
- this.messageTextarea.nativeElement.focus();
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 input events to detect @ mentions
204
+ * Handle text submitted from the input box
205
205
  */
206
- onInput(event) {
207
- const textarea = event.target;
208
- const cursorPos = textarea.selectionStart;
209
- const text = textarea.value;
210
- // Check if we're typing after an @ symbol
211
- const textBeforeCursor = text.substring(0, cursorPos);
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
- * Handle keydown events in the textarea
234
- * - Enter alone: Send message (unless dropdown is open)
235
- * - Shift+Enter: Add new line
236
- * - Arrow keys, Tab, Escape: Handle mention dropdown if open
237
- */
238
- onKeyDown(event) {
239
- // If mention dropdown is open, let it handle certain keys
240
- if (this.showMentionDropdown) {
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
- // Regular key handling
247
- if (event.key === 'Enter' && !event.shiftKey) {
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
- else {
286
- // Show below the textarea (default) - anchor to the BOTTOM of the textarea
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.messageTextarea?.nativeElement) {
520
- this.messageTextarea.nativeElement.focus();
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
- await this.updateConversationDetail(agentResponseMessage, result.agentRun?.Message || `✅ **${agentName}** completed`, 'Complete');
1369
- // Server created artifacts - emit event to trigger UI reload
1370
- if (result.payload && Object.keys(result.payload).length > 0) {
1371
- this.artifactCreated.emit({
1372
- artifactId: '',
1373
- versionId: '',
1374
- versionNumber: 0,
1375
- conversationDetailId: agentResponseMessage.ID,
1376
- name: ''
1377
- });
1378
- this.messageSent.emit(agentResponseMessage);
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.MentionAutocompleteService), i0.ɵɵdirectiveInject(i8.MentionParserService)); };
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.messageTextarea = _t.first);
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) {
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)(1, "textarea", 2, 0);
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); });
1649
- i0.ɵɵlistener("keydown", function MessageInputComponent_Template_textarea_keydown_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onKeyDown($event)); })("input", function MessageInputComponent_Template_textarea_input_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInput($event)); });
1650
- i0.ɵɵtext(3, " ");
1651
- i0.ɵɵelementEnd();
1652
- i0.ɵɵelementStart(4, "mj-mention-dropdown", 3);
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.ɵɵadvance(2);
1676
- i0.ɵɵproperty("disabled", !ctx.canSend)("title", ctx.isSending ? "Sending..." : "Send message");
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-container\">\n <textarea\n #messageTextarea\n class=\"message-input\"\n [class.intent-checking]=\"isProcessing\"\n [(ngModel)]=\"messageText\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled || isProcessing\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"onInput($event)\"\n rows=\"3\">\n </textarea>\n\n <!-- Mention Autocomplete Dropdown -->\n <mj-mention-dropdown\n [suggestions]=\"mentionSuggestions\"\n [position]=\"mentionDropdownPosition\"\n [visible]=\"showMentionDropdown\"\n [showAbove]=\"mentionDropdownShowAbove\"\n (suggestionSelected)=\"onMentionSelected($event)\"\n (closed)=\"closeMentionDropdown()\">\n </mj-mention-dropdown>\n\n <div class=\"input-actions\">\n <div class=\"processing-indicator\" *ngIf=\"isProcessing\">\n <i class=\"fas fa-circle-notch fa-spin\"></i>\n <span>{{ processingMessage }}</span>\n </div>\n <button\n class=\"btn-attach\"\n [disabled]=\"disabled\"\n title=\"Attach file (coming soon)\">\n <i class=\"fas fa-paperclip\"></i>\n </button>\n <button\n class=\"btn-send\"\n [disabled]=\"!canSend\"\n (click)=\"onSend()\"\n [title]=\"isSending ? 'Sending...' : 'Send message'\">\n <i class=\"fas fa-paper-plane\"></i>\n </button>\n </div>\n</div>", styles: [".message-input-container {\n position: relative;\n padding: 16px 24px;\n border-top: 1px solid #D9D9D9;\n background: #FFF;\n}\n\n.message-input-wrapper {\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:focus-within {\n border-color: #0076B6;\n box-shadow: 0 0 0 3px rgba(0, 118, 182, 0.1);\n}\n\n.message-input {\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:focus {\n outline: none;\n}\n\n.message-input:disabled {\n background: transparent;\n cursor: wait;\n}\n\n// Subtle visual feedback when checking intent (no ugly gray background)\n.message-input.intent-checking {\n opacity: 0.6;\n transition: opacity 0.2s;\n}\n.input-actions {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px;\n}\n.btn-attach {\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:hover:not(:disabled) {\n background: #F4F4F4;\n border-color: #AAA;\n}\n.btn-attach:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.btn-send {\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:hover:not(:disabled) {\n background: #2563EB;\n}\n.btn-send:disabled {\n background: #D9D9D9;\n color: #AAA;\n cursor: not-allowed;\n}\n.btn-send i {\n font-size: 16px;\n}\n.processing-indicator {\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 i {\n color: #0076B6;\n}"] }]
1682
- }], () => [{ type: i1.DialogService }, { type: i2.ToastService }, { type: i3.ConversationAgentService }, { type: i4.ConversationStateService }, { type: i5.DataCacheService }, { type: i6.ActiveTasksService }, { type: i7.MentionAutocompleteService }, { type: i8.MentionParserService }], { conversationId: [{
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
- }], messageTextarea: [{
1628
+ }], inputBox: [{
1713
1629
  type: ViewChild,
1714
- args: ['messageTextarea']
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