@dataclouder/ngx-agent-cards 0.1.68 → 0.1.70
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/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
|
|
|
3
3
|
import { ChatUserSettings, EModelQuality, IAuditable, IAIModel, IManageable, EntityCommunicationService, FiltersConfig, IFilterQueryResponse, HttpCoreService, EntityBaseFormComponent, EntityBaseListComponent, ICustomFilter, PColumn, OnActionEvent, formatCamelCaseString } from '@dataclouder/ngx-core';
|
|
4
4
|
import * as _angular_forms from '@angular/forms';
|
|
5
5
|
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
6
|
-
import { AudioEffectType, TTSRequest } from '@dataclouder/ngx-
|
|
6
|
+
import { AudioEffectType, TTSRequest } from '@dataclouder/ngx-ai-services';
|
|
7
7
|
import * as _angular_core from '@angular/core';
|
|
8
8
|
import { InjectionToken, Type, Provider, WritableSignal, Injector, Signal, OnDestroy, ElementRef, OnInit, AfterViewInit, TemplateRef, EventEmitter } from '@angular/core';
|
|
9
9
|
import { UserService } from '@dataclouder/ngx-users';
|
|
@@ -451,6 +451,7 @@ declare class MessageContent {
|
|
|
451
451
|
tag?: string;
|
|
452
452
|
ssml?: string;
|
|
453
453
|
audioEffect?: AudioEffectType;
|
|
454
|
+
imageUrl?: string;
|
|
454
455
|
}
|
|
455
456
|
declare enum ChatRole {
|
|
456
457
|
System = "system",
|
|
@@ -541,6 +542,7 @@ declare class DefaultAgentCardsService extends EntityCommunicationService<IAgent
|
|
|
541
542
|
randomSeed: number;
|
|
542
543
|
protected toastService: _dataclouder_ngx_core.ToastAlertsAbstractService;
|
|
543
544
|
private appConfig;
|
|
545
|
+
private whisperService;
|
|
544
546
|
constructor();
|
|
545
547
|
partialUpdateAgentCard(agentCard: IAgentCard): Promise<IAgentCard>;
|
|
546
548
|
generateMainImage(idCard: string): Promise<any>;
|
|
@@ -886,13 +888,14 @@ declare class EvaluationService {
|
|
|
886
888
|
}
|
|
887
889
|
|
|
888
890
|
declare class DCChatComponent implements OnInit, OnDestroy {
|
|
889
|
-
private
|
|
891
|
+
private injector;
|
|
892
|
+
private userService;
|
|
893
|
+
private dialogService;
|
|
890
894
|
private conversationService;
|
|
891
895
|
evaluationService: EvaluationService;
|
|
892
896
|
messageStateService: MessagesStateService;
|
|
893
|
-
private dialogService;
|
|
894
897
|
private chatMonitorService;
|
|
895
|
-
private
|
|
898
|
+
private conversationInfoService;
|
|
896
899
|
private chatFooterComponent;
|
|
897
900
|
chatUserSettings: ChatUserSettings;
|
|
898
901
|
conversationSettings: IConversationSettings;
|
|
@@ -903,7 +906,6 @@ declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
903
906
|
}>;
|
|
904
907
|
readonly chatEvent: _angular_core.OutputEmitterRef<ChatEvent<any>>;
|
|
905
908
|
readonly goalCompleted: _angular_core.OutputEmitterRef<void>;
|
|
906
|
-
messages: _angular_core.WritableSignal<ChatMessage[]>;
|
|
907
909
|
micSettings: MicSettings;
|
|
908
910
|
isAdmin: boolean;
|
|
909
911
|
constructor();
|
|
@@ -1156,6 +1158,8 @@ type AudioState = 'idle' | 'playing' | 'paused' | 'loading' | 'playable';
|
|
|
1156
1158
|
declare class MessageContentDisplayer implements OnDestroy {
|
|
1157
1159
|
message: _angular_core.InputSignal<MessageContent>;
|
|
1158
1160
|
markWord: _angular_core.InputSignal<string>;
|
|
1161
|
+
highlightColor: _angular_core.InputSignal<string>;
|
|
1162
|
+
get hostHighlightColor(): string;
|
|
1159
1163
|
readonly playAudio: _angular_core.OutputEmitterRef<MessageContent>;
|
|
1160
1164
|
readonly audioCompleted: _angular_core.OutputEmitterRef<MessageContent>;
|
|
1161
1165
|
readonly wordClicked: _angular_core.OutputEmitterRef<{
|
|
@@ -1191,21 +1195,52 @@ declare class MessageContentDisplayer implements OnDestroy {
|
|
|
1191
1195
|
private startAudioPlayback;
|
|
1192
1196
|
debug(): void;
|
|
1193
1197
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MessageContentDisplayer, never>;
|
|
1194
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageContentDisplayer, "message-content-displayer", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "markWord": { "alias": "markWord"; "required": false; "isSignal": true; }; }, { "playAudio": "playAudio"; "audioCompleted": "audioCompleted"; "wordClicked": "wordClicked"; }, never, never, true, never>;
|
|
1198
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MessageContentDisplayer, "message-content-displayer", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; "markWord": { "alias": "markWord"; "required": false; "isSignal": true; }; "highlightColor": { "alias": "highlightColor"; "required": false; "isSignal": true; }; }, { "playAudio": "playAudio"; "audioCompleted": "audioCompleted"; "wordClicked": "wordClicked"; }, never, never, true, never>;
|
|
1195
1199
|
}
|
|
1196
1200
|
|
|
1197
1201
|
declare function matchTranscription(originalText: string, transcription: WordTimestamps[]): WordTimestamps[];
|
|
1198
1202
|
declare function extractAudioAndTranscription(message: MessageContent, audio: AudioGenerated): MessageContent;
|
|
1199
1203
|
declare function buildObjectTTSRequest(message: MessageContent, settings?: ChatUserSettings): TTSRequest;
|
|
1200
1204
|
|
|
1205
|
+
/**
|
|
1206
|
+
* @Component
|
|
1207
|
+
*
|
|
1208
|
+
* @description
|
|
1209
|
+
* This component orchestrates the display and audio playback of chat messages.
|
|
1210
|
+
* It uses the `MessageOrchestrationService` to manage the message queue and audio playback.
|
|
1211
|
+
*
|
|
1212
|
+
* @see MessageOrchestrationService
|
|
1213
|
+
* @see MessageContentDisplayer
|
|
1214
|
+
*/
|
|
1201
1215
|
declare class ChatMessageOrchestratorComponent implements OnInit {
|
|
1202
1216
|
private orchestrationService;
|
|
1217
|
+
/**
|
|
1218
|
+
* An array of `MessageContent` objects to be displayed and orchestrated.
|
|
1219
|
+
*/
|
|
1203
1220
|
messages: _angular_core.InputSignal<MessageContent[]>;
|
|
1221
|
+
/**
|
|
1222
|
+
* The `ChatRole` of the messages' author.
|
|
1223
|
+
*/
|
|
1204
1224
|
messageRole: _angular_core.InputSignal<ChatRole>;
|
|
1225
|
+
/**
|
|
1226
|
+
* Emits when the audio for a message has completed playing.
|
|
1227
|
+
*/
|
|
1205
1228
|
audioCompleted: _angular_core.OutputEmitterRef<MessageContent>;
|
|
1206
1229
|
messagesSignal: _angular_core.Signal<MessageContent[]>;
|
|
1207
1230
|
ngOnInit(): void;
|
|
1231
|
+
/**
|
|
1232
|
+
* @description
|
|
1233
|
+
* Handles the `audioCompleted` event from the `MessageContentDisplayer`.
|
|
1234
|
+
*
|
|
1235
|
+
* @param message - The `MessageContent` object whose audio has finished playing.
|
|
1236
|
+
*/
|
|
1208
1237
|
onAudioCompleted(message: MessageContent): void;
|
|
1238
|
+
/**
|
|
1239
|
+
* @description
|
|
1240
|
+
* Handles the `wordClicked` event from the `MessageContentDisplayer`.
|
|
1241
|
+
*
|
|
1242
|
+
* @param wordData - The `WordData` object containing information about the clicked word.
|
|
1243
|
+
*/
|
|
1209
1244
|
onWordClicked(wordData: WordData): void;
|
|
1210
1245
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChatMessageOrchestratorComponent, never>;
|
|
1211
1246
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChatMessageOrchestratorComponent, "dc-message-orchestrator", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "messageRole": { "alias": "messageRole"; "required": true; "isSignal": true; }; }, { "audioCompleted": "audioCompleted"; }, never, never, true, never>;
|