diff --git a/CHANGELOG.md b/CHANGELOG.md index 774eacf29..2c2b84243 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fixed an issue where the `
` areas of `ui.page_sidebar()` and `ui.page_navbar()` (with a `sidebar`) were made to be a fillable containers even when `fillable=False`. (#1816) +* Fixed an issue where the `.update_user_input()` method on `ui.Chat()` isn't working in shinylive. (#1891) + ## [1.3.0] - 2025-03-03 ### New features diff --git a/shiny/ui/_chat.py b/shiny/ui/_chat.py index 1125c2e0c..3ddb0ab3b 100644 --- a/shiny/ui/_chat.py +++ b/shiny/ui/_chat.py @@ -1107,16 +1107,13 @@ def update_user_input( } ) - _utils.run_coro_sync( - self._session.send_custom_message( - "shinyChatMessage", - { - "id": self.id, - "handler": "shiny-chat-update-user-input", - "obj": obj, - }, - ) - ) + msg = { + "id": self.id, + "handler": "shiny-chat-update-user-input", + "obj": obj, + } + + self._session._send_message_sync({"custom": {"shinyChatMessage": msg}}) def set_user_message(self, value: str): """