@dataclouder/ngx-agent-cards 0.0.87 → 0.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +17 -7
  2. package/fesm2022/dataclouder-ngx-agent-cards.mjs +1314 -1292
  3. package/fesm2022/dataclouder-ngx-agent-cards.mjs.map +1 -1
  4. package/lib/components/chat-container/chat-container.component.d.ts +8 -22
  5. package/lib/components/chat-container/chat-footer/chat-footer.component.d.ts +16 -10
  6. package/lib/components/chat-container/chat-header/chat-header.component.d.ts +7 -8
  7. package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.component.d.ts +16 -9
  8. package/lib/components/chat-container/chat-messages-list/chat-message/chat-message.utils.d.ts +3 -2
  9. package/lib/components/chat-container/chat-messages-list/chat-message/multi-message-content/multi-message-content.d.ts +17 -6
  10. package/lib/components/chat-container/chat-messages-list/chat-messages-list.component.d.ts +5 -3
  11. package/lib/components/chat-settings/dc-conversation-userchat-settings.component.d.ts +7 -8
  12. package/lib/components/dc-agent-card-details/dc-agent-card-details.component.d.ts +4 -6
  13. package/lib/components/dc-agent-card-lists/agent-card-default-ui/agent-card-default-ui.component.d.ts +5 -5
  14. package/lib/components/dc-agent-card-lists/dc-agent-card-lists.component.d.ts +9 -10
  15. package/lib/components/dc-agent-form/account-platform/account-platform-form.component.d.ts +3 -4
  16. package/lib/components/dc-agent-form/dc-agent-card-form.component.d.ts +16 -18
  17. package/lib/components/icons/icons.component.d.ts +7 -7
  18. package/lib/components/prompt-preview-dialog/prompt-preview-dialog.component.d.ts +3 -2
  19. package/lib/components/provider-selector/provider-selector.component.d.ts +3 -3
  20. package/lib/components/standalone-audio-text-sync/standalone-audio-text-sync.component.d.ts +62 -0
  21. package/lib/components/translate-dialog/translate-dialog.component.d.ts +3 -5
  22. package/lib/models/agent.models.d.ts +2 -0
  23. package/lib/models/conversation-ai.class.d.ts +2 -2
  24. package/lib/services/conversation.service.d.ts +2 -3
  25. package/lib/services/dc-conversation-builder.service.d.ts +2 -2
  26. package/lib/services/evaluation.service.d.ts +2 -2
  27. package/package.json +1 -1
  28. package/public-api.d.ts +2 -0
  29. package/lib/components/audio-text-sync/audio-text-sync.component.d.ts +0 -42
  30. package/lib/components/chat-container/chat-messages-list/chat-message/message-content/message-content.component.d.ts +0 -24
@@ -119,6 +119,8 @@ export declare class MessageAudio {
119
119
  text?: string;
120
120
  content?: string;
121
121
  voice?: string;
122
+ shouldPlayAudio?: boolean;
123
+ messageId?: string | number;
122
124
  }
123
125
  export declare class ChatMultiMessage extends MessageAudio {
124
126
  tag: string | string[] | Set<string> | {
@@ -1,6 +1,6 @@
1
1
  import { InjectionToken, Type } from '@angular/core';
2
2
  import { Provider } from '@angular/core';
3
- import { ChatUserSettings, IAgentCard, ModelName, IConversationSettingsDTO, IAgentResponseDTO } from './agent.models';
3
+ import { ChatUserSettings, IAgentCard, ModelName, IConversationSettingsDTO, IAgentResponseDTO, TTSRequest } from './agent.models';
4
4
  import { FiltersConfig, IFilterQueryResponse } from '@dataclouder/ngx-core';
5
5
  export declare const CONVERSATION_AI_TOKEN: InjectionToken<AgentCardsAbstractService>;
6
6
  export declare abstract class AgentCardsAbstractService {
@@ -16,7 +16,7 @@ export declare abstract class AgentCardsAbstractService {
16
16
  abstract findAgentCardByTitle(title: string): Promise<IAgentCard>;
17
17
  abstract saveConversationCard(conversation: IAgentCard): Promise<IAgentCard>;
18
18
  abstract deleteConversationCard(id: string): Promise<IAgentCard>;
19
- abstract getTextAudioFile(tts: any): Promise<any>;
19
+ abstract getTextAudioFile(tts: TTSRequest): Promise<any>;
20
20
  abstract getConversationUserChatSettings(): Promise<ChatUserSettings>;
21
21
  abstract getListModels(provider: string): Promise<ModelName[]>;
22
22
  abstract translateConversation(currentLang: string, targetLang: string, id: string): Promise<ChatUserSettings>;
@@ -1,7 +1,5 @@
1
1
  import { Signal } from '@angular/core';
2
2
  import { ChatMessage, IAgentCard, IAgentResponseDTO, IConversationSettings } from '../models/agent.models';
3
- import { AgentCardsAbstractService } from '../models/conversation-ai.class';
4
- import { MessageProcessingService } from './message-processing.service';
5
3
  import * as i0 from "@angular/core";
6
4
  export declare class ConversationService {
7
5
  private agentCardService;
@@ -11,7 +9,8 @@ export declare class ConversationService {
11
9
  private conversationSettingsSignal;
12
10
  private agentCardSignal;
13
11
  private isDestroyedSignal;
14
- constructor(agentCardService: AgentCardsAbstractService, messageProcessingService: MessageProcessingService);
12
+ /** Inserted by Angular inject() migration for backwards compatibility */
13
+ constructor(...args: unknown[]);
15
14
  getMessages(): Signal<ChatMessage[]>;
16
15
  isThinking(): Signal<boolean>;
17
16
  getConversationSettings(): Signal<IConversationSettings | null>;
@@ -1,9 +1,9 @@
1
1
  import { ChatMessage, IConversationSettings, IAgentCard } from '../models/agent.models';
2
- import { UserDataExchangeAbstractService } from '../models/user-data-exchange';
3
2
  import * as i0 from "@angular/core";
4
3
  export declare class DCConversationPromptBuilderService {
5
4
  private userDataExchange;
6
- constructor(userDataExchange: UserDataExchangeAbstractService);
5
+ /** Inserted by Angular inject() migration for backwards compatibility */
6
+ constructor(...args: unknown[]);
7
7
  buildConversationSettings(agentCard: IAgentCard, parseDict?: {
8
8
  [key: string]: string;
9
9
  }): IConversationSettings;
@@ -1,12 +1,12 @@
1
1
  import { Signal } from '@angular/core';
2
2
  import { ChatMessage, IMiniAgentCard } from '../models/agent.models';
3
- import { AgentCardsAbstractService } from '../models/conversation-ai.class';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class EvaluationService {
6
5
  private agentCardService;
7
6
  private scoreSignal;
8
7
  private evaluationResultSignal;
9
- constructor(agentCardService: AgentCardsAbstractService);
8
+ /** Inserted by Angular inject() migration for backwards compatibility */
9
+ constructor(...args: unknown[]);
10
10
  getScore(): Signal<number>;
11
11
  getEvaluationResult(): Signal<any>;
12
12
  evaluateConversation(messages: ChatMessage[], evaluator: IMiniAgentCard): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-agent-cards",
3
- "version": "0.0.87",
3
+ "version": "0.0.88",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
package/public-api.d.ts CHANGED
@@ -14,3 +14,5 @@ export * from './lib/components/provider-selector/provider-selector.component';
14
14
  export * from './lib/models/agent.utils';
15
15
  export * from './lib/components/chat-container/chat-container.component';
16
16
  export * from './lib/components/chat-container/chat.models';
17
+ export * from './lib/components/standalone-audio-text-sync/standalone-audio-text-sync.component';
18
+ export * from './lib/components/chat-container/chat-messages-list/chat-message/chat-message.utils';
@@ -1,42 +0,0 @@
1
- import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
2
- import { HighlightedWord } from '../../services/audio-text-sync.service';
3
- import { MessageAudio } from '../../models/agent.models';
4
- import { AudioTextSyncService } from '../../services/audio-text-sync.service';
5
- import * as i0 from "@angular/core";
6
- export declare class AudioTextSyncComponent implements OnInit {
7
- private cdr;
8
- private audioTextSyncService;
9
- message: MessageAudio;
10
- isLoading: boolean;
11
- playAudio: EventEmitter<MessageAudio>;
12
- highlightedWords: import("@angular/core").WritableSignal<HighlightedWord[]>;
13
- private messageId;
14
- private injector;
15
- constructor(cdr: ChangeDetectorRef, audioTextSyncService: AudioTextSyncService);
16
- /**
17
- * Check if the message has transcription timestamps
18
- */
19
- get hasTranscription(): boolean;
20
- /**
21
- * Get the message text content
22
- */
23
- get messageText(): string;
24
- /**
25
- * Track function for ngFor to improve performance
26
- * @param index The current item's index
27
- * @param item The current item
28
- */
29
- trackByIndex(index: number, item: any): number;
30
- ngOnInit(): void;
31
- /**
32
- * Generate a unique ID for this message instance
33
- * Uses message content/text and a timestamp to ensure uniqueness
34
- */
35
- private generateMessageId;
36
- /**
37
- * Emit event to play the audio message
38
- */
39
- onPlayMessage(): void;
40
- static ɵfac: i0.ɵɵFactoryDeclaration<AudioTextSyncComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<AudioTextSyncComponent, "dc-audio-text-sync", never, { "message": { "alias": "message"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, { "playAudio": "playAudio"; }, never, never, true, never>;
42
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { MessageAudio } from '../../../../../models/agent.models';
3
- import * as i0 from "@angular/core";
4
- export declare class MessageContentComponent implements OnInit {
5
- message: MessageAudio;
6
- isLoading: boolean;
7
- playAudio: EventEmitter<MessageAudio>;
8
- constructor();
9
- get hasTranscription(): boolean;
10
- get messageText(): string;
11
- get messageTag(): string | string[] | Set<string> | {
12
- [klass: string]: any;
13
- } | null;
14
- onPlayMessage(): void;
15
- /**
16
- * Track function for ngFor to improve performance
17
- * @param index The current item's index
18
- * @param item The current item
19
- */
20
- trackByIndex(index: number, item: any): number;
21
- ngOnInit(): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<MessageContentComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<MessageContentComponent, "dc-message-content", never, { "message": { "alias": "message"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; }, { "playAudio": "playAudio"; }, never, never, true, never>;
24
- }