-
Notifications
You must be signed in to change notification settings - Fork 1.2k
.NET: Update to the latest version of GitHub.Copilot.SDK #4151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -137,7 +137,8 @@ public void CopySessionConfig_CopiesAllProperties() | |
| // Assert | ||
| Assert.Equal("gpt-4o", result.Model); | ||
| Assert.Equal("high", result.ReasoningEffort); | ||
| Assert.Same(tools, result.Tools); | ||
| Assert.NotSame(tools, result.Tools); | ||
| Assert.Single(result.Tools!); | ||
|
Comment on lines
+140
to
+141
|
||
| Assert.Same(systemMessage, result.SystemMessage); | ||
| Assert.Equal(new List<string> { "tool1", "tool2" }, result.AvailableTools); | ||
| Assert.Equal(new List<string> { "tool3" }, result.ExcludedTools); | ||
|
|
@@ -147,7 +148,8 @@ public void CopySessionConfig_CopiesAllProperties() | |
| Assert.Same(infiniteSessions, result.InfiniteSessions); | ||
| Assert.Same(permissionHandler, result.OnPermissionRequest); | ||
| Assert.Same(userInputHandler, result.OnUserInputRequest); | ||
| Assert.Same(mcpServers, result.McpServers); | ||
| Assert.NotSame(mcpServers, result.McpServers); | ||
| Assert.Single(result.McpServers!); | ||
| Assert.Equal(new List<string> { "skill1" }, result.DisabledSkills); | ||
| Assert.True(result.Streaming); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CopySessionConfignow callssource.Clone()without validatingsource. Since this file consistently usesThrow.IfNull(...)for argument validation, consider adding an explicit null check so callers get anArgumentNullExceptioninstead of a potentialNullReferenceExceptionif the method is ever reused elsewhere.