Files
Jon Galloway 1140812aaa Update .NET Copilot SDK cookbook for GitHub.Copilot.SDK 1.0 (#2021)
* Update .NET Copilot SDK cookbook for GitHub.Copilot.SDK 1.0

Align the dotnet copilot-sdk cookbook recipes and docs with the 1.0.1 release:

- Namespace GitHub.Copilot.SDK -> GitHub.Copilot

- MCP config uses Dictionary<string, McpServerConfig> + McpStdioServerConfig (drop Type discriminator)

- StopAsync no longer returns an error list; wrap graceful shutdown in try/catch

- GetMessagesAsync -> GetEventsAsync with event pattern matching

- LogLevel string -> CopilotLogLevel.Error enum

* Address PR review: clarify package/namespace, default event case, MCP stdio wording

- Note that the GitHub.Copilot.SDK package exposes the GitHub.Copilot namespace in each recipe

- Add a default case + note to the GetEventsAsync history example so other event kinds are not silently dropped

- Refine accessibility-report docs to describe a local stdio MCP server (McpStdioServerConfig via npx)

* Address re-review: add using for event types, note StopAsync throw behavior
2026-06-17 14:13:20 +10:00
..
2026-04-06 15:20:20 -04:00

GitHub Copilot Cookbook

A collection of practical recipes and examples for working with GitHub Copilot tools and features. Each recipe provides focused, copy-paste-ready code snippets and real-world examples to help you accomplish common tasks.

What's in the Cookbook

The cookbook is organized by tool or product, with recipes collected by language where applicable:

GitHub Copilot SDK

Ready-to-use recipes for building with the GitHub Copilot SDK across multiple languages.

  • Copilot SDK Cookbook - Recipes for .NET, Go, Java, Node.js, and Python
    • Error handling, session management, file operations, and more
    • Runnable examples for each language
    • Best practices and complete implementation guides

Getting Started

  1. Browse the tool or product folder that matches what you want to build
  2. Find the recipe that solves your use case
  3. Copy the code snippet or check the recipe/ subfolder for complete, runnable examples
  4. Refer to the language-specific documentation for setup and execution instructions

Planned Expansions

The cookbook is designed to grow alongside the GitHub Copilot ecosystem. Future additions may include recipes for:

  • Additional Copilot tools and integrations
  • Advanced patterns and workflows
  • Integration with external services and APIs
  • Language-specific optimizations and best practices

Contributing

Have a recipe to share? We'd love to include it! See CONTRIBUTING.md for guidelines on submitting new recipes.

Resources

Official Documentation

External Cookbooks

Other