fix: refresh during generation

fixes #116
This commit is contained in:
Jing Hua 2023-03-25 13:58:17 +08:00
parent b04dbfa76b
commit b7848e8b8b

View file

@ -157,7 +157,9 @@ const ContentView = React.memo(
<div className='flex justify-end gap-2 w-full mt-2'> <div className='flex justify-end gap-2 w-full mt-2'>
{isDelete || ( {isDelete || (
<> <>
{role === 'assistant' && messageIndex === lastMessageIndex && ( {!useStore.getState().generating &&
role === 'assistant' &&
messageIndex === lastMessageIndex && (
<RefreshButton onClick={handleRefresh} /> <RefreshButton onClick={handleRefresh} />
)} )}
{messageIndex !== 0 && <UpButton onClick={handleMoveUp} />} {messageIndex !== 0 && <UpButton onClick={handleMoveUp} />}