max-agent-ui 0.0.36 → 0.0.37

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
@@ -206,13 +206,26 @@ interface AssistantSearchResult {
206
206
  hostAction: AssistantHostAction;
207
207
  }>;
208
208
  }
209
+ type AssistantVisualisationType = 'bar' | 'horizontalBar' | 'stackedBar' | 'doughnut' | 'pie' | 'line' | 'lineStyles' | 'radar' | 'polarArea' | 'barLine';
210
+ interface AssistantVisualisationDataset {
211
+ label: string;
212
+ values: number[];
213
+ type?: 'bar' | 'line';
214
+ color?: string;
215
+ colors?: string[];
216
+ borderDash?: number[];
217
+ fill?: boolean;
218
+ }
209
219
  interface AssistantVisualisation {
210
- type: 'doughnut' | 'bar';
220
+ type: AssistantVisualisationType;
211
221
  title: string;
212
222
  labels: string[];
213
223
  values: number[];
214
224
  colors?: string[];
215
225
  valueLabel?: string;
226
+ datasets?: AssistantVisualisationDataset[];
227
+ xAxisLabel?: string;
228
+ yAxisLabel?: string;
216
229
  }
217
230
  interface AssistantShiftCard {
218
231
  id?: string | number;
@@ -347,7 +360,12 @@ interface AssistantChatProgress {
347
360
  stage: 'request' | 'intent_projection' | 'embedding' | 'capability_routing' | 'argument_extraction' | 'api_call' | 'action' | 'response';
348
361
  message: string;
349
362
  }
350
- type AssistantChatStreamEvent = AssistantChatProgress | {
363
+ interface AssistantChatDelta {
364
+ type: 'delta';
365
+ delta: string;
366
+ }
367
+ type AssistantChatActivity = AssistantChatProgress | AssistantChatDelta;
368
+ type AssistantChatStreamEvent = AssistantChatActivity | {
351
369
  type: 'result';
352
370
  response: AssistantChatResponse;
353
371
  } | {
@@ -417,6 +435,8 @@ interface AssistantMessage {
417
435
  capabilityKey?: string;
418
436
  isError?: boolean;
419
437
  isStreaming?: boolean;
438
+ processingUpdates?: AssistantChatProgress[];
439
+ streamingContent?: string;
420
440
  }
421
441
 
422
442
  interface AssistantBootstrapConfig {
@@ -439,7 +459,7 @@ declare class MaxAssistantService {
439
459
  private readonly config;
440
460
  private readonly http;
441
461
  constructor(config: MaxAssistantConfig, http: HttpClient | null);
442
- sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (progress: AssistantChatProgress) => void): Observable<AssistantChatResponse>;
462
+ sendMessage(message: string, conversationId?: string, config?: MaxAssistantConfig, confirmation?: AssistantConfirmation, history?: AssistantConversationMessage[], onProgress?: (activity: AssistantChatActivity) => void): Observable<AssistantChatResponse>;
443
463
  confirmAction(actionId: number, decision: AssistantConfirmation['decision'], conversationId: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
444
464
  sendStructuredAction(message: string, action: AssistantStructuredAction, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
445
465
  retrieveAnalyticsPage(message: string, analyticsPage: AssistantAnalyticsPage, conversationId?: string, config?: MaxAssistantConfig, history?: AssistantConversationMessage[]): Observable<AssistantChatResponse>;
@@ -477,6 +497,7 @@ declare class MaxAssistantExportService {
477
497
  exportTableToExcel(table: AssistantResponseTable): Promise<void>;
478
498
  exportVisualisationToPdf(visualisation: AssistantVisualisation): Promise<void>;
479
499
  private chartTotal;
500
+ private chartTypeLabel;
480
501
  private toExportCellValue;
481
502
  private exportFileName;
482
503
  private fallbackColor;
@@ -546,6 +567,9 @@ declare class MaxAssistantComponent implements OnInit {
546
567
  private readonly defaultConfig;
547
568
  private messagesViewport?;
548
569
  private activeTurnAnchorMessageId?;
570
+ private scrollToLatestTimer?;
571
+ private readonly visualisationDataCache;
572
+ private readonly visualisationOptionsCache;
549
573
  private composerInput?;
550
574
  private supportQueryInput?;
551
575
  private feedbackInput?;
@@ -645,13 +669,17 @@ declare class MaxAssistantComponent implements OnInit {
645
669
  protected tablePageError(messageId: string, tableIndex: number): string | undefined;
646
670
  protected exportTable(table: AssistantResponseTable): void;
647
671
  protected exportVisualisation(visualisation: AssistantVisualisation): void;
648
- protected chartTotal(visualisation: AssistantVisualisation): number;
649
- protected chartColor(visualisation: AssistantVisualisation, index: number): string;
650
- protected doughnutDashArray(visualisation: AssistantVisualisation, index: number): string;
651
- protected doughnutDashOffset(visualisation: AssistantVisualisation, index: number): number;
652
- protected barWidth(visualisation: AssistantVisualisation, index: number): number;
672
+ protected chartType(visualisation: AssistantVisualisation): 'bar' | 'line' | 'doughnut' | 'pie' | 'radar' | 'polarArea';
673
+ protected chartData(visualisation: AssistantVisualisation): {
674
+ labels: string[];
675
+ datasets: Array<Record<string, unknown>>;
676
+ };
677
+ protected chartOptions(visualisation: AssistantVisualisation): Record<string, unknown>;
678
+ protected chartHeight(visualisation: AssistantVisualisation): number;
679
+ private shouldShowChartLegend;
653
680
  protected chartAriaLabel(visualisation: AssistantVisualisation): string;
654
- private chartPercentage;
681
+ private chartColour;
682
+ private colourWithOpacity;
655
683
  protected formatTraceValue(value: AssistantFieldValue | undefined): string;
656
684
  protected traceMap(value: AssistantFieldValue | undefined): AssistantFieldMap | undefined;
657
685
  protected traceMapField(value: AssistantFieldValue | undefined, key: string): AssistantFieldMap | undefined;
@@ -740,4 +768,4 @@ declare class MaxAgentShiftCardComponent {
740
768
  }
741
769
 
742
770
  export { MAX_ASSISTANT_CONFIG, MaxAgentEntityOptionComponent, MaxAgentShiftCardComponent, MaxAssistantComponent, MaxAssistantFeedbackService, MaxAssistantService, MaxAssistantSupportService };
743
- export type { AssistantAnalyticsPage, AssistantApiCall, AssistantCard, 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, MaxAgentShiftCardVariant, MaxAssistantConfig };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "max-agent-ui",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -9,6 +9,7 @@
9
9
  "@angular/common": ">=20.0.0 <22.0.0",
10
10
  "@angular/core": ">=20.0.0 <22.0.0",
11
11
  "@angular/forms": ">=20.0.0 <22.0.0",
12
+ "chart.js": ">=4.4.0 <5.0.0",
12
13
  "primeicons": "^7.0.0",
13
14
  "primeng": ">=20.0.0 <22.0.0",
14
15
  "rxjs": "^7.8.0"