@dataclouder/ngx-agent-cards 0.0.87 → 0.0.89
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/README.md +17 -7
- package/fesm2022/dataclouder-ngx-agent-cards.mjs +1134 -1352
- package/fesm2022/dataclouder-ngx-agent-cards.mjs.map +1 -1
- package/lib/components/chat-container/chat-container.component.d.ts +9 -38
- package/lib/components/chat-container/chat-footer/chat-footer.component.d.ts +18 -10
- package/lib/components/chat-container/chat-header/chat-header.component.d.ts +7 -8
- package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.component.d.ts +11 -27
- package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.utils.d.ts +3 -2
- package/lib/components/chat-container/chat-messages-list/chat-messages-list.component.d.ts +3 -3
- package/lib/components/chat-container/chat-messages-list/message-orchestrator/message-orchestrator.component.d.ts +26 -0
- package/lib/components/chat-settings/dc-conversation-userchat-settings.component.d.ts +7 -8
- package/lib/components/dc-agent-card-details/dc-agent-card-details.component.d.ts +4 -6
- package/lib/components/dc-agent-card-lists/agent-card-default-ui/agent-card-default-ui.component.d.ts +5 -5
- package/lib/components/dc-agent-card-lists/dc-agent-card-lists.component.d.ts +9 -10
- package/lib/components/dc-agent-form/account-platform/account-platform-form.component.d.ts +3 -4
- package/lib/components/dc-agent-form/dc-agent-card-form.component.d.ts +16 -18
- package/lib/components/icons/icons.component.d.ts +7 -7
- package/lib/components/prompt-preview-dialog/prompt-preview-dialog.component.d.ts +3 -2
- package/lib/components/provider-selector/provider-selector.component.d.ts +3 -3
- package/lib/components/text-highlighter/text-highlighter.d.ts +62 -0
- package/lib/components/translate-dialog/translate-dialog.component.d.ts +3 -5
- package/lib/models/agent.models.d.ts +5 -7
- package/lib/models/conversation-ai.class.d.ts +2 -2
- package/lib/models/user-data-exchange.d.ts +2 -0
- package/lib/pipes/safe-json.pipe.d.ts +15 -0
- package/lib/services/conversation.service.d.ts +8 -14
- package/lib/services/dc-conversation-builder.service.d.ts +0 -2
- package/lib/services/evaluation.service.d.ts +2 -2
- package/lib/services/message-processing.service.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
- package/lib/components/audio-text-sync/audio-text-sync.component.d.ts +0 -42
- package/lib/components/chat-container/chat-messages-list/chat-message/message-content/message-content.component.d.ts +0 -24
- package/lib/components/chat-container/chat-messages-list/chat-message/multi-message-content/multi-message-content.d.ts +0 -22
- package/lib/services/audio-text-sync.service.d.ts +0 -57
|
@@ -1,50 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DialogService } from 'primeng/dynamicdialog';
|
|
3
|
-
import { ToastAlertsAbstractService } from '@dataclouder/ngx-core';
|
|
1
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
4
2
|
import { MicSettings } from '@dataclouder/ngx-mic';
|
|
5
|
-
import { ChatUserSettings, IAgentCard, IMiniAgentCard
|
|
6
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
7
|
-
import { DCConversationPromptBuilderService } from '../../services/dc-conversation-builder.service';
|
|
8
|
-
import { ConversationService } from '../../services/conversation.service';
|
|
9
|
-
import { EvaluationService } from '../../services/evaluation.service';
|
|
3
|
+
import { ChatMessage, ChatUserSettings, IAgentCard, IMiniAgentCard } from '../../models/agent.models';
|
|
10
4
|
import * as i0 from "@angular/core";
|
|
11
5
|
export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
12
|
-
private agentCardService;
|
|
13
|
-
private toastService;
|
|
14
6
|
private conversationBuilder;
|
|
15
7
|
private dialogService;
|
|
16
8
|
private conversationService;
|
|
17
|
-
private
|
|
9
|
+
private userDataExchange;
|
|
18
10
|
chatUserSettings: ChatUserSettings;
|
|
19
11
|
agentCard: IAgentCard;
|
|
20
|
-
evaluatorAgentCard: IMiniAgentCard
|
|
21
|
-
parseDict: {
|
|
12
|
+
readonly evaluatorAgentCard: import("@angular/core").InputSignal<IMiniAgentCard>;
|
|
13
|
+
readonly parseDict: import("@angular/core").InputSignal<{
|
|
22
14
|
[key: string]: string;
|
|
23
|
-
}
|
|
24
|
-
sendMessage:
|
|
15
|
+
}>;
|
|
16
|
+
readonly sendMessage: import("@angular/core").OutputEmitterRef<string>;
|
|
25
17
|
micSettings: MicSettings;
|
|
26
|
-
imageUser: string;
|
|
27
|
-
thinkingImg: string;
|
|
28
|
-
aiIcon: string;
|
|
29
18
|
isInfoVisible: boolean;
|
|
30
|
-
isChatSettingsVisible: boolean;
|
|
31
|
-
isUserTalking: boolean;
|
|
32
|
-
isGettingTranscription: boolean;
|
|
33
19
|
isAdmin: boolean;
|
|
34
|
-
messages: import("@angular/core").
|
|
35
|
-
isThinking: import("@angular/core").Signal<boolean>;
|
|
36
|
-
score: import("@angular/core").Signal<number>;
|
|
37
|
-
constructor(agentCardService: AgentCardsAbstractService, toastService: ToastAlertsAbstractService, conversationBuilder: DCConversationPromptBuilderService, dialogService: DialogService, conversationService: ConversationService, evaluationService: EvaluationService);
|
|
20
|
+
messages: import("@angular/core").WritableSignal<ChatMessage[]>;
|
|
38
21
|
ngOnInit(): Promise<void>;
|
|
39
22
|
ngOnDestroy(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Handle user message from chat footer
|
|
42
|
-
*/
|
|
43
|
-
onUserMessage(message: ChatMessage): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Handle microphone input finished
|
|
46
|
-
*/
|
|
47
|
-
onMicFinished(eventBlob: any): Promise<void>;
|
|
48
23
|
/**
|
|
49
24
|
* Open chat settings dialog
|
|
50
25
|
*/
|
|
@@ -57,10 +32,6 @@ export declare class DCChatComponent implements OnInit, OnDestroy {
|
|
|
57
32
|
* Restart conversation
|
|
58
33
|
*/
|
|
59
34
|
restartConversation(conversation?: IAgentCard | null): Promise<void>;
|
|
60
|
-
/**
|
|
61
|
-
* Evaluate conversation using evaluator agent
|
|
62
|
-
*/
|
|
63
|
-
private evaluateConversation;
|
|
64
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCChatComponent, never>;
|
|
65
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DCChatComponent, "dc-chat", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; }; "parseDict": { "alias": "parseDict"; "required": false; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCChatComponent, "dc-chat", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; "isSignal": true; }; "parseDict": { "alias": "parseDict"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; }, never, never, true, never>;
|
|
66
37
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { FormControl } from '@angular/forms';
|
|
3
2
|
import { MicSettings } from '@dataclouder/ngx-mic';
|
|
4
|
-
import { ChatMessage } from '../../../models/agent.models';
|
|
3
|
+
import { ChatMessage, IMiniAgentCard } from '../../../models/agent.models';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class ChatFooterComponent {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
private conversationService;
|
|
7
|
+
private evaluationService;
|
|
8
|
+
readonly isAIThinking: import("@angular/core").InputSignal<boolean>;
|
|
9
|
+
readonly evaluatorAgentCard: import("@angular/core").InputSignal<IMiniAgentCard>;
|
|
10
|
+
readonly micSettings: import("@angular/core").InputSignal<MicSettings>;
|
|
11
|
+
readonly sendMessage: import("@angular/core").OutputEmitterRef<ChatMessage>;
|
|
12
|
+
readonly textInputChanged: import("@angular/core").OutputEmitterRef<string>;
|
|
13
|
+
isGettingTranscription: boolean;
|
|
14
|
+
isUserTalking: boolean;
|
|
13
15
|
chatInputControl: FormControl;
|
|
16
|
+
score: import("@angular/core").Signal<number>;
|
|
14
17
|
/**
|
|
15
18
|
* Sets the input text in the textarea
|
|
16
19
|
* @param text The text to set
|
|
@@ -24,7 +27,12 @@ export declare class ChatFooterComponent {
|
|
|
24
27
|
/**
|
|
25
28
|
* Sends the user message
|
|
26
29
|
*/
|
|
27
|
-
sendUserMessage(): void
|
|
30
|
+
sendUserMessage(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Evaluate conversation using evaluator agent
|
|
33
|
+
*/
|
|
34
|
+
private evaluateConversation;
|
|
35
|
+
onMicFinished(eventBlob: any): Promise<void>;
|
|
28
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatFooterComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatFooterComponent, "dc-chat-footer", never, { "isAIThinking": { "alias": "isAIThinking"; "required": false; }; "
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatFooterComponent, "dc-chat-footer", never, { "isAIThinking": { "alias": "isAIThinking"; "required": false; "isSignal": true; }; "evaluatorAgentCard": { "alias": "evaluatorAgentCard"; "required": false; "isSignal": true; }; "micSettings": { "alias": "micSettings"; "required": false; "isSignal": true; }; }, { "sendMessage": "sendMessage"; "textInputChanged": "textInputChanged"; }, never, never, true, never>;
|
|
30
38
|
}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
1
|
import { IAgentCard } from '../../../models/agent.models';
|
|
3
|
-
import { AgentCardsAbstractService } from '../../../models/conversation-ai.class';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
3
|
export declare class ChatHeaderComponent {
|
|
6
4
|
private agentCardService;
|
|
7
|
-
isAdmin: boolean
|
|
5
|
+
readonly isAdmin: import("@angular/core").InputSignal<boolean>;
|
|
8
6
|
alternativeConversation: IAgentCard[];
|
|
9
7
|
agentCard: IAgentCard;
|
|
10
|
-
restartConversationEvent:
|
|
11
|
-
showInfoEvent:
|
|
12
|
-
settingsClickEvent:
|
|
13
|
-
|
|
8
|
+
readonly restartConversationEvent: import("@angular/core").OutputEmitterRef<IAgentCard>;
|
|
9
|
+
readonly showInfoEvent: import("@angular/core").OutputEmitterRef<void>;
|
|
10
|
+
readonly settingsClickEvent: import("@angular/core").OutputEmitterRef<void>;
|
|
11
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
12
|
+
constructor(...args: unknown[]);
|
|
14
13
|
restartConversation(conversation?: IAgentCard | null): void;
|
|
15
14
|
showInfo(): void;
|
|
16
15
|
settingsClick(): void;
|
|
17
16
|
changeConversationCard(): Promise<void>;
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatHeaderComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatHeaderComponent, "dc-chat-header", never, { "isAdmin": { "alias": "isAdmin"; "required": false; }; "alternativeConversation": { "alias": "alternativeConversation"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; }, { "restartConversationEvent": "restartConversationEvent"; "showInfoEvent": "showInfoEvent"; "settingsClickEvent": "settingsClickEvent"; }, never, never, true, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatHeaderComponent, "dc-chat-header", never, { "isAdmin": { "alias": "isAdmin"; "required": false; "isSignal": true; }; "alternativeConversation": { "alias": "alternativeConversation"; "required": false; }; "agentCard": { "alias": "agentCard"; "required": false; }; }, { "restartConversationEvent": "restartConversationEvent"; "showInfoEvent": "showInfoEvent"; "settingsClickEvent": "settingsClickEvent"; }, never, never, true, never>;
|
|
20
19
|
}
|
package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.component.d.ts
CHANGED
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChatMessage, ChatMultiMessage, ChatUserSettings, MessageAudio } from '../../../../models/agent.models';
|
|
3
|
-
import { AgentCardsAbstractService } from '../../../../models/conversation-ai.class';
|
|
4
|
-
import { AudioService } from '../../../../services/audio.service';
|
|
5
|
-
import { AudioTextSyncService } from '../../../../services/audio-text-sync.service';
|
|
1
|
+
import { ChatMessage, ChatUserSettings, MessageAudio } from '../../../../models/agent.models';
|
|
6
2
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class ChatMessageComponent
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
constructor(audioService: AudioService, agentCardService: AgentCardsAbstractService, audioTextSyncService: AudioTextSyncService);
|
|
17
|
-
ngOnInit(): Promise<void>;
|
|
18
|
-
generateAndPlayAudio(message: ChatMessage, overwriteText?: string | null): Promise<void>;
|
|
19
|
-
playMessage(message: MessageAudio): HTMLAudioElement | null;
|
|
20
|
-
/**
|
|
21
|
-
* Generate a unique ID for a message
|
|
22
|
-
* Uses message content/text and a timestamp to ensure uniqueness
|
|
23
|
-
*/
|
|
24
|
-
private generateMessageId;
|
|
25
|
-
generateAndPlayAllAudios(multiMessages: ChatMultiMessage[]): void;
|
|
26
|
-
private preloadNextMessageAudio;
|
|
27
|
-
private buildObjectTTSRequest;
|
|
3
|
+
export declare class ChatMessageComponent {
|
|
4
|
+
chatMessage: import("@angular/core").InputSignal<ChatMessage>;
|
|
5
|
+
chatUserSettings: import("@angular/core").InputSignal<ChatUserSettings>;
|
|
6
|
+
audioMessage: import("@angular/core").WritableSignal<MessageAudio>;
|
|
7
|
+
hasMultiMessages: import("@angular/core").Signal<boolean>;
|
|
8
|
+
multiMessages: import("@angular/core").Signal<MessageAudio[]>;
|
|
9
|
+
messageTranslation: import("@angular/core").Signal<string>;
|
|
10
|
+
isUserMessage: import("@angular/core").Signal<boolean>;
|
|
11
|
+
private messageEffect;
|
|
28
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessageComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "dc-chat-message", never, { "chatMessage": { "alias": "chatMessage"; "required":
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessageComponent, "dc-chat-message", never, { "chatMessage": { "alias": "chatMessage"; "required": true; "isSignal": true; }; "chatUserSettings": { "alias": "chatUserSettings"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
14
|
}
|
package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { AudioGenerated,
|
|
1
|
+
import { AudioGenerated, ChatUserSettings, MessageAudio, TTSRequest } from '../../../../models/agent.models';
|
|
2
2
|
export declare function matchTranscription(originalText: string, transcription: any[]): any[];
|
|
3
|
-
export declare function extractAudioAndTranscription(message:
|
|
3
|
+
export declare function extractAudioAndTranscription(message: MessageAudio, audio: AudioGenerated): MessageAudio;
|
|
4
|
+
export declare function buildObjectTTSRequest(message: MessageAudio, settings?: ChatUserSettings): TTSRequest;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ChatMessage, ChatUserSettings } from '../../../models/agent.models';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class ChatMessagesListComponent {
|
|
4
|
-
chatUserSettings: ChatUserSettings
|
|
5
|
-
thinkingImg: string;
|
|
4
|
+
readonly chatUserSettings: import("@angular/core").InputSignal<ChatUserSettings>;
|
|
6
5
|
aiIcon: string;
|
|
7
6
|
private conversationService;
|
|
7
|
+
inputMessages: import("@angular/core").InputSignal<ChatMessage[]>;
|
|
8
8
|
messages: import("@angular/core").Signal<ChatMessage[]>;
|
|
9
9
|
isThinking: import("@angular/core").Signal<boolean>;
|
|
10
10
|
trackByMessage(index: number, message: ChatMessage): string;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChatMessagesListComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessagesListComponent, "dc-chat-messages-list", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required":
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChatMessagesListComponent, "dc-chat-messages-list", never, { "chatUserSettings": { "alias": "chatUserSettings"; "required": true; "isSignal": true; }; "inputMessages": { "alias": "inputMessages"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
13
13
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ChatRole, MessageAudio } from '../../../../models/agent.models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class MessageOrchestratorComponent implements OnInit {
|
|
5
|
+
private agentCardService;
|
|
6
|
+
private conversationService;
|
|
7
|
+
messages: import("@angular/core").InputSignal<MessageAudio[]>;
|
|
8
|
+
messageRole: import("@angular/core").InputSignal<ChatRole>;
|
|
9
|
+
messagesSignal: import("@angular/core").WritableSignal<MessageAudio[]>;
|
|
10
|
+
readonly playAudio: import("@angular/core").OutputEmitterRef<MessageAudio>;
|
|
11
|
+
readonly audioCompleted: import("@angular/core").OutputEmitterRef<MessageAudio>;
|
|
12
|
+
private audioQueue;
|
|
13
|
+
private isGenerating;
|
|
14
|
+
private currentPlayingIndex;
|
|
15
|
+
private preGenerationInProgress;
|
|
16
|
+
ngOnInit(): void;
|
|
17
|
+
private initializeAudioQueue;
|
|
18
|
+
private processNextInQueue;
|
|
19
|
+
private preGenerateNextIfNeeded;
|
|
20
|
+
private generateAudioForIndex;
|
|
21
|
+
onAudioCompleted(message: MessageAudio): void;
|
|
22
|
+
changeStates(index: number, messageAudio: MessageAudio): void;
|
|
23
|
+
generateAudio(message: MessageAudio, overwriteText?: string | null): Promise<MessageAudio>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageOrchestratorComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MessageOrchestratorComponent, "dc-message-orchestrator", never, { "messages": { "alias": "messages"; "required": true; "isSignal": true; }; "messageRole": { "alias": "messageRole"; "required": true; "isSignal": true; }; }, { "playAudio": "playAudio"; "audioCompleted": "audioCompleted"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { OnInit, TemplateRef } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
3
|
import { TextEngines } from '../../models/conversation-enums';
|
|
4
|
-
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
5
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
5
|
export declare class DCConversationUserChatSettingsComponent implements OnInit {
|
|
8
6
|
private dialogRef;
|
|
9
7
|
private fb;
|
|
10
8
|
private conversationCardAIService;
|
|
11
9
|
isLoadingModels: boolean;
|
|
12
|
-
showFeature: any
|
|
13
|
-
onSettingsChange:
|
|
10
|
+
readonly showFeature: import("@angular/core").InputSignal<any>;
|
|
11
|
+
readonly onSettingsChange: import("@angular/core").OutputEmitterRef<any>;
|
|
14
12
|
textEngines: TextEngines[];
|
|
15
13
|
voiceTTSOptions: import("@dataclouder/ngx-agent-cards").VoiceTTSOption[];
|
|
16
14
|
textEngineOptions: {
|
|
@@ -35,12 +33,13 @@ export declare class DCConversationUserChatSettingsComponent implements OnInit {
|
|
|
35
33
|
}>;
|
|
36
34
|
}>;
|
|
37
35
|
tooltipRef: TemplateRef<any>;
|
|
38
|
-
|
|
36
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
37
|
+
constructor(...args: unknown[]);
|
|
39
38
|
isAdmin: boolean;
|
|
40
39
|
ngOnInit(): void;
|
|
41
40
|
private loadInitialSettings;
|
|
42
41
|
close(): void;
|
|
43
42
|
saveSettings(): Promise<void>;
|
|
44
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCConversationUserChatSettingsComponent, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationUserChatSettingsComponent, "dc-chat-settings-dialog", never, { "showFeature": { "alias": "showFeature"; "required": false; }; }, { "onSettingsChange": "onSettingsChange"; }, never, never, true, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationUserChatSettingsComponent, "dc-chat-settings-dialog", never, { "showFeature": { "alias": "showFeature"; "required": false; "isSignal": true; }; }, { "onSettingsChange": "onSettingsChange"; }, never, never, true, never>;
|
|
46
45
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
3
2
|
import { IAgentCard } from '../../models/agent.models';
|
|
4
|
-
import { ActivatedRoute } from '@angular/router';
|
|
5
|
-
import { UserDataExchangeAbstractService } from '../../models/user-data-exchange';
|
|
6
3
|
import * as i0 from "@angular/core";
|
|
7
4
|
export declare class DcAgentCardDetailsComponent implements OnInit {
|
|
8
5
|
private agentCardService;
|
|
9
6
|
private route;
|
|
10
7
|
private cdr;
|
|
11
8
|
private userDataExchange;
|
|
12
|
-
|
|
9
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
10
|
+
constructor(...args: unknown[]);
|
|
13
11
|
agentCardId: string;
|
|
14
|
-
onStartConversation:
|
|
12
|
+
readonly onStartConversation: import("@angular/core").OutputEmitterRef<any>;
|
|
15
13
|
agentCard: IAgentCard;
|
|
16
14
|
ngOnInit(): Promise<void>;
|
|
17
15
|
startConversation(): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type OnInit } from '@angular/core';
|
|
2
2
|
import { IAgentCard } from '../../../models/agent.models';
|
|
3
3
|
import { MenuItem } from 'primeng/api';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class DCConversationCardUIComponent implements OnInit {
|
|
6
6
|
speedDialModel: MenuItem[];
|
|
7
7
|
ngOnInit(): void;
|
|
8
|
-
card: IAgentCard
|
|
9
|
-
showOptions: boolean
|
|
10
|
-
onCardAction:
|
|
8
|
+
readonly card: import("@angular/core").InputSignal<IAgentCard>;
|
|
9
|
+
readonly showOptions: import("@angular/core").InputSignal<boolean>;
|
|
10
|
+
readonly onCardAction: import("@angular/core").OutputEmitterRef<{
|
|
11
11
|
event: string;
|
|
12
12
|
card: IAgentCard;
|
|
13
13
|
}>;
|
|
@@ -15,5 +15,5 @@ export declare class DCConversationCardUIComponent implements OnInit {
|
|
|
15
15
|
onEdit(): void;
|
|
16
16
|
onDelete(): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCConversationCardUIComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationCardUIComponent, "dc-agent-card-default-ui", never, { "card": { "alias": "card"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; }, { "onCardAction": "onCardAction"; }, never, never, true, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCConversationCardUIComponent, "dc-agent-card-default-ui", never, { "card": { "alias": "card"; "required": false; "isSignal": true; }; "showOptions": { "alias": "showOptions"; "required": false; "isSignal": true; }; }, { "onCardAction": "onCardAction"; }, never, never, true, never>;
|
|
19
19
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { OnInit, Type, OnDestroy
|
|
2
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
1
|
+
import { OnInit, Type, OnDestroy } from '@angular/core';
|
|
3
2
|
import { IAgentCard } from '../../models/agent.models';
|
|
4
|
-
import {
|
|
5
|
-
import { FiltersConfig, PaginationBase, ToastAlertsAbstractService, PColumn, OnActionEvent } from '@dataclouder/ngx-core';
|
|
3
|
+
import { FiltersConfig, PaginationBase, PColumn, OnActionEvent } from '@dataclouder/ngx-core';
|
|
6
4
|
import { DCConversationCardUIComponent } from './agent-card-default-ui/agent-card-default-ui.component';
|
|
7
5
|
import { NgComponentOutlet } from '@angular/common';
|
|
8
6
|
import { QueryList } from '@angular/core';
|
|
@@ -13,16 +11,17 @@ export declare class AgentCardListComponent extends PaginationBase implements On
|
|
|
13
11
|
private toastService;
|
|
14
12
|
private cdr;
|
|
15
13
|
viewMode: 'cards' | 'table';
|
|
16
|
-
customCardComponent
|
|
17
|
-
showOptions
|
|
18
|
-
gridLayout: boolean
|
|
19
|
-
getCustomButtons: (card: IAgentCard) => MenuItem[]
|
|
14
|
+
readonly customCardComponent: import("@angular/core").InputSignal<Type<DCConversationCardUIComponent>>;
|
|
15
|
+
readonly showOptions: import("@angular/core").InputSignal<boolean>;
|
|
16
|
+
readonly gridLayout: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
readonly getCustomButtons: import("@angular/core").InputSignal<(card: IAgentCard) => MenuItem[]>;
|
|
20
18
|
outlets: QueryList<NgComponentOutlet>;
|
|
21
19
|
protected columns: PColumn[];
|
|
22
20
|
agentCards: IAgentCard[];
|
|
23
21
|
private cardEventSubs;
|
|
24
22
|
cardComponent: Type<DCConversationCardUIComponent>;
|
|
25
|
-
|
|
23
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
24
|
+
constructor(...args: unknown[]);
|
|
26
25
|
ngOnInit(): void;
|
|
27
26
|
subscribeDinamicInstantToEvents(): void;
|
|
28
27
|
private subscribeToCardEvents;
|
|
@@ -41,5 +40,5 @@ export declare class AgentCardListComponent extends PaginationBase implements On
|
|
|
41
40
|
filterChange(filters: FiltersConfig): Promise<void>;
|
|
42
41
|
onCardAction(actionEvent: OnActionEvent): void;
|
|
43
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<AgentCardListComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AgentCardListComponent, "dc-agent-card-lists", never, { "viewMode": { "alias": "viewMode"; "required": false; }; "customCardComponent": { "alias": "customCardComponent"; "required": false; }; "showOptions": { "alias": "showOptions"; "required": false; }; "gridLayout": { "alias": "gridLayout"; "required": false; }; "getCustomButtons": { "alias": "getCustomButtons"; "required": false; }; }, {}, never, never, true, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AgentCardListComponent, "dc-agent-card-lists", never, { "viewMode": { "alias": "viewMode"; "required": false; }; "customCardComponent": { "alias": "customCardComponent"; "required": false; "isSignal": true; }; "showOptions": { "alias": "showOptions"; "required": false; "isSignal": true; }; "gridLayout": { "alias": "gridLayout"; "required": false; "isSignal": true; }; "getCustomButtons": { "alias": "getCustomButtons"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
45
44
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { FormArray
|
|
3
|
-
import { ActivatedRoute, Router } from '@angular/router';
|
|
4
|
-
import { ToastAlertsAbstractService } from '@dataclouder/ngx-core';
|
|
2
|
+
import { FormArray } from '@angular/forms';
|
|
5
3
|
import { EAccountsPlatform } from '../../../models/agent.models';
|
|
6
4
|
import * as i0 from "@angular/core";
|
|
7
5
|
export declare class AccountPlatformForm implements OnInit {
|
|
@@ -14,7 +12,8 @@ export declare class AccountPlatformForm implements OnInit {
|
|
|
14
12
|
label: string;
|
|
15
13
|
value: EAccountsPlatform;
|
|
16
14
|
}[];
|
|
17
|
-
|
|
15
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
16
|
+
constructor(...args: unknown[]);
|
|
18
17
|
genericId: any;
|
|
19
18
|
ngOnInit(): Promise<void>;
|
|
20
19
|
save(): Promise<void>;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { StorageImageSettings, MultiImagesStorageService } from '@dataclouder/ngx-cloud-storage';
|
|
6
|
-
import { DCConversationPromptBuilderService } from '../../services/dc-conversation-builder.service';
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormArray } from '@angular/forms';
|
|
3
|
+
import { AudioSpeed } from '@dataclouder/ngx-core';
|
|
4
|
+
import { StorageImageSettings } from '@dataclouder/ngx-cloud-storage';
|
|
7
5
|
import { DialogService } from 'primeng/dynamicdialog';
|
|
8
6
|
import { ConversationType, TextEngines } from '../../models/conversation-enums';
|
|
9
7
|
import { EAccountsPlatform, IAgentCard } from '../../models/agent.models';
|
|
10
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
11
8
|
import * as i0 from "@angular/core";
|
|
12
9
|
export declare class DCAgentCardFormComponent implements OnInit {
|
|
13
10
|
private fb;
|
|
@@ -18,7 +15,7 @@ export declare class DCAgentCardFormComponent implements OnInit {
|
|
|
18
15
|
private activatedRoute;
|
|
19
16
|
dialogService: DialogService;
|
|
20
17
|
private promptBuilder;
|
|
21
|
-
private toastService
|
|
18
|
+
private toastService;
|
|
22
19
|
textEngines: TextEngines[];
|
|
23
20
|
conversationOptions: {
|
|
24
21
|
value: ConversationType;
|
|
@@ -41,14 +38,14 @@ export declare class DCAgentCardFormComponent implements OnInit {
|
|
|
41
38
|
label: string;
|
|
42
39
|
value: AudioSpeed;
|
|
43
40
|
}[];
|
|
44
|
-
storageSettings: StorageImageSettings
|
|
45
|
-
bannerImgSettings: StorageImageSettings
|
|
46
|
-
imageStorageSettings: StorageImageSettings
|
|
41
|
+
readonly storageSettings: import("@angular/core").InputSignal<StorageImageSettings>;
|
|
42
|
+
readonly bannerImgSettings: import("@angular/core").InputSignal<StorageImageSettings>;
|
|
43
|
+
readonly imageStorageSettings: import("@angular/core").InputSignal<StorageImageSettings>;
|
|
47
44
|
stickerStorageSettings: StorageImageSettings;
|
|
48
|
-
onImageLoaded:
|
|
49
|
-
onSave:
|
|
50
|
-
onGoDetails:
|
|
51
|
-
onTranslate:
|
|
45
|
+
readonly onImageLoaded: import("@angular/core").OutputEmitterRef<any>;
|
|
46
|
+
readonly onSave: import("@angular/core").OutputEmitterRef<any>;
|
|
47
|
+
readonly onGoDetails: import("@angular/core").OutputEmitterRef<string>;
|
|
48
|
+
readonly onTranslate: import("@angular/core").OutputEmitterRef<any>;
|
|
52
49
|
markdownForm: import("@angular/forms").FormGroup<{
|
|
53
50
|
seeMarkdown: import("@angular/forms").FormControl<boolean>;
|
|
54
51
|
}>;
|
|
@@ -97,7 +94,8 @@ export declare class DCAgentCardFormComponent implements OnInit {
|
|
|
97
94
|
}>;
|
|
98
95
|
accounts: FormArray<import("@angular/forms").FormControl<unknown>>;
|
|
99
96
|
}>;
|
|
100
|
-
|
|
97
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
98
|
+
constructor(...args: unknown[]);
|
|
101
99
|
ngOnInit(): void;
|
|
102
100
|
private loadConversationCard;
|
|
103
101
|
private patchFormWithConversationData;
|
|
@@ -120,6 +118,6 @@ export declare class DCAgentCardFormComponent implements OnInit {
|
|
|
120
118
|
generateCharacter(): Promise<void>;
|
|
121
119
|
private extractJsonFromResponse;
|
|
122
120
|
removeSticker(sticker: any): Promise<void>;
|
|
123
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DCAgentCardFormComponent,
|
|
124
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DCAgentCardFormComponent, "dc-agent-form", never, { "storageSettings": { "alias": "storageSettings"; "required": false; }; "bannerImgSettings": { "alias": "bannerImgSettings"; "required": false; }; "imageStorageSettings": { "alias": "imageStorageSettings"; "required": false; }; }, { "onImageLoaded": "onImageLoaded"; "onSave": "onSave"; "onGoDetails": "onGoDetails"; "onTranslate": "onTranslate"; }, never, never, true, never>;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DCAgentCardFormComponent, never>;
|
|
122
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DCAgentCardFormComponent, "dc-agent-form", never, { "storageSettings": { "alias": "storageSettings"; "required": false; "isSignal": true; }; "bannerImgSettings": { "alias": "bannerImgSettings"; "required": false; "isSignal": true; }; "imageStorageSettings": { "alias": "imageStorageSettings"; "required": false; "isSignal": true; }; }, { "onImageLoaded": "onImageLoaded"; "onSave": "onSave"; "onGoDetails": "onGoDetails"; "onTranslate": "onTranslate"; }, never, never, true, never>;
|
|
125
123
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { IconName } from './icon-map';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class IconsComponent implements OnChanges {
|
|
6
5
|
private sanitizer;
|
|
7
|
-
name:
|
|
8
|
-
size: number
|
|
9
|
-
color: string
|
|
6
|
+
readonly name: import("@angular/core").InputSignal<"chat" | "play" | "loading">;
|
|
7
|
+
readonly size: import("@angular/core").InputSignal<number>;
|
|
8
|
+
readonly color: import("@angular/core").InputSignal<string>;
|
|
10
9
|
sanitizedIcon: SafeHtml;
|
|
11
|
-
|
|
10
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
11
|
+
constructor(...args: unknown[]);
|
|
12
12
|
ngOnChanges(changes: SimpleChanges): void;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<IconsComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<IconsComponent, "dc-icon", never, { "name": { "alias": "name"; "required":
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconsComponent, "dc-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class PromptPreviewDialogComponent {
|
|
4
4
|
private dynamicDialogConfig;
|
|
5
5
|
dialogRef: DynamicDialogRef<void>;
|
|
6
6
|
data: any;
|
|
7
|
-
|
|
7
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
8
|
+
constructor(...args: unknown[]);
|
|
8
9
|
close(): void;
|
|
9
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PromptPreviewDialogComponent, never>;
|
|
10
11
|
static ɵcmp: i0.ɵɵComponentDeclaration<PromptPreviewDialogComponent, "dc-prompt-preview-dialog", never, {}, {}, never, never, true, never>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AgentCardsAbstractService } from '../../models/conversation-ai.class';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
/**
|
|
6
5
|
* A component that provides AI model provider selection functionality.
|
|
@@ -28,7 +27,8 @@ export declare class ProviderSelectorComponent implements OnInit {
|
|
|
28
27
|
isLoadingModels: boolean;
|
|
29
28
|
/** Array of available models for the selected provider */
|
|
30
29
|
modelnames: any[];
|
|
31
|
-
|
|
30
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
31
|
+
constructor(...args: unknown[]);
|
|
32
32
|
/**
|
|
33
33
|
* Initializes the component by setting up subscriptions to provider changes
|
|
34
34
|
* and loading initial models if a provider is already selected.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { MessageAudio } from '../../models/agent.models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Interface for highlighted word state
|
|
6
|
+
*/
|
|
7
|
+
export interface HighlightedWord {
|
|
8
|
+
word: string;
|
|
9
|
+
index: number;
|
|
10
|
+
isHighlighted: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare class TextHighlighterComponent implements OnDestroy {
|
|
13
|
+
message: import("@angular/core").InputSignal<MessageAudio>;
|
|
14
|
+
highlightedWords: import("@angular/core").WritableSignal<HighlightedWord[]>;
|
|
15
|
+
isPlaying: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
iconState: import("@angular/core").Signal<"isLoading" | "isPlaying" | "playable" | "idle">;
|
|
17
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
18
|
+
shouldPlayAudio: import("@angular/core").Signal<boolean>;
|
|
19
|
+
messageText: import("@angular/core").Signal<string>;
|
|
20
|
+
classTag: import("@angular/core").Signal<string>;
|
|
21
|
+
hasTranscription: import("@angular/core").Signal<boolean>;
|
|
22
|
+
readonly playAudio: import("@angular/core").OutputEmitterRef<MessageAudio>;
|
|
23
|
+
readonly audioCompleted: import("@angular/core").OutputEmitterRef<MessageAudio>;
|
|
24
|
+
private audioElement;
|
|
25
|
+
private destroy$;
|
|
26
|
+
private cdr;
|
|
27
|
+
private destroyRef;
|
|
28
|
+
constructor();
|
|
29
|
+
/**
|
|
30
|
+
* Track function for ngFor to improve performance
|
|
31
|
+
*/
|
|
32
|
+
trackByIndex(index: number, item: any): number;
|
|
33
|
+
ngOnDestroy(): void;
|
|
34
|
+
private initializeBasedOnMessage;
|
|
35
|
+
/**
|
|
36
|
+
* Initialize the audio element and set up event listeners
|
|
37
|
+
*/
|
|
38
|
+
private initializeAudio;
|
|
39
|
+
/**
|
|
40
|
+
* Initialize highlighted words from transcription timestamps
|
|
41
|
+
*/
|
|
42
|
+
private initializeHighlightedWords;
|
|
43
|
+
/**
|
|
44
|
+
* Set up audio synchronization with text
|
|
45
|
+
*/
|
|
46
|
+
private subcribeToAudioSync;
|
|
47
|
+
private subscribeToEndAudio;
|
|
48
|
+
/**
|
|
49
|
+
* Clean up audio element and event listeners
|
|
50
|
+
*/
|
|
51
|
+
private cleanupAudio;
|
|
52
|
+
/**
|
|
53
|
+
* Play or pause the audio
|
|
54
|
+
*/
|
|
55
|
+
onPlayMessage(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Start audio playback and handle any setup needed
|
|
58
|
+
*/
|
|
59
|
+
private startAudioPlayback;
|
|
60
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextHighlighterComponent, never>;
|
|
61
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextHighlighterComponent, "dc-text-highlighter", never, { "message": { "alias": "message"; "required": true; "isSignal": true; }; }, { "playAudio": "playAudio"; "audioCompleted": "audioCompleted"; }, never, never, true, never>;
|
|
62
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormBuilder, FormGroup } from '@angular/forms';
|
|
1
|
+
import { FormGroup } from '@angular/forms';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class TranslateDialogComponent {
|
|
5
4
|
private fb;
|
|
@@ -12,9 +11,8 @@ export declare class TranslateDialogComponent {
|
|
|
12
11
|
code: string;
|
|
13
12
|
description: string;
|
|
14
13
|
}[];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
14
|
+
/** Inserted by Angular inject() migration for backwards compatibility */
|
|
15
|
+
constructor(...args: unknown[]);
|
|
18
16
|
onCancel(): void;
|
|
19
17
|
onConfirm(): void;
|
|
20
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateDialogComponent, never>;
|