init
__all__ = ['ConversationListLoaderComponent', 'conversation_history_drawer_layout', 'render_conversation_metadata']
module-attribute
ConversationListLoaderComponent
Bases: MyComponentState
Loads the conversation list (i.e. titles and uids) for the logged-in user.
Creates either a "select" dropdown for conversations, or "vstack" of clickable items
Note: Requires the .load_conversation_list_handler to be called on page load
...
on_load=[conv_list_component.State.load_conversation_list_event]
conversation_selected = ''
class-attribute
instance-attribute
conversations_list = []
class-attribute
instance-attribute
max_num_conversations_to_load = 50
class-attribute
instance-attribute
conversation_options()
For use in a select dropdown to show title but use value of uid.
get_component(mode='select', on_select_handlers=None, max_num_conversations_to_load=50, show_selection=False)
classmethod
load_conversation_list_handler()
async
set_conversation_selected(value)
conversation_history_drawer_layout(conversation_list_component)
This provides a drawer for the conversation history that slides in from the left.
This should be placed anywhere within the main page content (position of slide out button is fixed, and drawer is an overlay) 2024-04-04 -- Works if placed in the vstack Returns: