@carbon/ai-chat 1.3.2 → 1.4.0-rc.1
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/dist/es/aiChatEntry.js +96 -132
- package/dist/es/aiChatEntry.js.map +1 -1
- package/dist/es/chat.ChatAppEntry.js +1808 -4924
- package/dist/es/chat.ChatAppEntry.js.map +1 -1
- package/dist/es/chat.LayoutCustomProperties.js +12 -0
- package/dist/es/chat.LayoutCustomProperties.js.map +1 -0
- package/dist/es/{chat.PageObjectId.js → chat.languages.js} +489 -227
- package/dist/es/chat.languages.js.map +1 -0
- package/dist/es/serverEntry.js +36 -9
- package/dist/es/serverEntry.js.map +1 -1
- package/dist/es/web-components/cds-aichat-container/index.js +31 -67
- package/dist/es/web-components/cds-aichat-container/index.js.map +1 -1
- package/dist/es/web-components/cds-aichat-custom-element/index.js +30 -66
- package/dist/es/web-components/cds-aichat-custom-element/index.js.map +1 -1
- package/dist/es-custom/aiChatEntry.js +96 -132
- package/dist/es-custom/aiChatEntry.js.map +1 -1
- package/dist/es-custom/chat.ChatAppEntry.js +1808 -4924
- package/dist/es-custom/chat.ChatAppEntry.js.map +1 -1
- package/dist/es-custom/chat.LayoutCustomProperties.js +12 -0
- package/dist/es-custom/chat.LayoutCustomProperties.js.map +1 -0
- package/dist/es-custom/{chat.PageObjectId.js → chat.languages.js} +489 -227
- package/dist/es-custom/chat.languages.js.map +1 -0
- package/dist/es-custom/serverEntry.js +36 -9
- package/dist/es-custom/serverEntry.js.map +1 -1
- package/dist/es-custom/web-components/cds-aichat-container/index.js +31 -67
- package/dist/es-custom/web-components/cds-aichat-container/index.js.map +1 -1
- package/dist/es-custom/web-components/cds-aichat-custom-element/index.js +30 -66
- package/dist/es-custom/web-components/cds-aichat-custom-element/index.js.map +1 -1
- package/dist/types/aiChatEntry.d.ts +4 -3
- package/dist/types/{serverEntry-ojFJl1OR.d.ts → serverEntry-BZ90jVeY.d.ts} +1026 -975
- package/dist/types/serverEntry.d.ts +3 -2
- package/package.json +8 -19
- package/telemetry.yml +0 -5
- package/dist/es/chat.PageObjectId.js.map +0 -1
- package/dist/es-custom/chat.PageObjectId.js.map +0 -1
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
import "@carbon/ai-chat-components/es/components/chain-of-thought/src/types.js";
|
|
2
|
+
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
|
|
5
|
+
import enLocaleData from "dayjs/locale/en.js";
|
|
6
|
+
|
|
7
|
+
import React from "react";
|
|
8
|
+
|
|
9
|
+
var PageObjectId;
|
|
10
|
+
|
|
11
|
+
(function(PageObjectId) {
|
|
12
|
+
PageObjectId["CLOSE_CHAT"] = "close_chat";
|
|
13
|
+
PageObjectId["LAUNCHER"] = "launcher_open_chat";
|
|
14
|
+
PageObjectId["INPUT"] = "input_field";
|
|
15
|
+
PageObjectId["INPUT_SEND"] = "input_send";
|
|
16
|
+
PageObjectId["HEADER_TITLE"] = "header_title";
|
|
17
|
+
PageObjectId["HEADER_NAME"] = "header_name";
|
|
18
|
+
PageObjectId["MAIN_PANEL"] = "main_panel";
|
|
19
|
+
PageObjectId["DISCLAIMER_PANEL"] = "disclaimer_panel";
|
|
20
|
+
PageObjectId["DISCLAIMER_ACCEPT_BUTTON"] = "disclaimer_accept_button";
|
|
21
|
+
PageObjectId["HOME_SCREEN_PANEL"] = "home_screen_panel";
|
|
22
|
+
PageObjectId["HYDRATING_PANEL"] = "hydrating_panel";
|
|
23
|
+
PageObjectId["CATASTROPHIC_PANEL"] = "catastrophic_panel";
|
|
24
|
+
PageObjectId["IFRAME_PANEL"] = "iframe_panel";
|
|
25
|
+
PageObjectId["CONVERSATIONAL_SEARCH_CITATION_PANEL"] = "conversational_search_citation_panel";
|
|
26
|
+
PageObjectId["CUSTOM_PANEL"] = "custom_panel";
|
|
27
|
+
PageObjectId["BUTTON_RESPONSE_PANEL"] = "button_response_panel";
|
|
28
|
+
})(PageObjectId || (PageObjectId = {}));
|
|
29
|
+
|
|
1
30
|
var ViewType;
|
|
2
31
|
|
|
3
32
|
(function(ViewType) {
|
|
@@ -189,11 +218,11 @@ var launcher_isOpen = "Close the chat window";
|
|
|
189
218
|
|
|
190
219
|
var launcher_isClosed = "Open the chat window";
|
|
191
220
|
|
|
192
|
-
var launcher_desktopGreeting = "Hi!
|
|
221
|
+
var launcher_desktopGreeting = "Hi! How can I help you today?";
|
|
193
222
|
|
|
194
223
|
var launcher_mobileGreeting = "Hi! How can I help you today?";
|
|
195
224
|
|
|
196
|
-
var launcher_ariaIsExpanded = "
|
|
225
|
+
var launcher_ariaIsExpanded = "Dismiss launcher notification";
|
|
197
226
|
|
|
198
227
|
var launcher_closeButton = "Close";
|
|
199
228
|
|
|
@@ -221,6 +250,8 @@ var messages_assistantIsLoading = "{assistantName} is thinking";
|
|
|
221
250
|
|
|
222
251
|
var messages_agentIsTyping = "The live agent is typing";
|
|
223
252
|
|
|
253
|
+
var messages_focusHandle = "Message";
|
|
254
|
+
|
|
224
255
|
var messages_scrollHandle = "Chat history begin";
|
|
225
256
|
|
|
226
257
|
var messages_scrollHandleDetailed = "Chat history begin. Activate to focus the first message then use the arrow, home, and end keys to move between messages. Press escape to exit.";
|
|
@@ -235,8 +266,6 @@ var message_labelAssistant = "{actorName} {timestamp}";
|
|
|
235
266
|
|
|
236
267
|
var message_labelYou = "You {timestamp}";
|
|
237
268
|
|
|
238
|
-
var notifications_toastClose = "Close notification";
|
|
239
|
-
|
|
240
269
|
var buttons_restart = "Restart conversation";
|
|
241
270
|
|
|
242
271
|
var buttons_cancel = "Cancel";
|
|
@@ -419,8 +448,6 @@ var conversationalSearch_toggleCitations = "Open or close the list of sources";
|
|
|
419
448
|
|
|
420
449
|
var conversationalSearch_responseStopped = "Response stopped";
|
|
421
450
|
|
|
422
|
-
var launcher_chatNow = "Chat now";
|
|
423
|
-
|
|
424
451
|
var iframe_ariaSourceLoaded = "The web page has loaded.";
|
|
425
452
|
|
|
426
453
|
var iframe_ariaImageAltText = "Preview image for the web page panel.";
|
|
@@ -473,6 +500,22 @@ var table_paginationSupplementalText = "of {pagesCount, number} {pagesCount, plu
|
|
|
473
500
|
|
|
474
501
|
var table_paginationStatus = "{start, number}–{end, number} of {count, number} {count, plural, one {item} other {items}}";
|
|
475
502
|
|
|
503
|
+
var codeSnippet_feedback = "Copied!";
|
|
504
|
+
|
|
505
|
+
var codeSnippet_showLessText = "Show less";
|
|
506
|
+
|
|
507
|
+
var codeSnippet_showMoreText = "Show more";
|
|
508
|
+
|
|
509
|
+
var codeSnippet_tooltipContent = "Copy to clipboard";
|
|
510
|
+
|
|
511
|
+
var codeSnippet_lineCount = "{count, plural, one {{count, number} line} other {{count, number} lines}}";
|
|
512
|
+
|
|
513
|
+
var codeSnippet_foldCollapse = "Collapse code block";
|
|
514
|
+
|
|
515
|
+
var codeSnippet_foldExpand = "Expand code block";
|
|
516
|
+
|
|
517
|
+
var table_downloadButton = "Download table data";
|
|
518
|
+
|
|
476
519
|
var feedback_positiveLabel = "Good response";
|
|
477
520
|
|
|
478
521
|
var feedback_negativeLabel = "Bad response";
|
|
@@ -507,198 +550,211 @@ var chainOfThought_statusProcessingLabel = "Processing";
|
|
|
507
550
|
|
|
508
551
|
var chainOfThought_explainabilityLabel = "How did I get this answer?";
|
|
509
552
|
|
|
553
|
+
var reasoningSteps_mainLabelOpen = "Hide reasoning";
|
|
554
|
+
|
|
555
|
+
var reasoningSteps_mainLabelClosed = "Show reasoning";
|
|
556
|
+
|
|
510
557
|
var enLanguagePackData = {
|
|
511
|
-
ai_slug_label
|
|
512
|
-
ai_slug_title
|
|
513
|
-
ai_slug_description
|
|
514
|
-
components_overflow_ariaLabel
|
|
515
|
-
components_swiper_currentLabel
|
|
516
|
-
errors_communicating
|
|
517
|
-
errors_imageSource
|
|
518
|
-
errors_videoSource
|
|
519
|
-
errors_audioSource
|
|
520
|
-
errors_iframeSource
|
|
521
|
-
errors_singleMessage
|
|
522
|
-
errors_ariaMessageRetrying
|
|
523
|
-
errors_ariaMessageFailed
|
|
524
|
-
errors_noHumanAgentsAvailable
|
|
525
|
-
errors_noHumanAgentsJoined
|
|
526
|
-
errors_connectingToHumanAgent
|
|
527
|
-
errors_busy
|
|
528
|
-
errors_agentAppSessionExpired
|
|
529
|
-
errors_generalContent
|
|
530
|
-
errors_somethingWrong
|
|
531
|
-
input_ariaLabel
|
|
532
|
-
input_placeholder
|
|
533
|
-
input_buttonLabel
|
|
534
|
-
input_uploadButtonLabel
|
|
535
|
-
window_title
|
|
536
|
-
window_ariaChatRegion
|
|
537
|
-
window_ariaChatRegionNamespace
|
|
538
|
-
window_ariaWindowOpened
|
|
539
|
-
window_ariaWindowClosed
|
|
540
|
-
window_ariaWindowLoading
|
|
541
|
-
launcher_isOpen
|
|
542
|
-
launcher_isClosed
|
|
543
|
-
launcher_desktopGreeting
|
|
544
|
-
launcher_mobileGreeting
|
|
545
|
-
launcher_ariaIsExpanded
|
|
546
|
-
launcher_closeButton
|
|
547
|
-
media_transcript_label
|
|
548
|
-
messages_youSaid
|
|
549
|
-
messages_assistantSaid
|
|
550
|
-
messages_agentSaid
|
|
551
|
-
messages_searchResults
|
|
552
|
-
messages_searchResultsLink
|
|
553
|
-
messages_searchResultsOpenDocument
|
|
554
|
-
messages_searchResultsOpenDocumentWithLabel
|
|
555
|
-
messages_searchResultsExpand
|
|
556
|
-
messages_searchResultsCollapse
|
|
557
|
-
messages_assistantIsLoading
|
|
558
|
-
messages_agentIsTyping
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
buttons_restart
|
|
568
|
-
buttons_cancel
|
|
569
|
-
buttons_retry
|
|
570
|
-
options_select
|
|
571
|
-
options_ariaOptionsDisabled
|
|
572
|
-
header_previewLinkTitle
|
|
573
|
-
header_ariaAssistantAvatar
|
|
574
|
-
header_overflowMenu_options
|
|
575
|
-
homeScreen_returnToAssistant
|
|
576
|
-
homeScreen_returnToHome
|
|
577
|
-
homeScreen_overflowMenuHomeScreen
|
|
578
|
-
homeScreen_ariaQuickStartListButton
|
|
579
|
-
homeScreen_ariaQuickStartListOpened
|
|
580
|
-
homeScreen_ariaQuickStartListClosed
|
|
581
|
-
default_agent_availableMessage
|
|
582
|
-
default_agent_unavailableMessage
|
|
583
|
-
agent_reason_error
|
|
584
|
-
agent_sdMissingWarning
|
|
585
|
-
agent_noName
|
|
586
|
-
agent_chatTitle
|
|
587
|
-
agent_startChat
|
|
588
|
-
agent_connecting
|
|
589
|
-
agent_agentNoNameTitle
|
|
590
|
-
agent_agentJoinedName
|
|
591
|
-
agent_agentJoinedNoName
|
|
592
|
-
agent_youConnectedWarning
|
|
593
|
-
agent_connectingMinutes
|
|
594
|
-
agent_connectingQueue
|
|
595
|
-
agent_ariaHumanAgentAvatar
|
|
596
|
-
agent_ariaGenericAvatar
|
|
597
|
-
agent_ariaGenericAssistantAvatar
|
|
598
|
-
agent_youEndedChat
|
|
599
|
-
agent_conversationWasEnded
|
|
600
|
-
agent_disconnected
|
|
601
|
-
agent_reconnected
|
|
602
|
-
agent_agentLeftChat
|
|
603
|
-
agent_agentLeftChatNoName
|
|
604
|
-
agent_agentEndedChat
|
|
605
|
-
agent_agentEndedChatNoName
|
|
606
|
-
agent_transferring
|
|
607
|
-
agent_transferringNoName
|
|
608
|
-
agent_endChat
|
|
609
|
-
agent_confirmSuspendedEndChatTitle
|
|
610
|
-
agent_confirmSuspendedEndChatMessage
|
|
611
|
-
agent_confirmCancelRequestTitle
|
|
612
|
-
agent_confirmCancelRequestMessage
|
|
613
|
-
agent_confirmCancelRequestNo
|
|
614
|
-
agent_confirmCancelRequestYes
|
|
615
|
-
agent_confirmEndChat
|
|
616
|
-
agent_confirmEndChatNo
|
|
617
|
-
agent_confirmEndChatYes
|
|
618
|
-
agent_confirmEndSuspendedYes
|
|
619
|
-
agent_assistantReturned
|
|
620
|
-
agent_newMessage
|
|
621
|
-
agent_cardButtonChatRequested
|
|
622
|
-
agent_cardButtonConnected
|
|
623
|
-
agent_cardButtonChatEnded
|
|
624
|
-
agent_cardMessageChatEnded
|
|
625
|
-
agent_cardMessageConnected
|
|
626
|
-
agent_connectButtonCancel
|
|
627
|
-
agent_connectedButtonEndChat
|
|
628
|
-
agent_connectWaiting
|
|
629
|
-
agent_defaultMessageToHumanAgent
|
|
630
|
-
agent_inputPlaceholderConnecting
|
|
631
|
-
agent_inputPlaceholderReconnecting
|
|
632
|
-
agent_sharingStopSharingButton
|
|
633
|
-
agent_sharingRequestTitle
|
|
634
|
-
agent_sharingRequestMessage
|
|
635
|
-
agent_sharingAcceptButton
|
|
636
|
-
agent_sharingDeclineButton
|
|
637
|
-
agent_sharingRequested
|
|
638
|
-
agent_sharingAccepted
|
|
639
|
-
agent_sharingDeclined
|
|
640
|
-
agent_sharingCancelled
|
|
641
|
-
agent_sharingEnded
|
|
642
|
-
agent_suspendedWarning
|
|
643
|
-
icon_ariaUnreadMessages
|
|
644
|
-
showMore
|
|
645
|
-
showMoreResults
|
|
646
|
-
disclaimer_title
|
|
647
|
-
disclaimer_accept
|
|
648
|
-
general_ariaCloseInformationOverlay
|
|
649
|
-
general_ariaAnnounceOpenedInformationOverlay
|
|
650
|
-
general_ariaAnnounceClosedInformationOverlay
|
|
651
|
-
general_ariaAnnounceEscapeOverlay
|
|
652
|
-
general_returnToAssistant
|
|
653
|
-
conversationalSearch_streamingIncomplete
|
|
654
|
-
conversationalSearch_viewSourceDocument
|
|
655
|
-
conversationalSearch_citationsLabel
|
|
656
|
-
conversationalSearch_toggleCitations
|
|
657
|
-
conversationalSearch_responseStopped
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
558
|
+
ai_slug_label,
|
|
559
|
+
ai_slug_title,
|
|
560
|
+
ai_slug_description,
|
|
561
|
+
components_overflow_ariaLabel,
|
|
562
|
+
components_swiper_currentLabel,
|
|
563
|
+
errors_communicating,
|
|
564
|
+
errors_imageSource,
|
|
565
|
+
errors_videoSource,
|
|
566
|
+
errors_audioSource,
|
|
567
|
+
errors_iframeSource,
|
|
568
|
+
errors_singleMessage,
|
|
569
|
+
errors_ariaMessageRetrying,
|
|
570
|
+
errors_ariaMessageFailed,
|
|
571
|
+
errors_noHumanAgentsAvailable,
|
|
572
|
+
errors_noHumanAgentsJoined,
|
|
573
|
+
errors_connectingToHumanAgent,
|
|
574
|
+
errors_busy,
|
|
575
|
+
errors_agentAppSessionExpired,
|
|
576
|
+
errors_generalContent,
|
|
577
|
+
errors_somethingWrong,
|
|
578
|
+
input_ariaLabel,
|
|
579
|
+
input_placeholder,
|
|
580
|
+
input_buttonLabel,
|
|
581
|
+
input_uploadButtonLabel,
|
|
582
|
+
window_title,
|
|
583
|
+
window_ariaChatRegion,
|
|
584
|
+
window_ariaChatRegionNamespace,
|
|
585
|
+
window_ariaWindowOpened,
|
|
586
|
+
window_ariaWindowClosed,
|
|
587
|
+
window_ariaWindowLoading,
|
|
588
|
+
launcher_isOpen,
|
|
589
|
+
launcher_isClosed,
|
|
590
|
+
launcher_desktopGreeting,
|
|
591
|
+
launcher_mobileGreeting,
|
|
592
|
+
launcher_ariaIsExpanded,
|
|
593
|
+
launcher_closeButton,
|
|
594
|
+
media_transcript_label,
|
|
595
|
+
messages_youSaid,
|
|
596
|
+
messages_assistantSaid,
|
|
597
|
+
messages_agentSaid,
|
|
598
|
+
messages_searchResults,
|
|
599
|
+
messages_searchResultsLink,
|
|
600
|
+
messages_searchResultsOpenDocument,
|
|
601
|
+
messages_searchResultsOpenDocumentWithLabel,
|
|
602
|
+
messages_searchResultsExpand,
|
|
603
|
+
messages_searchResultsCollapse,
|
|
604
|
+
messages_assistantIsLoading,
|
|
605
|
+
messages_agentIsTyping,
|
|
606
|
+
messages_focusHandle,
|
|
607
|
+
messages_scrollHandle,
|
|
608
|
+
messages_scrollHandleDetailed,
|
|
609
|
+
messages_scrollHandleEnd,
|
|
610
|
+
messages_scrollHandleEndDetailed,
|
|
611
|
+
messages_scrollMoreButton,
|
|
612
|
+
message_labelAssistant,
|
|
613
|
+
message_labelYou,
|
|
614
|
+
buttons_restart,
|
|
615
|
+
buttons_cancel,
|
|
616
|
+
buttons_retry,
|
|
617
|
+
options_select,
|
|
618
|
+
options_ariaOptionsDisabled,
|
|
619
|
+
header_previewLinkTitle,
|
|
620
|
+
header_ariaAssistantAvatar,
|
|
621
|
+
header_overflowMenu_options,
|
|
622
|
+
homeScreen_returnToAssistant,
|
|
623
|
+
homeScreen_returnToHome,
|
|
624
|
+
homeScreen_overflowMenuHomeScreen,
|
|
625
|
+
homeScreen_ariaQuickStartListButton,
|
|
626
|
+
homeScreen_ariaQuickStartListOpened,
|
|
627
|
+
homeScreen_ariaQuickStartListClosed,
|
|
628
|
+
default_agent_availableMessage,
|
|
629
|
+
default_agent_unavailableMessage,
|
|
630
|
+
agent_reason_error,
|
|
631
|
+
agent_sdMissingWarning,
|
|
632
|
+
agent_noName,
|
|
633
|
+
agent_chatTitle,
|
|
634
|
+
agent_startChat,
|
|
635
|
+
agent_connecting,
|
|
636
|
+
agent_agentNoNameTitle,
|
|
637
|
+
agent_agentJoinedName,
|
|
638
|
+
agent_agentJoinedNoName,
|
|
639
|
+
agent_youConnectedWarning,
|
|
640
|
+
agent_connectingMinutes,
|
|
641
|
+
agent_connectingQueue,
|
|
642
|
+
agent_ariaHumanAgentAvatar,
|
|
643
|
+
agent_ariaGenericAvatar,
|
|
644
|
+
agent_ariaGenericAssistantAvatar,
|
|
645
|
+
agent_youEndedChat,
|
|
646
|
+
agent_conversationWasEnded,
|
|
647
|
+
agent_disconnected,
|
|
648
|
+
agent_reconnected,
|
|
649
|
+
agent_agentLeftChat,
|
|
650
|
+
agent_agentLeftChatNoName,
|
|
651
|
+
agent_agentEndedChat,
|
|
652
|
+
agent_agentEndedChatNoName,
|
|
653
|
+
agent_transferring,
|
|
654
|
+
agent_transferringNoName,
|
|
655
|
+
agent_endChat,
|
|
656
|
+
agent_confirmSuspendedEndChatTitle,
|
|
657
|
+
agent_confirmSuspendedEndChatMessage,
|
|
658
|
+
agent_confirmCancelRequestTitle,
|
|
659
|
+
agent_confirmCancelRequestMessage,
|
|
660
|
+
agent_confirmCancelRequestNo,
|
|
661
|
+
agent_confirmCancelRequestYes,
|
|
662
|
+
agent_confirmEndChat,
|
|
663
|
+
agent_confirmEndChatNo,
|
|
664
|
+
agent_confirmEndChatYes,
|
|
665
|
+
agent_confirmEndSuspendedYes,
|
|
666
|
+
agent_assistantReturned,
|
|
667
|
+
agent_newMessage,
|
|
668
|
+
agent_cardButtonChatRequested,
|
|
669
|
+
agent_cardButtonConnected,
|
|
670
|
+
agent_cardButtonChatEnded,
|
|
671
|
+
agent_cardMessageChatEnded,
|
|
672
|
+
agent_cardMessageConnected,
|
|
673
|
+
agent_connectButtonCancel,
|
|
674
|
+
agent_connectedButtonEndChat,
|
|
675
|
+
agent_connectWaiting,
|
|
676
|
+
agent_defaultMessageToHumanAgent,
|
|
677
|
+
agent_inputPlaceholderConnecting,
|
|
678
|
+
agent_inputPlaceholderReconnecting,
|
|
679
|
+
agent_sharingStopSharingButton,
|
|
680
|
+
agent_sharingRequestTitle,
|
|
681
|
+
agent_sharingRequestMessage,
|
|
682
|
+
agent_sharingAcceptButton,
|
|
683
|
+
agent_sharingDeclineButton,
|
|
684
|
+
agent_sharingRequested,
|
|
685
|
+
agent_sharingAccepted,
|
|
686
|
+
agent_sharingDeclined,
|
|
687
|
+
agent_sharingCancelled,
|
|
688
|
+
agent_sharingEnded,
|
|
689
|
+
agent_suspendedWarning,
|
|
690
|
+
icon_ariaUnreadMessages,
|
|
691
|
+
showMore,
|
|
692
|
+
showMoreResults,
|
|
693
|
+
disclaimer_title,
|
|
694
|
+
disclaimer_accept,
|
|
695
|
+
general_ariaCloseInformationOverlay,
|
|
696
|
+
general_ariaAnnounceOpenedInformationOverlay,
|
|
697
|
+
general_ariaAnnounceClosedInformationOverlay,
|
|
698
|
+
general_ariaAnnounceEscapeOverlay,
|
|
699
|
+
general_returnToAssistant,
|
|
700
|
+
conversationalSearch_streamingIncomplete,
|
|
701
|
+
conversationalSearch_viewSourceDocument,
|
|
702
|
+
conversationalSearch_citationsLabel,
|
|
703
|
+
conversationalSearch_toggleCitations,
|
|
704
|
+
conversationalSearch_responseStopped,
|
|
705
|
+
iframe_ariaSourceLoaded,
|
|
706
|
+
iframe_ariaImageAltText,
|
|
707
|
+
iframe_ariaClosePanel,
|
|
708
|
+
iframe_ariaOpenedPanel,
|
|
709
|
+
iframe_ariaClosedPanel,
|
|
710
|
+
iframe_ariaClickPreviewCard,
|
|
711
|
+
datePicker_chooseDate,
|
|
712
|
+
datePicker_confirmDate,
|
|
713
|
+
fileSharing_fileTooLarge,
|
|
714
|
+
fileSharing_ariaAnnounceSuccess,
|
|
715
|
+
fileSharing_fileIcon,
|
|
716
|
+
fileSharing_removeButtonTitle,
|
|
717
|
+
fileSharing_statusUploading,
|
|
718
|
+
fileSharing_uploadFailed,
|
|
719
|
+
fileSharing_agentMessageText,
|
|
720
|
+
fileSharing_request,
|
|
721
|
+
carousel_prevNavButton,
|
|
722
|
+
carousel_nextNavButton,
|
|
723
|
+
input_completionsTagApp,
|
|
724
|
+
input_completionsTagAssistant,
|
|
725
|
+
table_filterPlaceholder,
|
|
726
|
+
table_previousPage,
|
|
727
|
+
table_nextPage,
|
|
728
|
+
table_itemsPerPage,
|
|
729
|
+
table_paginationSupplementalText,
|
|
730
|
+
table_paginationStatus,
|
|
731
|
+
codeSnippet_feedback,
|
|
732
|
+
codeSnippet_showLessText,
|
|
733
|
+
codeSnippet_showMoreText,
|
|
734
|
+
codeSnippet_tooltipContent,
|
|
735
|
+
codeSnippet_lineCount,
|
|
736
|
+
codeSnippet_foldCollapse,
|
|
737
|
+
codeSnippet_foldExpand,
|
|
738
|
+
table_downloadButton,
|
|
739
|
+
feedback_positiveLabel,
|
|
740
|
+
feedback_negativeLabel,
|
|
741
|
+
feedback_defaultTitle,
|
|
742
|
+
feedback_defaultPrompt,
|
|
743
|
+
feedback_defaultPlaceholder,
|
|
744
|
+
feedback_submitLabel,
|
|
745
|
+
feedback_cancelLabel,
|
|
746
|
+
input_stopResponse,
|
|
747
|
+
messages_responseStopped,
|
|
748
|
+
chainOfThought_stepTitle,
|
|
749
|
+
chainOfThought_inputLabel,
|
|
750
|
+
chainOfThought_outputLabel,
|
|
751
|
+
chainOfThought_toolLabel,
|
|
752
|
+
chainOfThought_statusSucceededLabel,
|
|
753
|
+
chainOfThought_statusFailedLabel,
|
|
754
|
+
chainOfThought_statusProcessingLabel,
|
|
755
|
+
chainOfThought_explainabilityLabel,
|
|
756
|
+
reasoningSteps_mainLabelOpen,
|
|
757
|
+
reasoningSteps_mainLabelClosed
|
|
702
758
|
};
|
|
703
759
|
|
|
704
760
|
const enLanguagePack = enLanguagePackData;
|
|
@@ -821,14 +877,6 @@ var HumanAgentMessageType;
|
|
|
821
877
|
HumanAgentMessageType["SYSTEM"] = "system";
|
|
822
878
|
})(HumanAgentMessageType || (HumanAgentMessageType = {}));
|
|
823
879
|
|
|
824
|
-
var ChainOfThoughtStepStatus;
|
|
825
|
-
|
|
826
|
-
(function(ChainOfThoughtStepStatus) {
|
|
827
|
-
ChainOfThoughtStepStatus["PROCESSING"] = "processing";
|
|
828
|
-
ChainOfThoughtStepStatus["FAILURE"] = "failure";
|
|
829
|
-
ChainOfThoughtStepStatus["SUCCESS"] = "success";
|
|
830
|
-
})(ChainOfThoughtStepStatus || (ChainOfThoughtStepStatus = {}));
|
|
831
|
-
|
|
832
880
|
var OptionItemPreference;
|
|
833
881
|
|
|
834
882
|
(function(OptionItemPreference) {
|
|
@@ -871,6 +919,14 @@ var ButtonItemKind;
|
|
|
871
919
|
ButtonItemKind["LINK"] = "link";
|
|
872
920
|
})(ButtonItemKind || (ButtonItemKind = {}));
|
|
873
921
|
|
|
922
|
+
var ReasoningStepOpenState;
|
|
923
|
+
|
|
924
|
+
(function(ReasoningStepOpenState) {
|
|
925
|
+
ReasoningStepOpenState["OPEN"] = "open";
|
|
926
|
+
ReasoningStepOpenState["CLOSE"] = "close";
|
|
927
|
+
ReasoningStepOpenState["DEFAULT"] = "default";
|
|
928
|
+
})(ReasoningStepOpenState || (ReasoningStepOpenState = {}));
|
|
929
|
+
|
|
874
930
|
var UserType;
|
|
875
931
|
|
|
876
932
|
(function(UserType) {
|
|
@@ -889,26 +945,232 @@ var MessageErrorState;
|
|
|
889
945
|
MessageErrorState[MessageErrorState["WAITING"] = 5] = "WAITING";
|
|
890
946
|
})(MessageErrorState || (MessageErrorState = {}));
|
|
891
947
|
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
(
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
948
|
+
const WA_CONSOLE_PREFIX = "[Chat]";
|
|
949
|
+
|
|
950
|
+
const RIGHT_TO_LEFT_MARK = String.fromCharCode(8207);
|
|
951
|
+
|
|
952
|
+
const ENGLISH_US_DATE_FORMAT = "mm/dd/yyyy";
|
|
953
|
+
|
|
954
|
+
const RESPONSE_TYPE_TIMEOUT_MS = 2e4;
|
|
955
|
+
|
|
956
|
+
const DEFAULT_CUSTOM_PANEL_ID = "wac-default-panel";
|
|
957
|
+
|
|
958
|
+
function THROW_ERROR() {
|
|
959
|
+
throw Error("Not implemented.");
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
const AUTO_SCROLL_EXTRA = 28 - 8;
|
|
963
|
+
|
|
964
|
+
const ONE_LINE_MESSAGE_HEIGHT = 88;
|
|
965
|
+
|
|
966
|
+
const AUTO_SCROLL_THROTTLE_TIMEOUT = 100;
|
|
967
|
+
|
|
968
|
+
async function sleep(milliseconds) {
|
|
969
|
+
await new Promise(resolve => {
|
|
970
|
+
setTimeout(resolve, milliseconds);
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
function resolveOrTimeout(promise, duration, errorMessage) {
|
|
975
|
+
const timeout = new Promise((resolve, reject) => {
|
|
976
|
+
setTimeout(() => {
|
|
977
|
+
const message = errorMessage || `The operation timed out after ${duration}ms`;
|
|
978
|
+
reject(message);
|
|
979
|
+
}, duration);
|
|
980
|
+
});
|
|
981
|
+
return Promise.race([ promise, timeout ]);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
let enableDebugLog = false;
|
|
985
|
+
|
|
986
|
+
function debugLog(message, ...args) {
|
|
987
|
+
if (enableDebugLog) {
|
|
988
|
+
console.log(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
function consoleError(message, ...args) {
|
|
993
|
+
console.error(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
function consoleLog(message, ...args) {
|
|
997
|
+
console.log(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
function consoleDebug(message, ...args) {
|
|
1001
|
+
console.debug(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
function consoleWarn(message, ...args) {
|
|
1005
|
+
console.warn(`${WA_CONSOLE_PREFIX} ${message}`, ...args);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
function setEnableDebugLog(debug) {
|
|
1009
|
+
enableDebugLog = debug;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
function isEnableDebugLog() {
|
|
1013
|
+
return enableDebugLog;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
async function safeFetchTextWithTimeout(response) {
|
|
1017
|
+
try {
|
|
1018
|
+
if (response) {
|
|
1019
|
+
return resolveOrTimeout(response.text(), 2e3, "Getting response text");
|
|
1020
|
+
}
|
|
1021
|
+
} catch (error) {
|
|
1022
|
+
consoleError("Error getting fetch text", error);
|
|
1023
|
+
}
|
|
1024
|
+
return undefined;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
function createDidCatchErrorData(component, error, errorInfo, isCatastrophicError) {
|
|
1028
|
+
return {
|
|
1029
|
+
errorType: OnErrorType.RENDER,
|
|
1030
|
+
message: `${component}.componentDidCatch`,
|
|
1031
|
+
otherData: {
|
|
1032
|
+
error,
|
|
1033
|
+
errorInfo
|
|
1034
|
+
},
|
|
1035
|
+
catastrophicErrorType: isCatastrophicError
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
function getResponsiveElementPaddingValue(baseHeight = 180) {
|
|
1040
|
+
return `${100 / (320 / baseHeight)}%`;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
function isValidForUpload(upload) {
|
|
1044
|
+
return upload.status === FileStatusValue.EDIT && !upload.isError;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
function callOnError(onError, data) {
|
|
1048
|
+
if (onError) {
|
|
1049
|
+
try {
|
|
1050
|
+
onError(data);
|
|
1051
|
+
} catch (error) {
|
|
1052
|
+
consoleError("Error calling onError", error);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
function normalizeModuleInterop(mod) {
|
|
1058
|
+
let resolved = mod;
|
|
1059
|
+
while (resolved && typeof resolved === "object" && "default" in resolved && resolved.default !== resolved) {
|
|
1060
|
+
resolved = resolved.default;
|
|
1061
|
+
}
|
|
1062
|
+
return resolved;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
const localeLoaders = {
|
|
1066
|
+
ar: () => import("dayjs/locale/ar.js").then(mod => normalizeModuleInterop(mod)),
|
|
1067
|
+
"ar-dz": () => import("dayjs/locale/ar-dz.js").then(mod => normalizeModuleInterop(mod)),
|
|
1068
|
+
"ar-kw": () => import("dayjs/locale/ar-kw.js").then(mod => normalizeModuleInterop(mod)),
|
|
1069
|
+
"ar-ly": () => import("dayjs/locale/ar-ly.js").then(mod => normalizeModuleInterop(mod)),
|
|
1070
|
+
"ar-ma": () => import("dayjs/locale/ar-ma.js").then(mod => normalizeModuleInterop(mod)),
|
|
1071
|
+
"ar-sa": () => import("dayjs/locale/ar-sa.js").then(mod => normalizeModuleInterop(mod)),
|
|
1072
|
+
"ar-tn": () => import("dayjs/locale/ar-tn.js").then(mod => normalizeModuleInterop(mod)),
|
|
1073
|
+
cs: () => import("dayjs/locale/cs.js").then(mod => normalizeModuleInterop(mod)),
|
|
1074
|
+
de: () => import("dayjs/locale/de.js").then(mod => normalizeModuleInterop(mod)),
|
|
1075
|
+
"de-at": () => import("dayjs/locale/de-at.js").then(mod => normalizeModuleInterop(mod)),
|
|
1076
|
+
"de-ch": () => import("dayjs/locale/de-ch.js").then(mod => normalizeModuleInterop(mod)),
|
|
1077
|
+
en: () => import("dayjs/locale/en.js").then(mod => normalizeModuleInterop(mod)),
|
|
1078
|
+
"en-au": () => import("dayjs/locale/en-au.js").then(mod => normalizeModuleInterop(mod)),
|
|
1079
|
+
"en-ca": () => import("dayjs/locale/en-ca.js").then(mod => normalizeModuleInterop(mod)),
|
|
1080
|
+
"en-gb": () => import("dayjs/locale/en-gb.js").then(mod => normalizeModuleInterop(mod)),
|
|
1081
|
+
"en-ie": () => import("dayjs/locale/en-ie.js").then(mod => normalizeModuleInterop(mod)),
|
|
1082
|
+
"en-il": () => import("dayjs/locale/en-il.js").then(mod => normalizeModuleInterop(mod)),
|
|
1083
|
+
"en-nz": () => import("dayjs/locale/en-nz.js").then(mod => normalizeModuleInterop(mod)),
|
|
1084
|
+
es: () => import("dayjs/locale/es.js").then(mod => normalizeModuleInterop(mod)),
|
|
1085
|
+
"es-do": () => import("dayjs/locale/es-do.js").then(mod => normalizeModuleInterop(mod)),
|
|
1086
|
+
"es-us": () => import("dayjs/locale/es-us.js").then(mod => normalizeModuleInterop(mod)),
|
|
1087
|
+
nl: () => import("dayjs/locale/nl.js").then(mod => normalizeModuleInterop(mod)),
|
|
1088
|
+
fr: () => import("dayjs/locale/fr.js").then(mod => normalizeModuleInterop(mod)),
|
|
1089
|
+
"fr-ca": () => import("dayjs/locale/fr-ca.js").then(mod => normalizeModuleInterop(mod)),
|
|
1090
|
+
"fr-ch": () => import("dayjs/locale/fr-ch.js").then(mod => normalizeModuleInterop(mod)),
|
|
1091
|
+
it: () => import("dayjs/locale/it.js").then(mod => normalizeModuleInterop(mod)),
|
|
1092
|
+
"it-ch": () => import("dayjs/locale/it-ch.js").then(mod => normalizeModuleInterop(mod)),
|
|
1093
|
+
ja: () => import("dayjs/locale/ja.js").then(mod => normalizeModuleInterop(mod)),
|
|
1094
|
+
ko: () => import("dayjs/locale/ko.js").then(mod => normalizeModuleInterop(mod)),
|
|
1095
|
+
pt: () => import("dayjs/locale/pt.js").then(mod => normalizeModuleInterop(mod)),
|
|
1096
|
+
"pt-br": () => import("dayjs/locale/pt-br.js").then(mod => normalizeModuleInterop(mod)),
|
|
1097
|
+
zh: () => import("dayjs/locale/zh-cn.js").then(mod => normalizeModuleInterop(mod)),
|
|
1098
|
+
"zh-cn": () => import("dayjs/locale/zh-cn.js").then(mod => normalizeModuleInterop(mod)),
|
|
1099
|
+
"zh-tw": () => import("dayjs/locale/zh-tw.js").then(mod => normalizeModuleInterop(mod)),
|
|
1100
|
+
"zh-mo": () => import("dayjs/locale/zh-tw.js").then(mod => normalizeModuleInterop(mod)),
|
|
1101
|
+
"zh-hk": () => import("dayjs/locale/zh-tw.js").then(mod => normalizeModuleInterop(mod))
|
|
1102
|
+
};
|
|
912
1103
|
|
|
913
|
-
|
|
914
|
-
|
|
1104
|
+
function isSupportedLocale(locale, object) {
|
|
1105
|
+
if (!locale) {
|
|
1106
|
+
return null;
|
|
1107
|
+
}
|
|
1108
|
+
locale = locale.toLowerCase().replace(/_/g, "-");
|
|
1109
|
+
if (object[locale]) {
|
|
1110
|
+
return locale;
|
|
1111
|
+
}
|
|
1112
|
+
const language = locale.substring(0, 2);
|
|
1113
|
+
if (object[language]) {
|
|
1114
|
+
return language;
|
|
1115
|
+
}
|
|
1116
|
+
return null;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
function findSupportedKey(requestedLocale, object, objectType) {
|
|
1120
|
+
const requestedSupported = isSupportedLocale(requestedLocale, object);
|
|
1121
|
+
if (requestedSupported) {
|
|
1122
|
+
return requestedSupported;
|
|
1123
|
+
}
|
|
1124
|
+
if (requestedLocale) {
|
|
1125
|
+
const keyList = JSON.stringify(Object.keys(object));
|
|
1126
|
+
consoleError(`The requested locale "${requestedLocale}" does not contain a supported ${objectType}. We are defaulting to "en". The supported values are ${keyList}.`);
|
|
1127
|
+
}
|
|
1128
|
+
return "en";
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
async function loadLocale(requestedLocale) {
|
|
1132
|
+
try {
|
|
1133
|
+
const localeKey = findSupportedKey(requestedLocale, localeLoaders, "locale");
|
|
1134
|
+
const localeModule = await localeLoaders[localeKey]();
|
|
1135
|
+
if (localeModule) {
|
|
1136
|
+
return localeModule;
|
|
1137
|
+
}
|
|
1138
|
+
consoleError(`The locale data for "${localeKey}" did not load. The application will default to "en".`);
|
|
1139
|
+
} catch (error) {
|
|
1140
|
+
consoleError(`An error occurred loading the locale data for "${requestedLocale}". The application will default to "en".`, error);
|
|
1141
|
+
}
|
|
1142
|
+
return enLocaleData;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
function handleBTag(chunks) {
|
|
1146
|
+
return React.createElement("b", null, chunks);
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
function handleBRTag() {
|
|
1150
|
+
return React.createElement("br", null);
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
function addHTMLSupport(values) {
|
|
1154
|
+
values.b = handleBTag;
|
|
1155
|
+
values.br = handleBRTag;
|
|
1156
|
+
return values;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
async function loadDayjsLocale(locale) {
|
|
1160
|
+
if (!dayjs.Ls[locale]) {
|
|
1161
|
+
const previousLocale = dayjs.locale();
|
|
1162
|
+
const localePack = await loadLocale(locale);
|
|
1163
|
+
dayjs.locale(localePack);
|
|
1164
|
+
dayjs.locale(previousLocale);
|
|
1165
|
+
const isLoaded = Boolean(dayjs.Ls[locale]);
|
|
1166
|
+
if (!isLoaded && locale.length === 2) {
|
|
1167
|
+
throw Error("Locale is not recognized.");
|
|
1168
|
+
} else if (!isLoaded) {
|
|
1169
|
+
return loadDayjsLocale(locale.substring(0, 2));
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
return locale;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
export { ENGLISH_US_DATE_FORMAT as $, WA_CONSOLE_PREFIX as A, BusEventType as B, CornersType as C, DEFAULT_CUSTOM_PANEL_ID as D, ErrorType as E, FeedbackInteractionType as F, setEnableDebugLog as G, HumanAgentsOnlineStatus as H, IFrameItemDisplayOption as I, consoleDebug as J, resolveOrTimeout as K, loadLocale as L, MessageSendSource as M, MainWindowOpenReason as N, OnErrorType as O, PageObjectId as P, addHTMLSupport as Q, ReasoningStepOpenState as R, ScreenShareState as S, getResponsiveElementPaddingValue as T, UserType as U, ViewType as V, WriteableElementName as W, RESPONSE_TYPE_TIMEOUT_MS as X, THROW_ERROR as Y, RIGHT_TO_LEFT_MARK as Z, loadDayjsLocale as _, PanelType as a, createDidCatchErrorData as a0, AUTO_SCROLL_EXTRA as a1, ONE_LINE_MESSAGE_HEIGHT as a2, AUTO_SCROLL_THROTTLE_TIMEOUT as a3, isValidForUpload as a4, MainWindowCloseReason as a5, ViewChangeReason as b, CancellationReason as c, CarbonTheme as d, enLanguagePack as e, MinimizeButtonIconType as f, FileStatusValue as g, ButtonItemKind as h, ButtonItemType as i, MessageInputType as j, MessageResponseTypes as k, OptionItemPreference as l, WidthOptions as m, HumanAgentMessageType as n, MessageErrorState as o, normalizeModuleInterop as p, localeLoaders as q, InternalMessageRequestType as r, consoleError as s, debugLog as t, sleep as u, callOnError as v, consoleWarn as w, consoleLog as x, isEnableDebugLog as y, safeFetchTextWithTimeout as z };
|
|
1176
|
+
//# sourceMappingURL=chat.languages.js.map
|