@carbon/ai-chat 1.2.1 → 1.3.0-rc.0
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 +6 -6
- package/dist/es/chat.ChatAppEntry.js +594 -298
- package/dist/es/chat.ChatAppEntry.js.map +1 -1
- package/dist/es/chat.PageObjectId.js +3 -0
- package/dist/es/chat.PageObjectId.js.map +1 -1
- package/dist/es/web-components/cds-aichat-container/index.js +6 -6
- package/dist/es/web-components/cds-aichat-custom-element/index.js +6 -6
- package/dist/es-custom/aiChatEntry.js +6 -6
- package/dist/es-custom/chat.ChatAppEntry.js +594 -298
- package/dist/es-custom/chat.ChatAppEntry.js.map +1 -1
- package/dist/es-custom/chat.PageObjectId.js +3 -0
- package/dist/es-custom/chat.PageObjectId.js.map +1 -1
- package/dist/es-custom/web-components/cds-aichat-container/index.js +6 -6
- package/dist/es-custom/web-components/cds-aichat-custom-element/index.js +6 -6
- package/dist/types/aiChatEntry.d.ts +2 -2
- package/dist/types/{serverEntry-Cad3Ek2W.d.ts → serverEntry-BN03ML3a.d.ts} +181 -24
- package/dist/types/serverEntry.d.ts +1 -1
- package/package.json +11 -11
|
@@ -70,8 +70,6 @@ import "lit/directive.js";
|
|
|
70
70
|
|
|
71
71
|
import "@carbon/web-components/es-custom/components/list/index.js";
|
|
72
72
|
|
|
73
|
-
import "lodash-es/debounce.js";
|
|
74
|
-
|
|
75
73
|
import "@carbon/web-components/es-custom/components/data-table/index.js";
|
|
76
74
|
|
|
77
75
|
import "@carbon/web-components/es-custom/components/checkbox/index.js";
|
|
@@ -148,6 +146,10 @@ import "@carbon/web-components/es-custom/components/skeleton-text/skeleton-text.
|
|
|
148
146
|
|
|
149
147
|
import "@carbon/web-components/es-custom/components/skeleton-placeholder/skeleton-placeholder.js";
|
|
150
148
|
|
|
149
|
+
import "@carbon/icons/es/chevron--down/16.js";
|
|
150
|
+
|
|
151
|
+
import "@carbon/icons/es/chevron--up/16.js";
|
|
152
|
+
|
|
151
153
|
import "@carbon/icons/es/touch--interaction/16.js";
|
|
152
154
|
|
|
153
155
|
import "@carbon/icons/es/send/16.js";
|
|
@@ -162,14 +164,12 @@ import "@carbon/icons/es/chevron--left/16.js";
|
|
|
162
164
|
|
|
163
165
|
import "@carbon/icons/es/chevron--right/16.js";
|
|
164
166
|
|
|
167
|
+
import "lodash-es/debounce.js";
|
|
168
|
+
|
|
165
169
|
import "@carbon/icons/es/link/16.js";
|
|
166
170
|
|
|
167
171
|
import "@carbon/icons/es/maximize/16.js";
|
|
168
172
|
|
|
169
|
-
import "@carbon/icons/es/chevron--down/16.js";
|
|
170
|
-
|
|
171
|
-
import "@carbon/icons/es/chevron--up/16.js";
|
|
172
|
-
|
|
173
173
|
import "@carbon/web-components/es-custom/components/tag/operational-tag.js";
|
|
174
174
|
|
|
175
175
|
import "@carbon/icons/es/checkmark/32.js";
|
|
@@ -72,8 +72,6 @@ import "lit/directive.js";
|
|
|
72
72
|
|
|
73
73
|
import "@carbon/web-components/es-custom/components/list/index.js";
|
|
74
74
|
|
|
75
|
-
import "lodash-es/debounce.js";
|
|
76
|
-
|
|
77
75
|
import "@carbon/web-components/es-custom/components/data-table/index.js";
|
|
78
76
|
|
|
79
77
|
import "@carbon/web-components/es-custom/components/checkbox/index.js";
|
|
@@ -150,6 +148,10 @@ import "@carbon/web-components/es-custom/components/skeleton-text/skeleton-text.
|
|
|
150
148
|
|
|
151
149
|
import "@carbon/web-components/es-custom/components/skeleton-placeholder/skeleton-placeholder.js";
|
|
152
150
|
|
|
151
|
+
import "@carbon/icons/es/chevron--down/16.js";
|
|
152
|
+
|
|
153
|
+
import "@carbon/icons/es/chevron--up/16.js";
|
|
154
|
+
|
|
153
155
|
import "@carbon/icons/es/touch--interaction/16.js";
|
|
154
156
|
|
|
155
157
|
import "@carbon/icons/es/send/16.js";
|
|
@@ -164,14 +166,12 @@ import "@carbon/icons/es/chevron--left/16.js";
|
|
|
164
166
|
|
|
165
167
|
import "@carbon/icons/es/chevron--right/16.js";
|
|
166
168
|
|
|
169
|
+
import "lodash-es/debounce.js";
|
|
170
|
+
|
|
167
171
|
import "@carbon/icons/es/link/16.js";
|
|
168
172
|
|
|
169
173
|
import "@carbon/icons/es/maximize/16.js";
|
|
170
174
|
|
|
171
|
-
import "@carbon/icons/es/chevron--down/16.js";
|
|
172
|
-
|
|
173
|
-
import "@carbon/icons/es/chevron--up/16.js";
|
|
174
|
-
|
|
175
175
|
import "@carbon/web-components/es-custom/components/tag/operational-tag.js";
|
|
176
176
|
|
|
177
177
|
import "@carbon/icons/es/checkmark/32.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChatContainerProps, B as BusEventViewPreChange, a as ChatInstance, b as BusEventViewChange } from './serverEntry-
|
|
2
|
-
export {
|
|
1
|
+
import { C as ChatContainerProps, B as BusEventViewPreChange, a as ChatInstance, b as BusEventViewChange } from './serverEntry-BN03ML3a.js';
|
|
2
|
+
export { at as AdditionalDataToAgent, au as AgentAvailability, aQ as AudioItem, aL as BaseGenericItem, aR as BaseMessageInput, r as BusEvent, A as BusEventChatReady, D as BusEventChunkUserDefinedResponse, G as BusEventClosePanelButtonClicked, H as BusEventCustomPanelClose, J as BusEventCustomPanelOpen, K as BusEventCustomPanelPreClose, M as BusEventCustomPanelPreOpen, O as BusEventFeedback, Q as BusEventHistoryBegin, R as BusEventHistoryEnd, s as BusEventHumanAgentAreAnyAgentsOnline, t as BusEventHumanAgentEndChat, u as BusEventHumanAgentPreEndChat, v as BusEventHumanAgentPreReceive, w as BusEventHumanAgentPreSend, x as BusEventHumanAgentPreStartChat, y as BusEventHumanAgentReceive, z as BusEventHumanAgentSend, U as BusEventMessageItemCustom, X as BusEventPreReceive, Y as BusEventPreReset, Z as BusEventPreSend, _ as BusEventReceive, $ as BusEventReset, a0 as BusEventSend, a1 as BusEventType, a2 as BusEventUserDefinedResponse, aS as ButtonItem, aT as ButtonItemKind, aU as ButtonItemType, aa as CancellationReason, ad as CarbonTheme, aV as CardItem, aW as CarouselItem, bS as CdsAiChatContainerAttributes, bT as CdsAiChatCustomElementAttributes, bE as ChainOfThoughtStep, bF as ChainOfThoughtStepStatus, h as ChangeFunction, d as ChatHeaderConfig, i as ChatInstanceInput, ab as ChatInstanceMessaging, j as ChatInstanceNotifications, k as ChatInstanceServiceDeskActions, aX as Chunk, aY as CompleteItemChunk, aZ as ConnectToHumanAgentItem, a_ as ConnectToHumanAgentItemTransferInfo, aw as ConnectingErrorInfo, a$ as ConversationalSearchItem, b0 as ConversationalSearchItemCitation, q as CornersType, ae as CustomMenuOption, e as CustomPanelConfigOptions, f as CustomPanelInstance, g as CustomPanels, ac as CustomSendMessageOptions, b1 as DateItem, ar as DeepPartial, af as DisclaimerPublicConfig, ax as DisconnectedErrorInfo, ay as EndChatInfo, az as ErrorType, E as EventBusHandler, l as EventHandlers, b2 as EventInput, b3 as EventInputData, a3 as FeedbackInteractionType, aA as FileStatusValue, aB as FileUpload, F as FileUploadCapabilities, b4 as FinalResponseChunk, b5 as GenericItem, b6 as GenericItemMessageFeedbackCategories, bG as GenericItemMessageFeedbackOptions, bH as GenericItemMessageOptions, b7 as GridItem, ah as HeaderConfig, bO as HistoryItem, a6 as HomeScreenConfig, a7 as HomeScreenStarterButton, a8 as HomeScreenStarterButtons, a9 as HomeScreenState, b8 as HorizontalCellAlignment, bD as HumanAgentMessageType, av as HumanAgentsOnlineStatus, b9 as IFrameItem, ba as IFrameItemDisplayOption, bb as ImageItem, I as IncreaseOrDecrease, bc as InlineErrorItem, ai as InputConfig, bd as ItemStreamingMetadata, aj as LanguagePack, bQ as LauncherCallToActionConfig, bR as LauncherConfig, ak as LayoutConfig, L as LayoutCustomProperties, bi as MediaFileAccessibility, be as MediaItem, bf as MediaItemDimensions, bg as MediaSubtitleTrack, bh as MediaTranscript, bI as Message, bP as MessageErrorState, bL as MessageHistoryFeedback, bj as MessageInput, bk as MessageInputType, bl as MessageItemPanelInfo, bm as MessageOutput, bn as MessageRequest, aO as MessageRequestHistory, bo as MessageResponse, aN as MessageResponseHistory, aM as MessageResponseOptions, bp as MessageResponseTypes, a4 as MessageSendSource, al as MinimizeButtonIconType, N as NotificationMessage, as as ObjectMap, am as OnErrorData, an as OnErrorType, bq as OptionItem, br as OptionItemPreference, bX as PageObjectId, bs as PartialItemChunk, bJ as PartialOrCompleteItemChunk, bK as PartialResponse, bt as PauseItem, aq as PersistedHumanAgentState, P as PersistedState, n as PublicChatHumanAgentState, o as PublicChatState, ao as PublicConfig, ap as PublicConfigMessaging, m as PublicInputState, bU as RenderUserDefinedResponse, bV as RenderUserDefinedState, bW as RenderWriteableElementResponse, aP as ResponseUserProfile, aC as ScreenShareState, bM as SearchResult, S as SendOptions, aD as ServiceDesk, aE as ServiceDeskCallback, aF as ServiceDeskCapabilities, aG as ServiceDeskErrorInfo, aH as ServiceDeskFactoryParameters, aI as ServiceDeskPublicConfig, bC as SingleOption, aJ as StartChatOptions, bu as StreamChunk, bY as TestId, bv as TextItem, T as TypeAndHandler, bw as UserDefinedItem, aK as UserMessageErrorInfo, bN as UserType, bx as VerticalCellAlignment, by as VideoItem, a5 as ViewChangeReason, V as ViewState, c as ViewType, bz as WidthOptions, bA as WithBodyAndFooter, bB as WithWidthOptions, W as WriteableElementName, p as WriteableElements, ag as enLanguagePack } from './serverEntry-BN03ML3a.js';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import '@carbon/web-components/es/components/notification/defs.js';
|
|
5
5
|
import '@carbon/web-components/es/components/button/defs.js';
|
|
@@ -998,6 +998,82 @@ interface MediaItemDimensions {
|
|
|
998
998
|
*/
|
|
999
999
|
base_height?: number;
|
|
1000
1000
|
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Represents a single subtitle/caption track for video content.
|
|
1003
|
+
* Uses WebVTT format for accessibility. Rendered as native HTML5 track elements.
|
|
1004
|
+
*
|
|
1005
|
+
* @category Messaging
|
|
1006
|
+
*/
|
|
1007
|
+
interface MediaSubtitleTrack {
|
|
1008
|
+
/**
|
|
1009
|
+
* URL pointing to the WebVTT subtitle file.
|
|
1010
|
+
*/
|
|
1011
|
+
src: string;
|
|
1012
|
+
/**
|
|
1013
|
+
* The language code (e.g., "en", "es", "fr").
|
|
1014
|
+
* Used for the track's srclang attribute.
|
|
1015
|
+
*/
|
|
1016
|
+
language: string;
|
|
1017
|
+
/**
|
|
1018
|
+
* Human-readable label for the track (e.g., "English", "Spanish").
|
|
1019
|
+
* Displayed in the browser's subtitle menu.
|
|
1020
|
+
*/
|
|
1021
|
+
label: string;
|
|
1022
|
+
/**
|
|
1023
|
+
* The kind of text track.
|
|
1024
|
+
* - "subtitles": Translation of dialogue (default)
|
|
1025
|
+
* - "captions": Transcription including sound effects
|
|
1026
|
+
* - "descriptions": Audio descriptions for visually impaired
|
|
1027
|
+
*/
|
|
1028
|
+
kind?: "subtitles" | "captions" | "descriptions";
|
|
1029
|
+
/**
|
|
1030
|
+
* Whether this track should be enabled by default.
|
|
1031
|
+
* Only one track should be default.
|
|
1032
|
+
*/
|
|
1033
|
+
default?: boolean;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Represents a text transcript for audio content.
|
|
1037
|
+
* Displayed as readable text below the audio player for accessibility.
|
|
1038
|
+
*
|
|
1039
|
+
* @category Messaging
|
|
1040
|
+
*/
|
|
1041
|
+
interface MediaTranscript {
|
|
1042
|
+
/**
|
|
1043
|
+
* Full text transcript of the audio content.
|
|
1044
|
+
* Supports markdown for formatting.
|
|
1045
|
+
*/
|
|
1046
|
+
text: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* Language of the transcript (e.g., "en", "es", "fr").
|
|
1049
|
+
*/
|
|
1050
|
+
language?: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* Optional label for the transcript (e.g., "English Transcript").
|
|
1053
|
+
*/
|
|
1054
|
+
label?: string;
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Accessibility features for raw media files (not embedded platforms).
|
|
1058
|
+
* These features only apply when using direct file URLs (e.g., .mp4, .mp3).
|
|
1059
|
+
*
|
|
1060
|
+
* For embedded platforms (YouTube, Vimeo, SoundCloud, Mixcloud, etc.),
|
|
1061
|
+
* rely on the platform's built-in accessibility features instead.
|
|
1062
|
+
*
|
|
1063
|
+
* @category Messaging
|
|
1064
|
+
*/
|
|
1065
|
+
interface MediaFileAccessibility {
|
|
1066
|
+
/**
|
|
1067
|
+
* Subtitle/caption tracks for video files.
|
|
1068
|
+
* Supports WebVTT format rendered as native HTML5 track elements.
|
|
1069
|
+
*/
|
|
1070
|
+
subtitle_tracks?: MediaSubtitleTrack[];
|
|
1071
|
+
/**
|
|
1072
|
+
* Text transcript for audio files.
|
|
1073
|
+
* Displayed as expandable text below the audio player.
|
|
1074
|
+
*/
|
|
1075
|
+
transcript?: MediaTranscript;
|
|
1076
|
+
}
|
|
1001
1077
|
/**
|
|
1002
1078
|
* The different ways an iframe item may be displayed.
|
|
1003
1079
|
*
|
|
@@ -1045,6 +1121,11 @@ interface MediaItem<TUserDefinedType = Record<string, unknown>> extends BaseGene
|
|
|
1045
1121
|
* Settings that control the dimensions for the media item.
|
|
1046
1122
|
*/
|
|
1047
1123
|
dimensions?: MediaItemDimensions;
|
|
1124
|
+
/**
|
|
1125
|
+
* Accessibility features for raw media files.
|
|
1126
|
+
* Only applies to direct file URLs (e.g., .mp4, .mp3), not embedded platforms.
|
|
1127
|
+
*/
|
|
1128
|
+
file_accessibility?: MediaFileAccessibility;
|
|
1048
1129
|
}
|
|
1049
1130
|
/**
|
|
1050
1131
|
* Citations for text generated by an AI to provide the user with relevant source information and context.
|
|
@@ -2190,6 +2271,10 @@ declare enum BusEventType {
|
|
|
2190
2271
|
* Fired after the view changes (e.g. when the chat window closes).
|
|
2191
2272
|
*/
|
|
2192
2273
|
VIEW_CHANGE = "view:change",
|
|
2274
|
+
/**
|
|
2275
|
+
* Fired when a button response item with button_type "custom_event" is clicked.
|
|
2276
|
+
* Provides the originating button item and the full message payload to handlers.
|
|
2277
|
+
*/
|
|
2193
2278
|
MESSAGE_ITEM_CUSTOM = "messageItemCustom",
|
|
2194
2279
|
/**
|
|
2195
2280
|
* Fired when a userDefined message is received.
|
|
@@ -2889,7 +2974,8 @@ interface ChatInstanceMessaging {
|
|
|
2889
2974
|
removeMessages: (messageIDs: string[]) => Promise<void>;
|
|
2890
2975
|
/**
|
|
2891
2976
|
* Clears the current conversation. This will trigger a restart of the conversation but will not start a new
|
|
2892
|
-
* conversation (hydration).
|
|
2977
|
+
* conversation (hydration). It will also clear any loading indicators UNLESS you have set
|
|
2978
|
+
* {@link PublicConfigMessaging.messageLoadingIndicatorTimeoutSecs} to 0.
|
|
2893
2979
|
*/
|
|
2894
2980
|
clearConversation: () => Promise<void>;
|
|
2895
2981
|
/**
|
|
@@ -2900,8 +2986,8 @@ interface ChatInstanceMessaging {
|
|
|
2900
2986
|
/**
|
|
2901
2987
|
* Restarts the conversation with the assistant. This does not make any changes to a conversation with a human agent.
|
|
2902
2988
|
* This will clear all the current assistant messages from the main assistant view and cancel any outstanding
|
|
2903
|
-
* messages.
|
|
2904
|
-
*
|
|
2989
|
+
* messages. It will also clear any loading indicators UNLESS you have set
|
|
2990
|
+
* {@link PublicConfigMessaging.messageLoadingIndicatorTimeoutSecs} to 0.
|
|
2905
2991
|
*/
|
|
2906
2992
|
restartConversation: () => Promise<void>;
|
|
2907
2993
|
}
|
|
@@ -2958,13 +3044,52 @@ interface ChatInstance extends EventHandlers, ChatActions {
|
|
|
2958
3044
|
customPanels?: CustomPanels;
|
|
2959
3045
|
}
|
|
2960
3046
|
/**
|
|
2961
|
-
* This is the state made available by calling getState. This is a public method that returns immutable values.
|
|
3047
|
+
* This is the state made available by calling {@link ChatInstance.getState}. This is a public method that returns immutable values.
|
|
2962
3048
|
*
|
|
2963
3049
|
* @category Instance
|
|
2964
3050
|
*/
|
|
3051
|
+
interface PublicInputState {
|
|
3052
|
+
/**
|
|
3053
|
+
* @experimental Raw text currently queued in the input before being sent to customSendMessage.
|
|
3054
|
+
*/
|
|
3055
|
+
rawValue: string;
|
|
3056
|
+
}
|
|
2965
3057
|
type PublicChatState = Readonly<Omit<PersistedState, "humanAgentState"> & {
|
|
3058
|
+
/**
|
|
3059
|
+
* Current human agent state.
|
|
3060
|
+
*/
|
|
2966
3061
|
humanAgent: PublicChatHumanAgentState;
|
|
3062
|
+
/**
|
|
3063
|
+
* Counter that indicates if a message is loading and a loading indicator should be displayed.
|
|
3064
|
+
* If "0" then we do not show loading indicator.
|
|
3065
|
+
*/
|
|
3066
|
+
isMessageLoadingCounter: number;
|
|
3067
|
+
/**
|
|
3068
|
+
* Optional string to display next to the loading indicator.
|
|
3069
|
+
*/
|
|
3070
|
+
isMessageLoadingText?: string;
|
|
3071
|
+
/**
|
|
3072
|
+
* Counter that indicates if the chat is hydrating and a full screen loading state should be displayed.
|
|
3073
|
+
*/
|
|
3074
|
+
isHydratingCounter: number;
|
|
3075
|
+
/**
|
|
3076
|
+
* @experimental State representing the main input surface.
|
|
3077
|
+
*/
|
|
3078
|
+
input: PublicInputState;
|
|
2967
3079
|
}>;
|
|
3080
|
+
interface ChatInstanceInput {
|
|
3081
|
+
/**
|
|
3082
|
+
* @experimental Updates the raw text queued in the input before it is sent to customSendMessage.
|
|
3083
|
+
* Use this when you want to manipulate the canonical value while leaving
|
|
3084
|
+
* presentation up to the default renderer or, in the future, a custom slot implementation.
|
|
3085
|
+
*
|
|
3086
|
+
* @example
|
|
3087
|
+
* ```ts
|
|
3088
|
+
* instance.input.updateRawValue((prev) => `${prev} @celeste`);
|
|
3089
|
+
* ```
|
|
3090
|
+
*/
|
|
3091
|
+
updateRawValue: (updater: (previous: string) => string) => void;
|
|
3092
|
+
}
|
|
2968
3093
|
/**
|
|
2969
3094
|
* Current connection state of the human agent experience.
|
|
2970
3095
|
*
|
|
@@ -3065,19 +3190,16 @@ interface ChatActions {
|
|
|
3065
3190
|
*/
|
|
3066
3191
|
writeableElements: Partial<WriteableElements>;
|
|
3067
3192
|
/**
|
|
3068
|
-
*
|
|
3069
|
-
* you want to force input into a button, etc.
|
|
3193
|
+
* @deprecated Configure via {@link InputConfig.isVisible}.
|
|
3070
3194
|
*/
|
|
3071
3195
|
updateInputFieldVisibility: (isVisible: boolean) => void;
|
|
3072
3196
|
/**
|
|
3073
|
-
*
|
|
3074
|
-
*
|
|
3197
|
+
* @deprecated Configure via {@link InputConfig.isDisabled}
|
|
3198
|
+
* or {@link PublicConfig.isReadonly}.
|
|
3075
3199
|
*/
|
|
3076
3200
|
updateInputIsDisabled: (isDisabled: boolean) => void;
|
|
3077
3201
|
/**
|
|
3078
|
-
*
|
|
3079
|
-
* small empty circle on the launcher. If there are any unread messages from a human agent, this indicator will be
|
|
3080
|
-
* shown with a number regardless of the custom setting of this flag.
|
|
3202
|
+
* @deprecated Configure via {@link LauncherConfig.showUnreadIndicator}.
|
|
3081
3203
|
*/
|
|
3082
3204
|
updateAssistantUnreadIndicatorVisibility: (isVisible: boolean) => void;
|
|
3083
3205
|
/**
|
|
@@ -3102,15 +3224,25 @@ interface ChatActions {
|
|
|
3102
3224
|
*/
|
|
3103
3225
|
doAutoScroll: () => void;
|
|
3104
3226
|
/**
|
|
3105
|
-
* Either increases or decreases the internal counter that indicates whether the "
|
|
3106
|
-
* shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will
|
|
3107
|
-
* increase or decrease the value.
|
|
3227
|
+
* @param direction Either increases or decreases the internal counter that indicates whether the "message is loading"
|
|
3228
|
+
* indicator is shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will
|
|
3229
|
+
* increase or decrease the value. "reset" will set the value back to 0. You may pass undefined as the first value
|
|
3230
|
+
* if you just wish to update the message.
|
|
3231
|
+
*
|
|
3232
|
+
* You can access the current value via {@link ChatInstance.getState}.
|
|
3233
|
+
*
|
|
3234
|
+
* @param message You can also, optionally, pass a plain text string as the second argument. It will display next to the loading indicator for
|
|
3235
|
+
* you to give meaningful feedback while the message is loading (or simple strings like "Thinking...", etc). The most
|
|
3236
|
+
* recent value will be used. So if you call it with a string value and then again with no value, the value will be
|
|
3237
|
+
* replaced with undefined and stop showing in the UI.
|
|
3108
3238
|
*/
|
|
3109
|
-
updateIsMessageLoadingCounter: (direction: IncreaseOrDecrease) => void;
|
|
3239
|
+
updateIsMessageLoadingCounter: (direction: IncreaseOrDecrease, message?: string) => void;
|
|
3110
3240
|
/**
|
|
3111
3241
|
* Either increases or decreases the internal counter that indicates whether the hydration fullscreen loading state is
|
|
3112
3242
|
* shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will
|
|
3113
|
-
* increase or decrease the value.
|
|
3243
|
+
* increase or decrease the value. "reset" will set the value back to 0.
|
|
3244
|
+
*
|
|
3245
|
+
* You can access the current value via {@link ChatInstance.getState}.
|
|
3114
3246
|
*/
|
|
3115
3247
|
updateIsChatLoadingCounter: (direction: IncreaseOrDecrease) => void;
|
|
3116
3248
|
/**
|
|
@@ -3119,6 +3251,10 @@ interface ChatActions {
|
|
|
3119
3251
|
* @experimental
|
|
3120
3252
|
*/
|
|
3121
3253
|
notifications: ChatInstanceNotifications;
|
|
3254
|
+
/**
|
|
3255
|
+
* Actions for mutating the chat input contents.
|
|
3256
|
+
*/
|
|
3257
|
+
input: ChatInstanceInput;
|
|
3122
3258
|
/**
|
|
3123
3259
|
* Actions that are related to a service desk integration.
|
|
3124
3260
|
*/
|
|
@@ -3134,7 +3270,7 @@ interface ChatActions {
|
|
|
3134
3270
|
/**
|
|
3135
3271
|
* @category Instance
|
|
3136
3272
|
*/
|
|
3137
|
-
type IncreaseOrDecrease = "increase" | "decrease";
|
|
3273
|
+
type IncreaseOrDecrease = "increase" | "decrease" | "reset" | undefined;
|
|
3138
3274
|
/**
|
|
3139
3275
|
* This interface represents the options for when a MessageRequest is sent to the server with the send method.
|
|
3140
3276
|
*
|
|
@@ -3377,6 +3513,10 @@ interface LauncherConfig {
|
|
|
3377
3513
|
* If the launcher is visible. Defaults to true.
|
|
3378
3514
|
*/
|
|
3379
3515
|
isOn?: boolean;
|
|
3516
|
+
/**
|
|
3517
|
+
* Controls whether the unread indicator dot shows even when no human-agent unread count exists.
|
|
3518
|
+
*/
|
|
3519
|
+
showUnreadIndicator?: boolean;
|
|
3380
3520
|
/**
|
|
3381
3521
|
* Properties specific to the mobile launcher.
|
|
3382
3522
|
*/
|
|
@@ -3456,6 +3596,7 @@ declare const enLanguagePack: {
|
|
|
3456
3596
|
launcher_mobileGreeting: string;
|
|
3457
3597
|
launcher_ariaIsExpanded: string;
|
|
3458
3598
|
launcher_closeButton: string;
|
|
3599
|
+
media_transcript_label: string;
|
|
3459
3600
|
messages_youSaid: string;
|
|
3460
3601
|
messages_assistantSaid: string;
|
|
3461
3602
|
messages_agentSaid: string;
|
|
@@ -3784,6 +3925,16 @@ interface InputConfig {
|
|
|
3784
3925
|
* The maximum number of characters allowed in the input field. Defaults to 10000.
|
|
3785
3926
|
*/
|
|
3786
3927
|
maxInputCharacters?: number;
|
|
3928
|
+
/**
|
|
3929
|
+
* Controls whether the main input surface is visible when the chat loads.
|
|
3930
|
+
* Defaults to true.
|
|
3931
|
+
*/
|
|
3932
|
+
isVisible?: boolean;
|
|
3933
|
+
/**
|
|
3934
|
+
* If true, the main input surface starts in a disabled (read-only) state.
|
|
3935
|
+
* Equivalent to {@link PublicConfig.isReadonly}, but scoped just to the assistant input.
|
|
3936
|
+
*/
|
|
3937
|
+
isDisabled?: boolean;
|
|
3787
3938
|
}
|
|
3788
3939
|
/**
|
|
3789
3940
|
* Configuration for the main header of the chat.
|
|
@@ -3791,6 +3942,11 @@ interface InputConfig {
|
|
|
3791
3942
|
* @category Config
|
|
3792
3943
|
*/
|
|
3793
3944
|
interface HeaderConfig {
|
|
3945
|
+
/**
|
|
3946
|
+
* If the chat should supply its own header. Can be false if you have a fullscreen chat or one embedded into a page and
|
|
3947
|
+
* you want to only make use of the main application header. Defaults to true.
|
|
3948
|
+
*/
|
|
3949
|
+
isOn?: boolean;
|
|
3794
3950
|
/**
|
|
3795
3951
|
* Indicates the icon to use for the close button in the header.
|
|
3796
3952
|
*/
|
|
@@ -3871,15 +4027,16 @@ interface PublicConfigMessaging {
|
|
|
3871
4027
|
/**
|
|
3872
4028
|
* Changes the timeout used by the message service when making message calls. The timeout is in seconds. The
|
|
3873
4029
|
* default is 150 seconds. After this time, an error will be shown in the client and an Abort signal will be sent
|
|
3874
|
-
* to customSendMessage. If set to 0, the chat will never timeout.
|
|
4030
|
+
* to customSendMessage. If set to 0, the chat will never timeout. This is tied to either {@link ChatInstanceMessaging.addMessage} or
|
|
4031
|
+
* {@link ChatInstanceMessaging.addMessageChunk} being called after this message was sent. If neither of those methods
|
|
4032
|
+
* are called with in the window defined here, the chat will timeout (unless the value is set to 0).
|
|
3875
4033
|
*/
|
|
3876
4034
|
messageTimeoutSecs?: number;
|
|
3877
4035
|
/**
|
|
3878
4036
|
* Controls how long AI chat should wait before showing the loading indicator. If set to 0, the chat will never show
|
|
3879
|
-
* the loading indicator. This is tied to either {@link ChatInstanceMessaging.addMessage} or
|
|
3880
|
-
* {@link ChatInstanceMessaging.addMessageChunk} being called after this message was sent.
|
|
3881
|
-
*
|
|
3882
|
-
* If set to 0, the chat will never automatically show a loading indicator.
|
|
4037
|
+
* the loading indicator on its own. This is tied to either {@link ChatInstanceMessaging.addMessage} or
|
|
4038
|
+
* {@link ChatInstanceMessaging.addMessageChunk} being called after this message was sent. If neither of those methods
|
|
4039
|
+
* are called with in the window defined here, the loading indicator will be shown.
|
|
3883
4040
|
*/
|
|
3884
4041
|
messageLoadingIndicatorTimeoutSecs?: number;
|
|
3885
4042
|
/**
|
|
@@ -4426,5 +4583,5 @@ declare enum PageObjectId {
|
|
|
4426
4583
|
*/
|
|
4427
4584
|
type TestId = PageObjectId;
|
|
4428
4585
|
|
|
4429
|
-
export {
|
|
4430
|
-
export type {
|
|
4586
|
+
export { LayoutCustomProperties as L, WriteableElementName as W, BusEventType as a1, FeedbackInteractionType as a3, MessageSendSource as a4, ViewChangeReason as a5, FileStatusValue as aA, ScreenShareState as aC, ButtonItemKind as aT, ButtonItemType as aU, CancellationReason as aa, CarbonTheme as ad, enLanguagePack as ag, MinimizeButtonIconType as al, OnErrorType as an, HumanAgentsOnlineStatus as av, ErrorType as az, HumanAgentMessageType as bD, ChainOfThoughtStepStatus as bF, UserType as bN, MessageErrorState as bP, PageObjectId as bX, IFrameItemDisplayOption as ba, MessageInputType as bk, MessageResponseTypes as bp, OptionItemPreference as br, WidthOptions as bz, ViewType as c, CornersType as q };
|
|
4587
|
+
export type { BusEventReset as $, BusEventChatReady as A, BusEventViewPreChange as B, ChatContainerProps as C, BusEventChunkUserDefinedResponse as D, EventBusHandler as E, FileUploadCapabilities as F, BusEventClosePanelButtonClicked as G, BusEventCustomPanelClose as H, IncreaseOrDecrease as I, BusEventCustomPanelOpen as J, BusEventCustomPanelPreClose as K, BusEventCustomPanelPreOpen as M, NotificationMessage as N, BusEventFeedback as O, PersistedState as P, BusEventHistoryBegin as Q, BusEventHistoryEnd as R, SendOptions as S, TypeAndHandler as T, BusEventMessageItemCustom as U, ViewState as V, BusEventPreReceive as X, BusEventPreReset as Y, BusEventPreSend as Z, BusEventReceive as _, ChatInstance as a, ConversationalSearchItem as a$, BusEventSend as a0, BusEventUserDefinedResponse as a2, HomeScreenConfig as a6, HomeScreenStarterButton as a7, HomeScreenStarterButtons as a8, HomeScreenState as a9, FileUpload as aB, ServiceDesk as aD, ServiceDeskCallback as aE, ServiceDeskCapabilities as aF, ServiceDeskErrorInfo as aG, ServiceDeskFactoryParameters as aH, ServiceDeskPublicConfig as aI, StartChatOptions as aJ, UserMessageErrorInfo as aK, BaseGenericItem as aL, MessageResponseOptions as aM, MessageResponseHistory as aN, MessageRequestHistory as aO, ResponseUserProfile as aP, AudioItem as aQ, BaseMessageInput as aR, ButtonItem as aS, CardItem as aV, CarouselItem as aW, Chunk as aX, CompleteItemChunk as aY, ConnectToHumanAgentItem as aZ, ConnectToHumanAgentItemTransferInfo as a_, ChatInstanceMessaging as ab, CustomSendMessageOptions as ac, CustomMenuOption as ae, DisclaimerPublicConfig as af, HeaderConfig as ah, InputConfig as ai, LanguagePack as aj, LayoutConfig as ak, OnErrorData as am, PublicConfig as ao, PublicConfigMessaging as ap, PersistedHumanAgentState as aq, DeepPartial as ar, ObjectMap as as, AdditionalDataToAgent as at, AgentAvailability as au, ConnectingErrorInfo as aw, DisconnectedErrorInfo as ax, EndChatInfo as ay, BusEventViewChange as b, ConversationalSearchItemCitation as b0, DateItem as b1, EventInput as b2, EventInputData as b3, FinalResponseChunk as b4, GenericItem as b5, GenericItemMessageFeedbackCategories as b6, GridItem as b7, HorizontalCellAlignment as b8, IFrameItem as b9, WithBodyAndFooter as bA, WithWidthOptions as bB, SingleOption as bC, ChainOfThoughtStep as bE, GenericItemMessageFeedbackOptions as bG, GenericItemMessageOptions as bH, Message as bI, PartialOrCompleteItemChunk as bJ, PartialResponse as bK, MessageHistoryFeedback as bL, SearchResult as bM, HistoryItem as bO, LauncherCallToActionConfig as bQ, LauncherConfig as bR, CdsAiChatContainerAttributes as bS, CdsAiChatCustomElementAttributes as bT, RenderUserDefinedResponse as bU, RenderUserDefinedState as bV, RenderWriteableElementResponse as bW, TestId as bY, ImageItem as bb, InlineErrorItem as bc, ItemStreamingMetadata as bd, MediaItem as be, MediaItemDimensions as bf, MediaSubtitleTrack as bg, MediaTranscript as bh, MediaFileAccessibility as bi, MessageInput as bj, MessageItemPanelInfo as bl, MessageOutput as bm, MessageRequest as bn, MessageResponse as bo, OptionItem as bq, PartialItemChunk as bs, PauseItem as bt, StreamChunk as bu, TextItem as bv, UserDefinedItem as bw, VerticalCellAlignment as bx, VideoItem as by, ChatHeaderConfig as d, CustomPanelConfigOptions as e, CustomPanelInstance as f, CustomPanels as g, ChangeFunction as h, ChatInstanceInput as i, ChatInstanceNotifications as j, ChatInstanceServiceDeskActions as k, EventHandlers as l, PublicInputState as m, PublicChatHumanAgentState as n, PublicChatState as o, WriteableElements as p, BusEvent as r, BusEventHumanAgentAreAnyAgentsOnline as s, BusEventHumanAgentEndChat as t, BusEventHumanAgentPreEndChat as u, BusEventHumanAgentPreReceive as v, BusEventHumanAgentPreSend as w, BusEventHumanAgentPreStartChat as x, BusEventHumanAgentReceive as y, BusEventHumanAgentSend as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { at as AdditionalDataToAgent, au as AgentAvailability, aQ as AudioItem, aL as BaseGenericItem, aR as BaseMessageInput, r as BusEvent, A as BusEventChatReady, D as BusEventChunkUserDefinedResponse, G as BusEventClosePanelButtonClicked, H as BusEventCustomPanelClose, J as BusEventCustomPanelOpen, K as BusEventCustomPanelPreClose, M as BusEventCustomPanelPreOpen, O as BusEventFeedback, Q as BusEventHistoryBegin, R as BusEventHistoryEnd, s as BusEventHumanAgentAreAnyAgentsOnline, t as BusEventHumanAgentEndChat, u as BusEventHumanAgentPreEndChat, v as BusEventHumanAgentPreReceive, w as BusEventHumanAgentPreSend, x as BusEventHumanAgentPreStartChat, y as BusEventHumanAgentReceive, z as BusEventHumanAgentSend, U as BusEventMessageItemCustom, X as BusEventPreReceive, Y as BusEventPreReset, Z as BusEventPreSend, _ as BusEventReceive, $ as BusEventReset, a0 as BusEventSend, a1 as BusEventType, a2 as BusEventUserDefinedResponse, b as BusEventViewChange, B as BusEventViewPreChange, aS as ButtonItem, aT as ButtonItemKind, aU as ButtonItemType, aa as CancellationReason, ad as CarbonTheme, aV as CardItem, aW as CarouselItem, bS as CdsAiChatContainerAttributes, bT as CdsAiChatCustomElementAttributes, bE as ChainOfThoughtStep, bF as ChainOfThoughtStepStatus, d as ChatHeaderConfig, a as ChatInstance, i as ChatInstanceInput, ab as ChatInstanceMessaging, j as ChatInstanceNotifications, k as ChatInstanceServiceDeskActions, aX as Chunk, aY as CompleteItemChunk, aZ as ConnectToHumanAgentItem, a_ as ConnectToHumanAgentItemTransferInfo, aw as ConnectingErrorInfo, a$ as ConversationalSearchItem, b0 as ConversationalSearchItemCitation, q as CornersType, ae as CustomMenuOption, e as CustomPanelConfigOptions, f as CustomPanelInstance, g as CustomPanels, ac as CustomSendMessageOptions, b1 as DateItem, ar as DeepPartial, af as DisclaimerPublicConfig, ax as DisconnectedErrorInfo, ay as EndChatInfo, az as ErrorType, E as EventBusHandler, l as EventHandlers, b2 as EventInput, b3 as EventInputData, a3 as FeedbackInteractionType, aA as FileStatusValue, aB as FileUpload, F as FileUploadCapabilities, b4 as FinalResponseChunk, b5 as GenericItem, b6 as GenericItemMessageFeedbackCategories, bG as GenericItemMessageFeedbackOptions, bH as GenericItemMessageOptions, b7 as GridItem, ah as HeaderConfig, bO as HistoryItem, a6 as HomeScreenConfig, a7 as HomeScreenStarterButton, a8 as HomeScreenStarterButtons, a9 as HomeScreenState, b8 as HorizontalCellAlignment, bD as HumanAgentMessageType, av as HumanAgentsOnlineStatus, b9 as IFrameItem, ba as IFrameItemDisplayOption, bb as ImageItem, I as IncreaseOrDecrease, bc as InlineErrorItem, ai as InputConfig, bd as ItemStreamingMetadata, aj as LanguagePack, bQ as LauncherCallToActionConfig, bR as LauncherConfig, ak as LayoutConfig, L as LayoutCustomProperties, bi as MediaFileAccessibility, be as MediaItem, bf as MediaItemDimensions, bg as MediaSubtitleTrack, bh as MediaTranscript, bI as Message, bP as MessageErrorState, bL as MessageHistoryFeedback, bj as MessageInput, bk as MessageInputType, bl as MessageItemPanelInfo, bm as MessageOutput, bn as MessageRequest, aO as MessageRequestHistory, bo as MessageResponse, aN as MessageResponseHistory, aM as MessageResponseOptions, bp as MessageResponseTypes, a4 as MessageSendSource, al as MinimizeButtonIconType, N as NotificationMessage, as as ObjectMap, am as OnErrorData, an as OnErrorType, bq as OptionItem, br as OptionItemPreference, bX as PageObjectId, bs as PartialItemChunk, bJ as PartialOrCompleteItemChunk, bK as PartialResponse, bt as PauseItem, aq as PersistedHumanAgentState, P as PersistedState, n as PublicChatHumanAgentState, o as PublicChatState, ao as PublicConfig, ap as PublicConfigMessaging, m as PublicInputState, bU as RenderUserDefinedResponse, bV as RenderUserDefinedState, bW as RenderWriteableElementResponse, aP as ResponseUserProfile, aC as ScreenShareState, bM as SearchResult, S as SendOptions, aD as ServiceDesk, aE as ServiceDeskCallback, aF as ServiceDeskCapabilities, aG as ServiceDeskErrorInfo, aH as ServiceDeskFactoryParameters, aI as ServiceDeskPublicConfig, bC as SingleOption, aJ as StartChatOptions, bu as StreamChunk, bY as TestId, bv as TextItem, T as TypeAndHandler, bw as UserDefinedItem, aK as UserMessageErrorInfo, bN as UserType, bx as VerticalCellAlignment, by as VideoItem, a5 as ViewChangeReason, V as ViewState, c as ViewType, bz as WidthOptions, bA as WithBodyAndFooter, bB as WithWidthOptions, W as WriteableElementName, p as WriteableElements, ag as enLanguagePack } from './serverEntry-BN03ML3a.js';
|
|
2
2
|
import '@carbon/web-components/es/components/notification/defs.js';
|
|
3
3
|
import '@carbon/web-components/es/components/button/defs.js';
|
|
4
4
|
import 'react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/ai-chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-rc.0",
|
|
4
4
|
"description": "Be sure to review the [chat documentation](https://chat.carbondesignsystem.com/tag/latest/docs/documents/Overview.html).",
|
|
5
5
|
"author": "IBM Corp",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"@carbon/icons": "^11.53.0",
|
|
76
76
|
"@carbon/styles": "^1.88.0",
|
|
77
77
|
"@carbon/themes": "^11.58.0",
|
|
78
|
-
"@carbon/web-components": "^2.
|
|
78
|
+
"@carbon/web-components": "^2.42.0",
|
|
79
79
|
"@open-wc/testing": "4.0.0",
|
|
80
80
|
"@rollup/plugin-babel": "^6.0.4",
|
|
81
|
-
"@rollup/plugin-commonjs": "^
|
|
81
|
+
"@rollup/plugin-commonjs": "^29.0.0",
|
|
82
82
|
"@rollup/plugin-json": "^6.1.0",
|
|
83
83
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
84
84
|
"@rollup/plugin-replace": "^6.0.2",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@testing-library/jest-dom": "^6.4.8",
|
|
88
88
|
"@testing-library/react": "^16.3.0",
|
|
89
89
|
"@types/color": "^4.2.0",
|
|
90
|
-
"@types/jest": "^
|
|
90
|
+
"@types/jest": "^30.0.0",
|
|
91
91
|
"@types/lodash-es": "^4.17.12",
|
|
92
92
|
"@types/markdown-it": "^14.1.2",
|
|
93
93
|
"@types/markdown-it-attrs": "^4.1.3",
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
"@web/test-runner": "0.19.0",
|
|
99
99
|
"@web/test-runner-playwright": "^0.11.0",
|
|
100
100
|
"autoprefixer": "^10.4.21",
|
|
101
|
-
"babel-jest": "^
|
|
101
|
+
"babel-jest": "^30.0.0",
|
|
102
102
|
"concurrently": "^9.2.0",
|
|
103
103
|
"fs-extra": "^11.3.2",
|
|
104
104
|
"globby": "^15.0.0",
|
|
105
105
|
"identity-obj-proxy": "^3.0.0",
|
|
106
|
-
"jest": "^
|
|
107
|
-
"jest-environment-jsdom": "^
|
|
106
|
+
"jest": "^30.0.0",
|
|
107
|
+
"jest-environment-jsdom": "^30.0.0",
|
|
108
108
|
"lit": "^3.1.0",
|
|
109
109
|
"playwright": "^1.48.1",
|
|
110
110
|
"postcss": "^8.4.41",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"rollup-plugin-dts": "^6.2.1",
|
|
116
116
|
"rollup-plugin-postcss": "^4.0.2",
|
|
117
117
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
118
|
-
"sass": "1.93.
|
|
118
|
+
"sass": "1.93.3",
|
|
119
119
|
"serve": "^14.2.4",
|
|
120
120
|
"terser": "^5.43.1",
|
|
121
121
|
"ts-jest": "^29.1.5",
|
|
@@ -127,13 +127,13 @@
|
|
|
127
127
|
},
|
|
128
128
|
"peerDependencies": {
|
|
129
129
|
"@carbon/icons": ">=11.53.0 <12.0.0",
|
|
130
|
-
"@carbon/web-components": ">=2.
|
|
130
|
+
"@carbon/web-components": ">=2.42.0 <3.0.0",
|
|
131
131
|
"lit": ">=3.1.0 <4.0.0",
|
|
132
132
|
"react": ">=17.0.0 <20.0.0",
|
|
133
133
|
"react-dom": ">=17.0.0 <20.0.0"
|
|
134
134
|
},
|
|
135
135
|
"dependencies": {
|
|
136
|
-
"@carbon/ai-chat-components": "^0.
|
|
136
|
+
"@carbon/ai-chat-components": "^0.5.0-rc.0",
|
|
137
137
|
"@ibm/telemetry-js": "^1.10.2",
|
|
138
138
|
"@lit/react": "^1.0.6",
|
|
139
139
|
"classnames": "^2.5.0",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
"url": "https://github.com/carbon-design-system/carbon-ai-chat/issues"
|
|
172
172
|
},
|
|
173
173
|
"homepage": "https://github.com/carbon-design-system/carbon-ai-chat#readme",
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "e2f1a5e76c57bfca5b8b7fd0701eee7ed84a7fdb"
|
|
175
175
|
}
|