Update .NET Copilot SDK recipes for explicit permission (fix for SDK v0.1.28) (#1033)

* Update .NET Copilot SDK recipes for explicit permission handling (fix breaking change in SDK v0.1.28)

* Update .NET Copilot SDK recipes for explicit permission handling
This commit is contained in:
Jon Galloway
2026-03-16 18:49:03 -07:00
committed by GitHub
parent 99e00272f8
commit e2c763df88
14 changed files with 78 additions and 26 deletions

View File

@@ -7,9 +7,21 @@ await using var client = new CopilotClient();
await client.StartAsync();
// Create multiple independent sessions
var session1 = await client.CreateSessionAsync(new SessionConfig { Model = "gpt-5" });
var session2 = await client.CreateSessionAsync(new SessionConfig { Model = "gpt-5" });
var session3 = await client.CreateSessionAsync(new SessionConfig { Model = "claude-sonnet-4.5" });
var session1 = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-5",
OnPermissionRequest = PermissionHandler.ApproveAll
});
var session2 = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-5",
OnPermissionRequest = PermissionHandler.ApproveAll
});
var session3 = await client.CreateSessionAsync(new SessionConfig
{
Model = "claude-sonnet-4.5",
OnPermissionRequest = PermissionHandler.ApproveAll
});
Console.WriteLine("Created 3 independent sessions");