Cleanup chat history before sending it to LLM in V2 agent
What does this MR do and why?
Fix for Gracefully handle null content in Duo Chat history (#478619 - closed) it also contains backported deduplication history functionality
Original code: cleanup and deduplication
Note: this is a fix for a bug for a feature that is still behind a feature flag
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
How to set up and validate locally
- Turn on the feature flag
v2_chat_agent_integration
- Open chat and ask it different questions.
- Open new tab and observe chat history
Related to #478619 (closed)