def conversation_box() -> None:
state = me.state(State)
conversation = state.conversation
with me.box(style=CHAT_STARTER_STYLE):
header()
messages = conversation.messages
with me.box(
style=me.Style(overflow_y="auto", display="flex", flex_direction="column")
):
me.box(
key="conversationtop",
style=me.Style(margin=me.Margin(bottom="1vh")),
)
for message in messages:
message_box(message, conversation.is_from_the_past)
if messages:
me.box(
key="end_of_messages",
style=me.Style(margin=me.Margin(bottom="50vh")),
)