Update GitHub.Copilot.SDK to 0.1.25 and use Clone() to replace custom SessionConfig copying

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-22 11:12:43 +00:00
Unverified
parent 51b83c05b9
commit b909cadbd6
3 changed files with 7 additions and 26 deletions
+1 -1
View File
@@ -92,7 +92,7 @@
<PackageVersion Include="Microsoft.SemanticKernel.Agents.AzureAI" Version="1.67.0-preview" />
<PackageVersion Include="Microsoft.SemanticKernel.Plugins.OpenApi" Version="1.67.0" />
<!-- Agent SDKs -->
<PackageVersion Include="GitHub.Copilot.SDK" Version="0.1.23" />
<PackageVersion Include="GitHub.Copilot.SDK" Version="0.1.25" />
<PackageVersion Include="Microsoft.Agents.CopilotStudio.Client" Version="1.3.171-beta" />
<!-- M365 Agents SDK -->
<PackageVersion Include="AdaptiveCards" Version="3.1.0" />
@@ -274,32 +274,13 @@ public sealed class GitHubCopilotAgent : AIAgent, IAsyncDisposable
}
/// <summary>
/// Copies all supported properties from a source <see cref="SessionConfig"/> into a new instance
/// with <see cref="SessionConfig.Streaming"/> set to <c>true</c>.
/// Clones the given <see cref="SessionConfig"/> and sets <see cref="SessionConfig.Streaming"/> to <c>true</c>.
/// </summary>
internal static SessionConfig CopySessionConfig(SessionConfig source)
{
return new SessionConfig
{
Model = source.Model,
ReasoningEffort = source.ReasoningEffort,
Tools = source.Tools,
SystemMessage = source.SystemMessage,
AvailableTools = source.AvailableTools,
ExcludedTools = source.ExcludedTools,
Provider = source.Provider,
OnPermissionRequest = source.OnPermissionRequest,
OnUserInputRequest = source.OnUserInputRequest,
Hooks = source.Hooks,
WorkingDirectory = source.WorkingDirectory,
ConfigDir = source.ConfigDir,
McpServers = source.McpServers,
CustomAgents = source.CustomAgents,
SkillDirectories = source.SkillDirectories,
DisabledSkills = source.DisabledSkills,
InfiniteSessions = source.InfiniteSessions,
Streaming = true
};
SessionConfig copy = source.Clone();
copy.Streaming = true;
return copy;
}
/// <summary>
@@ -137,7 +137,7 @@ public sealed class GitHubCopilotAgentTests
// Assert
Assert.Equal("gpt-4o", result.Model);
Assert.Equal("high", result.ReasoningEffort);
Assert.Same(tools, result.Tools);
Assert.Equal(tools, result.Tools);
Assert.Same(systemMessage, result.SystemMessage);
Assert.Equal(new List<string> { "tool1", "tool2" }, result.AvailableTools);
Assert.Equal(new List<string> { "tool3" }, result.ExcludedTools);
@@ -147,7 +147,7 @@ public sealed class GitHubCopilotAgentTests
Assert.Same(infiniteSessions, result.InfiniteSessions);
Assert.Same(permissionHandler, result.OnPermissionRequest);
Assert.Same(userInputHandler, result.OnUserInputRequest);
Assert.Same(mcpServers, result.McpServers);
Assert.Equal(mcpServers, result.McpServers);
Assert.Equal(new List<string> { "skill1" }, result.DisabledSkills);
Assert.True(result.Streaming);
}