Update .NET Copilot SDK recipes for explicit permission (fix for SDK v0.1.28)#1033
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the .NET Copilot SDK cookbook recipes and their accompanying markdown docs to align with the SDK’s opt-in permission model introduced in v0.1.28, and improves the local-files recipe to be easier/safer to demo by allowing an optional target directory argument.
Changes:
- Added explicit
OnPermissionRequesthandlers to multiple .NET recipe sessions and mirrored those updates in the markdown examples. - Updated the “managing local files” recipe (and docs) to accept an optional CLI folder argument, defaulting to the current directory.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cookbook/copilot-sdk/dotnet/recipe/ralph-loop.cs | Uses explicit permission handler via PermissionHandler.ApproveAll. |
| cookbook/copilot-sdk/dotnet/recipe/pr-visualization.cs | Adds explicit permission handling to the session config. |
| cookbook/copilot-sdk/dotnet/recipe/persisting-sessions.cs | Adds explicit permission handling to the session config. |
| cookbook/copilot-sdk/dotnet/recipe/multiple-sessions.cs | Adds explicit permission handling to each session config. |
| cookbook/copilot-sdk/dotnet/recipe/managing-local-files.cs | Adds permission handling and allows optional folder arg (defaults to CWD). |
| cookbook/copilot-sdk/dotnet/recipe/error-handling.cs | Adds explicit permission handling to the session config. |
| cookbook/copilot-sdk/dotnet/recipe/accessibility-report.cs | Adds explicit permission handling to the session config. |
| cookbook/copilot-sdk/dotnet/ralph-loop.md | Updates snippet(s) to include explicit permission handling. |
| cookbook/copilot-sdk/dotnet/pr-visualization.md | Updates snippet to include explicit permission handling. |
| cookbook/copilot-sdk/dotnet/persisting-sessions.md | Updates snippet to include explicit permission handling. |
| cookbook/copilot-sdk/dotnet/multiple-sessions.md | Updates snippets to include explicit permission handling (plus a heading typo). |
| cookbook/copilot-sdk/dotnet/managing-local-files.md | Documents optional folder argument + permission handling. |
| cookbook/copilot-sdk/dotnet/error-handling.md | Updates snippets + adds note about v0.1.28 opt-in permissions. |
| cookbook/copilot-sdk/dotnet/accessibility-report.md | Updates snippets to include explicit permission handling. |
You can also share your feedback on Copilot code review. Take the survey.
|
@jongalloway - can you retarget this to the |
a56ee4b to
f2d4ae4
Compare
c75b08c to
ab77e8a
Compare
|
It looks like you've incorrectly branched from the You can attempt to fix this with a rebase: If that does not resolve it, you can run |
… breaking change in SDK v0.1.28)
148fb60 to
b70ade3
Compare
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.Description
This PR updates the existing .NET Copilot SDK cookbook recipes and their corresponding markdown examples to match the SDK's opt-in permission model introduced in v0.1.28.
The changes add explicit
OnPermissionRequesthandlers to the affected .NET recipe examples and update the documentation snippets to match. It also updates themanaging-local-filesrecipe so it can optionally take a target directory argument and otherwise default to the current directory, which makes it easier to demo safely.I verified the changes by running the repo build and testing the
managing-local-filesexample against this repository in a dry-run style scenario. The example correctly recognized that the repository should not be reorganized.Type of Contribution
Additional Notes
npm run build,bash scripts/fix-line-endings.sh, andgit diff --check.markdownlintstill reports existing long-line issues in the touched markdown files. Some new long-line warnings are introduced by the added permission-handling snippets, but they were left as-is to keep the cookbook examples simple and readable.By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.