Commit Graph
4 Commits
Author SHA1 Message Date
Jon GallowayandCopilot a19b3101cc Update .NET Copilot SDK cookbook for current SDK releases (#3548)
* Update .NET Copilot SDK cookbook: fix On<T> breaking change, add in-process runtime, tool search, and message provenance recipes

- Fix breaking change: Session.On is now generic (On<T> where T : SessionEvent).
  Updated all recipes that used the old non-generic session.On(evt => ...) pattern:
  error-handling, pr-visualization, managing-local-files, accessibility-report,
  ralph-loop (both .md and .cs where applicable).
- Add new 'In-Process Runtime' recipe (in-process-runtime.md + recipe/in-process-runtime.cs)
  demonstrating RuntimeConnection.ForInProcess(), live-tested.
- Document tool search / deferred loading (SessionConfig.ToolSearch / ToolSearchConfig)
  in pr-visualization.md, live-tested.
- Document typed message provenance (MessageOptions.Source / MessageSource) in
  error-handling.md, live-tested.
- Fix dotnet/README.md recipe index: it was missing Ralph Loop and Accessibility
  Report entries; also added the new In-Process Runtime entry.
- Add In-Process Runtime entry to the top-level cookbook/copilot-sdk/README.md
  .NET section.
- Update dotnet/recipe/README.md runnable-examples table with the new recipe.

All existing .NET cookbook recipes were rebuilt and rechecked against the current
GitHub Copilot SDK (Copilot CLI 1.0.85); no other breaking changes were found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Update cookbook model names to current supported models

- Replace stale/nonexistent model IDs (gpt-5, claude-sonnet-4.5,
  claude-opus-4.6, gpt-5.1-codex-mini) with current values from the
  supported AI models list
- Prefer Model = "auto" wherever a specific model isn't load-bearing
  to the recipe's teaching point
- ralph-loop: pin gpt-5.3-codex (current codex-family GA model), since
  a dedicated coding model is a deliberate, documented choice for the
  autonomous loop
- multiple-sessions: reshape the model narrative so it demonstrates a
  real explicit-override use case (A/B testing via claude-sonnet-5)
  instead of two sessions sharing the same hardcoded model

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use SendAndWaitAsync in in-process runtime recipe

Replace the event-based TaskCompletionSource pattern with SendAndWaitAsync so the example waits for the final assistant response, propagates session errors, and uses the SDK timeout behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-22 00:15:06 +00:00
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
Jon Galloway e2c763df88 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
2026-03-17 12:49:03 +11:00
Aaron Powell 2a06b99b9b Add accessibility report cookbook recipe
Add a new cookbook recipe that generates WCAG accessibility reports using
the Playwright MCP server. Includes streaming output, structured report
formatting, and optional Playwright test generation.

- C#, TypeScript, Python, and Go implementations
- Markdown documentation for each language
- Updated cookbook.yml, copilot-sdk README, and package.json
2026-02-12 11:25:49 +11:00