From fb313097188761186c2ddee38e363665c835d813 Mon Sep 17 00:00:00 2001
From: Protocol Zero <257158451+Protocol-zero-0@users.noreply.github.com>
Date: Thu, 19 Mar 2026 20:40:32 +0000
Subject: [PATCH 1/2] fix: respect SessionConfig.Streaming in CopySessionConfig
Made-with: Cursor
---
.../GitHubCopilotAgent.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs
index bbebd7a312..99a91dc605 100644
--- a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs
+++ b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft. All rights reserved.
+// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Collections.Generic;
@@ -274,8 +274,8 @@ private ResumeSessionConfig CreateResumeConfig()
}
///
- /// Copies all supported properties from a source into a new instance
- /// with set to true.
+ /// Copies all supported properties from a source into a new instance,
+ /// including .
///
internal static SessionConfig CopySessionConfig(SessionConfig source)
{
@@ -298,13 +298,13 @@ internal static SessionConfig CopySessionConfig(SessionConfig source)
SkillDirectories = source.SkillDirectories,
DisabledSkills = source.DisabledSkills,
InfiniteSessions = source.InfiniteSessions,
- Streaming = true
+ Streaming = source.Streaming
};
}
///
/// Copies all supported properties from a source into a new
- /// with set to true.
+ /// , defaulting to true when source is null.
///
internal static ResumeSessionConfig CopyResumeSessionConfig(SessionConfig? source)
{
@@ -327,7 +327,7 @@ internal static ResumeSessionConfig CopyResumeSessionConfig(SessionConfig? sourc
SkillDirectories = source?.SkillDirectories,
DisabledSkills = source?.DisabledSkills,
InfiniteSessions = source?.InfiniteSessions,
- Streaming = true
+ Streaming = source?.Streaming ?? true
};
}
From a214f4d0c32de7cf5e0b29b766930537e9b549d4 Mon Sep 17 00:00:00 2001
From: Protocol Zero <257158451+Protocol-zero-0@users.noreply.github.com>
Date: Fri, 20 Mar 2026 19:51:51 +0000
Subject: [PATCH 2/2] test: cover false streaming copy behavior
Made-with: Cursor
---
.../GitHubCopilotAgent.cs | 2 +-
.../GitHubCopilotAgentTests.cs | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs
index 99a91dc605..6e3f88ee09 100644
--- a/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs
+++ b/dotnet/src/Microsoft.Agents.AI.GitHub.Copilot/GitHubCopilotAgent.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft. All rights reserved.
+// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Collections.Generic;
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..2089f28524 100644
--- a/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs
+++ b/dotnet/tests/Microsoft.Agents.AI.GitHub.Copilot.UnitTests/GitHubCopilotAgentTests.cs
@@ -1,4 +1,4 @@
-// Copyright (c) Microsoft. All rights reserved.
+// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Collections.Generic;
@@ -129,6 +129,7 @@ public void CopySessionConfig_CopiesAllProperties()
OnUserInputRequest = userInputHandler,
McpServers = mcpServers,
DisabledSkills = ["skill1"],
+ Streaming = false,
};
// Act
@@ -149,7 +150,7 @@ public void CopySessionConfig_CopiesAllProperties()
Assert.Same(userInputHandler, result.OnUserInputRequest);
Assert.Same(mcpServers, result.McpServers);
Assert.Equal(new List { "skill1" }, result.DisabledSkills);
- Assert.True(result.Streaming);
+ Assert.False(result.Streaming);
}
[Fact]
@@ -180,6 +181,7 @@ public void CopyResumeSessionConfig_CopiesAllProperties()
OnUserInputRequest = userInputHandler,
McpServers = mcpServers,
DisabledSkills = ["skill1"],
+ Streaming = false,
};
// Act
@@ -200,7 +202,7 @@ public void CopyResumeSessionConfig_CopiesAllProperties()
Assert.Same(userInputHandler, result.OnUserInputRequest);
Assert.Same(mcpServers, result.McpServers);
Assert.Equal(new List { "skill1" }, result.DisabledSkills);
- Assert.True(result.Streaming);
+ Assert.False(result.Streaming);
}
[Fact]