Problem
When the AI is generating a long response (streaming), users have no way to stop it mid-way. They have to wait or refresh the page.
Expected behavior
- While AI is streaming, a red "Stop" button (■) appears next to the message or in the input area.
- Clicking it cancels the current generation.
- Abort the fetch request (using
AbortController).
- The partial response remains as is, and a note "[Stopped by user]" is appended.
Technical hints
- Frontend:
frontend/src/components/ChatWindow.jsx – manage an AbortController for the streaming request.
- Add state
isGenerating to show/hide stop button.
- On stop, call
abortController.abort() and update UI.
Labels: enhancement, good-first-issue, SSoC26
Problem
When the AI is generating a long response (streaming), users have no way to stop it mid-way. They have to wait or refresh the page.
Expected behavior
AbortController).Technical hints
frontend/src/components/ChatWindow.jsx– manage anAbortControllerfor the streaming request.isGeneratingto show/hide stop button.abortController.abort()and update UI.Labels:
enhancement,good-first-issue,SSoC26