Skip to content

Commit 259bd41

Browse files
schloerkecpsievert
andauthored
Apply suggestions from code review
Co-authored-by: Carson Sievert <[email protected]>
1 parent 59fc8bb commit 259bd41

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

shiny/ui/_chat.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,14 +1417,15 @@ def enable_bookmarking(
14171417
"""
14181418
Enable bookmarking for the chat instance.
14191419
1420-
This method allows the chat instance to be bookmarked, which means that the
1421-
current state of the chat (including messages) can be saved and restored
1422-
when the app is reloaded.
1420+
This method registers `on_bookmark` and `on_restore` hooks on `session.bookmark`
1421+
to save/restore chat state on both the `Chat` and `client` instances.
1422+
In order for this method to actually work correctly, a `bookmark_store`
1423+
must be specified on the `App` object.
14231424
14241425
Parameters
14251426
----------
14261427
client
1427-
The chat client (e.g. [chatlas](https://posit-dev.github.io/chatlas/)) instance to use for bookmarking.
1428+
The chat client instance to use for bookmarking. This can be a Chat model provider from [chatlas](https://posit-dev.github.io/chatlas/), or more generally, an instance following the `ClientWithState` protocol.
14281429
14291430
Raises
14301431
------

0 commit comments

Comments
 (0)