Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created May 7, 2026 10:08
Show Gist options
  • Select an option

  • Save wullemsb/30203995cc2be90ad1d5470244bfc843 to your computer and use it in GitHub Desktop.

Select an option

Save wullemsb/30203995cc2be90ad1d5470244bfc843 to your computer and use it in GitHub Desktop.
using GitHub.Copilot.SDK;
await using var client = new CopilotClient();
await using var session = await client.CreateSessionAsync(new SessionConfig
{
Model = "gpt-4.1",
OnPermissionRequest = PermissionHandler.ApproveAll
});
var response = await session.SendAndWaitAsync(new MessageOptions { Prompt = "What does this codebase do?" });
Console.WriteLine(response?.Data.Content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment