Add pre-chat message with starter prompts#5255
Merged
Conversation
OEvgeny
reviewed
Aug 7, 2024
OEvgeny
reviewed
Aug 7, 2024
OEvgeny
reviewed
Aug 7, 2024
OEvgeny
approved these changes
Aug 7, 2024
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Added
Changed
useSuggestedActionsto return the activity the suggested actions originated from, in PR #5255, by @compulimFixed
styleOptions.maxMessageLengthshould support any JavaScript number value includingInfinity, by @compulim, in PR #5255Description
Adding experimental pre-chat message with starter prompts in Fluent skin pack.
Pre-chat message activity is defined as:
type === 'message'entities[]contains a https://schema.org/Message object which fulfill the following criteriatype === 'https://schema.org/Message'@context === 'https://schema.org'@id === '', the empty string indicates the object is about the message itself@type === 'Message'keywords[]contains"PreChatMessage"Design
The pre-chat message activity leverage Schema.org/Message/keywords to tag the message itself as a
"PreChatMessage".We also want to reuse the suggested actions
messageBackactions for starter prompts (image, title, text, and optionally display text). Thus, we need to hide the suggested actions in the send box. This also pave the road for the inline suggested actions feature.Specific Changes
PreChatMessageActivityto activity middleware of Fluent skin packactivity.suggestedActions, they must bemessageBackcard actionuseSuggestedActionsto return the activity the suggested actions originated fromstyleOptions.maxMessageLength === Infinity'should treat the style option as disabledCHANGELOG.mdReview Checklist
z-index)Documents reviewed (docs, samples, live demo)Internationalization reviewed (strings, unit formatting)package.jsonandpackage-lock.jsonreviewedSecurity reviewed (no data URIs, check for nonce leak)