diff --git a/dotnet/Directory.Packages.props b/dotnet/Directory.Packages.props index a07bde035b..a91ae973da 100644 --- a/dotnet/Directory.Packages.props +++ b/dotnet/Directory.Packages.props @@ -98,7 +98,7 @@ - + diff --git a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs index bbebd7a312..c8a4ffe028 100644 --- a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs +++ b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs @@ -210,7 +210,7 @@ public sealed class GitHubCopilotAgent : AIAgent, IAsyncDisposable string prompt = string.Join("\n", messages.Select(m => m.Text)); // Handle DataContent as attachments - (List? attachments, tempDir) = await ProcessDataContentAttachmentsAsync( + (List? attachments, tempDir) = await ProcessDataContentAttachmentsAsync( messages, cancellationToken).ConfigureAwait(false); @@ -443,11 +443,11 @@ public sealed class GitHubCopilotAgent : AIAgent, IAsyncDisposable return new SessionConfig { Tools = mappedTools, SystemMessage = systemMessage }; } - private static async Task<(List? Attachments, string? TempDir)> ProcessDataContentAttachmentsAsync( + private static async Task<(List? Attachments, string? TempDir)> ProcessDataContentAttachmentsAsync( IEnumerable messages, CancellationToken cancellationToken) { - List? attachments = null; + List? attachments = null; string? tempDir = null; foreach (ChatMessage message in messages) { @@ -461,7 +461,7 @@ public sealed class GitHubCopilotAgent : AIAgent, IAsyncDisposable string tempFilePath = await dataContent.SaveToAsync(tempDir, cancellationToken).ConfigureAwait(false); attachments ??= []; - attachments.Add(new UserMessageDataAttachmentsItemFile + attachments.Add(new UserMessageAttachmentFile { Path = tempFilePath, DisplayName = Path.GetFileName(tempFilePath) diff --git a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs index 52ea0026dc..2ad1a84fe6 100644 --- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs +++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs @@ -112,7 +112,7 @@ public sealed class GitHubCopilotAgentTests PermissionRequestHandler permissionHandler = (_, _) => Task.FromResult(new PermissionRequestResult()); UserInputHandler userInputHandler = (_, _) => Task.FromResult(new UserInputResponse { Answer = "input" }); var mcpServers = new Dictionary { ["server1"] = new McpLocalServerConfig() }; - + var source = new SessionConfig { Model = "gpt-4o",