Added useDraftedInput hook, which stores the saved message to the local storage and clears the drafted input if it is an empty string. It is also sensitive to the change of key.
Can help to test:
Switching around chats while leaving some draft messages
Start a new chat (note that the initial message won't be saved in localStorage, but the messages after initial message will be saved)
Added
useDraftedInput
hook, which stores the saved message to the local storage and clears the drafted input if it is an empty string. It is also sensitive to the change ofkey
.Can help to test: