@acorex-platform/extension-ai-conversation-client 0.0.46 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-CTr53paj.mjs → acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-DfdGeEG4.mjs} +262 -95
- package/fesm2022/acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-DfdGeEG4.mjs.map +1 -0
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-DIwe0Kes.mjs → acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-B6QodNVg.mjs} +2 -2
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-DIwe0Kes.mjs.map → acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-B6QodNVg.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-start-assist-chat.command-CQM2377i.mjs → acorex-platform-extension-ai-conversation-client-start-assist-chat.command-zQPeOCRi.mjs} +2 -2
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-start-assist-chat.command-CQM2377i.mjs.map → acorex-platform-extension-ai-conversation-client-start-assist-chat.command-zQPeOCRi.mjs.map} +1 -1
- package/fesm2022/acorex-platform-extension-ai-conversation-client.mjs +1 -1
- package/package.json +3 -3
- package/types/acorex-platform-extension-ai-conversation-client.d.ts +8 -1
- package/fesm2022/acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-CTr53paj.mjs.map +0 -1
|
@@ -2,7 +2,7 @@ import { AXP_SEARCH_PROVIDER, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex-pla
|
|
|
2
2
|
import * as i1$1 from '@acorex-platform/framework-client/core';
|
|
3
3
|
import { AXPComponentSlotModule, provideAppStartUpTask, AXP_APP_STARTUP_PRIORITY } from '@acorex-platform/framework-client/core';
|
|
4
4
|
import { AXPCommandService, AXPRuntimeTransportService, provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
5
|
-
import { AXM_AI_MANAGEMENT_MODULE_NAME, AXM_AI_MANAGEMENT_ASSIST_ENTITY_NAME, AXMEntityChatService, AXMConversationEntityStoreService, axmChatAiTargetDisplayName, axmChatAiTargetDisplayDescription, axmChatAiTargetAvatarUrl, axmFilterChatAiTargets, axmChatAiPeerParticipantId, axmBuildAiChatConversationMetadata, axmEntityRefFromLaunchContext, CONVERSATION_START_ASSIST_CHAT_COMMAND, axmChatAiTargetShortcutDescriptionKey, AXMChatEmptyAssistSessionService, AXM_ASSIST_DEFAULT_RESOLVER_PORT, axmAssistStarterPromptChipItems, AXMAssistSuggestionChipsComponent, AXMChatComposerAssistPickerComponent, AXM_CHAT_EMPTY_STATE_COMPONENT, AXM_MINI_CHAT_INBOX_CONVERSATION_FILTER, axmConversationHasAiChat, AXMConversationFocusService, axmIsAssistRetryableStatus, axmReadAssistResponseStatus, axmReadReplyToUserMessageId, axmMessageEntityToMessage, axmAssistPersistedMessageLooksComplete, axmShouldPreferPersistedAssistOverLiveCache, axmRoomWithAssistPeerDisplayName, axmSyncAssistPeerDisplayName, axmRoomEntityToConversation, axmIsAssistTerminalStatus, CONVERSATION_SYNC_READ_STATE_COMMAND, axmAssistHasFinalizeMetadata, AXM_CHAT_SIDEBAR_ACTION_PROVIDER, AXMMiniChatPanelService, AXMMiniChatFooterDockComponent, AXMMiniChatHeaderSlotComponent, AXM_CONVERSATION_ASSIST_RESPONSE_PORT, AXM_CHAT_ASSIST_CATALOG_PORT, AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS, CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND } from '@acorex-platform/module-conversation-client';
|
|
5
|
+
import { AXM_AI_MANAGEMENT_MODULE_NAME, AXM_AI_MANAGEMENT_ASSIST_ENTITY_NAME, AXMEntityChatService, AXMConversationEntityStoreService, axmChatAiTargetDisplayName, axmChatAiTargetDisplayDescription, axmChatAiTargetAvatarUrl, axmFilterChatAiTargets, axmChatAiPeerParticipantId, axmBuildAiChatConversationMetadata, axmEntityRefFromLaunchContext, axmEntityRefForMiniChatPageContext, CONVERSATION_START_ASSIST_CHAT_COMMAND, axmChatAiTargetShortcutDescriptionKey, AXMChatEmptyAssistSessionService, AXM_ASSIST_DEFAULT_RESOLVER_PORT, AXMMiniChatFileDropService, axmAssistStarterPromptChipItems, AXMAssistSuggestionChipsComponent, AXMChatComposerAssistPickerComponent, AXM_CHAT_EMPTY_STATE_COMPONENT, AXM_MINI_CHAT_INBOX_CONVERSATION_FILTER, axmConversationHasAiChat, AXMConversationFocusService, axmIsAssistRetryableStatus, axmReadAssistResponseStatus, axmReadReplyToUserMessageId, axmMessageEntityToMessage, axmAssistPersistedMessageLooksComplete, axmShouldPreferPersistedAssistOverLiveCache, axmRoomWithAssistPeerDisplayName, axmSyncAssistPeerDisplayName, axmRoomEntityToConversation, axmIsAssistTerminalStatus, CONVERSATION_SYNC_READ_STATE_COMMAND, axmAssistHasFinalizeMetadata, AXM_CHAT_SIDEBAR_ACTION_PROVIDER, AXMMiniChatPanelService, AXMMiniChatFooterDockComponent, AXMMiniChatHeaderSlotComponent, AXM_CONVERSATION_ASSIST_RESPONSE_PORT, AXM_CHAT_ASSIST_CATALOG_PORT, AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS, CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND } from '@acorex-platform/module-conversation-client';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { inject, Injectable, DestroyRef, viewChild, output, input, computed, signal, effect, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
8
8
|
import { AXPSystemActionType, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
|
|
@@ -243,7 +243,7 @@ class AXMChatAssistLauncherService {
|
|
|
243
243
|
if (launchContext) {
|
|
244
244
|
metadata[AXM_ASSIST_LAUNCH_CONTEXT_METADATA_KEY] = axmSanitizeContextualAssistContext(launchContext);
|
|
245
245
|
}
|
|
246
|
-
const entityRef = axmEntityRefFromLaunchContext(launchContext);
|
|
246
|
+
const entityRef = axmEntityRefFromLaunchContext(launchContext) ?? axmEntityRefForMiniChatPageContext(launchContext);
|
|
247
247
|
if (entityRef) {
|
|
248
248
|
return this.entityChatService.createEntityChat(entityRef, row.id, metadata);
|
|
249
249
|
}
|
|
@@ -354,6 +354,8 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
354
354
|
this.conversationService = inject(AXConversationService);
|
|
355
355
|
this.defaultAssistResolver = inject(AXM_ASSIST_DEFAULT_RESOLVER_PORT, { optional: true });
|
|
356
356
|
this.destroyRef = inject(DestroyRef);
|
|
357
|
+
this.fileDrop = inject(AXMMiniChatFileDropService);
|
|
358
|
+
this.unregisterEmptyDraft = null;
|
|
357
359
|
this.draftInput = viewChild('draftInput', /* @ts-ignore */
|
|
358
360
|
...(ngDevMode ? [{ debugName: "draftInput" }] : /* istanbul ignore next */ []));
|
|
359
361
|
this.fileInput = viewChild('fileInput', /* @ts-ignore */
|
|
@@ -363,6 +365,10 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
363
365
|
this.conversationCreated = output();
|
|
364
366
|
this.initialAssistId = input(undefined, /* @ts-ignore */
|
|
365
367
|
...(ngDevMode ? [{ debugName: "initialAssistId" }] : /* istanbul ignore next */ []));
|
|
368
|
+
this.assistSelection = input('optional', /* @ts-ignore */
|
|
369
|
+
...(ngDevMode ? [{ debugName: "assistSelection" }] : /* istanbul ignore next */ []));
|
|
370
|
+
this.acceptExternalFileDrop = input(false, /* @ts-ignore */
|
|
371
|
+
...(ngDevMode ? [{ debugName: "acceptExternalFileDrop" }] : /* istanbul ignore next */ []));
|
|
366
372
|
this.entityId = input(undefined, /* @ts-ignore */
|
|
367
373
|
...(ngDevMode ? [{ debugName: "entityId" }] : /* istanbul ignore next */ []));
|
|
368
374
|
this.entityType = input(undefined, /* @ts-ignore */
|
|
@@ -403,9 +409,17 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
403
409
|
this.maxDraftFiles = MAX_EMPTY_DRAFT_FILES;
|
|
404
410
|
this.isBusy = computed(() => this.sending() || this.loading(), /* @ts-ignore */
|
|
405
411
|
...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
|
|
406
|
-
this.
|
|
407
|
-
|
|
408
|
-
|
|
412
|
+
this.asksForAssist = computed(() => this.assistSelection() === 'ask' && !this.selectedAssistId(), /* @ts-ignore */
|
|
413
|
+
...(ngDevMode ? [{ debugName: "asksForAssist" }] : /* istanbul ignore next */ []));
|
|
414
|
+
this.canSend = computed(() => {
|
|
415
|
+
if (this.isBusy() || !this.hasDraftContent()) {
|
|
416
|
+
return false;
|
|
417
|
+
}
|
|
418
|
+
if (this.selectedAssistId()) {
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
return this.canResolveAssist();
|
|
422
|
+
}, /* @ts-ignore */
|
|
409
423
|
...(ngDevMode ? [{ debugName: "canSend" }] : /* istanbul ignore next */ []));
|
|
410
424
|
this.selectedAssistLabel = computed(() => {
|
|
411
425
|
const selected = this.rows().find((row) => row.id === this.selectedAssistId());
|
|
@@ -413,6 +427,9 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
413
427
|
}, /* @ts-ignore */
|
|
414
428
|
...(ngDevMode ? [{ debugName: "selectedAssistLabel" }] : /* istanbul ignore next */ []));
|
|
415
429
|
this.draftPlaceholder = computed(() => {
|
|
430
|
+
if (this.asksForAssist()) {
|
|
431
|
+
return this.translationService.translateSync('@conversation:mini-chat.choose-assist.placeholder');
|
|
432
|
+
}
|
|
416
433
|
if (this.compact()) {
|
|
417
434
|
return this.translationService.translateSync('@conversation:mini-chat.composer.placeholder');
|
|
418
435
|
}
|
|
@@ -425,6 +442,7 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
425
442
|
this.assistsLoadPromise = null;
|
|
426
443
|
this.starterPromptsLoadGeneration = 0;
|
|
427
444
|
this.starterAbort = null;
|
|
445
|
+
this.askAssistCleared = false;
|
|
428
446
|
//#endregion
|
|
429
447
|
//#region ----- Event Handlers -----
|
|
430
448
|
this.onAssistConversationCreated = (conversationId) => {
|
|
@@ -436,12 +454,53 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
436
454
|
};
|
|
437
455
|
void this.ensureAssistsLoaded();
|
|
438
456
|
this.destroyRef.onDestroy(() => {
|
|
457
|
+
this.unregisterEmptyDraft?.();
|
|
439
458
|
this.starterAbort?.abort();
|
|
440
459
|
this.clearDraftFiles();
|
|
441
460
|
this.emptyAssistSession.closeAssistPicker();
|
|
442
461
|
});
|
|
462
|
+
effect(() => {
|
|
463
|
+
if (!this.acceptExternalFileDrop()) {
|
|
464
|
+
this.unregisterEmptyDraft?.();
|
|
465
|
+
this.unregisterEmptyDraft = null;
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
if (this.unregisterEmptyDraft) {
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
this.unregisterEmptyDraft = this.fileDrop.registerEmptyDraftAdder((files) => this.addDraftFiles(files));
|
|
472
|
+
});
|
|
473
|
+
// Header inbox (`ask`) must not inherit a leftover assist from another surface.
|
|
474
|
+
// Drop that leftover once. A Global AI Settings default, or a later pick, must stick.
|
|
475
|
+
effect(() => {
|
|
476
|
+
const mode = this.assistSelection();
|
|
477
|
+
if (mode !== 'ask') {
|
|
478
|
+
this.askAssistCleared = false;
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
if (this.askAssistCleared) {
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
this.askAssistCleared = true;
|
|
485
|
+
this.emptyAssistSession.setSelectedAssistId(this.selectedAssistId()?.trim());
|
|
486
|
+
});
|
|
487
|
+
effect(() => {
|
|
488
|
+
if (this.assistSelection() !== 'locked' || this.loading()) {
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
const requestedId = this.initialAssistId()?.trim();
|
|
492
|
+
if (!requestedId || !this.rows().some((row) => row.id === requestedId)) {
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
if (this.selectedAssistId() !== requestedId) {
|
|
496
|
+
this.selectedAssistId.set(requestedId);
|
|
497
|
+
}
|
|
498
|
+
});
|
|
443
499
|
effect(() => {
|
|
444
500
|
const sessionAssistId = this.emptyAssistSession.selectedAssistId();
|
|
501
|
+
if (this.assistSelection() === 'ask' && !sessionAssistId) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
445
504
|
if (sessionAssistId && sessionAssistId !== this.selectedAssistId()) {
|
|
446
505
|
this.selectedAssistId.set(sessionAssistId);
|
|
447
506
|
}
|
|
@@ -453,6 +512,7 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
453
512
|
entityId: this.entityId(),
|
|
454
513
|
entityType: this.entityType(),
|
|
455
514
|
launchContext: this.launchContext(),
|
|
515
|
+
assistSelection: this.assistSelection(),
|
|
456
516
|
});
|
|
457
517
|
});
|
|
458
518
|
effect(() => {
|
|
@@ -482,25 +542,23 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
482
542
|
}
|
|
483
543
|
const selected = Array.from(input.files ?? []);
|
|
484
544
|
input.value = '';
|
|
485
|
-
|
|
545
|
+
this.addDraftFiles(selected);
|
|
546
|
+
}
|
|
547
|
+
addDraftFiles(files) {
|
|
548
|
+
if (files.length === 0 || this.isBusy()) {
|
|
486
549
|
return;
|
|
487
550
|
}
|
|
488
551
|
const remaining = Math.max(0, MAX_EMPTY_DRAFT_FILES - this.draftFiles().length);
|
|
489
|
-
const accepted =
|
|
552
|
+
const accepted = files.slice(0, remaining);
|
|
490
553
|
if (accepted.length === 0) {
|
|
491
554
|
return;
|
|
492
555
|
}
|
|
493
|
-
this.draftFiles.update((current) => [
|
|
494
|
-
...current,
|
|
495
|
-
...accepted.map((file) => this.toDraftFile(file)),
|
|
496
|
-
]);
|
|
556
|
+
this.draftFiles.update((current) => [...current, ...accepted.map((file) => this.toDraftFile(file))]);
|
|
497
557
|
}
|
|
498
558
|
removeDraftFile(id) {
|
|
499
559
|
const current = this.draftFiles();
|
|
500
560
|
const next = current.filter((item) => item.id !== id);
|
|
501
|
-
current
|
|
502
|
-
.filter((item) => item.id === id)
|
|
503
|
-
.forEach((item) => this.revokePreview(item.preview));
|
|
561
|
+
current.filter((item) => item.id === id).forEach((item) => this.revokePreview(item.preview));
|
|
504
562
|
this.draftFiles.set(next);
|
|
505
563
|
}
|
|
506
564
|
resizeDraftInput() {
|
|
@@ -524,6 +582,10 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
524
582
|
if (!this.canSend()) {
|
|
525
583
|
return;
|
|
526
584
|
}
|
|
585
|
+
const assistId = await this.ensureSelectedAssist();
|
|
586
|
+
if (!assistId) {
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
527
589
|
const text = this.draftText();
|
|
528
590
|
const files = this.draftFiles().map((item) => item.file);
|
|
529
591
|
this.sending.set(true);
|
|
@@ -586,7 +648,7 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
586
648
|
rows = await this.assistCatalog.loadCatalogTargets(true);
|
|
587
649
|
}
|
|
588
650
|
this.rows.set(rows);
|
|
589
|
-
this.selectedAssistId.set(await this.
|
|
651
|
+
this.selectedAssistId.set(await this.resolveAssistIdForMode(rows));
|
|
590
652
|
}
|
|
591
653
|
catch (error) {
|
|
592
654
|
console.error('Failed to load AI chat targets (empty composer):', error);
|
|
@@ -599,17 +661,99 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
599
661
|
this.loading.set(false);
|
|
600
662
|
}
|
|
601
663
|
}
|
|
602
|
-
|
|
603
|
-
|
|
664
|
+
hasDraftContent() {
|
|
665
|
+
return this.draftText().trim().length > 0 || this.draftFiles().length > 0;
|
|
666
|
+
}
|
|
667
|
+
canResolveAssist() {
|
|
668
|
+
if (this.assistSelection() === 'ask') {
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
const rows = this.rows();
|
|
672
|
+
if (this.assistSelection() === 'locked') {
|
|
673
|
+
const requestedId = this.initialAssistId()?.trim();
|
|
674
|
+
return !!requestedId && rows.some((row) => row.id === requestedId);
|
|
675
|
+
}
|
|
676
|
+
return rows.length > 0;
|
|
677
|
+
}
|
|
678
|
+
async ensureSelectedAssist() {
|
|
679
|
+
const current = this.selectedAssistId()?.trim();
|
|
680
|
+
if (current) {
|
|
681
|
+
this.emptyAssistSession.setSelectedAssistId(current);
|
|
682
|
+
return current;
|
|
683
|
+
}
|
|
684
|
+
const assistId = await this.resolveAssistIdForMode(this.rows());
|
|
685
|
+
if (!assistId) {
|
|
604
686
|
return undefined;
|
|
687
|
+
}
|
|
688
|
+
this.selectedAssistId.set(assistId);
|
|
689
|
+
this.emptyAssistSession.setSelectedAssistId(assistId);
|
|
690
|
+
return assistId;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Header (`ask`) uses Global AI Settings → Default Assist.
|
|
694
|
+
* Form designer (`locked`) uses the assist id passed in (Form Designer → Default Assist).
|
|
695
|
+
*/
|
|
696
|
+
async resolveAssistIdForMode(rows) {
|
|
605
697
|
const requestedId = this.initialAssistId()?.trim();
|
|
606
|
-
|
|
607
|
-
|
|
698
|
+
const mode = this.assistSelection();
|
|
699
|
+
if (mode === 'locked') {
|
|
700
|
+
return requestedId ? this.includeAssistRow(rows, requestedId) : undefined;
|
|
701
|
+
}
|
|
702
|
+
if (requestedId) {
|
|
703
|
+
const matched = await this.includeAssistRow(rows, requestedId);
|
|
704
|
+
if (matched) {
|
|
705
|
+
return matched;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
if (mode === 'ask') {
|
|
709
|
+
const defaultAssistId = await this.resolveDefaultAssistId();
|
|
710
|
+
return defaultAssistId ? this.includeAssistRow(rows, defaultAssistId) : undefined;
|
|
711
|
+
}
|
|
712
|
+
if (!rows.length) {
|
|
713
|
+
return undefined;
|
|
714
|
+
}
|
|
608
715
|
const defaultAssistId = await this.resolveDefaultAssistId();
|
|
609
|
-
if (defaultAssistId
|
|
610
|
-
|
|
716
|
+
if (defaultAssistId) {
|
|
717
|
+
const matched = await this.includeAssistRow(rows, defaultAssistId);
|
|
718
|
+
if (matched) {
|
|
719
|
+
return matched;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
611
722
|
return rows[0]?.id;
|
|
612
723
|
}
|
|
724
|
+
/** Keeps a settings assist selectable even when it is outside the first catalog page. */
|
|
725
|
+
async includeAssistRow(rows, assistId) {
|
|
726
|
+
const id = assistId.trim();
|
|
727
|
+
if (!id) {
|
|
728
|
+
return undefined;
|
|
729
|
+
}
|
|
730
|
+
if (rows.some((row) => row.id === id) || this.rows().some((row) => row.id === id)) {
|
|
731
|
+
return id;
|
|
732
|
+
}
|
|
733
|
+
try {
|
|
734
|
+
const assist = await this.assistCatalog.getAssist(id);
|
|
735
|
+
const resolvedId = assist?.id?.trim();
|
|
736
|
+
if (!assist || !resolvedId) {
|
|
737
|
+
return undefined;
|
|
738
|
+
}
|
|
739
|
+
if (!this.rows().some((row) => row.id === resolvedId)) {
|
|
740
|
+
this.rows.update((current) => [
|
|
741
|
+
...current,
|
|
742
|
+
{
|
|
743
|
+
id: resolvedId,
|
|
744
|
+
name: String(assist.name ?? ''),
|
|
745
|
+
title: assist.title ?? assist.name ?? resolvedId,
|
|
746
|
+
description: assist.description,
|
|
747
|
+
professionImageUrl: assist.professionImageUrl,
|
|
748
|
+
},
|
|
749
|
+
]);
|
|
750
|
+
}
|
|
751
|
+
return resolvedId;
|
|
752
|
+
}
|
|
753
|
+
catch {
|
|
754
|
+
return undefined;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
613
757
|
async resolveDefaultAssistId() {
|
|
614
758
|
if (!this.defaultAssistResolver)
|
|
615
759
|
return undefined;
|
|
@@ -722,7 +866,7 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
722
866
|
return labels;
|
|
723
867
|
}
|
|
724
868
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatEmptyAssistComposerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
725
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMChatEmptyAssistComposerComponent, isStandalone: true, selector: "axm-chat-empty-assist-composer", inputs: { initialAssistId: { classPropertyName: "initialAssistId", publicName: "initialAssistId", isSignal: true, isRequired: false, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: false, transformFunction: null }, entityType: { classPropertyName: "entityType", publicName: "entityType", isSignal: true, isRequired: false, transformFunction: null }, sendStarterPromptsInPlace: { classPropertyName: "sendStarterPromptsInPlace", publicName: "sendStarterPromptsInPlace", isSignal: true, isRequired: false, transformFunction: null }, launchContext: { classPropertyName: "launchContext", publicName: "launchContext", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, assistConversationCreated: { classPropertyName: "assistConversationCreated", publicName: "assistConversationCreated", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { conversationCreated: "conversationCreated" }, host: { properties: { "class.axm-chat-empty-assist-composer-host--compact": "compact()", "attr.dir": "textDirection()", "style.direction": "textDirection()" }, classAttribute: "axm-chat-empty-assist-composer-host" }, viewQueries: [{ propertyName: "draftInput", first: true, predicate: ["draftInput"], descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
869
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMChatEmptyAssistComposerComponent, isStandalone: true, selector: "axm-chat-empty-assist-composer", inputs: { initialAssistId: { classPropertyName: "initialAssistId", publicName: "initialAssistId", isSignal: true, isRequired: false, transformFunction: null }, assistSelection: { classPropertyName: "assistSelection", publicName: "assistSelection", isSignal: true, isRequired: false, transformFunction: null }, acceptExternalFileDrop: { classPropertyName: "acceptExternalFileDrop", publicName: "acceptExternalFileDrop", isSignal: true, isRequired: false, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: false, transformFunction: null }, entityType: { classPropertyName: "entityType", publicName: "entityType", isSignal: true, isRequired: false, transformFunction: null }, sendStarterPromptsInPlace: { classPropertyName: "sendStarterPromptsInPlace", publicName: "sendStarterPromptsInPlace", isSignal: true, isRequired: false, transformFunction: null }, launchContext: { classPropertyName: "launchContext", publicName: "launchContext", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, assistConversationCreated: { classPropertyName: "assistConversationCreated", publicName: "assistConversationCreated", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { conversationCreated: "conversationCreated" }, host: { properties: { "class.axm-chat-empty-assist-composer-host--compact": "compact()", "attr.dir": "textDirection()", "style.direction": "textDirection()" }, classAttribute: "axm-chat-empty-assist-composer-host" }, viewQueries: [{ propertyName: "draftInput", first: true, predicate: ["draftInput"], descendants: true, isSignal: true }, { propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
726
870
|
<div class="axm-chat-empty-assist-composer">
|
|
727
871
|
<div class="axm-chat-empty-assist-composer__hero">
|
|
728
872
|
@if (compact()) {
|
|
@@ -731,9 +875,21 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
731
875
|
</span>
|
|
732
876
|
}
|
|
733
877
|
<div class="axm-chat-empty-assist-composer__caption">
|
|
734
|
-
|
|
878
|
+
@if (asksForAssist()) {
|
|
879
|
+
{{ '@conversation:mini-chat.choose-assist.title' | translate | async }}
|
|
880
|
+
}
|
|
881
|
+
<!-- ----- Default welcome when an assist is already chosen or selection is optional ----- -->
|
|
882
|
+
@else {
|
|
883
|
+
{{ (compact() ? '@conversation:mini-chat.empty.title' : '@conversation:chat.empty-assist.caption') | translate | async }}
|
|
884
|
+
}
|
|
735
885
|
</div>
|
|
736
|
-
@if (
|
|
886
|
+
@if (asksForAssist()) {
|
|
887
|
+
<p class="axm-chat-empty-assist-composer__subtitle">
|
|
888
|
+
{{ '@conversation:mini-chat.choose-assist.subtitle' | translate | async }}
|
|
889
|
+
</p>
|
|
890
|
+
}
|
|
891
|
+
<!-- ----- Compact welcome subtitle when the header is not waiting for an assist ----- -->
|
|
892
|
+
@else if (compact()) {
|
|
737
893
|
<p class="axm-chat-empty-assist-composer__subtitle">
|
|
738
894
|
{{ '@conversation:mini-chat.empty.subtitle' | translate | async }}
|
|
739
895
|
</p>
|
|
@@ -786,15 +942,18 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
786
942
|
</button>
|
|
787
943
|
</div>
|
|
788
944
|
}
|
|
789
|
-
<button
|
|
790
|
-
|
|
791
|
-
|
|
945
|
+
<ax-button
|
|
946
|
+
class="axm-chat-empty-assist-composer__attachment-add ax-sm rounded-full"
|
|
947
|
+
look="blank"
|
|
948
|
+
[iconOnly]="true"
|
|
792
949
|
[disabled]="isBusy() || draftFiles().length >= maxDraftFiles"
|
|
793
|
-
[
|
|
794
|
-
(
|
|
950
|
+
[text]="('@acorex:chat.pickers.common.add-more' | translate | async) ?? ''"
|
|
951
|
+
(onClick)="browseDraftFiles()"
|
|
795
952
|
>
|
|
796
|
-
<
|
|
797
|
-
|
|
953
|
+
<ax-prefix>
|
|
954
|
+
<i class="fa-light fa-plus"></i>
|
|
955
|
+
</ax-prefix>
|
|
956
|
+
</ax-button>
|
|
798
957
|
</div>
|
|
799
958
|
</div>
|
|
800
959
|
}
|
|
@@ -812,24 +971,20 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
812
971
|
<i class="fa-light fa-paperclip"></i>
|
|
813
972
|
</ax-prefix>
|
|
814
973
|
</ax-button>
|
|
815
|
-
|
|
816
|
-
class="rounded-full axm-chat-composer-assist-picker"
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
<axm-chat-composer-assist-picker />
|
|
830
|
-
</ax-dropdown-panel>
|
|
831
|
-
}
|
|
832
|
-
</ax-button>
|
|
974
|
+
@if (assistSelection() !== 'locked') {
|
|
975
|
+
<ax-button class="rounded-full axm-chat-composer-assist-picker" look="blank" [iconOnly]="true" [disabled]="isBusy() || rows().length === 0" [text]="('@conversation:chat.empty-assist.assist-default' | translate | async) ?? ''">
|
|
976
|
+
<ax-prefix>
|
|
977
|
+
<i class="fa-light fa-sparkles"></i>
|
|
978
|
+
</ax-prefix>
|
|
979
|
+
<!---->
|
|
980
|
+
<!-- ----- Assist list as a dropdown, not a popup ----- -->
|
|
981
|
+
@if (rows().length > 0) {
|
|
982
|
+
<ax-dropdown-panel>
|
|
983
|
+
<axm-chat-composer-assist-picker />
|
|
984
|
+
</ax-dropdown-panel>
|
|
985
|
+
}
|
|
986
|
+
</ax-button>
|
|
987
|
+
}
|
|
833
988
|
</div>
|
|
834
989
|
<textarea
|
|
835
990
|
#draftInput
|
|
@@ -886,7 +1041,7 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
886
1041
|
</div>
|
|
887
1042
|
}
|
|
888
1043
|
</div>
|
|
889
|
-
`, isInline: true, styles: [":host{display:block;width:100%}:host(.axm-chat-empty-assist-composer-host--compact){display:flex;height:100%;min-height:0}.axm-chat-empty-assist-composer{display:flex;flex-direction:column;gap:1rem;width:min(100%,64rem);margin-inline:auto}.axm-chat-empty-assist-composer__hero{display:flex;flex-direction:column;align-items:center;gap:.625rem}.axm-chat-empty-assist-composer__hero-icon{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.875rem;color:rgb(var(--ax-sys-color-primary-600));background:linear-gradient(145deg,rgba(var(--ax-sys-color-primary-500),.14),rgba(var(--ax-sys-color-primary-500),.04));border:1px solid rgba(var(--ax-sys-color-primary-500),.18)}.axm-chat-empty-assist-composer__composer{position:relative;display:flex;flex-direction:column;width:100%;overflow:hidden;border-radius:2em;border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.axm-chat-empty-assist-composer__attachments{display:flex;align-items:center;width:100%;min-width:0;padding:.
|
|
1044
|
+
`, isInline: true, styles: [":host{display:block;width:100%}:host(.axm-chat-empty-assist-composer-host--compact){display:flex;height:100%;min-height:0}.axm-chat-empty-assist-composer{display:flex;flex-direction:column;gap:1rem;width:min(100%,64rem);margin-inline:auto}.axm-chat-empty-assist-composer__hero{display:flex;flex-direction:column;align-items:center;gap:.625rem}.axm-chat-empty-assist-composer__hero-icon{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.875rem;color:rgb(var(--ax-sys-color-primary-600));background:linear-gradient(145deg,rgba(var(--ax-sys-color-primary-500),.14),rgba(var(--ax-sys-color-primary-500),.04));border:1px solid rgba(var(--ax-sys-color-primary-500),.18)}.axm-chat-empty-assist-composer__composer{position:relative;display:flex;flex-direction:column;width:100%;overflow:hidden;border-radius:2em;border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.axm-chat-empty-assist-composer__attachments{display:flex;align-items:center;width:100%;min-width:0;padding:.125rem .5rem 0;border-bottom:1px solid rgba(var(--ax-sys-color-border-light-surface),.65)}.axm-chat-empty-assist-composer__attachments-scroll{display:flex;flex:1 1 auto;flex-wrap:nowrap;align-items:center;gap:.375rem;min-width:0;width:0;overflow-x:auto;overflow-y:hidden;padding-block:.375rem;scrollbar-width:thin}.axm-chat-empty-assist-composer__attachment{position:relative;display:flex;flex-shrink:0;align-items:center}.axm-chat-empty-assist-composer__attachment--file{width:9.5rem;max-width:9.5rem;height:2rem;gap:.375rem;padding-inline:.375rem .5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-border-light-surface),.85);background:rgb(var(--ax-sys-color-surface))}.axm-chat-empty-assist-composer__attachment-thumb{display:flex;width:2rem;height:2rem;align-items:center;justify-content:center;overflow:hidden;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-border-light-surface),.85);background:rgb(var(--ax-sys-color-surface))}.axm-chat-empty-assist-composer__attachment-thumb img,.axm-chat-empty-assist-composer__attachment-thumb video{width:100%;height:100%;object-fit:cover}.axm-chat-empty-assist-composer__attachment-icon{display:flex;width:1.25rem;height:1.25rem;flex-shrink:0;align-items:center;justify-content:center;font-size:.75rem;color:rgb(var(--ax-sys-color-on-surface));opacity:.72}.axm-chat-empty-assist-composer__attachment-name{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.75rem;color:rgb(var(--ax-sys-color-on-surface))}.axm-chat-empty-assist-composer__attachment-remove{position:absolute;inset-block-start:-.25rem;inset-inline-end:-.25rem;z-index:1;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:none;border-radius:9999px;background:rgb(var(--ax-sys-color-danger-500));color:rgb(var(--ax-sys-color-lightest-surface));font-size:.5rem;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .15s ease}.axm-chat-empty-assist-composer__attachment:hover .axm-chat-empty-assist-composer__attachment-remove,.axm-chat-empty-assist-composer__attachment:focus-within .axm-chat-empty-assist-composer__attachment-remove,.axm-chat-empty-assist-composer__attachment-remove:focus-visible{opacity:1;pointer-events:auto}@media(hover:none){.axm-chat-empty-assist-composer__attachment-remove{opacity:1;pointer-events:auto}}.axm-chat-empty-assist-composer__attachment-add{flex-shrink:0;align-self:center}.axm-chat-empty-assist-composer__attachment-add ax-prefix i{font-size:.875rem;line-height:1}.axm-chat-empty-assist-composer__input-row{display:flex;width:100%;min-width:0;align-items:center;gap:.5rem;padding:.25rem .5rem}.axm-chat-empty-assist-composer__actions-start,.axm-chat-empty-assist-composer__primary{display:flex;flex-shrink:0;align-items:center}.axm-chat-empty-assist-composer__actions-start ax-icon i,.axm-chat-empty-assist-composer__actions-start ax-prefix i,.axm-chat-empty-assist-composer__primary ax-prefix i{font-size:1.375rem;line-height:1}.axm-chat-empty-assist-composer__textarea{flex:1 1 auto;min-width:0;min-height:2.25rem;max-height:14rem;margin:0;padding-block:.25rem;border:none;outline:none;resize:none;overflow:hidden;background:transparent;font-size:inherit;line-height:1.5;color:rgb(var(--ax-sys-color-on-surface))}.axm-chat-empty-assist-composer__textarea::placeholder{color:rgb(var(--ax-sys-color-on-surface));opacity:.45}.axm-chat-empty-assist-composer__file-input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.axm-chat-empty-assist-composer__caption{margin-bottom:1.25rem;text-align:center;font-size:clamp(1.9rem,3.4vw,2.7rem);line-height:1.15;font-weight:700;letter-spacing:-.02em;color:rgb(var(--ax-sys-color-on-surface))}.axm-chat-empty-assist-composer__suggestions{display:flex;flex-direction:column;gap:.5rem}.axm-chat-empty-assist-composer__suggestions-label{margin:0;padding-inline:.125rem;font-size:.6875rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:rgb(var(--ax-sys-color-on-surface));opacity:.52}.axm-chat-empty-assist-composer__chips-loading{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding-block:.5rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer{width:100%;max-width:none;height:100%;min-height:0;gap:.875rem;justify-content:center;overflow:hidden;padding-block:.5rem .125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__hero{flex-shrink:0;gap:.5rem;padding-block-start:.5rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__hero-icon{width:2.5rem;height:2.5rem;border-radius:.875rem;color:rgb(var(--ax-sys-color-primary-600))}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__caption{margin-bottom:0;font-size:1.125rem;line-height:1.3;font-weight:700;letter-spacing:-.03em}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__composer{flex-shrink:0;width:100%;border-radius:1.5rem;border-color:rgba(var(--ax-sys-color-border-light-surface),.95)}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__textarea{min-height:1.625rem;max-height:8rem;font-size:.875rem;line-height:1.4}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__subtitle{margin:0;max-width:20rem;text-align:center;font-size:.8125rem;line-height:1.5;font-weight:400;color:rgb(var(--ax-sys-color-on-surface));opacity:.58}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions,:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__chips-loading{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow:auto;justify-content:flex-start}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions{gap:.5rem;margin-top:.125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions-label{flex-shrink:0;margin-block-end:.125rem;letter-spacing:.02em;text-transform:none;font-size:.75rem;font-weight:500;opacity:.55}:host(.axm-chat-empty-assist-composer-host--compact) axm-assist-suggestion-chips{flex:0 1 auto;min-height:0;overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i5.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXMAssistSuggestionChipsComponent, selector: "axm-assist-suggestion-chips", inputs: ["items", "compact", "sendInPlace", "disabled"], outputs: ["conversationCreated"] }, { kind: "component", type: AXMChatComposerAssistPickerComponent, selector: "axm-chat-composer-assist-picker", inputs: ["__popup__"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
890
1045
|
}
|
|
891
1046
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatEmptyAssistComposerComponent, decorators: [{
|
|
892
1047
|
type: Component,
|
|
@@ -895,17 +1050,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
895
1050
|
'[class.axm-chat-empty-assist-composer-host--compact]': 'compact()',
|
|
896
1051
|
'[attr.dir]': 'textDirection()',
|
|
897
1052
|
'[style.direction]': 'textDirection()',
|
|
898
|
-
}, imports: [
|
|
899
|
-
CommonModule,
|
|
900
|
-
FormsModule,
|
|
901
|
-
AXButtonModule,
|
|
902
|
-
AXDecoratorModule,
|
|
903
|
-
AXDropdownModule,
|
|
904
|
-
AXLoadingModule,
|
|
905
|
-
AXTranslationModule,
|
|
906
|
-
AXMAssistSuggestionChipsComponent,
|
|
907
|
-
AXMChatComposerAssistPickerComponent,
|
|
908
|
-
], template: `
|
|
1053
|
+
}, imports: [CommonModule, FormsModule, AXButtonModule, AXDecoratorModule, AXDropdownModule, AXLoadingModule, AXTranslationModule, AXMAssistSuggestionChipsComponent, AXMChatComposerAssistPickerComponent], template: `
|
|
909
1054
|
<div class="axm-chat-empty-assist-composer">
|
|
910
1055
|
<div class="axm-chat-empty-assist-composer__hero">
|
|
911
1056
|
@if (compact()) {
|
|
@@ -914,9 +1059,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
914
1059
|
</span>
|
|
915
1060
|
}
|
|
916
1061
|
<div class="axm-chat-empty-assist-composer__caption">
|
|
917
|
-
|
|
1062
|
+
@if (asksForAssist()) {
|
|
1063
|
+
{{ '@conversation:mini-chat.choose-assist.title' | translate | async }}
|
|
1064
|
+
}
|
|
1065
|
+
<!-- ----- Default welcome when an assist is already chosen or selection is optional ----- -->
|
|
1066
|
+
@else {
|
|
1067
|
+
{{ (compact() ? '@conversation:mini-chat.empty.title' : '@conversation:chat.empty-assist.caption') | translate | async }}
|
|
1068
|
+
}
|
|
918
1069
|
</div>
|
|
919
|
-
@if (
|
|
1070
|
+
@if (asksForAssist()) {
|
|
1071
|
+
<p class="axm-chat-empty-assist-composer__subtitle">
|
|
1072
|
+
{{ '@conversation:mini-chat.choose-assist.subtitle' | translate | async }}
|
|
1073
|
+
</p>
|
|
1074
|
+
}
|
|
1075
|
+
<!-- ----- Compact welcome subtitle when the header is not waiting for an assist ----- -->
|
|
1076
|
+
@else if (compact()) {
|
|
920
1077
|
<p class="axm-chat-empty-assist-composer__subtitle">
|
|
921
1078
|
{{ '@conversation:mini-chat.empty.subtitle' | translate | async }}
|
|
922
1079
|
</p>
|
|
@@ -969,15 +1126,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
969
1126
|
</button>
|
|
970
1127
|
</div>
|
|
971
1128
|
}
|
|
972
|
-
<button
|
|
973
|
-
|
|
974
|
-
|
|
1129
|
+
<ax-button
|
|
1130
|
+
class="axm-chat-empty-assist-composer__attachment-add ax-sm rounded-full"
|
|
1131
|
+
look="blank"
|
|
1132
|
+
[iconOnly]="true"
|
|
975
1133
|
[disabled]="isBusy() || draftFiles().length >= maxDraftFiles"
|
|
976
|
-
[
|
|
977
|
-
(
|
|
1134
|
+
[text]="('@acorex:chat.pickers.common.add-more' | translate | async) ?? ''"
|
|
1135
|
+
(onClick)="browseDraftFiles()"
|
|
978
1136
|
>
|
|
979
|
-
<
|
|
980
|
-
|
|
1137
|
+
<ax-prefix>
|
|
1138
|
+
<i class="fa-light fa-plus"></i>
|
|
1139
|
+
</ax-prefix>
|
|
1140
|
+
</ax-button>
|
|
981
1141
|
</div>
|
|
982
1142
|
</div>
|
|
983
1143
|
}
|
|
@@ -995,24 +1155,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
995
1155
|
<i class="fa-light fa-paperclip"></i>
|
|
996
1156
|
</ax-prefix>
|
|
997
1157
|
</ax-button>
|
|
998
|
-
|
|
999
|
-
class="rounded-full axm-chat-composer-assist-picker"
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
<axm-chat-composer-assist-picker />
|
|
1013
|
-
</ax-dropdown-panel>
|
|
1014
|
-
}
|
|
1015
|
-
</ax-button>
|
|
1158
|
+
@if (assistSelection() !== 'locked') {
|
|
1159
|
+
<ax-button class="rounded-full axm-chat-composer-assist-picker" look="blank" [iconOnly]="true" [disabled]="isBusy() || rows().length === 0" [text]="('@conversation:chat.empty-assist.assist-default' | translate | async) ?? ''">
|
|
1160
|
+
<ax-prefix>
|
|
1161
|
+
<i class="fa-light fa-sparkles"></i>
|
|
1162
|
+
</ax-prefix>
|
|
1163
|
+
<!---->
|
|
1164
|
+
<!-- ----- Assist list as a dropdown, not a popup ----- -->
|
|
1165
|
+
@if (rows().length > 0) {
|
|
1166
|
+
<ax-dropdown-panel>
|
|
1167
|
+
<axm-chat-composer-assist-picker />
|
|
1168
|
+
</ax-dropdown-panel>
|
|
1169
|
+
}
|
|
1170
|
+
</ax-button>
|
|
1171
|
+
}
|
|
1016
1172
|
</div>
|
|
1017
1173
|
<textarea
|
|
1018
1174
|
#draftInput
|
|
@@ -1069,8 +1225,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1069
1225
|
</div>
|
|
1070
1226
|
}
|
|
1071
1227
|
</div>
|
|
1072
|
-
`, styles: [":host{display:block;width:100%}:host(.axm-chat-empty-assist-composer-host--compact){display:flex;height:100%;min-height:0}.axm-chat-empty-assist-composer{display:flex;flex-direction:column;gap:1rem;width:min(100%,64rem);margin-inline:auto}.axm-chat-empty-assist-composer__hero{display:flex;flex-direction:column;align-items:center;gap:.625rem}.axm-chat-empty-assist-composer__hero-icon{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.875rem;color:rgb(var(--ax-sys-color-primary-600));background:linear-gradient(145deg,rgba(var(--ax-sys-color-primary-500),.14),rgba(var(--ax-sys-color-primary-500),.04));border:1px solid rgba(var(--ax-sys-color-primary-500),.18)}.axm-chat-empty-assist-composer__composer{position:relative;display:flex;flex-direction:column;width:100%;overflow:hidden;border-radius:2em;border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.axm-chat-empty-assist-composer__attachments{display:flex;align-items:center;width:100%;min-width:0;padding:.
|
|
1073
|
-
}], ctorParameters: () => [], propDecorators: { draftInput: [{ type: i0.ViewChild, args: ['draftInput', { isSignal: true }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], conversationCreated: [{ type: i0.Output, args: ["conversationCreated"] }], initialAssistId: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialAssistId", required: false }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: false }] }], entityType: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityType", required: false }] }], sendStarterPromptsInPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendStarterPromptsInPlace", required: false }] }], launchContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "launchContext", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], assistConversationCreated: [{ type: i0.Input, args: [{ isSignal: true, alias: "assistConversationCreated", required: false }] }] } });
|
|
1228
|
+
`, styles: [":host{display:block;width:100%}:host(.axm-chat-empty-assist-composer-host--compact){display:flex;height:100%;min-height:0}.axm-chat-empty-assist-composer{display:flex;flex-direction:column;gap:1rem;width:min(100%,64rem);margin-inline:auto}.axm-chat-empty-assist-composer__hero{display:flex;flex-direction:column;align-items:center;gap:.625rem}.axm-chat-empty-assist-composer__hero-icon{display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.875rem;color:rgb(var(--ax-sys-color-primary-600));background:linear-gradient(145deg,rgba(var(--ax-sys-color-primary-500),.14),rgba(var(--ax-sys-color-primary-500),.04));border:1px solid rgba(var(--ax-sys-color-primary-500),.18)}.axm-chat-empty-assist-composer__composer{position:relative;display:flex;flex-direction:column;width:100%;overflow:hidden;border-radius:2em;border:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lightest-surface))}.axm-chat-empty-assist-composer__attachments{display:flex;align-items:center;width:100%;min-width:0;padding:.125rem .5rem 0;border-bottom:1px solid rgba(var(--ax-sys-color-border-light-surface),.65)}.axm-chat-empty-assist-composer__attachments-scroll{display:flex;flex:1 1 auto;flex-wrap:nowrap;align-items:center;gap:.375rem;min-width:0;width:0;overflow-x:auto;overflow-y:hidden;padding-block:.375rem;scrollbar-width:thin}.axm-chat-empty-assist-composer__attachment{position:relative;display:flex;flex-shrink:0;align-items:center}.axm-chat-empty-assist-composer__attachment--file{width:9.5rem;max-width:9.5rem;height:2rem;gap:.375rem;padding-inline:.375rem .5rem;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-border-light-surface),.85);background:rgb(var(--ax-sys-color-surface))}.axm-chat-empty-assist-composer__attachment-thumb{display:flex;width:2rem;height:2rem;align-items:center;justify-content:center;overflow:hidden;border-radius:.5rem;border:1px solid rgba(var(--ax-sys-color-border-light-surface),.85);background:rgb(var(--ax-sys-color-surface))}.axm-chat-empty-assist-composer__attachment-thumb img,.axm-chat-empty-assist-composer__attachment-thumb video{width:100%;height:100%;object-fit:cover}.axm-chat-empty-assist-composer__attachment-icon{display:flex;width:1.25rem;height:1.25rem;flex-shrink:0;align-items:center;justify-content:center;font-size:.75rem;color:rgb(var(--ax-sys-color-on-surface));opacity:.72}.axm-chat-empty-assist-composer__attachment-name{min-width:0;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.75rem;color:rgb(var(--ax-sys-color-on-surface))}.axm-chat-empty-assist-composer__attachment-remove{position:absolute;inset-block-start:-.25rem;inset-inline-end:-.25rem;z-index:1;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:none;border-radius:9999px;background:rgb(var(--ax-sys-color-danger-500));color:rgb(var(--ax-sys-color-lightest-surface));font-size:.5rem;cursor:pointer;opacity:0;pointer-events:none;transition:opacity .15s ease}.axm-chat-empty-assist-composer__attachment:hover .axm-chat-empty-assist-composer__attachment-remove,.axm-chat-empty-assist-composer__attachment:focus-within .axm-chat-empty-assist-composer__attachment-remove,.axm-chat-empty-assist-composer__attachment-remove:focus-visible{opacity:1;pointer-events:auto}@media(hover:none){.axm-chat-empty-assist-composer__attachment-remove{opacity:1;pointer-events:auto}}.axm-chat-empty-assist-composer__attachment-add{flex-shrink:0;align-self:center}.axm-chat-empty-assist-composer__attachment-add ax-prefix i{font-size:.875rem;line-height:1}.axm-chat-empty-assist-composer__input-row{display:flex;width:100%;min-width:0;align-items:center;gap:.5rem;padding:.25rem .5rem}.axm-chat-empty-assist-composer__actions-start,.axm-chat-empty-assist-composer__primary{display:flex;flex-shrink:0;align-items:center}.axm-chat-empty-assist-composer__actions-start ax-icon i,.axm-chat-empty-assist-composer__actions-start ax-prefix i,.axm-chat-empty-assist-composer__primary ax-prefix i{font-size:1.375rem;line-height:1}.axm-chat-empty-assist-composer__textarea{flex:1 1 auto;min-width:0;min-height:2.25rem;max-height:14rem;margin:0;padding-block:.25rem;border:none;outline:none;resize:none;overflow:hidden;background:transparent;font-size:inherit;line-height:1.5;color:rgb(var(--ax-sys-color-on-surface))}.axm-chat-empty-assist-composer__textarea::placeholder{color:rgb(var(--ax-sys-color-on-surface));opacity:.45}.axm-chat-empty-assist-composer__file-input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.axm-chat-empty-assist-composer__caption{margin-bottom:1.25rem;text-align:center;font-size:clamp(1.9rem,3.4vw,2.7rem);line-height:1.15;font-weight:700;letter-spacing:-.02em;color:rgb(var(--ax-sys-color-on-surface))}.axm-chat-empty-assist-composer__suggestions{display:flex;flex-direction:column;gap:.5rem}.axm-chat-empty-assist-composer__suggestions-label{margin:0;padding-inline:.125rem;font-size:.6875rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:rgb(var(--ax-sys-color-on-surface));opacity:.52}.axm-chat-empty-assist-composer__chips-loading{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding-block:.5rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer{width:100%;max-width:none;height:100%;min-height:0;gap:.875rem;justify-content:center;overflow:hidden;padding-block:.5rem .125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__hero{flex-shrink:0;gap:.5rem;padding-block-start:.5rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__hero-icon{width:2.5rem;height:2.5rem;border-radius:.875rem;color:rgb(var(--ax-sys-color-primary-600))}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__caption{margin-bottom:0;font-size:1.125rem;line-height:1.3;font-weight:700;letter-spacing:-.03em}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__composer{flex-shrink:0;width:100%;border-radius:1.5rem;border-color:rgba(var(--ax-sys-color-border-light-surface),.95)}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__textarea{min-height:1.625rem;max-height:8rem;font-size:.875rem;line-height:1.4}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__subtitle{margin:0;max-width:20rem;text-align:center;font-size:.8125rem;line-height:1.5;font-weight:400;color:rgb(var(--ax-sys-color-on-surface));opacity:.58}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions,:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__chips-loading{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;overflow:auto;justify-content:flex-start}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions{gap:.5rem;margin-top:.125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions-label{flex-shrink:0;margin-block-end:.125rem;letter-spacing:.02em;text-transform:none;font-size:.75rem;font-weight:500;opacity:.55}:host(.axm-chat-empty-assist-composer-host--compact) axm-assist-suggestion-chips{flex:0 1 auto;min-height:0;overflow:hidden}\n"] }]
|
|
1229
|
+
}], ctorParameters: () => [], propDecorators: { draftInput: [{ type: i0.ViewChild, args: ['draftInput', { isSignal: true }] }], fileInput: [{ type: i0.ViewChild, args: ['fileInput', { isSignal: true }] }], conversationCreated: [{ type: i0.Output, args: ["conversationCreated"] }], initialAssistId: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialAssistId", required: false }] }], assistSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "assistSelection", required: false }] }], acceptExternalFileDrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "acceptExternalFileDrop", required: false }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: false }] }], entityType: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityType", required: false }] }], sendStarterPromptsInPlace: [{ type: i0.Input, args: [{ isSignal: true, alias: "sendStarterPromptsInPlace", required: false }] }], launchContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "launchContext", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], assistConversationCreated: [{ type: i0.Input, args: [{ isSignal: true, alias: "assistConversationCreated", required: false }] }] } });
|
|
1074
1230
|
|
|
1075
1231
|
const AXE_CHAT_EMPTY_STATE_PROVIDERS = [
|
|
1076
1232
|
{
|
|
@@ -2392,6 +2548,10 @@ class AXMContextualAssistLauncherService {
|
|
|
2392
2548
|
isOpen() {
|
|
2393
2549
|
return this.panelService.isOpen();
|
|
2394
2550
|
}
|
|
2551
|
+
/** True while the window is on screen (a retained hidden window is not visible). */
|
|
2552
|
+
isVisible() {
|
|
2553
|
+
return this.panelService.isVisible();
|
|
2554
|
+
}
|
|
2395
2555
|
async open(context, options) {
|
|
2396
2556
|
const launchContext = axmSanitizeContextualAssistContext(context);
|
|
2397
2557
|
const assistId = options?.assistId?.trim();
|
|
@@ -2405,8 +2565,15 @@ class AXMContextualAssistLauncherService {
|
|
|
2405
2565
|
showComposer: true,
|
|
2406
2566
|
launchContext,
|
|
2407
2567
|
...(assistId ? { assistId } : {}),
|
|
2568
|
+
...(options?.assistSelection ? { assistSelection: options.assistSelection } : {}),
|
|
2569
|
+
...(options?.minimizable != null ? { minimizable: options.minimizable } : {}),
|
|
2570
|
+
...(options?.retainOnClose != null ? { retainOnClose: options.retainOnClose } : {}),
|
|
2408
2571
|
});
|
|
2409
2572
|
}
|
|
2573
|
+
/** Hides a retained window, or destroys the window when retention is off. */
|
|
2574
|
+
dismiss() {
|
|
2575
|
+
this.panelService.dismiss();
|
|
2576
|
+
}
|
|
2410
2577
|
/** Closes the panel when it is open; otherwise opens it (restores the last thread). */
|
|
2411
2578
|
async toggle(context, options) {
|
|
2412
2579
|
if (this.isOpen()) {
|
|
@@ -2466,11 +2633,11 @@ class AXEAIConversationExtensionModule {
|
|
|
2466
2633
|
provideCommandSetups([
|
|
2467
2634
|
{
|
|
2468
2635
|
key: CONVERSATION_START_ASSIST_CHAT_COMMAND,
|
|
2469
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-
|
|
2636
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-zQPeOCRi.mjs').then((m) => m.AXMConversationStartAssistChatCommand),
|
|
2470
2637
|
},
|
|
2471
2638
|
{
|
|
2472
2639
|
key: CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND,
|
|
2473
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-
|
|
2640
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-B6QodNVg.mjs').then((m) => m.AXMConversationSendAssistChatMessageCommand),
|
|
2474
2641
|
},
|
|
2475
2642
|
]),
|
|
2476
2643
|
], imports: [AXPComponentSlotModule.forChild({
|
|
@@ -2549,11 +2716,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2549
2716
|
provideCommandSetups([
|
|
2550
2717
|
{
|
|
2551
2718
|
key: CONVERSATION_START_ASSIST_CHAT_COMMAND,
|
|
2552
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-
|
|
2719
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-zQPeOCRi.mjs').then((m) => m.AXMConversationStartAssistChatCommand),
|
|
2553
2720
|
},
|
|
2554
2721
|
{
|
|
2555
2722
|
key: CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND,
|
|
2556
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-
|
|
2723
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-B6QodNVg.mjs').then((m) => m.AXMConversationSendAssistChatMessageCommand),
|
|
2557
2724
|
},
|
|
2558
2725
|
]),
|
|
2559
2726
|
],
|
|
@@ -2565,4 +2732,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2565
2732
|
*/
|
|
2566
2733
|
|
|
2567
2734
|
export { AXMChatAssistLauncherService as A, AXCConversationAssistResponseService as a, AXEAIConversationExtensionModule as b, AXEConversationAssistResponseService as c, AXMContextualAssistLauncherService as d };
|
|
2568
|
-
//# sourceMappingURL=acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-
|
|
2735
|
+
//# sourceMappingURL=acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-DfdGeEG4.mjs.map
|