Clear chat history when switching user views of aichat level
This PR updates aichat so that when a teacher switches the user view of an aichat level via the teacher channel, the chat history is cleared.
After update
https://github.com/code-dot-org/code-dot-org/assets/107423305/5ea4aa03-650f-488f-ab87-ffea27761c58
Links
Testing story
Tested locally in /allthethings aichat levels with a teacher account with a section that has two student accounts.
Deployment strategy
Follow-up work
- Investigate 'strange behavior' when teacher views student aichat levels Slack thread
- Update read-only view of aichat level https://codedotorg.atlassian.net/browse/LABS-758
Privacy
Security
Caching
PR Checklist:
- [ ] Tests provide adequate coverage
- [ ] Privacy and Security impacts have been assessed
- [ ] Code is well-commented
- [ ] New features are translatable or updates will not break translations
- [ ] Relevant documentation has been added or updated
- [ ] User impact is well-understood and desirable
- [ ] Pull Request is labeled appropriately
- [ ] Follow-up work items (including potential tech debt) are tracked and linked
I don't even know if I agree with my past self here, but thoughts on keeping the clearing logic together with what we have in AichatView?
https://github.com/code-dot-org/code-dot-org/pull/58103#discussion_r1575181925
I don't even know if I agree with my past self here, but thoughts on keeping the clearing logic together with what we have in
AichatView?
Oh yeah - I think it would make sense to move to AichatView. Thanks!