chainlit
chainlit copied to clipboard
Actions stop responding / get disabled when copilot was minimized
Describe the bug When actions are displayed to the user with cl.AskActionMessage, and the text input was disabled if the user hits the button to close the copilot, and then open the copilot againt then actions cannot be selected and the copilots hangs with no possible user interaction (because text input stills disabled and buttons of actions did not response)
Same behaviour on mobiles when the browser app is minimized, or lost focus.
To Reproduce Steps to reproduce the behavior:
- Open the copilot
- Send any action to the user interface
- DO NOT click any option of the action buttons, instead clic the "X" Copilot toggle visibility button to minimize copilot popup, then clic again to show and the bug is there.
- Try to write text on user input or select any button from prev displayed actions.
Expected behavior When minimize and show again the copilot popup, I expect to continue the interaction even if a set of displayed options from actions buttons are waiting for user clic.
Desktop (please complete the following information):
- OS: Ubuntu 22
- Browser Chrome
- Version dont have that info with me now.
Smartphone:
- Device: Iphone 12
- OS: N/A
- Browser Chrome/SAfari
- Version dont have that info with me now.
Additional context It seems to be the websocket disconnection, because the @cl.on_chat_end are called when I minimize the copilot popup, may be if the purpose was to close the chat instead of minimizing then it would be useful to popup a question to the user to clean and close the chat history/window in order to start a new conversation when copilot popup was showed again.