mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Clean up stale mentions of M.E.AI.Agents (#997)
* Clean up stale mentions of M.E.AI.Agents * Unused usings
This commit is contained in:
committed by
GitHub
Unverified
parent
7189caabc7
commit
77e5f527c4
+2
-1
@@ -10,9 +10,10 @@ using System.Threading.Tasks;
|
||||
using Azure;
|
||||
using Azure.AI.Agents.Persistent;
|
||||
using Azure.Core;
|
||||
using Microsoft.Extensions.AI;
|
||||
using Moq;
|
||||
|
||||
namespace Microsoft.Extensions.AI.Agents.AzureAI.UnitTests.Extensions;
|
||||
namespace Microsoft.Agents.AI.AzureAI.UnitTests.Extensions;
|
||||
|
||||
public sealed class PersistentAgentsClientExtensionsTests
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ public class OpenTelemetryAgentTests
|
||||
|
||||
// Verify activity tags
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.Operation.NameValues.InvokeAgent, activity.GetTagItem(OpenTelemetryConsts.GenAI.Operation.Name));
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftExtensionsAIAgents, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftAgentsAI, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
Assert.Equal("test-agent-id", activity.GetTagItem(OpenTelemetryConsts.GenAI.Agent.Id));
|
||||
Assert.Equal("TestAgent", activity.GetTagItem(OpenTelemetryConsts.GenAI.Agent.Name));
|
||||
Assert.Equal("Test Description", activity.GetTagItem(OpenTelemetryConsts.GenAI.Agent.Description));
|
||||
@@ -141,7 +141,7 @@ public class OpenTelemetryAgentTests
|
||||
|
||||
// Verify activity tags
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.Operation.NameValues.InvokeAgent, activity.GetTagItem(OpenTelemetryConsts.GenAI.Operation.Name));
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftExtensionsAIAgents, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftAgentsAI, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
Assert.Equal("test-agent-id", activity.GetTagItem(OpenTelemetryConsts.GenAI.Agent.Id));
|
||||
Assert.Equal("TestAgent", activity.GetTagItem(OpenTelemetryConsts.GenAI.Agent.Name));
|
||||
Assert.Equal("Test Description", activity.GetTagItem(OpenTelemetryConsts.GenAI.Agent.Description));
|
||||
@@ -198,7 +198,7 @@ public class OpenTelemetryAgentTests
|
||||
var activity = Assert.Single(activities);
|
||||
Assert.Equal("You are a helpful assistant.", activity.GetTagItem(OpenTelemetryConsts.GenAI.Request.Instructions));
|
||||
// Should use default system when ChatClientMetadata is not available
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftExtensionsAIAgents, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftAgentsAI, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -270,7 +270,7 @@ public class OpenTelemetryAgentTests
|
||||
// Assert
|
||||
var activity = Assert.Single(activities);
|
||||
// Should use default system when agent is not a ChatClientAgent
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftExtensionsAIAgents, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
Assert.Equal(OpenTelemetryConsts.GenAI.SystemNameValues.MicrosoftAgentsAI, activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -1179,8 +1179,8 @@ public class OpenTelemetryAgentTests
|
||||
// Assert
|
||||
var activity = Assert.Single(activities);
|
||||
|
||||
// Verify that the system defaults to "microsoft.extensions.ai.agents" when no metadata is available
|
||||
Assert.Equal("microsoft.extensions.ai.agents", activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
// Verify that the system defaults to "microsoft.agents.ai" when no metadata is available
|
||||
Assert.Equal("microsoft.agents.ai", activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
|
||||
// Verify that GetService returns null provider name
|
||||
var agentMetadata = telemetryAgent.GetService(typeof(AIAgentMetadata)) as AIAgentMetadata;
|
||||
@@ -1271,8 +1271,8 @@ public class OpenTelemetryAgentTests
|
||||
// Assert
|
||||
var activity = Assert.Single(activities);
|
||||
|
||||
// Verify that the system defaults to "microsoft.extensions.ai.agents" when no metadata is available
|
||||
Assert.Equal("microsoft.extensions.ai.agents", activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
// Verify that the system defaults to "microsoft.agents.ai" when no metadata is available
|
||||
Assert.Equal("microsoft.agents.ai", activity.GetTagItem(OpenTelemetryConsts.GenAI.SystemName));
|
||||
|
||||
// Verify that GetService returns null for metadata
|
||||
var agentMetadata = telemetryAgent.GetService(typeof(AIAgentMetadata)) as AIAgentMetadata;
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ using System.Threading.Tasks;
|
||||
using Azure;
|
||||
using Azure.AI.Agents.Persistent;
|
||||
using Azure.Identity;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests.Framework;
|
||||
using Microsoft.Extensions.AI;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
||||
@@ -8,7 +8,6 @@ using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
#pragma warning disable SYSLIB1045 // Use GeneratedRegex
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
namespace Microsoft.Agents.AI.Workflows.UnitTests;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
using System;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
namespace Microsoft.Agents.AI.Workflows.UnitTests;
|
||||
|
||||
@@ -6,7 +6,6 @@ using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Agents.AI.Workflows.Checkpointing;
|
||||
using Microsoft.Agents.AI.Workflows.Sample;
|
||||
using Microsoft.Agents.AI.Workflows.Specialized;
|
||||
|
||||
@@ -10,7 +10,6 @@ using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
namespace Microsoft.Agents.AI.Workflows.Sample;
|
||||
|
||||
-1
@@ -4,7 +4,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
namespace Microsoft.Agents.AI.Workflows.Sample;
|
||||
|
||||
@@ -8,7 +8,6 @@ using System.Text.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FluentAssertions;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.Agents.AI.Workflows.Specialized;
|
||||
using Microsoft.Extensions.AI;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user