mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
🛠️ fix: Improve SSE Handling and Fix Typo in sendEmail Template (#1245)
* fix: typo for passwordReset.handlebars * fix(useSSE): prevent unnecessary JSON.parse abort error, handle immediate abort-submit gracefully by reverting to previous state before immediate abort-submit, add showStopButton state to explicitly render disabled sendButton when message generation is cancelled, filter undefined messages and replace undefined convo for cancelHandler
This commit is contained in:
parent
e13b146d6d
commit
166a4fa44f
6 changed files with 33 additions and 17 deletions
|
|
@ -25,6 +25,7 @@ import store from '~/store';
|
|||
// this to be set somewhere else
|
||||
export default function useChatHelpers(index = 0, paramId: string | undefined) {
|
||||
const [files, setFiles] = useRecoilState(store.filesByIndex(index));
|
||||
const [showStopButton, setShowStopButton] = useState(true);
|
||||
const [filesLoading, setFilesLoading] = useState(false);
|
||||
const setFilesToDelete = useSetFilesToDelete();
|
||||
|
||||
|
|
@ -130,6 +131,7 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {
|
|||
isEdited = false,
|
||||
} = {},
|
||||
) => {
|
||||
setShowStopButton(true);
|
||||
if (!!isSubmitting || text === '') {
|
||||
return;
|
||||
}
|
||||
|
|
@ -369,5 +371,7 @@ export default function useChatHelpers(index = 0, paramId: string | undefined) {
|
|||
invalidateConvos,
|
||||
filesLoading,
|
||||
setFilesLoading,
|
||||
showStopButton,
|
||||
setShowStopButton,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue