diff --git a/api/server/middleware/abortMiddleware.js b/api/server/middleware/abortMiddleware.js
index 1177d71d99..ea331bcbbd 100644
--- a/api/server/middleware/abortMiddleware.js
+++ b/api/server/middleware/abortMiddleware.js
@@ -8,7 +8,7 @@ async function abortMessage(req, res) {
const { abortKey } = req.body;
if (!abortControllers.has(abortKey) && !res.headersSent) {
- return res.status(404).send('Request not found');
+ return res.status(404).send({ message: 'Request not found' });
}
const { abortController } = abortControllers.get(abortKey);
diff --git a/api/server/services/AuthService.js b/api/server/services/AuthService.js
index 06273826cc..363042a753 100644
--- a/api/server/services/AuthService.js
+++ b/api/server/services/AuthService.js
@@ -185,7 +185,7 @@ const resetPassword = async (userId, token, password) => {
{
name: user.name,
},
- 'resetPassword.handlebars',
+ 'passwordReset.handlebars',
);
await passwordResetToken.deleteOne();
diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx
index 062b5cd60c..632944eb8e 100644
--- a/client/src/components/Chat/Input/ChatForm.tsx
+++ b/client/src/components/Chat/Input/ChatForm.tsx
@@ -19,6 +19,8 @@ export default function ChatForm({ index = 0 }) {
handleStopGenerating,
filesLoading,
setFilesLoading,
+ showStopButton,
+ setShowStopButton,
} = useChatContext();
const submitMessage = () => {
@@ -46,10 +48,10 @@ export default function ChatForm({ index = 0 }) {
endpoint={conversation?.endpoint}
/>
- {isSubmitting ? (
-
+ {isSubmitting && showStopButton ? (
+
) : (
-
+
)}
diff --git a/client/src/components/Chat/Input/StopButton.tsx b/client/src/components/Chat/Input/StopButton.tsx
index 0ce8416ffa..69303adb97 100644
--- a/client/src/components/Chat/Input/StopButton.tsx
+++ b/client/src/components/Chat/Input/StopButton.tsx
@@ -1,4 +1,4 @@
-export default function StopButton({ stop }) {
+export default function StopButton({ stop, setShowStopButton }) {
return (
@@ -7,7 +7,10 @@ export default function StopButton({ stop }) {
type="button"
className="border-gizmo-gray-950 rounded-full border-2 p-1 dark:border-gray-200"
aria-label="Stop generating"
- onClick={stop}
+ onClick={(e) => {
+ setShowStopButton(false);
+ stop(e);
+ }}
>