AnswerDotAI / fasthtml-example

Example fasthtml applications demonstrating a range of web programming techniques
Apache License 2.0
581 stars 82 forks source link

Reset input field after user send a message #30

Closed inweb3 closed 1 week ago

inweb3 commented 2 weeks ago

Return an additional ChatInput() in send_message to make sure the user input field is reset after the Send button is clicked.

inweb3 commented 2 weeks ago

Added show:bottom to hx_swap to enable scrolling of assistant messages.

johnowhitaker commented 1 week ago

The show:bottom makes it impossible to scroll up and read the start of a long message while it's still generating, since it keeps jumping to the bottom of the message. So let's remove that for now and then I'll merge :)

inweb3 commented 1 week ago

I see. Thanks @johnowhitaker I removed the show:bottom commit, please check if it is ok now :)

johnowhitaker commented 1 week ago

@inweb3 thank you :)