Conversation
- Add stop() from useChat to destructure - Add conditional Stop button visible only while isAssistantTyping - Stop button replaces send button during streaming - Call stop() on click to cancel the AI response Closes #484
|
| Filename | Overview |
|---|---|
| apps/frontend/components/chat/ProjectChat.tsx | Destructures stop from useChat and replaces the Send button with a Stop button (Square icon) when isAssistantTyping is true; the isAssistantTyping guard is correctly removed from the Send button's disabled check in the else branch. |
| apps/frontend/messages/en.json | Adds stop.response i18n key with value "Stop response". |
| apps/frontend/messages/de.json | Adds stop.response i18n key with German translation "Antwort stoppen". |
Reviews (1): Last reviewed commit: "fix(frontend): add missing stop.response..." | Re-trigger Greptile
Summary
Add a Stop button to cancel streaming AI responses. When the assistant is generating a response, users can now click the Stop button (replacing the Send button) to abort the stream instead of waiting for it to complete. The partial message remains in place after stopping.
Type of Change
Changes Made
stopto theuseChatdestructuring inProjectChat.tsxisAssistantTypingis truestop.responsei18n key in bothde.jsonanden.jsonwith appropriate translationsaria-labelvia the i18n string for accessibilityRelated Issues
Closes #484
Supersedes PR #485 (closed without merging).
Testing
Checklist
make generateif SQL queries were modified (backend)Screenshots (if applicable)