@memberjunction/ng-conversations 6.1.0-edge.1 → 6.1.0-edge.3

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 (51) hide show
  1. package/LICENSE +180 -4
  2. package/README.md +32 -1
  3. package/dist/lib/components/composer/ai-composer.component.d.ts +11 -2
  4. package/dist/lib/components/composer/ai-composer.component.d.ts.map +1 -1
  5. package/dist/lib/components/composer/ai-composer.component.js +48 -32
  6. package/dist/lib/components/composer/ai-composer.component.js.map +1 -1
  7. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts +159 -9
  8. package/dist/lib/components/conversation/conversation-chat-area.component.d.ts.map +1 -1
  9. package/dist/lib/components/conversation/conversation-chat-area.component.js +497 -106
  10. package/dist/lib/components/conversation/conversation-chat-area.component.js.map +1 -1
  11. package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts +14 -2
  12. package/dist/lib/components/conversation/pinned-messages-panel.component.d.ts.map +1 -1
  13. package/dist/lib/components/conversation/pinned-messages-panel.component.js +37 -19
  14. package/dist/lib/components/conversation/pinned-messages-panel.component.js.map +1 -1
  15. package/dist/lib/components/message/message-input.component.d.ts +7 -3
  16. package/dist/lib/components/message/message-input.component.d.ts.map +1 -1
  17. package/dist/lib/components/message/message-input.component.js +78 -159
  18. package/dist/lib/components/message/message-input.component.js.map +1 -1
  19. package/dist/lib/components/message/message-list.component.d.ts +287 -7
  20. package/dist/lib/components/message/message-list.component.d.ts.map +1 -1
  21. package/dist/lib/components/message/message-list.component.js +850 -56
  22. package/dist/lib/components/message/message-list.component.js.map +1 -1
  23. package/dist/lib/components/message/workflow-plan-card.component.d.ts +52 -2
  24. package/dist/lib/components/message/workflow-plan-card.component.d.ts.map +1 -1
  25. package/dist/lib/components/message/workflow-plan-card.component.js +79 -15
  26. package/dist/lib/components/message/workflow-plan-card.component.js.map +1 -1
  27. package/dist/lib/services/conversation-agent.service.d.ts +98 -16
  28. package/dist/lib/services/conversation-agent.service.d.ts.map +1 -1
  29. package/dist/lib/services/conversation-agent.service.js +218 -69
  30. package/dist/lib/services/conversation-agent.service.js.map +1 -1
  31. package/dist/lib/services/conversation-detail-window.store.d.ts +206 -0
  32. package/dist/lib/services/conversation-detail-window.store.d.ts.map +1 -0
  33. package/dist/lib/services/conversation-detail-window.store.js +503 -0
  34. package/dist/lib/services/conversation-detail-window.store.js.map +1 -0
  35. package/dist/lib/services/realtime-pairing.d.ts +8 -3
  36. package/dist/lib/services/realtime-pairing.d.ts.map +1 -1
  37. package/dist/lib/services/realtime-pairing.js +9 -5
  38. package/dist/lib/services/realtime-pairing.js.map +1 -1
  39. package/dist/lib/utils/agent-artifact-summary.d.ts +54 -0
  40. package/dist/lib/utils/agent-artifact-summary.d.ts.map +1 -0
  41. package/dist/lib/utils/agent-artifact-summary.js +49 -0
  42. package/dist/lib/utils/agent-artifact-summary.js.map +1 -0
  43. package/dist/lib/utils/conversation-detail-window.d.ts +49 -0
  44. package/dist/lib/utils/conversation-detail-window.d.ts.map +1 -0
  45. package/dist/lib/utils/conversation-detail-window.js +86 -0
  46. package/dist/lib/utils/conversation-detail-window.js.map +1 -0
  47. package/dist/lib/utils/date-jump.d.ts +65 -0
  48. package/dist/lib/utils/date-jump.d.ts.map +1 -0
  49. package/dist/lib/utils/date-jump.js +106 -0
  50. package/dist/lib/utils/date-jump.js.map +1 -0
  51. package/package.json +32 -32
package/LICENSE CHANGED
@@ -1,7 +1,183 @@
1
- ISC License
1
+ Business Source License 1.1
2
2
 
3
- Copyright (c) 2023 MemberJunction
3
+ License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
4
+ "Business Source License" is a trademark of MariaDB plc.
4
5
 
5
- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
6
+ -----------------------------------------------------------------------------
6
7
 
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
8
+ Parameters
9
+
10
+ Licensor: Blue Cypress, Inc.
11
+
12
+ Licensed Work: MemberJunction.
13
+ The Licensed Work is (c) 2023-2026 Blue Cypress, Inc.
14
+
15
+ Additional Use Grant: Subject to the terms of this License, Licensor grants
16
+ you the following additional rights to make Production
17
+ Use of the Licensed Work.
18
+
19
+ 1. Internal Use
20
+
21
+ You may make production use of the Licensed Work for
22
+ your own internal business or organizational operations.
23
+
24
+ 2. Nonprofit Use
25
+
26
+ If you are a Nonprofit, you may make production use of
27
+ the Licensed Work for the operations and activities of
28
+ your Organizational Family.
29
+
30
+ 3. MemberJunction Certified Program Use
31
+
32
+ If you are authorized by Licensor under the
33
+ MemberJunction Certified Program to provide professional
34
+ services using the Licensed Work, you may make
35
+ production use of the Licensed Work in providing such
36
+ professional services to a client, provided that:
37
+
38
+ (a) the Licensed Work is deployed in, and the applicable
39
+ production use occurs within, an environment owned,
40
+ leased, licensed, subscribed to, or otherwise controlled
41
+ by that client; and
42
+
43
+ (b) the production use is for that client's own internal
44
+ business or organizational operations or is otherwise
45
+ independently permitted to that client under this
46
+ Additional Use Grant.
47
+
48
+ 4. Definitions Applicable to the Additional Use Grant
49
+
50
+ "Affiliate" means, with respect to a specified Person,
51
+ any other Person that directly or indirectly Controls,
52
+ is Controlled by, or is under common Control with such
53
+ specified Person.
54
+
55
+ "Control" (including the terms "Controls," "Controlled
56
+ by," and "under common Control with") means the direct
57
+ or indirect possession of the power to direct or cause
58
+ the direction of the management and policies of a
59
+ Person, whether through ownership of voting interests,
60
+ by contract, or otherwise.
61
+
62
+ "Organizational Family" means, with respect to a Person,
63
+ (a) such Person and its Affiliates, and (b) any
64
+ nonprofit organization, governmental entity, chapter,
65
+ division, local affiliate, regional affiliate, state
66
+ affiliate, national affiliate, or other entity that is
67
+ formally affiliated with such Person through governing
68
+ documents, a charter, bylaws, a membership agreement, or
69
+ another written organizational instrument, and is
70
+ recognized under such documents as part of the same
71
+ organizational structure.
72
+
73
+ "Nonprofit" means a Person recognized by the Internal
74
+ Revenue Service as exempt from federal income taxation
75
+ under Section 501(c)(3), 501(c)(4), 501(c)(5), or
76
+ 501(c)(6) of the Internal Revenue Code, or a foreign
77
+ organization recognized under substantially equivalent
78
+ laws.
79
+
80
+ A Person claiming eligibility as a Nonprofit shall, upon
81
+ Licensor's reasonable request, provide documentation
82
+ reasonably sufficient to demonstrate that it qualifies
83
+ as a Nonprofit. If such Person materially misrepresents,
84
+ or is unable to demonstrate, its qualification as a
85
+ Nonprofit, the rights granted to such Person under
86
+ Section 2 of this Additional Use Grant shall terminate.
87
+
88
+ "MemberJunction Certified Program" means Licensor's
89
+ then-current program for certifying and authorizing a
90
+ Person to provide professional services using the
91
+ Licensed Work.
92
+
93
+ "Person" means any individual, corporation, limited
94
+ liability company, partnership, association, nonprofit
95
+ organization, governmental entity, or other legal or
96
+ organizational entity.
97
+
98
+ Change Date: Four (4) years from the date the Licensed Work is first
99
+ made available.
100
+
101
+ Change License: MIT License.
102
+
103
+ For information about alternative licensing arrangements for the Licensed
104
+ Work, please contact Blue Cypress, Inc.
105
+
106
+ -----------------------------------------------------------------------------
107
+
108
+ Terms
109
+
110
+ The Licensor hereby grants you the right to copy, modify, create derivative
111
+ works, redistribute, and make non-production use of the Licensed Work. The
112
+ Licensor may make an Additional Use Grant, above, permitting limited
113
+ production use.
114
+
115
+ Effective on the Change Date, or the fourth anniversary of the first publicly
116
+ available distribution of a specific version of the Licensed Work under this
117
+ License, whichever comes first, the Licensor hereby grants you rights under
118
+ the terms of the Change License, and the rights granted in the paragraph
119
+ above terminate.
120
+
121
+ If your use of the Licensed Work does not comply with the requirements
122
+ currently in effect as described in this License, you must purchase a
123
+ commercial license from the Licensor, its affiliated entities, or authorized
124
+ resellers, or you must refrain from using the Licensed Work.
125
+
126
+ All copies of the original and modified Licensed Work, and derivative works
127
+ of the Licensed Work, are subject to this License. This License applies
128
+ separately for each version of the Licensed Work and the Change Date may vary
129
+ for each version of the Licensed Work released by Licensor.
130
+
131
+ You must conspicuously display this License on each original or modified copy
132
+ of the Licensed Work. If you receive the Licensed Work in original or
133
+ modified form from a third party, the terms and conditions set forth in this
134
+ License apply to your use of that work.
135
+
136
+ Any use of the Licensed Work in violation of this License will automatically
137
+ terminate your rights under this License for the current and all other
138
+ versions of the Licensed Work.
139
+
140
+ This License does not grant you any right in any trademark or logo of
141
+ Licensor or its affiliates (provided that you may use a trademark or logo of
142
+ Licensor as expressly required by this License).
143
+
144
+ TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
145
+ AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
146
+ EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
147
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
148
+ TITLE.
149
+
150
+ MariaDB hereby grants you permission to use this License's text to license
151
+ your works, and to refer to it using the trademark "Business Source License",
152
+ as long as you comply with the Covenants of Licensor below.
153
+
154
+ -----------------------------------------------------------------------------
155
+
156
+ Covenants of Licensor
157
+
158
+ In consideration of the right to use this License's text and the "Business
159
+ Source License" name and trademark, Licensor covenants to MariaDB, and to all
160
+ other recipients of the licensed work to be provided by Licensor:
161
+
162
+ 1. To specify as the Change License the GPL Version 2.0 or any later version,
163
+ or a license that is compatible with GPL Version 2.0 or a later version,
164
+ where "compatible" means that software provided under the Change License
165
+ can be included in a program with software provided under GPL Version 2.0
166
+ or a later version. Licensor may specify additional Change Licenses without
167
+ limitation.
168
+
169
+ 2. To either: (a) specify an additional grant of rights to use that does not
170
+ impose any additional restriction on the right granted in this License, as
171
+ the Additional Use Grant; or (b) insert the text "None".
172
+
173
+ 3. To specify a Change Date.
174
+
175
+ 4. Not to modify this License in any other way.
176
+
177
+ -----------------------------------------------------------------------------
178
+
179
+ Notice
180
+
181
+ The Business Source License (this document, or the "License") is not an Open
182
+ Source license. However, the Licensed Work will eventually be made available
183
+ under an Open Source License, as stated in this License.
package/README.md CHANGED
@@ -451,6 +451,37 @@ This package never navigates (no Router): developer links emit a `RealtimeNaviga
451
451
 
452
452
  Message components use dynamic component creation (`ViewContainerRef.createComponent`) instead of Angular template binding to minimize render cycles and improve performance with large message lists.
453
453
 
454
+ ### Windowed transcript
455
+
456
+ Opening a conversation loads only the **most recent page** of the transcript — roughly ten
457
+ display items — rather than every `MJ: Conversation Details` row. Everything older is
458
+ represented by an "Earlier messages" sentinel at the top; scrolling it into view prepends the
459
+ previous page and holds the reader's scroll position. Items far from the viewport are
460
+ unmounted and replaced by height-holding spacers, so the DOM stays bounded no matter how far
461
+ back someone pages.
462
+
463
+ **Hosts do not opt in.** It is on by default and requires no configuration. The one thing a
464
+ host should provide is its scrolling element:
465
+
466
+ ```html
467
+ <mj-conversation-message-list [ScrollRoot]="myScrollContainer"> </mj-conversation-message-list>
468
+ ```
469
+
470
+ The list's own container does not scroll — consumers typically wrap it in their own scroller,
471
+ and that element is what the sentinel's `IntersectionObserver` needs as its root. When
472
+ `ScrollRoot` is omitted the component walks its ancestors to find one, which works but depends
473
+ on layout having settled.
474
+
475
+ **`ConversationEngine.LoadConversationDetails` is no longer what this widget calls on open.**
476
+ It now calls the additive `LoadDetailWindow`, which pages on the `Sequence` column and loads
477
+ peripherals (agent runs, ratings, artifacts, avatars) scoped to the returned rows.
478
+ `LoadConversationDetails` remains the full-history API and is unchanged — agents and
479
+ server-side callers depend on it returning a complete set, so the windowed path deliberately
480
+ never writes into the engine's detail cache.
481
+
482
+ Paging is measured in **display items**, not database rows: a realtime session collapses many
483
+ rows into one timeline card, and a session is never split across pages.
484
+
454
485
  ### MJ Entity Integration
455
486
 
456
487
  All data operations use the MemberJunction entity system:
@@ -501,4 +532,4 @@ npm run build
501
532
 
502
533
  ## License
503
534
 
504
- ISC
535
+ Business Source License 1.1 — see [LICENSE](../../../../LICENSE) for details.
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { IMetadataProvider, UserInfo } from '@memberjunction/core';
3
- import { MentionSuggestion, ComposerTriggerProvider, MentionEditorComponent, MessageInputBoxComponent, PendingAttachment } from '@memberjunction/ng-composer';
3
+ import { MentionSuggestion, ComposerTriggerProvider, MentionEditorComponent, MessageInputBoxComponent, PendingAttachment, BeforeSkillsOpenedEventArgs } from '@memberjunction/ng-composer';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
6
  * AI-aware composer: wraps the generic `<mj-message-input-box>` (from
@@ -70,6 +70,15 @@ export declare class AiComposerComponent {
70
70
  voiceRequested: EventEmitter<void>;
71
71
  voiceOptionsRequested: EventEmitter<void>;
72
72
  planModeToggle: EventEmitter<void>;
73
+ /**
74
+ * Before/After pair for the Skills button, proxied straight through from the input box. Gated on
75
+ * `EnableSkillCommands` — the button and the keystroke are two doors to the same feature, so one
76
+ * flag governs both rather than letting a composer advertise skills it will not serve.
77
+ *
78
+ * Cancel on `beforeSkillsOpened` vetoes the dropdown; `afterSkillsOpened` then does not fire.
79
+ */
80
+ beforeSkillsOpened: EventEmitter<BeforeSkillsOpenedEventArgs>;
81
+ afterSkillsOpened: EventEmitter<void>;
73
82
  onInnerValueChange(newValue: string): void;
74
83
  /** The inner mention editor — kept reachable for hosts that drive it directly (e.g. clear-after-programmatic-send). */
75
84
  get mentionEditor(): MentionEditorComponent | undefined;
@@ -104,6 +113,6 @@ export declare class AiComposerComponent {
104
113
  artifactVersionId?: string;
105
114
  }): PendingAttachment | undefined;
106
115
  static ɵfac: i0.ɵɵFactoryDeclaration<AiComposerComponent, never>;
107
- static ɵcmp: i0.ɵɵComponentDeclaration<AiComposerComponent, "mj-ai-composer", never, { "EnableAgentMentions": { "alias": "EnableAgentMentions"; "required": false; }; "EnableEntityMentions": { "alias": "EnableEntityMentions"; "required": false; }; "EnableSkillCommands": { "alias": "EnableSkillCommands"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; }; "enableMentions": { "alias": "enableMentions"; "required": false; }; "Provider": { "alias": "Provider"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "enableAttachments": { "alias": "enableAttachments"; "required": false; }; "maxAttachments": { "alias": "maxAttachments"; "required": false; }; "maxAttachmentSizeBytes": { "alias": "maxAttachmentSizeBytes"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "enableRealtime": { "alias": "enableRealtime"; "required": false; }; "voiceActive": { "alias": "voiceActive"; "required": false; }; "canStartRealtime": { "alias": "canStartRealtime"; "required": false; }; "enablePlanMode": { "alias": "enablePlanMode"; "required": false; }; "planModeActive": { "alias": "planModeActive"; "required": false; }; }, { "textSubmitted": "textSubmitted"; "blurred": "blurred"; "valueChange": "valueChange"; "attachmentsChanged": "attachmentsChanged"; "attachmentError": "attachmentError"; "attachmentClicked": "attachmentClicked"; "voiceRequested": "voiceRequested"; "voiceOptionsRequested": "voiceOptionsRequested"; "planModeToggle": "planModeToggle"; }, never, never, false, never>;
116
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiComposerComponent, "mj-ai-composer", never, { "EnableAgentMentions": { "alias": "EnableAgentMentions"; "required": false; }; "EnableEntityMentions": { "alias": "EnableEntityMentions"; "required": false; }; "EnableSkillCommands": { "alias": "EnableSkillCommands"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; }; "enableMentions": { "alias": "enableMentions"; "required": false; }; "Provider": { "alias": "Provider"; "required": false; }; "currentUser": { "alias": "currentUser"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "enableAttachments": { "alias": "enableAttachments"; "required": false; }; "maxAttachments": { "alias": "maxAttachments"; "required": false; }; "maxAttachmentSizeBytes": { "alias": "maxAttachmentSizeBytes"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "enableRealtime": { "alias": "enableRealtime"; "required": false; }; "voiceActive": { "alias": "voiceActive"; "required": false; }; "canStartRealtime": { "alias": "canStartRealtime"; "required": false; }; "enablePlanMode": { "alias": "enablePlanMode"; "required": false; }; "planModeActive": { "alias": "planModeActive"; "required": false; }; }, { "textSubmitted": "textSubmitted"; "blurred": "blurred"; "valueChange": "valueChange"; "attachmentsChanged": "attachmentsChanged"; "attachmentError": "attachmentError"; "attachmentClicked": "attachmentClicked"; "voiceRequested": "voiceRequested"; "voiceOptionsRequested": "voiceOptionsRequested"; "planModeToggle": "planModeToggle"; "beforeSkillsOpened": "beforeSkillsOpened"; "afterSkillsOpened": "afterSkillsOpened"; }, never, never, false, never>;
108
117
  }
109
118
  //# sourceMappingURL=ai-composer.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-composer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/composer/ai-composer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAA4B,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,6BAA6B,CAAC;;AAKrC;;;;;;;;;;;;;;;;GAgBG;AACH,qBAoCa,mBAAmB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;2CAAnB,mBAAmB;CAgK/B"}
1
+ {"version":3,"file":"ai-composer.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/components/composer/ai-composer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAA4B,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;;AAKrC;;;;;;;;;;;;;;;;GAgBG;AACH,qBAuCa,mBAAmB;IACP,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IAG3D,OAAO,CAAC,oBAAoB,CAAiB;IAC7C,OAAO,CAAC,qBAAqB,CAAiB;IAC9C,OAAO,CAAC,oBAAoB,CAAiB;IAC7C,OAAO,CAAC,uBAAuB,CAAiC;IAIhE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;IACnE,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA+B;IACrE,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;;IAMnE,uDAAuD;IACvD,IACI,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAKrC;IACD,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,gEAAgE;IAChE,IACI,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAKtC;IACD,IAAI,oBAAoB,IAAI,OAAO,CAElC;IAED,gDAAgD;IAChD,IACI,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAKrC;IACD,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,+GAA+G;IAC/G,IAAW,sBAAsB,IAAI,uBAAuB,EAAE,CAE7D;IAED,OAAO,CAAC,uBAAuB;IAStB,WAAW,EAAE,MAAM,CAAsD;IACzE,QAAQ,EAAE,OAAO,CAAS;IAC1B,KAAK,EAAE,MAAM,CAAM;IAC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C;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvH,2FAA2F;IACpF,4BAA4B,IAAI,MAAM;IAI7C,8CAA8C;IACvC,qBAAqB,IAAI,iBAAiB,EAAE;IAInD,wDAAwD;IACjD,cAAc,IAAI,IAAI;IAI7B,yEAAyE;IAClE,qBAAqB,CAAC,QAAQ,EAAE;QACrC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QACnD,SAAS,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC/C,GAAG,iBAAiB,GAAG,SAAS;yCAtKtB,mBAAmB;2CAAnB,mBAAmB;CAyK/B"}
@@ -112,6 +112,15 @@ export class AiComposerComponent {
112
112
  voiceRequested = new EventEmitter();
113
113
  voiceOptionsRequested = new EventEmitter();
114
114
  planModeToggle = new EventEmitter();
115
+ /**
116
+ * Before/After pair for the Skills button, proxied straight through from the input box. Gated on
117
+ * `EnableSkillCommands` — the button and the keystroke are two doors to the same feature, so one
118
+ * flag governs both rather than letting a composer advertise skills it will not serve.
119
+ *
120
+ * Cancel on `beforeSkillsOpened` vetoes the dropdown; `afterSkillsOpened` then does not fire.
121
+ */
122
+ beforeSkillsOpened = new EventEmitter();
123
+ afterSkillsOpened = new EventEmitter();
115
124
  onInnerValueChange(newValue) {
116
125
  this.value = newValue;
117
126
  this.valueChange.emit(newValue);
@@ -139,7 +148,7 @@ export class AiComposerComponent {
139
148
  }
140
149
  /** Mention chip data (id/type/name + preset info) currently in the editor. */
141
150
  getMentionChipsData() {
142
- return this.inputBox?.getMentionChipsData() || [];
151
+ return this.inputBox?.GetMentionChipsData() || [];
143
152
  }
144
153
  /** Plain text with mentions encoded as JSON (`@{"type":...}`) — the persistence format. */
145
154
  getPlainTextWithJsonMentions() {
@@ -147,11 +156,11 @@ export class AiComposerComponent {
147
156
  }
148
157
  /** Pending (not yet uploaded) attachments. */
149
158
  getPendingAttachments() {
150
- return this.inputBox?.getPendingAttachments() || [];
159
+ return this.inputBox?.GetPendingAttachments() || [];
151
160
  }
152
161
  /** Open the attachment file picker programmatically. */
153
162
  openFilePicker() {
154
- this.inputBox?.openFilePicker();
163
+ this.inputBox?.OpenFilePicker();
155
164
  }
156
165
  /** Attach an artifact as a pending attachment (artifact picker flow). */
157
166
  AddArtifactAttachment(artifact) {
@@ -163,13 +172,13 @@ export class AiComposerComponent {
163
172
  } if (rf & 2) {
164
173
  let _t;
165
174
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inputBox = _t.first);
166
- } }, inputs: { EnableAgentMentions: "EnableAgentMentions", EnableEntityMentions: "EnableEntityMentions", EnableSkillCommands: "EnableSkillCommands", placeholder: "placeholder", disabled: "disabled", value: "value", showCharacterCount: "showCharacterCount", enableMentions: "enableMentions", Provider: "Provider", currentUser: "currentUser", rows: "rows", enableAttachments: "enableAttachments", maxAttachments: "maxAttachments", maxAttachmentSizeBytes: "maxAttachmentSizeBytes", acceptedFileTypes: "acceptedFileTypes", enableRealtime: "enableRealtime", voiceActive: "voiceActive", canStartRealtime: "canStartRealtime", enablePlanMode: "enablePlanMode", planModeActive: "planModeActive" }, outputs: { textSubmitted: "textSubmitted", blurred: "blurred", valueChange: "valueChange", attachmentsChanged: "attachmentsChanged", attachmentError: "attachmentError", attachmentClicked: "attachmentClicked", voiceRequested: "voiceRequested", voiceOptionsRequested: "voiceOptionsRequested", planModeToggle: "planModeToggle" }, standalone: false, decls: 2, vars: 18, consts: [["inputBox", ""], [3, "textSubmitted", "blurred", "valueChange", "attachmentsChanged", "attachmentError", "attachmentClicked", "voiceRequested", "voiceOptionsRequested", "planModeToggle", "placeholder", "disabled", "value", "showCharacterCount", "enableMentions", "TriggerProviders", "Provider", "currentUser", "rows", "enableAttachments", "maxAttachments", "maxAttachmentSizeBytes", "acceptedFileTypes", "enableRealtime", "voiceActive", "canStartRealtime", "enablePlanMode", "planModeActive"]], template: function AiComposerComponent_Template(rf, ctx) { if (rf & 1) {
175
+ } }, inputs: { EnableAgentMentions: "EnableAgentMentions", EnableEntityMentions: "EnableEntityMentions", EnableSkillCommands: "EnableSkillCommands", placeholder: "placeholder", disabled: "disabled", value: "value", showCharacterCount: "showCharacterCount", enableMentions: "enableMentions", Provider: "Provider", currentUser: "currentUser", rows: "rows", enableAttachments: "enableAttachments", maxAttachments: "maxAttachments", maxAttachmentSizeBytes: "maxAttachmentSizeBytes", acceptedFileTypes: "acceptedFileTypes", enableRealtime: "enableRealtime", voiceActive: "voiceActive", canStartRealtime: "canStartRealtime", enablePlanMode: "enablePlanMode", planModeActive: "planModeActive" }, outputs: { textSubmitted: "textSubmitted", blurred: "blurred", valueChange: "valueChange", attachmentsChanged: "attachmentsChanged", attachmentError: "attachmentError", attachmentClicked: "attachmentClicked", voiceRequested: "voiceRequested", voiceOptionsRequested: "voiceOptionsRequested", planModeToggle: "planModeToggle", beforeSkillsOpened: "beforeSkillsOpened", afterSkillsOpened: "afterSkillsOpened" }, standalone: false, decls: 2, vars: 19, consts: [["inputBox", ""], [3, "TextSubmitted", "Blurred", "ValueChange", "AttachmentsChanged", "AttachmentError", "AttachmentClicked", "VoiceRequested", "VoiceOptionsRequested", "PlanModeToggle", "BeforeSkillsOpened", "AfterSkillsOpened", "Placeholder", "Disabled", "Value", "ShowCharacterCount", "EnableMentions", "TriggerProviders", "Provider", "CurrentUser", "Rows", "EnableAttachments", "MaxAttachments", "MaxAttachmentSizeBytes", "AcceptedFileTypes", "EnableRealtime", "VoiceActive", "CanStartRealtime", "EnablePlanMode", "EnableSkills", "PlanModeActive"]], template: function AiComposerComponent_Template(rf, ctx) { if (rf & 1) {
167
176
  const _r1 = i0.ɵɵgetCurrentView();
168
177
  i0.ɵɵelementStart(0, "mj-message-input-box", 1, 0);
169
- i0.ɵɵlistener("textSubmitted", function AiComposerComponent_Template_mj_message_input_box_textSubmitted_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.textSubmitted.emit($event)); })("blurred", function AiComposerComponent_Template_mj_message_input_box_blurred_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.blurred.emit()); })("valueChange", function AiComposerComponent_Template_mj_message_input_box_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInnerValueChange($event)); })("attachmentsChanged", function AiComposerComponent_Template_mj_message_input_box_attachmentsChanged_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.attachmentsChanged.emit($event)); })("attachmentError", function AiComposerComponent_Template_mj_message_input_box_attachmentError_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.attachmentError.emit($event)); })("attachmentClicked", function AiComposerComponent_Template_mj_message_input_box_attachmentClicked_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.attachmentClicked.emit($event)); })("voiceRequested", function AiComposerComponent_Template_mj_message_input_box_voiceRequested_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.voiceRequested.emit()); })("voiceOptionsRequested", function AiComposerComponent_Template_mj_message_input_box_voiceOptionsRequested_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.voiceOptionsRequested.emit()); })("planModeToggle", function AiComposerComponent_Template_mj_message_input_box_planModeToggle_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.planModeToggle.emit()); });
178
+ i0.ɵɵlistener("TextSubmitted", function AiComposerComponent_Template_mj_message_input_box_TextSubmitted_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.textSubmitted.emit($event)); })("Blurred", function AiComposerComponent_Template_mj_message_input_box_Blurred_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.blurred.emit()); })("ValueChange", function AiComposerComponent_Template_mj_message_input_box_ValueChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onInnerValueChange($event)); })("AttachmentsChanged", function AiComposerComponent_Template_mj_message_input_box_AttachmentsChanged_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.attachmentsChanged.emit($event)); })("AttachmentError", function AiComposerComponent_Template_mj_message_input_box_AttachmentError_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.attachmentError.emit($event)); })("AttachmentClicked", function AiComposerComponent_Template_mj_message_input_box_AttachmentClicked_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.attachmentClicked.emit($event)); })("VoiceRequested", function AiComposerComponent_Template_mj_message_input_box_VoiceRequested_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.voiceRequested.emit()); })("VoiceOptionsRequested", function AiComposerComponent_Template_mj_message_input_box_VoiceOptionsRequested_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.voiceOptionsRequested.emit()); })("PlanModeToggle", function AiComposerComponent_Template_mj_message_input_box_PlanModeToggle_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.planModeToggle.emit()); })("BeforeSkillsOpened", function AiComposerComponent_Template_mj_message_input_box_BeforeSkillsOpened_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.beforeSkillsOpened.emit($event)); })("AfterSkillsOpened", function AiComposerComponent_Template_mj_message_input_box_AfterSkillsOpened_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.afterSkillsOpened.emit()); });
170
179
  i0.ɵɵelementEnd();
171
180
  } if (rf & 2) {
172
- i0.ɵɵproperty("placeholder", ctx.placeholder)("disabled", ctx.disabled)("value", ctx.value)("showCharacterCount", ctx.showCharacterCount)("enableMentions", ctx.enableMentions)("TriggerProviders", ctx.ActiveTriggerProviders)("Provider", ctx.Provider)("currentUser", ctx.currentUser)("rows", ctx.rows)("enableAttachments", ctx.enableAttachments)("maxAttachments", ctx.maxAttachments)("maxAttachmentSizeBytes", ctx.maxAttachmentSizeBytes)("acceptedFileTypes", ctx.acceptedFileTypes)("enableRealtime", ctx.enableRealtime)("voiceActive", ctx.voiceActive)("canStartRealtime", ctx.canStartRealtime)("enablePlanMode", ctx.enablePlanMode)("planModeActive", ctx.planModeActive);
181
+ i0.ɵɵproperty("Placeholder", ctx.placeholder)("Disabled", ctx.disabled)("Value", ctx.value)("ShowCharacterCount", ctx.showCharacterCount)("EnableMentions", ctx.enableMentions)("TriggerProviders", ctx.ActiveTriggerProviders)("Provider", ctx.Provider)("CurrentUser", ctx.currentUser)("Rows", ctx.rows)("EnableAttachments", ctx.enableAttachments)("MaxAttachments", ctx.maxAttachments)("MaxAttachmentSizeBytes", ctx.maxAttachmentSizeBytes)("AcceptedFileTypes", ctx.acceptedFileTypes)("EnableRealtime", ctx.enableRealtime)("VoiceActive", ctx.voiceActive)("CanStartRealtime", ctx.canStartRealtime)("EnablePlanMode", ctx.enablePlanMode)("EnableSkills", ctx.EnableSkillCommands)("PlanModeActive", ctx.planModeActive);
173
182
  } }, dependencies: [i1.MessageInputBoxComponent], encapsulation: 2 });
174
183
  }
175
184
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AiComposerComponent, [{
@@ -180,33 +189,36 @@ export class AiComposerComponent {
180
189
  template: `
181
190
  <mj-message-input-box
182
191
  #inputBox
183
- [placeholder]="placeholder"
184
- [disabled]="disabled"
185
- [value]="value"
186
- [showCharacterCount]="showCharacterCount"
187
- [enableMentions]="enableMentions"
192
+ [Placeholder]="placeholder"
193
+ [Disabled]="disabled"
194
+ [Value]="value"
195
+ [ShowCharacterCount]="showCharacterCount"
196
+ [EnableMentions]="enableMentions"
188
197
  [TriggerProviders]="ActiveTriggerProviders"
189
198
  [Provider]="Provider"
190
- [currentUser]="currentUser"
191
- [rows]="rows"
192
- [enableAttachments]="enableAttachments"
193
- [maxAttachments]="maxAttachments"
194
- [maxAttachmentSizeBytes]="maxAttachmentSizeBytes"
195
- [acceptedFileTypes]="acceptedFileTypes"
196
- [enableRealtime]="enableRealtime"
197
- [voiceActive]="voiceActive"
198
- [canStartRealtime]="canStartRealtime"
199
- [enablePlanMode]="enablePlanMode"
200
- [planModeActive]="planModeActive"
201
- (textSubmitted)="textSubmitted.emit($event)"
202
- (blurred)="blurred.emit()"
203
- (valueChange)="onInnerValueChange($event)"
204
- (attachmentsChanged)="attachmentsChanged.emit($event)"
205
- (attachmentError)="attachmentError.emit($event)"
206
- (attachmentClicked)="attachmentClicked.emit($event)"
207
- (voiceRequested)="voiceRequested.emit()"
208
- (voiceOptionsRequested)="voiceOptionsRequested.emit()"
209
- (planModeToggle)="planModeToggle.emit()">
199
+ [CurrentUser]="currentUser"
200
+ [Rows]="rows"
201
+ [EnableAttachments]="enableAttachments"
202
+ [MaxAttachments]="maxAttachments"
203
+ [MaxAttachmentSizeBytes]="maxAttachmentSizeBytes"
204
+ [AcceptedFileTypes]="acceptedFileTypes"
205
+ [EnableRealtime]="enableRealtime"
206
+ [VoiceActive]="voiceActive"
207
+ [CanStartRealtime]="canStartRealtime"
208
+ [EnablePlanMode]="enablePlanMode"
209
+ [EnableSkills]="EnableSkillCommands"
210
+ [PlanModeActive]="planModeActive"
211
+ (TextSubmitted)="textSubmitted.emit($event)"
212
+ (Blurred)="blurred.emit()"
213
+ (ValueChange)="onInnerValueChange($event)"
214
+ (AttachmentsChanged)="attachmentsChanged.emit($event)"
215
+ (AttachmentError)="attachmentError.emit($event)"
216
+ (AttachmentClicked)="attachmentClicked.emit($event)"
217
+ (VoiceRequested)="voiceRequested.emit()"
218
+ (VoiceOptionsRequested)="voiceOptionsRequested.emit()"
219
+ (PlanModeToggle)="planModeToggle.emit()"
220
+ (BeforeSkillsOpened)="beforeSkillsOpened.emit($event)"
221
+ (AfterSkillsOpened)="afterSkillsOpened.emit()">
210
222
  </mj-message-input-box>
211
223
  `
212
224
  }]
@@ -271,6 +283,10 @@ export class AiComposerComponent {
271
283
  type: Output
272
284
  }], planModeToggle: [{
273
285
  type: Output
286
+ }], beforeSkillsOpened: [{
287
+ type: Output
288
+ }], afterSkillsOpened: [{
289
+ type: Output
274
290
  }] }); })();
275
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AiComposerComponent, { className: "AiComposerComponent", filePath: "src/lib/components/composer/ai-composer.component.ts", lineNumber: 66 }); })();
291
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AiComposerComponent, { className: "AiComposerComponent", filePath: "src/lib/components/composer/ai-composer.component.ts", lineNumber: 70 }); })();
276
292
  //# sourceMappingURL=ai-composer.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-composer.component.js","sourceRoot":"","sources":["../../../../src/lib/components/composer/ai-composer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAQlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;;;;AAErF;;;;;;;;;;;;;;;;GAgBG;AAqCH,MAAM,OAAO,mBAAmB;IACP,QAAQ,CAA4B;IAE3D,oFAAoF;IAC5E,oBAAoB,GAAY,IAAI,CAAC;IACrC,qBAAqB,GAAY,IAAI,CAAC;IACtC,oBAAoB,GAAY,IAAI,CAAC;IACrC,uBAAuB,GAA8B,EAAE,CAAC;IAEhE,2EAA2E;IAC3E,6EAA6E;IAC5D,oBAAoB,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAClD,qBAAqB,GAAG,IAAI,qBAAqB,EAAE,CAAC;IACpD,oBAAoB,GAAG,IAAI,oBAAoB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nB,mBAAmB;;;;;;;YAhC5B,kDA4B2C;YAAzC,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,0KAAiB,8BAA0B,KAAC,2IACjC,kBAAc,KAAC,yJACX,8BAA0B,KAAC,uKACpB,mCAA+B,KAAC,iKACnC,gCAA4B,KAAC,qKAC3B,kCAA8B,KAAC,yJAClC,yBAAqB,KAAC,uKACf,gCAA4B,KAAC,yJACpC,yBAAqB,KAAC;YAC1C,iBAAuB;;YAVrB,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,6CAA2B,0BACN,oBACN,8CAC0B,sCACR,gDACU,0BACtB,gCACM,kBACd,4CAC0B,sCACN,sDACgB,4CACV,sCACN,gCACN,0CACU,sCACJ,sCACA;;;iFAa1B,mBAAmB;cApC/B,SAAS;eAAC;gBACT,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,gBAAgB;gBAC1B,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BT;aACF;;kBAEE,SAAS;mBAAC,UAAU;;kBAmBpB,KAAK;;kBAYL,KAAK;;kBAYL,KAAK;;kBAyBL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,MAAM;;kBAEN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kFAnGI,mBAAmB","sourcesContent":["import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { MentionSuggestion,\n ComposerTriggerProvider,\n MentionEditorComponent,\n MessageInputBoxComponent,\n PendingAttachment\n} from '@memberjunction/ng-composer';\nimport { AgentMentionProvider } from '../../composer-plugins/agent-mention.provider';\nimport { RecordMentionProvider } from '../../composer-plugins/record-mention.provider';\nimport { SkillCommandProvider } from '../../composer-plugins/skill-command.provider';\n\n/**\n * AI-aware composer: wraps the generic `<mj-message-input-box>` (from\n * `@memberjunction/ng-composer`, which ships zero AI knowledge) and builds the AI\n * trigger plugins in — '@' agent/user mentions, '#' entity/query record mentions, and\n * '/' skill commands — while proxying the input box's full surface (inputs, outputs,\n * and public methods).\n *\n * The familiar granular flags live HERE now:\n * - `EnableAgentMentions` (default true) — the '@' trigger\n * - `EnableEntityMentions` (default true) — the '#' trigger\n * - `EnableSkillCommands` (default true) — the '/' trigger\n * plus the pass-through `enableMentions` master switch.\n *\n * The wrapper always runs the inner editor in EXPLICIT provider-list mode (it owns the\n * list; it deliberately does not proxy `TriggerProviders` / `ExcludedTriggerKeys` — use\n * the raw `<mj-message-input-box>` when you need custom providers or discovery mode).\n */\n@Component({\n standalone: false,\n selector: 'mj-ai-composer',\n template: `\n <mj-message-input-box\n #inputBox\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [value]=\"value\"\n [showCharacterCount]=\"showCharacterCount\"\n [enableMentions]=\"enableMentions\"\n [TriggerProviders]=\"ActiveTriggerProviders\"\n [Provider]=\"Provider\"\n [currentUser]=\"currentUser\"\n [rows]=\"rows\"\n [enableAttachments]=\"enableAttachments\"\n [maxAttachments]=\"maxAttachments\"\n [maxAttachmentSizeBytes]=\"maxAttachmentSizeBytes\"\n [acceptedFileTypes]=\"acceptedFileTypes\"\n [enableRealtime]=\"enableRealtime\"\n [voiceActive]=\"voiceActive\"\n [canStartRealtime]=\"canStartRealtime\"\n [enablePlanMode]=\"enablePlanMode\"\n [planModeActive]=\"planModeActive\"\n (textSubmitted)=\"textSubmitted.emit($event)\"\n (blurred)=\"blurred.emit()\"\n (valueChange)=\"onInnerValueChange($event)\"\n (attachmentsChanged)=\"attachmentsChanged.emit($event)\"\n (attachmentError)=\"attachmentError.emit($event)\"\n (attachmentClicked)=\"attachmentClicked.emit($event)\"\n (voiceRequested)=\"voiceRequested.emit()\"\n (voiceOptionsRequested)=\"voiceOptionsRequested.emit()\"\n (planModeToggle)=\"planModeToggle.emit()\">\n </mj-message-input-box>\n `\n})\nexport class AiComposerComponent {\n @ViewChild('inputBox') inputBox?: MessageInputBoxComponent;\n\n // ── AI convenience flags (the wrapper's reason to exist) ─────────────────────────\n private _enableAgentMentions: boolean = true;\n private _enableEntityMentions: boolean = true;\n private _enableSkillCommands: boolean = true;\n private _activeTriggerProviders: ComposerTriggerProvider[] = [];\n\n // One instance per plugin per composer — all instances share the singleton\n // MentionAutocompleteService engine, so there is no duplicate cache warm-up.\n private readonly agentMentionProvider = new AgentMentionProvider();\n private readonly recordMentionProvider = new RecordMentionProvider();\n private readonly skillCommandProvider = new SkillCommandProvider();\n\n constructor() {\n this.rebuildTriggerProviders();\n }\n\n /** Enables the '@' trigger (agent + user mentions). */\n @Input()\n set EnableAgentMentions(value: boolean) {\n if (value !== this._enableAgentMentions) {\n this._enableAgentMentions = value;\n this.rebuildTriggerProviders();\n }\n }\n get EnableAgentMentions(): boolean {\n return this._enableAgentMentions;\n }\n\n /** Enables the '#' trigger (entity + query record mentions). */\n @Input()\n set EnableEntityMentions(value: boolean) {\n if (value !== this._enableEntityMentions) {\n this._enableEntityMentions = value;\n this.rebuildTriggerProviders();\n }\n }\n get EnableEntityMentions(): boolean {\n return this._enableEntityMentions;\n }\n\n /** Enables the '/' trigger (skill commands). */\n @Input()\n set EnableSkillCommands(value: boolean) {\n if (value !== this._enableSkillCommands) {\n this._enableSkillCommands = value;\n this.rebuildTriggerProviders();\n }\n }\n get EnableSkillCommands(): boolean {\n return this._enableSkillCommands;\n }\n\n /** The explicit provider list bound to the inner editor (stable reference; rebuilt only when a flag flips). */\n public get ActiveTriggerProviders(): ComposerTriggerProvider[] {\n return this._activeTriggerProviders;\n }\n\n private rebuildTriggerProviders(): void {\n const providers: ComposerTriggerProvider[] = [];\n if (this._enableAgentMentions) providers.push(this.agentMentionProvider);\n if (this._enableEntityMentions) providers.push(this.recordMentionProvider);\n if (this._enableSkillCommands) providers.push(this.skillCommandProvider);\n this._activeTriggerProviders = providers;\n }\n\n // ── Proxied inputs (identical names/defaults to MessageInputBoxComponent) ────────\n @Input() placeholder: string = 'Type your message to start a new conversation...';\n @Input() disabled: boolean = false;\n @Input() value: string = '';\n @Input() showCharacterCount: boolean = false;\n /** Master switch for all mention/command triggers (pass-through). */\n @Input() enableMentions: boolean = true;\n /** Optional metadata provider scoping this composer (pass-through to the trigger plugins). */\n @Input() Provider: IMetadataProvider | null = null;\n @Input() currentUser?: UserInfo;\n @Input() rows: number = 3;\n @Input() enableAttachments: boolean = true;\n @Input() maxAttachments: number = 10;\n @Input() maxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB\n @Input() acceptedFileTypes: string = 'image/*';\n @Input() enableRealtime: boolean = false;\n @Input() voiceActive: boolean = false;\n @Input() canStartRealtime: boolean = true;\n @Input() enablePlanMode: boolean = false;\n @Input() planModeActive: boolean = false;\n\n // ── Proxied outputs ───────────────────────────────────────────────────────────────\n @Output() textSubmitted = new EventEmitter<string>();\n /** Composer lost focus — hosts persist drafts on this. */\n @Output() blurred = new EventEmitter<void>();\n @Output() valueChange = new EventEmitter<string>();\n @Output() attachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() attachmentError = new EventEmitter<string>();\n @Output() attachmentClicked = new EventEmitter<PendingAttachment>();\n @Output() voiceRequested = new EventEmitter<void>();\n @Output() voiceOptionsRequested = new EventEmitter<void>();\n @Output() planModeToggle = new EventEmitter<void>();\n\n onInnerValueChange(newValue: string): void {\n this.value = newValue;\n this.valueChange.emit(newValue);\n }\n\n // ── Proxied public methods (ViewChild delegation) ─────────────────────────────────\n\n /** The inner mention editor — kept reachable for hosts that drive it directly (e.g. clear-after-programmatic-send). */\n public get mentionEditor(): MentionEditorComponent | undefined {\n return this.inputBox?.mentionEditor;\n }\n\n /** Focus the composer input. */\n /** Inserts a resolved mention chip + space (see MentionEditorComponent.InsertMention). */\n public InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n return this.inputBox?.InsertMention(suggestion, focus) ?? false;\n }\n\n /** Focus with the caret at the end of content. */\n public FocusCaretAtEnd(): boolean {\n return this.inputBox?.FocusCaretAtEnd() ?? false;\n }\n\n public focus(): void {\n this.inputBox?.focus();\n }\n\n /** Clear the editor content and pending attachments. */\n public clear(): void {\n this.inputBox?.mentionEditor?.clear();\n }\n\n /** Mention chip data (id/type/name + preset info) currently in the editor. */\n public getMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n return this.inputBox?.getMentionChipsData() || [];\n }\n\n /** Plain text with mentions encoded as JSON (`@{\"type\":...}`) — the persistence format. */\n public getPlainTextWithJsonMentions(): string {\n return this.inputBox?.mentionEditor?.getPlainTextWithJsonMentions() || '';\n }\n\n /** Pending (not yet uploaded) attachments. */\n public getPendingAttachments(): PendingAttachment[] {\n return this.inputBox?.getPendingAttachments() || [];\n }\n\n /** Open the attachment file picker programmatically. */\n public openFilePicker(): void {\n this.inputBox?.openFilePicker();\n }\n\n /** Attach an artifact as a pending attachment (artifact picker flow). */\n public AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment | undefined {\n return this.inputBox?.AddArtifactAttachment(artifact);\n }\n}\n"]}
1
+ {"version":3,"file":"ai-composer.component.js","sourceRoot":"","sources":["../../../../src/lib/components/composer/ai-composer.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AASlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gD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Q,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCT;aACF;;kBAEE,SAAS;mBAAC,UAAU;;kBAmBpB,KAAK;;kBAYL,KAAK;;kBAYL,KAAK;;kBAyBL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,KAAK;;kBAEL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,MAAM;;kBAEN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAQN,MAAM;;kBACN,MAAM;;kFA5GI,mBAAmB","sourcesContent":["import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';\nimport { IMetadataProvider, UserInfo } from '@memberjunction/core';\nimport { MentionSuggestion,\n ComposerTriggerProvider,\n MentionEditorComponent,\n MessageInputBoxComponent,\n PendingAttachment,\n BeforeSkillsOpenedEventArgs\n} from '@memberjunction/ng-composer';\nimport { AgentMentionProvider } from '../../composer-plugins/agent-mention.provider';\nimport { RecordMentionProvider } from '../../composer-plugins/record-mention.provider';\nimport { SkillCommandProvider } from '../../composer-plugins/skill-command.provider';\n\n/**\n * AI-aware composer: wraps the generic `<mj-message-input-box>` (from\n * `@memberjunction/ng-composer`, which ships zero AI knowledge) and builds the AI\n * trigger plugins in — '@' agent/user mentions, '#' entity/query record mentions, and\n * '/' skill commands — while proxying the input box's full surface (inputs, outputs,\n * and public methods).\n *\n * The familiar granular flags live HERE now:\n * - `EnableAgentMentions` (default true) — the '@' trigger\n * - `EnableEntityMentions` (default true) — the '#' trigger\n * - `EnableSkillCommands` (default true) — the '/' trigger\n * plus the pass-through `enableMentions` master switch.\n *\n * The wrapper always runs the inner editor in EXPLICIT provider-list mode (it owns the\n * list; it deliberately does not proxy `TriggerProviders` / `ExcludedTriggerKeys` — use\n * the raw `<mj-message-input-box>` when you need custom providers or discovery mode).\n */\n@Component({\n standalone: false,\n selector: 'mj-ai-composer',\n template: `\n <mj-message-input-box\n #inputBox\n [Placeholder]=\"placeholder\"\n [Disabled]=\"disabled\"\n [Value]=\"value\"\n [ShowCharacterCount]=\"showCharacterCount\"\n [EnableMentions]=\"enableMentions\"\n [TriggerProviders]=\"ActiveTriggerProviders\"\n [Provider]=\"Provider\"\n [CurrentUser]=\"currentUser\"\n [Rows]=\"rows\"\n [EnableAttachments]=\"enableAttachments\"\n [MaxAttachments]=\"maxAttachments\"\n [MaxAttachmentSizeBytes]=\"maxAttachmentSizeBytes\"\n [AcceptedFileTypes]=\"acceptedFileTypes\"\n [EnableRealtime]=\"enableRealtime\"\n [VoiceActive]=\"voiceActive\"\n [CanStartRealtime]=\"canStartRealtime\"\n [EnablePlanMode]=\"enablePlanMode\"\n [EnableSkills]=\"EnableSkillCommands\"\n [PlanModeActive]=\"planModeActive\"\n (TextSubmitted)=\"textSubmitted.emit($event)\"\n (Blurred)=\"blurred.emit()\"\n (ValueChange)=\"onInnerValueChange($event)\"\n (AttachmentsChanged)=\"attachmentsChanged.emit($event)\"\n (AttachmentError)=\"attachmentError.emit($event)\"\n (AttachmentClicked)=\"attachmentClicked.emit($event)\"\n (VoiceRequested)=\"voiceRequested.emit()\"\n (VoiceOptionsRequested)=\"voiceOptionsRequested.emit()\"\n (PlanModeToggle)=\"planModeToggle.emit()\"\n (BeforeSkillsOpened)=\"beforeSkillsOpened.emit($event)\"\n (AfterSkillsOpened)=\"afterSkillsOpened.emit()\">\n </mj-message-input-box>\n `\n})\nexport class AiComposerComponent {\n @ViewChild('inputBox') inputBox?: MessageInputBoxComponent;\n\n // ── AI convenience flags (the wrapper's reason to exist) ─────────────────────────\n private _enableAgentMentions: boolean = true;\n private _enableEntityMentions: boolean = true;\n private _enableSkillCommands: boolean = true;\n private _activeTriggerProviders: ComposerTriggerProvider[] = [];\n\n // One instance per plugin per composer — all instances share the singleton\n // MentionAutocompleteService engine, so there is no duplicate cache warm-up.\n private readonly agentMentionProvider = new AgentMentionProvider();\n private readonly recordMentionProvider = new RecordMentionProvider();\n private readonly skillCommandProvider = new SkillCommandProvider();\n\n constructor() {\n this.rebuildTriggerProviders();\n }\n\n /** Enables the '@' trigger (agent + user mentions). */\n @Input()\n set EnableAgentMentions(value: boolean) {\n if (value !== this._enableAgentMentions) {\n this._enableAgentMentions = value;\n this.rebuildTriggerProviders();\n }\n }\n get EnableAgentMentions(): boolean {\n return this._enableAgentMentions;\n }\n\n /** Enables the '#' trigger (entity + query record mentions). */\n @Input()\n set EnableEntityMentions(value: boolean) {\n if (value !== this._enableEntityMentions) {\n this._enableEntityMentions = value;\n this.rebuildTriggerProviders();\n }\n }\n get EnableEntityMentions(): boolean {\n return this._enableEntityMentions;\n }\n\n /** Enables the '/' trigger (skill commands). */\n @Input()\n set EnableSkillCommands(value: boolean) {\n if (value !== this._enableSkillCommands) {\n this._enableSkillCommands = value;\n this.rebuildTriggerProviders();\n }\n }\n get EnableSkillCommands(): boolean {\n return this._enableSkillCommands;\n }\n\n /** The explicit provider list bound to the inner editor (stable reference; rebuilt only when a flag flips). */\n public get ActiveTriggerProviders(): ComposerTriggerProvider[] {\n return this._activeTriggerProviders;\n }\n\n private rebuildTriggerProviders(): void {\n const providers: ComposerTriggerProvider[] = [];\n if (this._enableAgentMentions) providers.push(this.agentMentionProvider);\n if (this._enableEntityMentions) providers.push(this.recordMentionProvider);\n if (this._enableSkillCommands) providers.push(this.skillCommandProvider);\n this._activeTriggerProviders = providers;\n }\n\n // ── Proxied inputs (identical names/defaults to MessageInputBoxComponent) ────────\n @Input() placeholder: string = 'Type your message to start a new conversation...';\n @Input() disabled: boolean = false;\n @Input() value: string = '';\n @Input() showCharacterCount: boolean = false;\n /** Master switch for all mention/command triggers (pass-through). */\n @Input() enableMentions: boolean = true;\n /** Optional metadata provider scoping this composer (pass-through to the trigger plugins). */\n @Input() Provider: IMetadataProvider | null = null;\n @Input() currentUser?: UserInfo;\n @Input() rows: number = 3;\n @Input() enableAttachments: boolean = true;\n @Input() maxAttachments: number = 10;\n @Input() maxAttachmentSizeBytes: number = 20 * 1024 * 1024; // 20MB\n @Input() acceptedFileTypes: string = 'image/*';\n @Input() enableRealtime: boolean = false;\n @Input() voiceActive: boolean = false;\n @Input() canStartRealtime: boolean = true;\n @Input() enablePlanMode: boolean = false;\n @Input() planModeActive: boolean = false;\n\n // ── Proxied outputs ───────────────────────────────────────────────────────────────\n @Output() textSubmitted = new EventEmitter<string>();\n /** Composer lost focus — hosts persist drafts on this. */\n @Output() blurred = new EventEmitter<void>();\n @Output() valueChange = new EventEmitter<string>();\n @Output() attachmentsChanged = new EventEmitter<PendingAttachment[]>();\n @Output() attachmentError = new EventEmitter<string>();\n @Output() attachmentClicked = new EventEmitter<PendingAttachment>();\n @Output() voiceRequested = new EventEmitter<void>();\n @Output() voiceOptionsRequested = new EventEmitter<void>();\n @Output() planModeToggle = new EventEmitter<void>();\n /**\n * Before/After pair for the Skills button, proxied straight through from the input box. Gated on\n * `EnableSkillCommands` — the button and the keystroke are two doors to the same feature, so one\n * flag governs both rather than letting a composer advertise skills it will not serve.\n *\n * Cancel on `beforeSkillsOpened` vetoes the dropdown; `afterSkillsOpened` then does not fire.\n */\n @Output() beforeSkillsOpened = new EventEmitter<BeforeSkillsOpenedEventArgs>();\n @Output() afterSkillsOpened = new EventEmitter<void>();\n\n onInnerValueChange(newValue: string): void {\n this.value = newValue;\n this.valueChange.emit(newValue);\n }\n\n // ── Proxied public methods (ViewChild delegation) ─────────────────────────────────\n\n /** The inner mention editor — kept reachable for hosts that drive it directly (e.g. clear-after-programmatic-send). */\n public get mentionEditor(): MentionEditorComponent | undefined {\n return this.inputBox?.mentionEditor;\n }\n\n /** Focus the composer input. */\n /** Inserts a resolved mention chip + space (see MentionEditorComponent.InsertMention). */\n public InsertMention(suggestion: MentionSuggestion, focus: boolean = true): boolean {\n return this.inputBox?.InsertMention(suggestion, focus) ?? false;\n }\n\n /** Focus with the caret at the end of content. */\n public FocusCaretAtEnd(): boolean {\n return this.inputBox?.FocusCaretAtEnd() ?? false;\n }\n\n public focus(): void {\n this.inputBox?.focus();\n }\n\n /** Clear the editor content and pending attachments. */\n public clear(): void {\n this.inputBox?.mentionEditor?.clear();\n }\n\n /** Mention chip data (id/type/name + preset info) currently in the editor. */\n public getMentionChipsData(): Array<{ id: string; type: string; name: string; presetId?: string; presetName?: string }> {\n return this.inputBox?.GetMentionChipsData() || [];\n }\n\n /** Plain text with mentions encoded as JSON (`@{\"type\":...}`) — the persistence format. */\n public getPlainTextWithJsonMentions(): string {\n return this.inputBox?.mentionEditor?.getPlainTextWithJsonMentions() || '';\n }\n\n /** Pending (not yet uploaded) attachments. */\n public getPendingAttachments(): PendingAttachment[] {\n return this.inputBox?.GetPendingAttachments() || [];\n }\n\n /** Open the attachment file picker programmatically. */\n public openFilePicker(): void {\n this.inputBox?.OpenFilePicker();\n }\n\n /** Attach an artifact as a pending attachment (artifact picker flow). */\n public AddArtifactAttachment(artifact: {\n fileID: string; fileName: string; mimeType: string;\n sizeBytes: number; artifactVersionId?: string;\n }): PendingAttachment | undefined {\n return this.inputBox?.AddArtifactAttachment(artifact);\n }\n}\n"]}