@acorex-platform/extension-ai-conversation-client 0.0.30 → 0.0.32
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-ZUV9J76R.mjs → acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-PyjS3LJH.mjs} +146 -65
- package/fesm2022/acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-PyjS3LJH.mjs.map +1 -0
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-CMKccVFQ.mjs → acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-DuNwjggd.mjs} +2 -2
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-CMKccVFQ.mjs.map → acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-DuNwjggd.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-start-assist-chat.command-BGICtlcW.mjs → acorex-platform-extension-ai-conversation-client-start-assist-chat.command-CdHIrGj8.mjs} +2 -2
- package/fesm2022/{acorex-platform-extension-ai-conversation-client-start-assist-chat.command-BGICtlcW.mjs.map → acorex-platform-extension-ai-conversation-client-start-assist-chat.command-CdHIrGj8.mjs.map} +1 -1
- package/fesm2022/acorex-platform-extension-ai-conversation-client.mjs +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-extension-ai-conversation-client.d.ts +0 -3
- package/fesm2022/acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-ZUV9J76R.mjs.map +0 -1
|
@@ -4,7 +4,7 @@ import { AXPComponentSlotModule, provideAppStartUpTask, AXP_APP_STARTUP_PRIORITY
|
|
|
4
4
|
import { AXPRuntimeTransportService, AXPCommandService, provideCommandSetups } from '@acorex-platform/framework-client/runtime';
|
|
5
5
|
import { AXM_AI_MANAGEMENT_MODULE_NAME, AXM_AI_MANAGEMENT_ASSIST_ENTITY_NAME, AXMConversationEntityStoreService, axmChatAiTargetDisplayName, axmChatAiTargetDisplayDescription, axmChatAiTargetAvatarUrl, axmFilterChatAiTargets, axmChatAiPeerParticipantId, axmBuildAiChatConversationMetadata, CONVERSATION_START_ASSIST_CHAT_COMMAND, axmChatAiTargetShortcutDescriptionKey, AXM_ASSIST_DEFAULT_RESOLVER_PORT, axmAssistStarterPromptChipItems, AXMAssistSuggestionChipsComponent, 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, 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
|
-
import { inject, Injectable, output, input, signal, computed, viewChild, effect, ChangeDetectionStrategy, Component,
|
|
7
|
+
import { inject, Injectable, output, input, signal, computed, viewChild, effect, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
8
8
|
import { AXPSystemActionType, runtimeCommandPayloadData } from '@acorex-platform/framework-shared/core';
|
|
9
9
|
import { sortBy } from 'lodash-es';
|
|
10
10
|
import { AXConversationService } from '@acorex/components/conversation';
|
|
@@ -512,30 +512,59 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
512
512
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatEmptyAssistComposerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
513
513
|
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 }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { conversationCreated: "conversationCreated" }, host: { properties: { "class.axm-chat-empty-assist-composer-host--compact": "compact()" }, classAttribute: "axm-chat-empty-assist-composer-host" }, viewQueries: [{ propertyName: "draftInput", first: true, predicate: ["draftInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
514
514
|
<div class="axm-chat-empty-assist-composer">
|
|
515
|
-
<div class="axm-chat-empty-assist-
|
|
516
|
-
|
|
515
|
+
<div class="axm-chat-empty-assist-composer__hero">
|
|
516
|
+
@if (compact()) {
|
|
517
|
+
<span class="axm-chat-empty-assist-composer__hero-icon" aria-hidden="true">
|
|
518
|
+
<ax-icon icon="fa-regular fa-sparkles"></ax-icon>
|
|
519
|
+
</span>
|
|
520
|
+
}
|
|
521
|
+
<div class="axm-chat-empty-assist-composer__caption">
|
|
522
|
+
{{ '@conversation:chat.empty-assist.caption' | translate | async }}
|
|
523
|
+
</div>
|
|
517
524
|
</div>
|
|
518
525
|
|
|
519
526
|
<div class="axm-chat-empty-assist-composer__composer-row">
|
|
520
|
-
|
|
521
|
-
<ax-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
+
@if (!compact()) {
|
|
528
|
+
<ax-button color="default" look="blank" class="rounded-full" [disabled]="isBusy()">
|
|
529
|
+
<ax-icon icon="fa-regular fa-sparkles"></ax-icon>
|
|
530
|
+
<span class="axm-chat-empty-assist-composer__assist-text">
|
|
531
|
+
@if (selectedAssistLabel(); as assistLabel) {
|
|
532
|
+
{{ assistLabel | translate | async }}
|
|
533
|
+
} @else {
|
|
534
|
+
{{ '@conversation:chat.empty-assist.assist-default' | translate | async }}
|
|
535
|
+
}
|
|
536
|
+
</span>
|
|
537
|
+
@if (!isBusy()) {
|
|
538
|
+
<ax-dropdown-panel>
|
|
539
|
+
<ax-button-item-list>
|
|
540
|
+
@for (row of rows(); track row.id) {
|
|
541
|
+
<ax-button-item [text]="(row.title | translate | async)!" [selected]="row.id === selectedAssistId()" (onClick)="onAssistIdChange(row.id)"></ax-button-item>
|
|
542
|
+
}
|
|
543
|
+
</ax-button-item-list>
|
|
544
|
+
</ax-dropdown-panel>
|
|
527
545
|
}
|
|
528
|
-
</
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
546
|
+
</ax-button>
|
|
547
|
+
} @else {
|
|
548
|
+
<ax-button
|
|
549
|
+
color="default"
|
|
550
|
+
look="blank"
|
|
551
|
+
class="axm-chat-empty-assist-composer__assist-trigger rounded-full"
|
|
552
|
+
[iconOnly]="true"
|
|
553
|
+
[disabled]="isBusy()"
|
|
554
|
+
[attr.aria-label]="('@conversation:chat.empty-assist.assist-default' | translate | async) ?? ''"
|
|
555
|
+
>
|
|
556
|
+
<ax-icon icon="fa-regular fa-sparkles"></ax-icon>
|
|
557
|
+
@if (!isBusy()) {
|
|
558
|
+
<ax-dropdown-panel>
|
|
559
|
+
<ax-button-item-list>
|
|
560
|
+
@for (row of rows(); track row.id) {
|
|
561
|
+
<ax-button-item [text]="(row.title | translate | async)!" [selected]="row.id === selectedAssistId()" (onClick)="onAssistIdChange(row.id)"></ax-button-item>
|
|
562
|
+
}
|
|
563
|
+
</ax-button-item-list>
|
|
564
|
+
</ax-dropdown-panel>
|
|
565
|
+
}
|
|
566
|
+
</ax-button>
|
|
567
|
+
}
|
|
539
568
|
|
|
540
569
|
@let assistTitle = (selectedAssistLabel() | translate | async) ?? '';
|
|
541
570
|
|
|
@@ -550,15 +579,32 @@ class AXMChatEmptyAssistComposerComponent {
|
|
|
550
579
|
[disabled]="isBusy()"
|
|
551
580
|
[placeholder]="('@conversation:chat.empty-assist.placeholder' | translate: { params: { assist: assistTitle } } | async) ?? ''"
|
|
552
581
|
></textarea>
|
|
553
|
-
<ax-button
|
|
582
|
+
<ax-button
|
|
583
|
+
color="primary"
|
|
584
|
+
class="axm-chat-empty-assist-composer__send rounded-full"
|
|
585
|
+
[disabled]="!canSend()"
|
|
586
|
+
[text]="sending() ? '…' : ''"
|
|
587
|
+
[attr.aria-label]="('@conversation:comments.actions.send.title' | translate | async) ?? ''"
|
|
588
|
+
(onClick)="send()"
|
|
589
|
+
>
|
|
554
590
|
@if (!sending()) {
|
|
555
591
|
<ax-icon icon="fa-light fa-arrow-up"></ax-icon>
|
|
556
592
|
}
|
|
557
593
|
</ax-button>
|
|
558
594
|
</div>
|
|
559
|
-
|
|
595
|
+
|
|
596
|
+
@if (starterPromptItems().length > 0) {
|
|
597
|
+
<div class="axm-chat-empty-assist-composer__suggestions">
|
|
598
|
+
@if (compact()) {
|
|
599
|
+
<p class="axm-chat-empty-assist-composer__suggestions-label">
|
|
600
|
+
{{ '@conversation:chat.starter-prompts.section-label' | translate | async }}
|
|
601
|
+
</p>
|
|
602
|
+
}
|
|
603
|
+
<axm-assist-suggestion-chips [items]="starterPromptItems()" [compact]="compact()" [sendInPlace]="sendStarterPromptsInPlace()" [disabled]="isBusy()" (conversationCreated)="conversationCreated.emit($event)" />
|
|
604
|
+
</div>
|
|
605
|
+
}
|
|
560
606
|
</div>
|
|
561
|
-
`, isInline: true, styles: [":host{display:block;width:100%}.axm-chat-empty-assist-composer{display:flex;flex-direction:column;gap:1rem;width:min(100%,64rem);margin-inline:auto}.axm-chat-empty-assist-composer__caption{margin-bottom:3rem;text-align:center;font-size:clamp(1.9rem,3.4vw,2.7rem);line-height:1.15;font-weight:700;letter-spacing:-.02em}.axm-chat-empty-assist-composer__composer-row{display:flex;gap:.375rem;align-items:
|
|
607
|
+
`, isInline: true, styles: [":host{display:block;width:100%}.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__caption{margin-bottom:3rem;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__composer-row{display:flex;gap:.375rem;align-items:flex-end;padding:.5rem;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__assist-text{display:inline-block;max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axm-chat-empty-assist-composer__send{flex-shrink:0}.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__textarea{resize:none;overflow:hidden;background:transparent;min-height:2.25rem;max-height:14rem;line-height:1.5;padding-block:.25rem;font-size:inherit;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}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer{width:100%;max-width:none;gap:.875rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__hero{gap:.5rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__caption{margin-bottom:0;font-size:1.125rem;line-height:1.35;font-weight:600;letter-spacing:-.015em}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__composer-row{gap:.25rem;align-items:center;padding:.375rem .4375rem .375rem .375rem;border-radius:1.5rem;border-color:rgba(var(--ax-sys-color-border-light-surface),.95);background:rgba(var(--ax-sys-color-surface),.35)}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__assist-trigger{color:rgb(var(--ax-sys-color-primary-600));opacity:.9}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__assist-text{max-width:5.5rem;font-size:.8125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__textarea{min-height:1.625rem;max-height:8rem;line-height:1.4;font-size:.875rem;padding-block:.125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions{gap:.375rem;margin-top:.125rem}\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", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXMAssistSuggestionChipsComponent, selector: "axm-assist-suggestion-chips", inputs: ["items", "compact", "sendInPlace", "disabled"], outputs: ["conversationCreated"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
562
608
|
}
|
|
563
609
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatEmptyAssistComposerComponent, decorators: [{
|
|
564
610
|
type: Component,
|
|
@@ -567,30 +613,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
567
613
|
'[class.axm-chat-empty-assist-composer-host--compact]': 'compact()',
|
|
568
614
|
}, imports: [CommonModule, FormsModule, AXButtonModule, AXDropdownModule, AXTextBoxModule, AXDecoratorModule, AXTranslationModule, AXMAssistSuggestionChipsComponent], template: `
|
|
569
615
|
<div class="axm-chat-empty-assist-composer">
|
|
570
|
-
<div class="axm-chat-empty-assist-
|
|
571
|
-
|
|
616
|
+
<div class="axm-chat-empty-assist-composer__hero">
|
|
617
|
+
@if (compact()) {
|
|
618
|
+
<span class="axm-chat-empty-assist-composer__hero-icon" aria-hidden="true">
|
|
619
|
+
<ax-icon icon="fa-regular fa-sparkles"></ax-icon>
|
|
620
|
+
</span>
|
|
621
|
+
}
|
|
622
|
+
<div class="axm-chat-empty-assist-composer__caption">
|
|
623
|
+
{{ '@conversation:chat.empty-assist.caption' | translate | async }}
|
|
624
|
+
</div>
|
|
572
625
|
</div>
|
|
573
626
|
|
|
574
627
|
<div class="axm-chat-empty-assist-composer__composer-row">
|
|
575
|
-
|
|
576
|
-
<ax-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
628
|
+
@if (!compact()) {
|
|
629
|
+
<ax-button color="default" look="blank" class="rounded-full" [disabled]="isBusy()">
|
|
630
|
+
<ax-icon icon="fa-regular fa-sparkles"></ax-icon>
|
|
631
|
+
<span class="axm-chat-empty-assist-composer__assist-text">
|
|
632
|
+
@if (selectedAssistLabel(); as assistLabel) {
|
|
633
|
+
{{ assistLabel | translate | async }}
|
|
634
|
+
} @else {
|
|
635
|
+
{{ '@conversation:chat.empty-assist.assist-default' | translate | async }}
|
|
636
|
+
}
|
|
637
|
+
</span>
|
|
638
|
+
@if (!isBusy()) {
|
|
639
|
+
<ax-dropdown-panel>
|
|
640
|
+
<ax-button-item-list>
|
|
641
|
+
@for (row of rows(); track row.id) {
|
|
642
|
+
<ax-button-item [text]="(row.title | translate | async)!" [selected]="row.id === selectedAssistId()" (onClick)="onAssistIdChange(row.id)"></ax-button-item>
|
|
643
|
+
}
|
|
644
|
+
</ax-button-item-list>
|
|
645
|
+
</ax-dropdown-panel>
|
|
582
646
|
}
|
|
583
|
-
</
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
647
|
+
</ax-button>
|
|
648
|
+
} @else {
|
|
649
|
+
<ax-button
|
|
650
|
+
color="default"
|
|
651
|
+
look="blank"
|
|
652
|
+
class="axm-chat-empty-assist-composer__assist-trigger rounded-full"
|
|
653
|
+
[iconOnly]="true"
|
|
654
|
+
[disabled]="isBusy()"
|
|
655
|
+
[attr.aria-label]="('@conversation:chat.empty-assist.assist-default' | translate | async) ?? ''"
|
|
656
|
+
>
|
|
657
|
+
<ax-icon icon="fa-regular fa-sparkles"></ax-icon>
|
|
658
|
+
@if (!isBusy()) {
|
|
659
|
+
<ax-dropdown-panel>
|
|
660
|
+
<ax-button-item-list>
|
|
661
|
+
@for (row of rows(); track row.id) {
|
|
662
|
+
<ax-button-item [text]="(row.title | translate | async)!" [selected]="row.id === selectedAssistId()" (onClick)="onAssistIdChange(row.id)"></ax-button-item>
|
|
663
|
+
}
|
|
664
|
+
</ax-button-item-list>
|
|
665
|
+
</ax-dropdown-panel>
|
|
666
|
+
}
|
|
667
|
+
</ax-button>
|
|
668
|
+
}
|
|
594
669
|
|
|
595
670
|
@let assistTitle = (selectedAssistLabel() | translate | async) ?? '';
|
|
596
671
|
|
|
@@ -605,15 +680,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
605
680
|
[disabled]="isBusy()"
|
|
606
681
|
[placeholder]="('@conversation:chat.empty-assist.placeholder' | translate: { params: { assist: assistTitle } } | async) ?? ''"
|
|
607
682
|
></textarea>
|
|
608
|
-
<ax-button
|
|
683
|
+
<ax-button
|
|
684
|
+
color="primary"
|
|
685
|
+
class="axm-chat-empty-assist-composer__send rounded-full"
|
|
686
|
+
[disabled]="!canSend()"
|
|
687
|
+
[text]="sending() ? '…' : ''"
|
|
688
|
+
[attr.aria-label]="('@conversation:comments.actions.send.title' | translate | async) ?? ''"
|
|
689
|
+
(onClick)="send()"
|
|
690
|
+
>
|
|
609
691
|
@if (!sending()) {
|
|
610
692
|
<ax-icon icon="fa-light fa-arrow-up"></ax-icon>
|
|
611
693
|
}
|
|
612
694
|
</ax-button>
|
|
613
695
|
</div>
|
|
614
|
-
|
|
696
|
+
|
|
697
|
+
@if (starterPromptItems().length > 0) {
|
|
698
|
+
<div class="axm-chat-empty-assist-composer__suggestions">
|
|
699
|
+
@if (compact()) {
|
|
700
|
+
<p class="axm-chat-empty-assist-composer__suggestions-label">
|
|
701
|
+
{{ '@conversation:chat.starter-prompts.section-label' | translate | async }}
|
|
702
|
+
</p>
|
|
703
|
+
}
|
|
704
|
+
<axm-assist-suggestion-chips [items]="starterPromptItems()" [compact]="compact()" [sendInPlace]="sendStarterPromptsInPlace()" [disabled]="isBusy()" (conversationCreated)="conversationCreated.emit($event)" />
|
|
705
|
+
</div>
|
|
706
|
+
}
|
|
615
707
|
</div>
|
|
616
|
-
`, styles: [":host{display:block;width:100%}.axm-chat-empty-assist-composer{display:flex;flex-direction:column;gap:1rem;width:min(100%,64rem);margin-inline:auto}.axm-chat-empty-assist-composer__caption{margin-bottom:3rem;text-align:center;font-size:clamp(1.9rem,3.4vw,2.7rem);line-height:1.15;font-weight:700;letter-spacing:-.02em}.axm-chat-empty-assist-composer__composer-row{display:flex;gap:.375rem;align-items:
|
|
708
|
+
`, styles: [":host{display:block;width:100%}.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__caption{margin-bottom:3rem;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__composer-row{display:flex;gap:.375rem;align-items:flex-end;padding:.5rem;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__assist-text{display:inline-block;max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.axm-chat-empty-assist-composer__send{flex-shrink:0}.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__textarea{resize:none;overflow:hidden;background:transparent;min-height:2.25rem;max-height:14rem;line-height:1.5;padding-block:.25rem;font-size:inherit;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}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer{width:100%;max-width:none;gap:.875rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__hero{gap:.5rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__caption{margin-bottom:0;font-size:1.125rem;line-height:1.35;font-weight:600;letter-spacing:-.015em}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__composer-row{gap:.25rem;align-items:center;padding:.375rem .4375rem .375rem .375rem;border-radius:1.5rem;border-color:rgba(var(--ax-sys-color-border-light-surface),.95);background:rgba(var(--ax-sys-color-surface),.35)}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__assist-trigger{color:rgb(var(--ax-sys-color-primary-600));opacity:.9}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__assist-text{max-width:5.5rem;font-size:.8125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__textarea{min-height:1.625rem;max-height:8rem;line-height:1.4;font-size:.875rem;padding-block:.125rem}:host(.axm-chat-empty-assist-composer-host--compact) .axm-chat-empty-assist-composer__suggestions{gap:.375rem;margin-top:.125rem}\n"] }]
|
|
617
709
|
}], ctorParameters: () => [], propDecorators: { 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 }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], draftInput: [{ type: i0.ViewChild, args: ['draftInput', { isSignal: true }] }] } });
|
|
618
710
|
|
|
619
711
|
const AXE_CHAT_EMPTY_STATE_PROVIDERS = [
|
|
@@ -677,7 +769,6 @@ class AXEConversationAssistResponseService {
|
|
|
677
769
|
this.store = inject(AXMConversationEntityStoreService);
|
|
678
770
|
this.focus = inject(AXMConversationFocusService);
|
|
679
771
|
this.commandService = inject(AXPCommandService);
|
|
680
|
-
this.injector = inject(Injector);
|
|
681
772
|
this.messageCache = new Map();
|
|
682
773
|
this.conversationCache = new Map();
|
|
683
774
|
this.streamTasks = new Map();
|
|
@@ -687,10 +778,6 @@ class AXEConversationAssistResponseService {
|
|
|
687
778
|
this.composerGenerationConversationId = null;
|
|
688
779
|
this.cancelAssistRequest = null;
|
|
689
780
|
}
|
|
690
|
-
/** Lazy: `AXConversationService` constructs the message API, which injects this port. */
|
|
691
|
-
get conversationService() {
|
|
692
|
-
return this.injector.get(AXConversationService);
|
|
693
|
-
}
|
|
694
781
|
static { this.ASSIST_SYNC_MIN_INTERVAL_MS = 2000; }
|
|
695
782
|
async handleAfterUserMessage(conversationId, _userMessageId, _command, currentUserId) {
|
|
696
783
|
this.currentUserId = currentUserId;
|
|
@@ -1381,7 +1468,7 @@ class AXEConversationAssistResponseService {
|
|
|
1381
1468
|
|| this.composerGenerationConversationId?.trim()
|
|
1382
1469
|
|| this.resolveActiveStreamingConversationId();
|
|
1383
1470
|
if (!scoped) {
|
|
1384
|
-
this.
|
|
1471
|
+
this.markComposerGenerating(null, false);
|
|
1385
1472
|
return;
|
|
1386
1473
|
}
|
|
1387
1474
|
try {
|
|
@@ -1404,16 +1491,10 @@ class AXEConversationAssistResponseService {
|
|
|
1404
1491
|
markComposerGenerating(conversationId, generating) {
|
|
1405
1492
|
if (generating && conversationId) {
|
|
1406
1493
|
this.composerGenerationConversationId = conversationId;
|
|
1407
|
-
if (this.focus.isFocused(conversationId)) {
|
|
1408
|
-
this.conversationService.setGenerating(true);
|
|
1409
|
-
}
|
|
1410
1494
|
return;
|
|
1411
1495
|
}
|
|
1412
1496
|
if (!generating) {
|
|
1413
1497
|
this.composerGenerationConversationId = null;
|
|
1414
|
-
if (!conversationId || this.focus.isFocused(conversationId)) {
|
|
1415
|
-
this.conversationService.setGenerating(false);
|
|
1416
|
-
}
|
|
1417
1498
|
}
|
|
1418
1499
|
}
|
|
1419
1500
|
syncComposerGeneratingForConversation(conversationId, generating) {
|
|
@@ -1673,7 +1754,7 @@ class AXMChatWithAssistDialogComponent extends AXBasePageComponent {
|
|
|
1673
1754
|
</div>
|
|
1674
1755
|
}
|
|
1675
1756
|
</ng-template>
|
|
1676
|
-
`, isInline: true, styles: [":host{display:block}.new-conversation-panel{display:flex;flex-direction:column;width:100%;overflow:hidden}.new-conversation-dialog-content{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:.75rem}.form-field--grow{flex:1;min-height:0;display:flex;flex-direction:column}.form-field{display:flex;flex-direction:column;gap:.35rem}.users-list-wrap{display:flex;flex-direction:column;height:min(50vh,36rem);overflow:hidden}.users-list-search{flex:0 0 auto;padding:.5rem .75rem;border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lighter-surface))}.users-list{display:block;flex:1 1 auto;min-height:0}.user-item-content{display:flex;align-items:center;gap:.75rem;height:100%;padding:.5rem .75rem;min-width:0}.user-item-text{display:flex;flex-direction:column;justify-content:center;min-width:0;flex:1;gap:.125rem}.user-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface))}.user-description-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:400;opacity:.72;color:rgb(var(--ax-sys-color-on-surface))}.users-list-empty{padding:1rem;text-align:center;font-size:.85rem;opacity:.7}.user-item-skeleton{display:flex;align-items:center;gap:.75rem;height:60px;padding:.5rem 1.25rem;min-width:0}.skeleton-avatar{flex:0 0 auto;width:3rem;height:3rem;border-radius:9999px}.skeleton-text{display:flex;flex-direction:column;min-width:0;flex:1;gap:.5rem}.skeleton-name{height:1rem;width:60%;border-radius:.25rem}.skeleton-description{height:.75rem;width:40%;border-radius:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXListComponent, selector: "ax-list", inputs: ["id", "name", "disabled", "readonly", "valueField", "textField", "textTemplate", "disabledField", "multiple", "selectionMode", "isItemTruncated", "showItemTooltip", "dataSource", "itemHeight", "itemTemplate", "emptyTemplate", "loadingTemplate", "checkbox"], outputs: ["onValueChanged", "disabledChange", "readonlyChange", "onBlur", "onFocus", "onItemClick", "onItemSelected", "onScrolledIndexChanged"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXPAvatarComponent, selector: "axp-avatar", inputs: ["size", "src", "fullName", "fallbackText", "placeholder"] }, { kind: "component", type: 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: "component", type: AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1757
|
+
`, isInline: true, styles: [":host{display:block}.new-conversation-panel{display:flex;flex-direction:column;width:100%;overflow:hidden}.new-conversation-dialog-content{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:.75rem}.form-field--grow{flex:1;min-height:0;display:flex;flex-direction:column}.form-field{display:flex;flex-direction:column;gap:.35rem}.users-list-wrap{display:flex;flex-direction:column;height:min(50vh,36rem);overflow:hidden}.users-list-search{flex:0 0 auto;padding:.5rem .75rem;border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface));background:rgb(var(--ax-sys-color-lighter-surface))}.users-list{display:block;flex:1 1 auto;min-height:0}.user-item-content{display:flex;align-items:center;gap:.75rem;height:100%;padding:.5rem .75rem;min-width:0}.user-item-text{display:flex;flex-direction:column;justify-content:center;min-width:0;flex:1;gap:.125rem}.user-name-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface))}.user-description-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:400;opacity:.72;color:rgb(var(--ax-sys-color-on-surface))}.users-list-empty{padding:1rem;text-align:center;font-size:.85rem;opacity:.7}.user-item-skeleton{display:flex;align-items:center;gap:.75rem;height:60px;padding:.5rem 1.25rem;min-width:0}.skeleton-avatar{flex:0 0 auto;width:3rem;height:3rem;border-radius:9999px}.skeleton-text{display:flex;flex-direction:column;min-width:0;flex:1;gap:.5rem}.skeleton-name{height:1rem;width:60%;border-radius:.25rem}.skeleton-description{height:.75rem;width:40%;border-radius:.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { 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: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXListComponent, selector: "ax-list", inputs: ["id", "name", "disabled", "readonly", "valueField", "textField", "textTemplate", "disabledField", "multiple", "selectionMode", "isItemTruncated", "showItemTooltip", "dataSource", "itemHeight", "itemTemplate", "emptyTemplate", "loadingTemplate", "checkbox"], outputs: ["onValueChanged", "disabledChange", "readonlyChange", "onBlur", "onFocus", "onItemClick", "onItemSelected", "onScrolledIndexChanged"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "component", type: AXPAvatarComponent, selector: "axp-avatar", inputs: ["size", "src", "fullName", "showTitle", "fallbackText", "placeholder"] }, { kind: "component", type: 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: "component", type: AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1677
1758
|
}
|
|
1678
1759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMChatWithAssistDialogComponent, decorators: [{
|
|
1679
1760
|
type: Component,
|
|
@@ -1826,11 +1907,11 @@ class AXEAIConversationExtensionModule {
|
|
|
1826
1907
|
provideCommandSetups([
|
|
1827
1908
|
{
|
|
1828
1909
|
key: CONVERSATION_START_ASSIST_CHAT_COMMAND,
|
|
1829
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-
|
|
1910
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-CdHIrGj8.mjs').then((m) => m.AXMConversationStartAssistChatCommand),
|
|
1830
1911
|
},
|
|
1831
1912
|
{
|
|
1832
1913
|
key: CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND,
|
|
1833
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-
|
|
1914
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-DuNwjggd.mjs').then((m) => m.AXMConversationSendAssistChatMessageCommand),
|
|
1834
1915
|
},
|
|
1835
1916
|
]),
|
|
1836
1917
|
], imports: [AXPComponentSlotModule.forChild({
|
|
@@ -1894,11 +1975,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1894
1975
|
provideCommandSetups([
|
|
1895
1976
|
{
|
|
1896
1977
|
key: CONVERSATION_START_ASSIST_CHAT_COMMAND,
|
|
1897
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-
|
|
1978
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-start-assist-chat.command-CdHIrGj8.mjs').then((m) => m.AXMConversationStartAssistChatCommand),
|
|
1898
1979
|
},
|
|
1899
1980
|
{
|
|
1900
1981
|
key: CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND,
|
|
1901
|
-
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-
|
|
1982
|
+
command: () => import('./acorex-platform-extension-ai-conversation-client-send-assist-chat-message.command-DuNwjggd.mjs').then((m) => m.AXMConversationSendAssistChatMessageCommand),
|
|
1902
1983
|
},
|
|
1903
1984
|
]),
|
|
1904
1985
|
],
|
|
@@ -1910,4 +1991,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
1910
1991
|
*/
|
|
1911
1992
|
|
|
1912
1993
|
export { AXMChatAssistLauncherService as A, AXCConversationAssistResponseService as a, AXEAIConversationExtensionModule as b, AXEConversationAssistResponseService as c };
|
|
1913
|
-
//# sourceMappingURL=acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-
|
|
1994
|
+
//# sourceMappingURL=acorex-platform-extension-ai-conversation-client-acorex-platform-extension-ai-conversation-client-PyjS3LJH.mjs.map
|