You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix ChatMessage.CreatedAt being always overwritten by the latest timestamp. (#6885)
* Initial plan
* Add failing test for Unix epoch timestamp issue
Co-authored-by: stephentoub <[email protected]>
* Fix CreatedAt timestamp overwrite by only updating if later
Co-authored-by: stephentoub <[email protected]>
* Enhance timestamp test with comprehensive scenarios
Co-authored-by: stephentoub <[email protected]>
* Replace DateTimeOffset.UnixEpoch with manual construction for compatibility
Co-authored-by: stephentoub <[email protected]>
* Apply suggestions from code review
* Update test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/ChatCompletion/ChatResponseUpdateExtensionsTests.cs
* Add theory test for timestamp folding with pairs of timestamps
Co-authored-by: stephentoub <[email protected]>
* Refactor ToChatResponse_TimestampFolding to use MemberData instead of duplicated InlineData
Co-authored-by: stephentoub <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: stephentoub <[email protected]>
Co-authored-by: Stephen Toub <[email protected]>
Copy file name to clipboardExpand all lines: test/Libraries/Microsoft.Extensions.AI.Abstractions.Tests/ChatCompletion/ChatResponseUpdateExtensionsTests.cs
+92Lines changed: 92 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -359,6 +359,98 @@ public async Task ToChatResponse_UsageContentExtractedFromContents()
0 commit comments