Skip to content

Conversation

@Salman-Ahamed
Copy link
Contributor

@Salman-Ahamed Salman-Ahamed commented Nov 7, 2025

🎯 What’s this PR about?

This PR addresses the issue where the chat responded to an old stopped request:

  • Ensures new user messages are always prioritized after stopping a response
  • Prevents unintended replies to previously interrupted requests
  • Improves chat consistency and user input accuracy

📎 Related ClickUp Ticket

Example: https://app.clickup.com/t/86ev83n44


💻 Demo (optional)


✅ Checklist

  • Self-reviewed the code
  • Linked the correct ClickUp ticket
  • Tested locally (MANDATORY)
  • Marked as Draft if not ready for review

- Added a check to return null if the message is empty in the SystemMessage component.
- Cleared previous error messages before sending a new message in the useChat hook to improve user experience.
- Improved error handling by removing both previous error messages and incomplete AI loading messages before sending a new message.
- Added checks to ensure that if error messages are present, the loading message is also removed to enhance user experience.
- Revised comment to specify the removal of loading messages instead of incomplete AI messages before sending a new message, enhancing code clarity and maintainability.
- Updated comment to clarify the condition for removing the loading message when error messages are present, enhancing code readability and maintainability.
Copy link
Contributor Author

@Salman-Ahamed Salman-Ahamed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

@hamza-smythos hamza-smythos merged commit fbaff71 into dev Nov 10, 2025
@hamza-smythos hamza-smythos deleted the fix/chat-stopped-request-response branch November 10, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants