You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: shiny/ui/_chat.py
+43-4Lines changed: 43 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1411,7 +1411,6 @@ def enable_bookmarking(
1411
1411
client: ClientWithState|chatlas.Chat[Any, Any],
1412
1412
/,
1413
1413
*,
1414
-
# TODO: Barret - `on` docs
1415
1414
on: Optional[Literal["response"]] ="response",
1416
1415
) ->CancelCallback:
1417
1416
"""
@@ -1420,12 +1419,21 @@ def enable_bookmarking(
1420
1419
This method registers `on_bookmark` and `on_restore` hooks on `session.bookmark`
1421
1420
to save/restore chat state on both the `Chat` and `client` instances.
1422
1421
In order for this method to actually work correctly, a `bookmark_store`
1423
-
must be specified on the `App` object.
1422
+
must be specified within `shiny.App()` or `shiny.express.app_opts()`.
1424
1423
1425
1424
Parameters
1426
1425
----------
1427
1426
client
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.
1427
+
The chat client instance to use for bookmarking. This can be a Chat model
1428
+
provider from [chatlas](https://posit-dev.github.io/chatlas/), or more
1429
+
generally, an instance following the `ClientWithState` protocol.
1430
+
on
1431
+
The event to trigger the bookmarking on.
1432
+
1433
+
When `on` is not `None`, the query string with the latest bookmark URL.
1434
+
1435
+
When `on` is `"response"`, the session will attempt to bookmark when the
0 commit comments