Fix: Clear error message when generating a new response in ChatPanel

In this commit, we updated the ChatPanel component to clear the error message when generating a new response. This change ensures that any previous error messages are removed from the UI, providing a clean slate for the new response. The setHasError('') function call was added to the onClick event handler of the RegenerationButton component.
This commit is contained in:
Rankin Zheng 2023-06-06 11:06:19 +08:00
parent 4aea940676
commit 4a6ff075a7

View File

@ -214,6 +214,7 @@ const chatPanel = () => {
setGenerating(true);
setResponsed(false);
setCurrentMessage('');
setHasError('');
}} />
</Stack>
</Container >