@@ -1406,8 +1406,8 @@ def enable_bookmarking(
14061406 client : ClientWithState | chatlas .Chat [Any , Any ],
14071407 / ,
14081408 * ,
1409- # TODO: Barret - bookmark_on docs
1410- bookmark_on : Optional [Literal ["response" ]] = "response" ,
1409+ # TODO: Barret - `on` docs
1410+ on : Optional [Literal ["response" ]] = "response" ,
14111411 ) -> CancelCallback :
14121412 """
14131413 Enable bookmarking for the chat instance.
@@ -1495,14 +1495,14 @@ async def set_chatlas_state(value: Jsonifiable) -> None:
14951495 root_session = session .root_scope ()
14961496 root_session .bookmark .exclude .append (self .id + "_user_input" )
14971497
1498- if bookmark_on is not None :
1498+ if on is not None :
14991499
15001500 # When ever the bookmark is requested, update the query string (indep of store type)
15011501 @root_session .bookmark .on_bookmarked
15021502 async def _ (url : str ):
15031503 await session .bookmark .update_query_string (url )
15041504
1505- if bookmark_on == "response" :
1505+ if on == "response" :
15061506
15071507 @reactive .effect
15081508 # @reactive.event(lambda: chat.latest_message_stream.result, ignore_init=True)
@@ -1645,42 +1645,21 @@ def ui(
16451645 ** kwargs ,
16461646 )
16471647
1648- @overload
16491648 def enable_bookmarking (
16501649 self ,
16511650 client : ClientWithState | chatlas .Chat [Any , Any ],
16521651 / ,
16531652 * ,
1654- bookmark_store : Optional [BookmarkStore ] = None ,
1655- bookmark_on : Optional [Literal ["response" ]] = "response" ,
1656- ) -> CancelCallback : ...
1657- @overload
1658- def enable_bookmarking (
1659- self ,
1660- client : ChatlasClient [Any , Any ],
1661- / ,
1662- * ,
1663- bookmark_store : Optional [BookmarkStore ] = None ,
1664- bookmark_on : Optional [Literal ["response" ]] = "response" ,
1665- ) -> CancelCallback : ...
1666- def enable_bookmarking (
1667- self ,
1668- client : Any ,
1669- / ,
1670- * ,
1671- bookmark_store : Optional [BookmarkStore ] = None ,
1672- bookmark_on : Optional [Literal ["response" ]] = "response" ,
1653+ store : Optional [BookmarkStore ] = None ,
1654+ on : Optional [Literal ["response" ]] = "response" ,
16731655 ) -> CancelCallback :
16741656
1675- if bookmark_store is not None :
1657+ if store is not None :
16761658 from ..express import app_opts
16771659
1678- app_opts (bookmark_store = bookmark_store )
1660+ app_opts (bookmark_store = store )
16791661
1680- return super ().enable_bookmarking (
1681- client ,
1682- bookmark_on = bookmark_on ,
1683- )
1662+ return super ().enable_bookmarking (client , on = on )
16841663
16851664
16861665@add_example (ex_dir = "../api-examples/Chat" )
0 commit comments