Skip to content

Commit 6abcb16

Browse files
authored
Properly send custom message in a synchronous manner (#1888)
1 parent b96388a commit 6abcb16

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
* Fixed an issue where the `<main>` areas of `ui.page_sidebar()` and `ui.page_navbar()` (with a `sidebar`) were made to be a fillable containers even when `fillable=False`. (#1816)
1717

18+
* Fixed an issue where the `.update_user_input()` method on `ui.Chat()` isn't working in shinylive. (#1891)
19+
1820
## [1.3.0] - 2025-03-03
1921

2022
### New features

shiny/ui/_chat.py

+7-10
Original file line numberDiff line numberDiff line change
@@ -1107,16 +1107,13 @@ def update_user_input(
11071107
}
11081108
)
11091109

1110-
_utils.run_coro_sync(
1111-
self._session.send_custom_message(
1112-
"shinyChatMessage",
1113-
{
1114-
"id": self.id,
1115-
"handler": "shiny-chat-update-user-input",
1116-
"obj": obj,
1117-
},
1118-
)
1119-
)
1110+
msg = {
1111+
"id": self.id,
1112+
"handler": "shiny-chat-update-user-input",
1113+
"obj": obj,
1114+
}
1115+
1116+
self._session._send_message_sync({"custom": {"shinyChatMessage": msg}})
11201117

11211118
def set_user_message(self, value: str):
11221119
"""

0 commit comments

Comments
 (0)