.NET: fix: preserve AG-UI session history#5904
Open
he-yufeng wants to merge 3 commits into
Open
Conversation
Comment on lines
+934
to
+937
| // AG-UI uses ConversationId as a thread id, not as a signal that the service stores model history. | ||
| private bool ConversationIdIndicatesServiceManagedHistory => | ||
| !string.Equals(this._agentMetadata.ProviderName, AGUIProviderName, StringComparison.Ordinal); | ||
|
|
Member
There was a problem hiding this comment.
Please use a static private method instead. The Xml comment doesn't align with the member logic.
Suggested change
| // AG-UI uses ConversationId as a thread id, not as a signal that the service stores model history. | |
| private bool ConversationIdIndicatesServiceManagedHistory => | |
| !string.Equals(this._agentMetadata.ProviderName, AGUIProviderName, StringComparison.Ordinal); | |
| // ??? | |
| private static bool IsAGUIProviderName(string providerName) => | |
| string.Equals(providerName, AGUIProviderName, StringComparison.Ordinal); | |
Contributor
Author
There was a problem hiding this comment.
Addressed in ef6343528: replaced the instance property with a private static IsAGUIProviderName(...) helper and removed the misleading comment. I used string? for the parameter because ProviderName is nullable under the project settings; the comparison still behaves the same for non-AG-UI providers.
Validation passed locally: AGUI unit-test project build, 3 focused AG-UI history tests, full AGUI unit suite on net10.0 and net472, dotnet format --verify-no-changes, and git diff --check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #5898
Verified