- Added
localCacheEnabled
flag to control the use of local cache in the Chat SDK.
- Use
disconnectWebsocket
instead ofdisconnect
(applied changes from PR #1219) - Prevent changes to the theme if it has already been added by other logic.
- Added bot profile style for the favicon from onboarding
- Passed missing locale to DateSeparator component
- Added stack direction to message list and set as bottom
- Added pending & failed icon to sent messages
- Added service name to playground
- Added utm source to banner link
- Removed CSS styles that could potentially affect the client's website
- Fixed that prevent zoom when focusing on input in iOS mobile
- File Message Support: File attachment in messages is now supported. Of course, drag-and-drop and copy-paste actions are also supported.
- Locale Support: Added a
locale
option to support multiple languages for welcome messages and suggested replies. If not specified, the browser's default language will be used. (support for multilingual settings will be available in the dashboard). - Carousel Adapter for Function Call: Introduced an adapter to convert function call responses into a carousel UI. Example usage is as follows:
interface MealFunctionCallResponse { meals: { strYoutube: string; strMeal: string; strMealThumb: string }[]; } function isMealsResponse(response: unknown): response is MealFunctionCallResponse { return !!response && typeof response === 'object' && 'meals' in response && Array.isArray(response.meals); } const App = () => { return ( <ChatAiWidget tools={{ functionCall: { carouselAdapter({ response }) { if (isMealsResponse(response)) { return response.meals.map((it) => ({ title: it.strMeal, // Carousel card title featured_image: it.strMealThumb, // Carousel card image url: it.strYoutube, // URL to open when the carousel card is clicked })); } return []; }, }, }} /> ); };
- Improved user interface and experience of form message feature
- Added
callbacks.onWidgetSettingFailure
inConstant
for handling widget setting failure - Added error page to widget playground
- Fixed a broken message data content UI in dark theme
- Fixed a bug where session not being reset on unauthorized error during channel fetch
- Fixed a bug where browser cached messages are not being cleared on refreshing the channel
- Added
enableWidgetExpandButton
inConstant
. Refer to Available props section in README.md file for details WidgetWindowFullScreen
no longer disconnects while network is connected- Texts in user message that start with
tel:
,mailto:
, orsms:
are now being considered as url
- Added a root element to the full-screen component for the modal to avoid crashes when clicking feedback.
- Fixed the carousel index calculation.
- Updated disconnect WS timeout to 1 minute.
- Updated Sendbird banner link attributes.
- Fixed a bug where directly managing the widget open state caused a disconnection after 3 minutes and prevented reconnection.
- Fixed a UX issue where the feedback modal was displaying unintended behavior
- Fixed a bug with URL handling in Markdown syntax
- Fixed a bug where the self-service widget was broken in Angular.js
- Fixed a broken backward compatibility of
FormMessage
introduced in v1.7.2
FormInput
ofFormMesage
now supports two newMessageFormItem.style.layout
types:chip
andtextarea
- Added
window.sbWidget
interface to allowing control of the widget state and cache clearing from a non-React environment
MessageFeedbackModal
is now being displayed within the widget windowautoOpen
is now being ignored in mobile view
- Added a file viewer that allows you to enlarge images by clicking on them.
- Fixed the text color of messages sent by third parties (not the bot) to display correctly.
- Re-applied the autoOpen settings as configured in the dashboard.
- Migrated endpoint for
FormMessage
to a new one
- Added
botStudioEditProps.styles.toggleButtonUrl
to customize the toggle button image. - Exported
WidgetButton
component.
- Fixed the disabled placeholder for waiting suggested replies.
- Fixed the issue where JavaScript would run when a link was ctrl + clicked.
- Fixed an issue where the link text color did not change according to the theme.
- Fixed the positioning of the scroll-to-bottom button.
- Fixed the positioning of the "powered by" banner.
- Added an underline to links in messages.
- Added video message support for bot messages. The widget now supports video messages sent by the bot.
- Added support for using new channels in
widget_setting
when a new channel is created. - Added
sessionToken
prop for managing manual sessions.
- Fixed a bug where the widget would not connect to the bot when the cached channel is not found and now creates a new channel.
- Fixed a bug where the feedback did not work according to the option set in the dashboard.
- Removed the default value of
false
for mentions in self-service.
- Removed auto focusing of message input when disabled state changes to false
- Added
messageInputControls
toConstant
. It allows to control enabled/disabled state of the message input - Added
dateLocale
toConstant
. It is applied to string values of message timestamp and date separator - Added the
enableHideWidgetForDeactivatedUser
toConstant
. It is used to decide whether the chatbot widget is hidden or not when the user is deactivated
import { ar } from 'date-fns/locale';
<ChatAiWidget
applicationId={props.applicationId}
botId={props.botId}
messageInputControls={{
blockWhileBotResponding: 30000, // Change force unblock timeout to 30 seconds. Default value is 10 seconds.
}}
dateLocale={ar} // Applies Arabic locale.
enableHideWidgetForDeactivatedUser={true}
/>
Refer to Available props section in README.md file for details.
- Fixed a bug where multiple timestamps of messages are not grouped into one when should be if
botStudioEditProps.welcomeMessages
is given
- Added horizontal suggested replies support.
- Fixed a bug where the configure session functionality was not working correctly.
- Displayed MessageDataContent for the last message only.
- Updated the custom session guide.
- Message input is now being disabled upon sending a message until a reply message is received from the bot and finished streaming
- Expand button is now being displayed only when
callbacks.onWidgetExpandStateChange
is given
autoOpen
inBotStyle
has been deprecated and is no longer being considered internally due to its use-case removal
- Fixed a bug where the widget was not working when
configureSession
was set.
- Removed a
@tanstack/react-query
dependency
Widget now supports carousel message for commercial shop items. Message with valid extendedMessagePayload?.commerce_shop_items
value is displayed as carousel component that is interactable.
- Added
enableResetHistoryOnConnect
inConstant
for allowing to reset chat history - Added
onWidgetExpandStateChange
toConstant.callbacks
that will be called upon expanded state change event
- Fixed a bug where
botStudioEditProps.botInfo.profileUrl
is not applied to typing indicator bubble - Fixed a bug where suggested replies of
botStudioEditProps.welcomeMessages
are not being removed after a message is sent - Fixed a bug where injected welcome messages are not displayed when there is no message in the channel
- Adjusted margins of message timestamp
- Fixed a bug where message bubble width is incorrectly displayed depending on the length of text
- Following Constant properties are removed because they were not being considered internally:
- instantConnect
- botNickName
- enableMobileView (use deviceType instead)
- Fixed a bug where styles were broken on some websites
- Added
widgetOpenState
andonWidgetOpenStateChange
toConstant
- Fixed a bug where a message sent by a member that is not the current user nor the bot user is displayed incorrectly
- Fixed a bug where the widget wouldn't close in the mobile view when autoOpen was set to true.
- Added
botStudioEditProps
inConstant
. Supports real time update of various injected states such asbotInfo
,aiAttributes
,welcomeMessages
, andstyles
- Fixed a bug where sender name is overflowing in a bot message
- Fixed a bug where message input is not being disabled when last message has a suggested replies
- Fixed a bug where multi-line message data content is displayed incorrectly
- Increased channel header button sizes in mobile view
autoOpen
is now applied in the mobile view as well
- Added a new optional property
deviceType
to Constant. When given, the app fixates its view type accordingly irregardless of change of screen width
- Fixed a bug where initial scroll position is not at the bottom when last message has suggested replies
- Fixed a bug where margin between neighboring messages is not always
16px
- Fixed a bug where users join empty channels when a bot is recreated with the same ID
- Fixed a bug where modal components being rendered beneath chat component
- Fixed errors occurring when removing a channel or when the bot leaves.
- Fixed types path correctly.
- Fixed an accidental disconnect issue.
- Reduced chat-ai-widget bundle size 402.12 kB -> 292.90 kB (gzip); 27.36%
- Removed
@sendbird/uikit-react
dependency frompackage.json
. - Linked the necessary code from
sendbird/uikit-react
github repository directly intopackages/uikit/
dir through a Git submodule. - Updated our build process(Github workflow / Circleci config) to initialize and update the Git submodule, ensuring that the latest version of the code is always used.
- Removed
- Added
serviceName
to chatbot configs
- Added missing property
url
inFunctionCallRequestInfo
- Added missing
callbacks
property toConstant
- Added new properties
apiHost
, andwsHost
inConstant
- Added
FileMessage
for displaying a file message content as image - Added a new property
callbacks
inConstantContextProps
- Added missing aria-label attributes to enhance accessibility, with corresponding ESLint rule settings to ensure continued compliance.
- Removed the expand/collapse button from the WidgetWindow.
- Incremented the specifications for messageInputWrapper style to improve UI consistency.
- Reverted the addition of the slim version of Datadog RUM, removing related code. This reverts the changes initially introduced in commit f2bfe362.
- Integrated Datadog RUM (Real User Monitoring) in a slimmed-down version to optimize performance monitoring without heavily impacting the application's load time.
- Made
children
prop type optional for component.
- Fixed a DOMException issue in useDynamicAttachModal hook.
- Replaced a Sendbird AI Chatbot website link in ChatBottom component.
- Implemented safe parsing of message.data to prevent errors in data handling.
- Enhanced efficiency by reusing user and channel information stored in localStorage, reducing redundant data requests and improving user experience.
- Established functionality to connect the ChatAiWidget upon component mounting, improving real-time interaction capabilities. This includes various improvements such as managing connections and handling UI behavior between mobile and desktop platforms.
- Corrected the position of the feedback dialog which used to be incorrectly placed after bumping up UIKit version.
- Updated key structures to include appId and boId, which allows better identification and tracking of business objects.
- LocalStorage key format:
@sendbird/chat-ai-widget/${appId}/${botId}
- LocalStorage key format:
- Cleanup of Unused Files and Dependencies: Removed unnecessary files and dependencies like dompurify to streamline the codebase.
- Created an upload_to_s3 pipeline to facilitate file transfers to AWS S3.
- Added automated workflows for publishing, enhancing deployment efficiency.
- Corrected the positioning of the feedback icon in the bot message UI
- Modified the build output path for better management of build artifacts.
- Removed
react-popper-tooltip
library from the project dependencies to streamline the bundle size.
- Apply text and icon color variations based on theme settings to the
<ErrorContainer />
component, enhancing the visual coherence across different application themes. - Introduce a message feedback feature that allows users to provide feedback on messages directly within the application. This feature is aimed at enhancing user engagement and interaction.
- As part of this update, the previous 👍🏻👎 emoji reactions have been replaced with a new UI
- Update the bot icon to a modern and more visually appealing design.
- Apply UIKit classNames to user message text & suggested replies
- styled-components.d.ts has been added to override
DefaultTheme
- styled-components.d.ts has been added to override
- Dismiss mobile keyboard after sending a message
- Inject className;
sendbird-word
to the message bubble component to make it customizable
- Enable passing
stringSet
prop from ChatAiWiget to UIKit- Available
stringSet
can be found at https://github.com/sendbird/sendbird-uikit-react/blob/main/src/ui/Label/stringSet.ts.
- Available
- Drop
react-code-block
library & add new CodeBlock component.- This update introduces a new component for displaying code blocks in a more efficient and stylized manner.
- Fix mobile UX issues to enhance UX on mobile devices by addressing various UI and interaction problems.
- Fix visibility of empty elements handling to ensure that empty elements in the application do not interfere with the user's experience by being incorrectly visible.
- Put the manual suggested reply component back for enhanced user interaction.
- Apply dynamic import for index script caching to improve performance and caching.
- Add self-service script publish guide.
- Added support for simple markdown formats in bot messages
- Supports bold format (
**bold**
) - Supports link format (
[text](url)
)
- Supports bold format (
- Addressed issues related to rendering bot messages
- Hide unused button icons
- Removed inherited margin and background-color from global CSS in the form
- Fixed a scroll issue in safari browser
- Added z-index to mobile container
- Internal change
- Reduced initial loading time:
- by changing delay time from 1000ms to 200ms when autoOpen is set to true.
- by eliminating unintended duplicated initial API calls.
- Improved user experience based on customer feedback:
- Excluded display of 👍👎 emojis during message streaming.
- Modified URL text messages from bots to be parsed as links.
- Fixed display of code snippets which had been broken since the self-service #87.
- Added
renderWidgetToggleButton
prop to support custom widget toggle button rendering.
- Replaced Channel module with GroupChannel to address issues.
- Used
isLoading
andisPending
along withisFetching
inuseChannelStyle
query hook to get the loading status.
- Introduced mobile view support: Users can now enable mobile view compatibility using the enableMobileView prop. To enable, simply set
enableMobileView={true}
. Default value is true.
<ChatAiWidget
{...other props}
enableMobileView={true / false}
/>
- Implemented Sendbird ChatAiWidget self-service integration: Detailed instructions for self-service integration can be found at here.
- Removed
startingPage
related logic and props:- These options, present since the early versions of the widget, have been deprecated due to extensive error pruning and lack of utilization in core functionalities. Related PR Link
- Changed source display indexing from the last item to the first
- Added a filtering option for the source list by
source_type
- Fixed text alignment issue with sendbird-message-input-text-field
- Fixed autoOpen & betaMark prop behavior issue
- Added missing profile URL image prop
- Used bot profileUrl & nickname in the channel header
- Applied text overflow attribute to message input element
- Excluded Pull Request option from Github.io deployment configuration
- Renamed
quick_replies
tosuggested_replies
- Renamed
extendedMessage
toextendedMessagePayload
in the message data - Added a feedback response with thumbs up and down emojis
- Introduced a boolean parameter,
enableEmojiFeedback
, to control emoji display
- Introduced a boolean parameter,
- Changed scroll block option to
end
fromnearest
in the useScrollOnStreaming hook - Merged sender profile when messages are sent in a short span of time
- Made profile image invisible only when consecutive message senders are the same
- Added form message UI components:
<FormInput />
&<FormMessage />
- Supported user conversations with 3 or more participants in the chatbot
- Enabled user(bot) mention
- Fixed URL parsing in the first message
- Implemented quick reply UI attachment to the bottom of bot messages.
- Introduced a new feature for quick reply UI.
- Introduce ai widget script loading for non-react users.
- Removed redundant styles to enhance the user interface.
- Improved the BETA logo UI.
- Corrected the format of quick replies.
- Addressed an issue with incorrect quick replies format.
- Removed an unnecessary
isStartingPage
condition.
- Moved url-webdemo to the packages directory for improved organization.
- Added support for mobile devices.
- Set
instantConnect: true
as default- If instantConnect set is
true
, the SDK connection will be established right after mounting the or component
- If instantConnect set is
- Fixed issues related to AdminMessage handling and introduced an option for source messages.
- Fixed an issue where scrolling in the parent element was not prevented.
- Some users experienced slow loading of the chat AI widget due to the large bundle size of react-code-blocks.So we implemented lazy loading for the component, resulting in faster and more efficient initialization.
- Pass customExtensionParams to SBProvider for logging purpose.
- Resolved an issue where the suggested reply panel overlapped the last message when streaming reply was enabled. By adding a 50px buffer to the scroll, the suggested reply panel now displays correctly without obstructing the last message.
- Added an interface to enable users to utilize their custom session handler. Introducing new props: configureSession and userId, which can now be passed into the component.
- Improved Channel Refresh Icon Control:
- Previously, the refresh icon and the expand + close icons were placed separately, causing alignment issues. To address this, the was used to prevent overlapping.
- Introduced a new prop,
customRefreshComponent
, which allows users to provide their own custom refresh icon component for better control.
- Detailed Waiting Logic for Pending Bot Messages:
- Implemented a logic to wait until the last message in the group channel is not null, with a timeout of up to 3 seconds. This fix addresses issues where Bot's messages were pending after sending the first message.
- Added a hashedKey handling feature for using the chat-ai-widget in ai-bot-url-webdemo.
- Introduced new props and exported the
Chat
component with the following features:instantConnect
: When set totrue
, the SDK connection will be established right after mounting the Chat or ChatAiWidget component.customBetaMarkText
: Allows customization of theBETA
tag text in the Channel header.
- Fixed Channel Refresh Issue:
- Even after merging #11, the channel was still being refreshed due to the sdk reconnection.
- Added a new option, sdkInitParams, to the UIKit sendbird/sendbird-uikit-react#692, allowing the passing of sdk init option params.
- By passing appStateToggleEnabled: false when sdk.init() is called, the unnecessary channel refresh is now prevented.
- Version 1.0.1 Issue Resolution:
- Fixed an issue where the default applicationId and botId values were incorrectly set when building with an existing .env file.
- Implemented logic to temporarily change .env to .env_temp before the build and revert it back post-build.
- Additionally, resolved the problem with the chat message sender's text_align being set to center.
- Ported some recent changes from the web-demo repository:
- The connection will not be established until a user sends the first message to the chat AI widget.
- Added userNickname prop to provide a distinctive name along with botName.