From db36809744e3cec21054eb63e124af54e5e64c44 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 5 Dec 2025 11:01:53 +0000 Subject: [PATCH] .NET: Move TextSearchProvider and TextSearchProviderOptions to Microsoft.Agents.AI namespace (#2639) * Initial plan * Move TextSearchProvider and TextSearchProviderOptions to Microsoft.Agents.AI namespace Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Restore AgentWithTextSearchRag project in solution file Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Revert using statement removal in AgentWithRAG_Step01_BasicTextRAG sample Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Revert the previous revert - remove using Microsoft.Agents.AI.Data from AgentWithRAG_Step01_BasicTextRAG Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> * Revert using statement removal in AgentWithTextSearchRag sample Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com> --- .../AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.cs | 1 - .../AgentWithRAG_Step02_CustomVectorStoreRAG/Program.cs | 1 - .../AgentWithRAG_Step03_CustomRAGDataSource/Program.cs | 1 - dotnet/src/Microsoft.Agents.AI/AgentJsonUtilities.cs | 1 - dotnet/src/Microsoft.Agents.AI/{Data => }/TextSearchProvider.cs | 2 +- .../Microsoft.Agents.AI/{Data => }/TextSearchProviderOptions.cs | 2 +- .../Data/TextSearchProviderTests.cs | 1 - 7 files changed, 2 insertions(+), 7 deletions(-) rename dotnet/src/Microsoft.Agents.AI/{Data => }/TextSearchProvider.cs (99%) rename dotnet/src/Microsoft.Agents.AI/{Data => }/TextSearchProviderOptions.cs (99%) diff --git a/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.cs b/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.cs index a30e0371a0..5470b1ed48 100644 --- a/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.cs +++ b/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step01_BasicTextRAG/Program.cs @@ -8,7 +8,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; -using Microsoft.Agents.AI.Data; using Microsoft.Agents.AI.Samples; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; diff --git a/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step02_CustomVectorStoreRAG/Program.cs b/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step02_CustomVectorStoreRAG/Program.cs index 89312f8597..eac14217d3 100644 --- a/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step02_CustomVectorStoreRAG/Program.cs +++ b/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step02_CustomVectorStoreRAG/Program.cs @@ -7,7 +7,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; -using Microsoft.Agents.AI.Data; using Microsoft.Extensions.AI; using Microsoft.Extensions.VectorData; using Microsoft.SemanticKernel.Connectors.Qdrant; diff --git a/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step03_CustomRAGDataSource/Program.cs b/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step03_CustomRAGDataSource/Program.cs index 5e7b2c4132..21f6643684 100644 --- a/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step03_CustomRAGDataSource/Program.cs +++ b/dotnet/samples/GettingStarted/AgentWithRAG/AgentWithRAG_Step03_CustomRAGDataSource/Program.cs @@ -9,7 +9,6 @@ using Azure.AI.OpenAI; using Azure.Identity; using Microsoft.Agents.AI; -using Microsoft.Agents.AI.Data; using Microsoft.Extensions.AI; using OpenAI; diff --git a/dotnet/src/Microsoft.Agents.AI/AgentJsonUtilities.cs b/dotnet/src/Microsoft.Agents.AI/AgentJsonUtilities.cs index c400a1cb6c..fe3f73b28b 100644 --- a/dotnet/src/Microsoft.Agents.AI/AgentJsonUtilities.cs +++ b/dotnet/src/Microsoft.Agents.AI/AgentJsonUtilities.cs @@ -4,7 +4,6 @@ using System.Diagnostics.CodeAnalysis; using System.Text.Encodings.Web; using System.Text.Json; using System.Text.Json.Serialization; -using Microsoft.Agents.AI.Data; namespace Microsoft.Agents.AI; diff --git a/dotnet/src/Microsoft.Agents.AI/Data/TextSearchProvider.cs b/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs similarity index 99% rename from dotnet/src/Microsoft.Agents.AI/Data/TextSearchProvider.cs rename to dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs index f76629a577..9659fdb7b8 100644 --- a/dotnet/src/Microsoft.Agents.AI/Data/TextSearchProvider.cs +++ b/dotnet/src/Microsoft.Agents.AI/TextSearchProvider.cs @@ -11,7 +11,7 @@ using Microsoft.Extensions.AI; using Microsoft.Extensions.Logging; using Microsoft.Shared.Diagnostics; -namespace Microsoft.Agents.AI.Data; +namespace Microsoft.Agents.AI; /// /// A text search context provider that performs a search over external knowledge diff --git a/dotnet/src/Microsoft.Agents.AI/Data/TextSearchProviderOptions.cs b/dotnet/src/Microsoft.Agents.AI/TextSearchProviderOptions.cs similarity index 99% rename from dotnet/src/Microsoft.Agents.AI/Data/TextSearchProviderOptions.cs rename to dotnet/src/Microsoft.Agents.AI/TextSearchProviderOptions.cs index 6700634bcd..e90a6efa63 100644 --- a/dotnet/src/Microsoft.Agents.AI/Data/TextSearchProviderOptions.cs +++ b/dotnet/src/Microsoft.Agents.AI/TextSearchProviderOptions.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.AI; -namespace Microsoft.Agents.AI.Data; +namespace Microsoft.Agents.AI; /// /// Options controlling the behavior of . diff --git a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Data/TextSearchProviderTests.cs b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Data/TextSearchProviderTests.cs index b32211e883..0e44eb8576 100644 --- a/dotnet/tests/Microsoft.Agents.AI.UnitTests/Data/TextSearchProviderTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.UnitTests/Data/TextSearchProviderTests.cs @@ -6,7 +6,6 @@ using System.Linq; using System.Text.Json; using System.Threading; using System.Threading.Tasks; -using Microsoft.Agents.AI.Data; using Microsoft.Extensions.AI; using Microsoft.Extensions.Logging; using Moq;