max-agent-ui 0.0.37 → 0.0.38
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/max-agent-ui.mjs +207 -128
- package/fesm2022/max-agent-ui.mjs.map +1 -1
- package/index.d.ts +24 -13
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { InjectionToken, OnInit, EventEmitter, DestroyRef } from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnInit, DoCheck, EventEmitter, DestroyRef } from '@angular/core';
|
|
3
3
|
import { HttpClient } from '@angular/common/http';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
|
|
@@ -30,7 +30,7 @@ interface AssistantConfirmation {
|
|
|
30
30
|
}
|
|
31
31
|
interface AssistantAnalyticsPage {
|
|
32
32
|
offset: number;
|
|
33
|
-
pageSize:
|
|
33
|
+
pageSize: 100;
|
|
34
34
|
}
|
|
35
35
|
interface AssistantStructuredAction {
|
|
36
36
|
capabilityKey: string;
|
|
@@ -275,7 +275,7 @@ interface AssistantResponseTable {
|
|
|
275
275
|
interface AssistantResponseTablePagination {
|
|
276
276
|
query: string;
|
|
277
277
|
offset: number;
|
|
278
|
-
pageSize:
|
|
278
|
+
pageSize: 100;
|
|
279
279
|
totalRecords: number;
|
|
280
280
|
totalRecordsExact?: boolean;
|
|
281
281
|
returnedRecords: number;
|
|
@@ -344,6 +344,8 @@ interface AssistantFeedbackResponse {
|
|
|
344
344
|
submittedAt: string;
|
|
345
345
|
}
|
|
346
346
|
interface AssistantChatRequest {
|
|
347
|
+
conversationStateVersion?: 1;
|
|
348
|
+
conversationState?: string;
|
|
347
349
|
message: string;
|
|
348
350
|
stream?: boolean;
|
|
349
351
|
conversationId?: string;
|
|
@@ -357,22 +359,28 @@ interface AssistantChatRequest {
|
|
|
357
359
|
}
|
|
358
360
|
interface AssistantChatProgress {
|
|
359
361
|
type: 'progress';
|
|
360
|
-
stage: 'request' | 'intent_projection' | 'embedding' | 'capability_routing' | 'argument_extraction' | 'api_call' | 'action' | 'response';
|
|
362
|
+
stage: 'request' | 'authorization' | 'intent_projection' | 'embedding' | 'capability_routing' | 'argument_extraction' | 'api_call' | 'action' | 'response';
|
|
361
363
|
message: string;
|
|
362
364
|
}
|
|
363
365
|
interface AssistantChatDelta {
|
|
364
366
|
type: 'delta';
|
|
365
367
|
delta: string;
|
|
366
368
|
}
|
|
367
|
-
|
|
369
|
+
interface AssistantChatData {
|
|
370
|
+
type: 'data';
|
|
371
|
+
data: Pick<AssistantChatResponse, 'displayResponse' | 'cards'>;
|
|
372
|
+
}
|
|
373
|
+
type AssistantChatActivity = AssistantChatProgress | AssistantChatDelta | AssistantChatData;
|
|
368
374
|
type AssistantChatStreamEvent = AssistantChatActivity | {
|
|
369
375
|
type: 'result';
|
|
370
376
|
response: AssistantChatResponse;
|
|
371
377
|
} | {
|
|
372
378
|
type: 'error';
|
|
373
379
|
message: string;
|
|
380
|
+
code?: string;
|
|
374
381
|
};
|
|
375
382
|
interface AssistantChatResponse {
|
|
383
|
+
conversationState?: string;
|
|
376
384
|
answer: string;
|
|
377
385
|
conversationId: string;
|
|
378
386
|
product: string;
|
|
@@ -446,6 +454,9 @@ interface AssistantBootstrapConfig {
|
|
|
446
454
|
}
|
|
447
455
|
|
|
448
456
|
interface MaxAssistantConfig {
|
|
457
|
+
/** Per-request transient state supplied by the assistant, never persisted by the host. */
|
|
458
|
+
conversationStateVersion?: 1;
|
|
459
|
+
conversationState?: string;
|
|
449
460
|
apiBaseUrl?: string;
|
|
450
461
|
assistantApiUrl?: string;
|
|
451
462
|
app?: AssistantProduct;
|
|
@@ -495,13 +506,9 @@ declare class MaxAssistantFeedbackService {
|
|
|
495
506
|
|
|
496
507
|
declare class MaxAssistantExportService {
|
|
497
508
|
exportTableToExcel(table: AssistantResponseTable): Promise<void>;
|
|
498
|
-
exportVisualisationToPdf(visualisation: AssistantVisualisation): Promise<void>;
|
|
499
|
-
private chartTotal;
|
|
500
|
-
private chartTypeLabel;
|
|
509
|
+
exportVisualisationToPdf(visualisation: AssistantVisualisation, visualisationElement: HTMLElement): Promise<void>;
|
|
501
510
|
private toExportCellValue;
|
|
502
511
|
private exportFileName;
|
|
503
|
-
private fallbackColor;
|
|
504
|
-
private pdfColor;
|
|
505
512
|
private downloadFile;
|
|
506
513
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaxAssistantExportService, never>;
|
|
507
514
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<MaxAssistantExportService>;
|
|
@@ -558,13 +565,14 @@ interface AssistantEntitySuggestionOption extends AssistantSuggestionOption {
|
|
|
558
565
|
presentation: 'person_card' | 'entity_tag';
|
|
559
566
|
entity: AssistantSuggestionEntity;
|
|
560
567
|
}
|
|
561
|
-
declare class MaxAssistantComponent implements OnInit {
|
|
568
|
+
declare class MaxAssistantComponent implements OnInit, DoCheck {
|
|
562
569
|
private readonly assistantService;
|
|
563
570
|
private readonly exportService;
|
|
564
571
|
private readonly feedbackService;
|
|
565
572
|
private readonly supportService;
|
|
566
573
|
private readonly destroyRef;
|
|
567
574
|
private readonly defaultConfig;
|
|
575
|
+
private readonly sessionState;
|
|
568
576
|
private messagesViewport?;
|
|
569
577
|
private activeTurnAnchorMessageId?;
|
|
570
578
|
private scrollToLatestTimer?;
|
|
@@ -609,6 +617,9 @@ declare class MaxAssistantComponent implements OnInit {
|
|
|
609
617
|
protected supportTicketForm: SupportTicketFormValue;
|
|
610
618
|
constructor(assistantService: MaxAssistantService, exportService: MaxAssistantExportService, feedbackService: MaxAssistantFeedbackService, supportService: MaxAssistantSupportService, destroyRef: DestroyRef, defaultConfig: MaxAssistantConfig);
|
|
611
619
|
ngOnInit(): void;
|
|
620
|
+
ngDoCheck(): void;
|
|
621
|
+
resetSession(): void;
|
|
622
|
+
protected onPageHide(): void;
|
|
612
623
|
focusComposer(): void;
|
|
613
624
|
protected get uiCopy(): typeof ASSISTANT_UI_COPY;
|
|
614
625
|
protected get bootstrapConfig(): AssistantBootstrapConfig;
|
|
@@ -668,7 +679,7 @@ declare class MaxAssistantComponent implements OnInit {
|
|
|
668
679
|
protected isTablePageLoading(messageId: string, tableIndex: number): boolean;
|
|
669
680
|
protected tablePageError(messageId: string, tableIndex: number): string | undefined;
|
|
670
681
|
protected exportTable(table: AssistantResponseTable): void;
|
|
671
|
-
protected exportVisualisation(visualisation: AssistantVisualisation): void;
|
|
682
|
+
protected exportVisualisation(visualisation: AssistantVisualisation, visualisationElement: HTMLElement): void;
|
|
672
683
|
protected chartType(visualisation: AssistantVisualisation): 'bar' | 'line' | 'doughnut' | 'pie' | 'radar' | 'polarArea';
|
|
673
684
|
protected chartData(visualisation: AssistantVisualisation): {
|
|
674
685
|
labels: string[];
|
|
@@ -768,4 +779,4 @@ declare class MaxAgentShiftCardComponent {
|
|
|
768
779
|
}
|
|
769
780
|
|
|
770
781
|
export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
|
|
771
|
-
export type { AssistantAnalyticsPage, AssistantApiCall, AssistantCard, AssistantChatActivity, AssistantChatDelta, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHelpGuide, AssistantHelpIcon, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantResponseTablePagination, AssistantRotaCalendar, AssistantSearchResult, AssistantSelectableEntity, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportSeverity, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, AssistantVisualisationDataset, AssistantVisualisationType, MaxAgentShiftCardVariant, MaxAssistantConfig };
|
|
782
|
+
export type { AssistantAnalyticsPage, AssistantApiCall, AssistantCard, AssistantChatActivity, AssistantChatData, AssistantChatDelta, AssistantChatProgress, AssistantChatRequest, AssistantChatResponse, AssistantChatStreamEvent, AssistantConfirmation, AssistantContextResolution, AssistantConversationMessage, AssistantDeveloperTrace, AssistantDisplayResponse, AssistantExtractedIntent, AssistantFeedbackCategory, AssistantFeedbackRequest, AssistantFeedbackResponse, AssistantFieldMap, AssistantFieldValue, AssistantHelpGuide, AssistantHelpIcon, AssistantHostAction, AssistantMessage, AssistantPendingAction, AssistantProduct, AssistantRequestContext, AssistantResponseTable, AssistantResponseTableAction, AssistantResponseTableColumn, AssistantResponseTablePagination, AssistantRotaCalendar, AssistantSearchResult, AssistantSelectableEntity, AssistantShiftCard, AssistantShiftCardGroup, AssistantSource, AssistantStructuredAction, AssistantSuggestion, AssistantSuggestionEntity, AssistantSuggestionOption, AssistantSupportSeverity, AssistantSupportTag, AssistantSupportTagSeverity, AssistantSupportTicketRequest, AssistantSupportTicketResponse, AssistantToolExecution, AssistantTraceControl, AssistantTraceStep, AssistantTraceStepCategory, AssistantTraceStepMetadata, AssistantTraceStepStatus, AssistantTraceTechnology, AssistantUser, AssistantVisualisation, AssistantVisualisationDataset, AssistantVisualisationType, MaxAgentShiftCardVariant, MaxAssistantConfig };
|