All notable changes for the React platform will be documented in this file.
Note that there is no changelog available for the initial release of the platform (2.0.0), you can find the release notes here.
The changelog format is based on Keep a Changelog, and this project adheres to Semantic Versioning
- Configuration property
xatkit.react.public_url
to specify the path of the socket.io server. This property is used when accessing the bot using the/admin
url, and allows to tune the HTML generation to connect to a specific react server. The provided URL must contain the hostname, port, and path to the react server, and can be used in nginx configuration for URL rewriting. If not specified the/admin
HTML page will point tohttp://localhost:<react port>
. - A set of
RestHandler
mimicking the behavior of the/admin
endpoint previously defined in xatkit-runtime (see #237 for more information). The testing page can still be accessed atlocalhost:5000/admin
(or the public URL specified in the configuration), and behave as before. Note that these endpoints are only accessible when using the RestPlatform. - Configuration property
xatkit.react.enable_testing_page
to specify if the testing page (located at/admin
) should be enabled or not. This property can be set tofalse
if a bot is embedded in an existing website, and should not be available through another URL. The default value for this property istrue
. - Support for quick message buttons (fix #5): the
PostMessage
andReply
actions can now print buttons to drive the conversation. The values of these buttons are specified in a new parameterbuttons
of the action. This value is used as a regular user input and is matched to existing intents. This change does not break the public API:PostMessage
andReply
actions still provide a constructor without buttons. PostMessage
now implementsRuntimeArtifactAction#beforeDelay
, and sends an event to the web client to print loading dots. Note that loading dots are not displayed if the provided delay is 0. The loading dots are always removed after displaying a new bot message, the server needs to send another event to display them again.- Action
ToggleDarkMode
that notifies the client to enable/disable dark mode. - Action
Wait
that pauses the execution. - Action
ReplyLinkSnippet
to tell the UI to display a link snippet with a preview image.
- The default value of
xatkit.react.client.url
is now*
: this eases the deployment in development / test environment. Note that production deployment should specify a value for this property in order to restrict the access to the deployed bot. - The
/admin
endpoint is no longer available if the Xatkit configuration contains the propertyxatkit.react.enable_testing_page = false
. - Change log level of non-critical message from the internal socket.io server. This reduces the amount of noise in Xatkit logs.
- Events
Client_Ready
andClient_Closed
create empty contextsreact_ready
andreact_closed
in addition to thereact
context. These contexts can be used to define intents following the conversation start. - Event
Client_Ready
now defines additional parameters in thereact
context:react.hostname
,react.url
, andreact.origin
containing information related to the page where the bot is located.
- #9: Change log level to trace/debug for socket.io server logs
- #12: Add an action to toggle dark mode
- Configuration property
xatkit.react.client.url
to specify the URL of client domains embedding the react chat component. This property is translated into aAccess-Control-Allow-Origin
header that tells the browser to authorize requests from the specified domain. Supported values for the property are single URL and wildcard ("*"
). The standard does not authorize multiple URLs in theAccess-Control-Allow-Origin
header (see here). ReactEventProvider
that fires non-textual events related to the react client. The provider currently provides two events:Client_Ready
andClient_Closed
, that are triggered when a new client connects to/disconnects from Xatkit. These events set context parameters allowing to use theReply
action as a response. See the wiki for more information.- Support for bots hosted on
https
domains. The Xatkit configuration can now contain axatkit.server.ssl.keystore
property specifying the location of the keystore to use to sign http responses. Additional properties specifying keystore password are also required, check Xatkit configuration options for more information.
- Action parameters and return are now statically typed. This change breaks the public API: execution models relying on the generic
Object
type for parameter and return now need to cast values to the expected type. (e.g.ChatPlatform.Reply(message)
now requires thatmessage
is aString
, this can be fixed with the following syntaxChatPlatform.Reply(message as String)
).
- Actions
ReplyFileMessage(file)
andReplyFileMessage(file, message)
to post messages containing file through the react component. These actions upload the provided file on Xatkit's public directory (see this commit on xatkit-runtime). If the file is an image (.gif
,.jpg
, or.png
) the react component prints a clickable thumbnail of the image, otherwise a link is created to open the file or download it. ReactPlatform.shutdown()
is now automatically called on JVM shutdown. This ensures the the SocketIO server has been properly stopped.
ReactIntentProvider
andChatProvider
now use the new intent provider hierarchy (see xatkit-runtime/#221).- React platform's intent providers and actions now use socket.io to receive messages and reply in real-time. This change breaks the public API: the REST endpoint
/react/getAnswers
doesn't exist anymore, and messages must be passed as JSON objects through the socket). - The SocketIO server now allows address reuse by default: this allows to quickly restart Xatkit and reuse the same port without binding errors.
See the release notes here.