mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fixed CA1873 warning (#4479)
This commit is contained in:
committed by
GitHub
Unverified
parent
b2ad1c3424
commit
fd981da0f8
@@ -747,9 +747,15 @@ public sealed partial class ChatClientAgent : AIAgent
|
||||
{
|
||||
// The agent has a ChatHistoryProvider configured, but the service returned a conversation id,
|
||||
// meaning the service manages chat history server-side. Both cannot be used simultaneously.
|
||||
if (this._agentOptions?.WarnOnChatHistoryProviderConflict is true)
|
||||
if (this._agentOptions?.WarnOnChatHistoryProviderConflict is true
|
||||
&& this._logger.IsEnabled(LogLevel.Warning))
|
||||
{
|
||||
this._logger.LogAgentChatClientHistoryProviderConflict(nameof(ChatClientAgentSession.ConversationId), nameof(this.ChatHistoryProvider), this.Id, this.GetLoggingAgentName());
|
||||
var loggingAgentName = this.GetLoggingAgentName();
|
||||
this._logger.LogAgentChatClientHistoryProviderConflict(
|
||||
nameof(ChatClientAgentSession.ConversationId),
|
||||
nameof(this.ChatHistoryProvider),
|
||||
this.Id,
|
||||
loggingAgentName);
|
||||
}
|
||||
|
||||
if (this._agentOptions?.ThrowOnChatHistoryProviderConflict is true)
|
||||
|
||||
Reference in New Issue
Block a user