-
Notifications
You must be signed in to change notification settings - Fork 44.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix side effects on message history #3619
Fix side effects on message history #3619
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #3619 +/- ##
==========================================
+ Coverage 59.98% 60.01% +0.02%
==========================================
Files 69 69
Lines 3099 3101 +2
Branches 513 445 -68
==========================================
+ Hits 1859 1861 +2
Misses 1109 1109
Partials 131 131
☔ View full report in Codecov by Sentry. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Background
An issue was caused by the update_running_summary function, which was directly modifying the new_events list passed as an argument. Since the new_events list is a part of the full_message_history, any modifications made to the new_events list would also affect the original full_message_history.
Changes
Create a copy of the new_events list: To avoid modifying the original new_events list and full_message_history, a copy of the new_events list was created using new_events.copy(), and the copy was named updated_new_events. Then added
updated_new_events
to the prompt.PR Quality Checklist